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()
示例#2
0
 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()
示例#3
0
文件: main.py 项目: kmshi/calibre
 def __init__(self, path, parent):
     self.path = path
     QAction.__init__(self, os.path.basename(path), parent)
示例#4
0
文件: sort.py 项目: fraga/calibre
 def __init__(self, text, key, ascending, parent):
     QAction.__init__(self, text, parent)
     self.key, self.ascending = key, ascending
     self.triggered.connect(self)
示例#5
0
 def __init__(self, id_, title, parent):
     QAction.__init__(self, title, parent)
     self.id = id_
     self.triggered.connect(self._triggered)
示例#6
0
 def __init__(self, *args):
     QAction.__init__(self, *args)
     self.connect(self, SIGNAL('triggered()'), self.correct)
示例#7
0
文件: sort.py 项目: smalldek/calibre
 def __init__(self, text, key, ascending, parent):
     QAction.__init__(self, text, parent)
     self.key, self.ascending = key, ascending
     self.triggered.connect(self)
示例#8
0
 def __init__(self, text, name, view):
     QAction.__init__(self, text, view)
     self._name = name
     self.triggered.connect(self.apply_style)
示例#9
0
文件: bars.py 项目: 089git/calibre
 def __init__(self, clone, parent):
     QAction.__init__(self, clone.text(), parent)
     self.clone = clone
     clone.changed.connect(self.clone_changed)
示例#10
0
 def __init__(self, clone, parent):
     QAction.__init__(self, clone.text(), parent)
     self.clone = clone
     clone.changed.connect(self.clone_changed)
示例#11
0
 def __init__(self, id_, title, parent):
     QAction.__init__(self, title, parent)
     self.id = id_
     self.triggered.connect(self._triggered)
示例#12
0
    def __init__(self, *args):
        QAction.__init__(self, *args)

        self.triggered.connect(
            lambda x: self.correct.emit(unicode(self.text())))
示例#13
0
 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)
示例#15
0
 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)
示例#16
0
    def __init__(self, *args):
        QAction.__init__(self, *args)
 
        self.triggered.connect(lambda x: self.correct.emit(
            unicode(self.text())))
示例#17
0
 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)