def __init__(self, wac, icon, text, checkable, view): QAction.__init__(self, QIcon(I(icon + '.png')), text, view) self._page_action = getattr(QWebPage, wac) self.setCheckable(checkable) self.triggered.connect(self.trigger_page_action) view.selectionChanged.connect(self.update_state, type=Qt.QueuedConnection) self.page_action.changed.connect(self.update_state, type=Qt.QueuedConnection) self.update_state()
def __init__(self, wac, icon, text, checkable, view): QAction.__init__(self, QIcon(I(icon+'.png')), text, view) self._page_action = getattr(QWebPage, wac) self.setCheckable(checkable) self.triggered.connect(self.trigger_page_action) view.selectionChanged.connect(self.update_state, type=Qt.QueuedConnection) self.page_action.changed.connect(self.update_state, type=Qt.QueuedConnection) self.update_state()
def __init__(self, path, parent): self.path = path QAction.__init__(self, os.path.basename(path), parent)
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, id_, title, parent): QAction.__init__(self, title, parent) self.id = id_ self.triggered.connect(self._triggered)
def __init__(self, *args): QAction.__init__(self, *args) self.connect(self, SIGNAL('triggered()'), self.correct)
def __init__(self, text, name, view): QAction.__init__(self, text, view) self._name = name self.triggered.connect(self.apply_style)
def __init__(self, clone, parent): QAction.__init__(self, clone.text(), parent) self.clone = clone clone.changed.connect(self.clone_changed)
def __init__(self, *args): QAction.__init__(self, *args) self.triggered.connect( lambda x: self.correct.emit(unicode(self.text())))
def __init__(self, fmt, parent): self.fmt = fmt.replace('ORIGINAL_', '') QAction.__init__(self, _('Restore %s from the original')%self.fmt, parent) self.triggered.connect(self._triggered)
def __init__(self, *args): QAction.__init__(self, *args) self.triggered.connect(lambda x: self.correct.emit( unicode(self.text())))
def __init__(self, fmt, parent): self.fmt = fmt.replace('ORIGINAL_', '') QAction.__init__(self, _('Restore %s from the original') % self.fmt, parent) self.triggered.connect(self._triggered)