예제 #1
0
 def __init__(self, text, key, ascending, parent):
     QAction.__init__(self, text, parent)
     self.key, self.ascending = key, ascending
     self.triggered.connect(self)
     ic = category_icon_map['custom:'] if self.key.startswith('#') else category_icon_map.get(key)
     if ic:
         self.setIcon(QIcon.ic(ic))
예제 #2
0
 def __init__(self, clone, parent, is_top_level=False, clone_shortcuts=True):
     QAction.__init__(self, clone.text().replace('&&', '&'), parent)
     self.setMenuRole(QAction.MenuRole.NoRole)  # ensure this action is not moved around by Qt
     self.is_top_level = is_top_level
     self.clone_shortcuts = clone_shortcuts
     self.clone = clone
     clone.changed.connect(self.clone_changed)
     self.clone_changed()
     self.triggered.connect(self.do_trigger)
예제 #3
0
파일: view.py 프로젝트: smdx023/calibre
 def __init__(self, id_, title, parent):
     QAction.__init__(self, title, parent)
     self.id = id_
     self.triggered.connect(self._triggered)
예제 #4
0
 def __init__(self, mb):
     QAction.__init__(self, mb)
예제 #5
0
파일: sort.py 프로젝트: zmshan2008/calibre
 def __init__(self, text, key, ascending, parent):
     QAction.__init__(self, text, parent)
     self.key, self.ascending = key, ascending
     self.triggered.connect(self)
예제 #6
0
 def __init__(self, clone, parent):
     QAction.__init__(self, clone.text(), parent)
     self.clone = clone
     clone.changed.connect(self.clone_changed)