コード例 #1
0
    def __init__(self, editor, parent, model, popup_checkable=False, *args):
        self.editor = editor
        self.model_root = self.editor.message_model
        self.tr = editor.tr

        self.__model = model
        coltext1 = self._get_coltext1()
        coltext2 = self._get_coltext2()

        sibling = self.find_predecessor(parent)
        if sibling:
            qt.QListViewItem.__init__(self, parent, sibling, coltext1, coltext2, *args)
        else:
            qt.QListViewItem.__init__(self, parent, coltext1, coltext2, *args)

        MenuProvider.__init__(self, editor, title=coltext1,
                              checkable=popup_checkable or bool(self.FLAG_NAMES))

        self.setPixmap(0, self.PIXMAP)
        self._enable_renaming()
        self._enable_drag()
コード例 #2
0
 def __init__(self, iconview, editor, popup_title=None):
     self._iconview, self._edsm_editor = iconview, editor
     self.tr = self._edsm_editor.tr
     MenuProvider.__init__(self, iconview, popup_title)
コード例 #3
0
 def __init__(self):
     MenuProvider.__init__(self)
     self.message_listview.setSorting(-1)
     self.__setup_icons()