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))
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)
def __init__(self, id_, title, parent): QAction.__init__(self, title, parent) self.id = id_ self.triggered.connect(self._triggered)
def __init__(self, mb): QAction.__init__(self, mb)
def __init__(self, text, key, ascending, parent): QAction.__init__(self, text, parent) self.key, self.ascending = key, ascending self.triggered.connect(self)
def __init__(self, clone, parent): QAction.__init__(self, clone.text(), parent) self.clone = clone clone.changed.connect(self.clone_changed)