def __init__(self, sandbox, *args, **kwargs):
QtGui.QMenu.__init__(self, *args, **kwargs)
self.setTitle('Add Source')
self.sandbox = sandbox
backends = set(src.display_backend for src in __sources__)
for ibe, be in enumerate(backends):
self.addSection(be)
for src in [s for s in __sources__
if s.display_backend == be]:
self.addSourceDelegate(src)
if ibe is not len(backends) - 1:
self.addSeparator()
评论列表
文章目录