当前位置: 首页>>代码示例>>Python>>正文


Python Qt.QAbstractTableModel类代码示例

本文整理汇总了Python中PyQt4.Qt.QAbstractTableModel的典型用法代码示例。如果您正苦于以下问题:Python QAbstractTableModel类的具体用法?Python QAbstractTableModel怎么用?Python QAbstractTableModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了QAbstractTableModel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

    def __init__(self, parent=None):
        QAbstractTableModel.__init__(self, parent)
        self.gui_parent = parent

        self.plugins = []
        self.enabled_overrides = {}
        self.cover_overrides = {}
开发者ID:Hainish,项目名称:calibre,代码行数:7,代码来源:metadata_sources.py

示例2: __init__

 def __init__(self, accounts, subjects):
     QAbstractTableModel.__init__(self)
     self.accounts = accounts
     self.subjects = subjects
     self.account_order = sorted(self.accounts.keys())
     self.headers = map(QVariant, [_("Email"), _("Formats"), _("Subject"), _("Auto send")])
     self.default_font = QFont()
     self.default_font.setBold(True)
     self.default_font = QVariant(self.default_font)
     self.tooltips = [NONE] + list(
         map(
             QVariant,
             map(
                 textwrap.fill,
                 [
                     _("Formats to email. The first matching format will be sent."),
                     _(
                         "Subject of the email to use when sending. When left blank "
                         "the title will be used for the subject. Also, the same "
                         'templates used for "Save to disk" such as {title} and '
                         "{author_sort} can be used here."
                     ),
                     "<p>"
                     + _(
                         "If checked, downloaded news will be automatically "
                         "mailed <br>to this email address "
                         "(provided it is in one of the listed formats)."
                     ),
                 ],
             ),
         )
     )
开发者ID:Eksmo,项目名称:calibre,代码行数:32,代码来源:emailp.py

示例3: __init__

 def __init__(self, parent):
     QAbstractTableModel.__init__(self, parent)
     self._data = None
     self._subs = [None]
     self._videos = [None]
     self._headers = [_("Videofile"), _("Subtitle")]
     self._main = None
     self.rowsSelected = None
开发者ID:matachi,项目名称:subdownloader,代码行数:8,代码来源:uploadlistview.py

示例4: __init__

 def __init__(self, parent=None):
     QAbstractTableModel.__init__(self, parent)
     self.counts = (0, 0)
     self.words = {}  # Map of (word, locale) to location data for the word
     self.spell_map = {}  # Map of (word, locale) to dictionaries.recognized(word, locale)
     self.sort_on = (0, False)
     self.items = []  # The currently displayed items
     self.filter_expression = None
     self.show_only_misspelt = True
     self.headers = (_('Word'), _('Count'), _('Language'), _('Misspelled?'))
开发者ID:charliehower,项目名称:calibre,代码行数:10,代码来源:spell.py

示例5: __init__

 def __init__(self, display_plugins):
     QAbstractTableModel.__init__(self)
     self.display_plugins = display_plugins
     self.headers = map(
         QVariant,
         [
             _("Plugin Name"),
             _("Donate"),
             _("Status"),
             _("Installed"),
             _("Available"),
             _("Released"),
             _("Calibre"),
             _("Author"),
         ],
     )
开发者ID:john-peterson,项目名称:calibre,代码行数:16,代码来源:plugin_updater.py

示例6: __init__

    def __init__(self, parent=None):
        QAbstractTableModel.__init__(self, parent)

        self.fields = []
        self.descs = {
                'authors': _('Authors'),
                'comments': _('Comments'),
                'pubdate': _('Published date'),
                'publisher': _('Publisher'),
                'rating' : _('Rating'),
                'tags' : _('Tags'),
                'title': _('Title'),
                'series': _('Series'),
                'languages': _('Languages'),
        }
        self.overrides = {}
        self.exclude = frozenset(['series_index'])
开发者ID:Eksmo,项目名称:calibre,代码行数:17,代码来源:metadata_sources.py

示例7: __init__

    def __init__(self):
        QAbstractTableModel.__init__(self)
        SearchQueryParser.__init__(self, ["all"])

        self.wait_icon = QVariant(QIcon(I("jobs.png")))
        self.running_icon = QVariant(QIcon(I("exec.png")))
        self.error_icon = QVariant(QIcon(I("dialog_error.png")))
        self.done_icon = QVariant(QIcon(I("ok.png")))

        self.jobs = []
        self.add_job = Dispatcher(self._add_job)
        self.server = Server(limit=int(config["worker_limit"] / 2.0), enforce_cpu_limit=config["enforce_cpu_limit"])
        self.threaded_server = ThreadedJobServer()
        self.changed_queue = Queue()

        self.timer = QTimer(self)
        self.timer.timeout.connect(self.update, type=Qt.QueuedConnection)
        self.timer.start(1000)
开发者ID:Eksmo,项目名称:calibre,代码行数:18,代码来源:jobs.py

示例8: __init__

 def __init__(self, accounts, subjects, aliases={}):
     QAbstractTableModel.__init__(self)
     self.accounts = accounts
     self.subjects = subjects
     self.aliases = aliases
     self.account_order = sorted(self.accounts.keys())
     self.headers  = map(QVariant, [_('Email'), _('Formats'), _('Subject'),
         _('Auto send'), _('Alias')])
     self.default_font = QFont()
     self.default_font.setBold(True)
     self.default_font = QVariant(self.default_font)
     self.tooltips =[NONE] + list(map(QVariant, map(textwrap.fill,
         [_('Formats to email. The first matching format will be sent.'),
          _('Subject of the email to use when sending. When left blank '
            'the title will be used for the subject. Also, the same '
            'templates used for "Save to disk" such as {title} and '
            '{author_sort} can be used here.'),
          '<p>'+_('If checked, downloaded news will be automatically '
                  'mailed <br>to this email address '
                  '(provided it is in one of the listed formats).'),
          _('Friendly name to use for this email address')
          ])))
开发者ID:089git,项目名称:calibre,代码行数:22,代码来源:emailp.py

示例9: flags

 def flags(self, index):
     if index.column() == 3:
         return QAbstractTableModel.flags(self, index) | Qt.ItemIsUserCheckable
     else:
         return QAbstractTableModel.flags(self, index) | Qt.ItemIsEditable
开发者ID:Eksmo,项目名称:calibre,代码行数:5,代码来源:emailp.py

示例10: flags

 def flags(self, index):
     flags = QAbstractTableModel.flags(self, index)
     if index.isValid():
         if index.row() == 0:
             flags |= Qt.ItemIsDropEnabled
     return flags
开发者ID:melorca,项目名称:subdownloader,代码行数:6,代码来源:imdblistview.py

示例11: __init__

 def __init__(self, parent):
     QAbstractTableModel.__init__(self, parent)
     self._imdb = []
     self._headers = ["Id"]
     self._main = None
     self.rowSelected = None
开发者ID:melorca,项目名称:subdownloader,代码行数:6,代码来源:imdblistview.py

示例12: headerData

 def headerData(self, section, orientation, role=Qt.DisplayRole):
     if orientation == Qt.Horizontal and role == Qt.DisplayRole:
         return _('Font family') if section == 1 else _('Embedded')
     return QAbstractTableModel.headerData(self, section, orientation, role)
开发者ID:HaraldGustafsson,项目名称:calibre,代码行数:4,代码来源:manage_fonts.py

示例13: __init__

    def __init__(self, parent, bookmarks):
        QAbstractTableModel.__init__(self, parent)

        self.bookmarks = bookmarks[:]
开发者ID:BobPyron,项目名称:calibre,代码行数:4,代码来源:bookmarkmanager.py

示例14: flags

 def flags(self, index):
     flags = QAbstractTableModel.flags(self, index)
     flags |= Qt.ItemIsEditable
     return flags
开发者ID:BobPyron,项目名称:calibre,代码行数:4,代码来源:bookmarkmanager.py

示例15: __init__

 def __init__(self, parent=None):
     QAbstractTableModel.__init__(self, parent)
     self.ls_data = []
开发者ID:whacked,项目名称:UmOkFileIndex,代码行数:3,代码来源:main.py


注:本文中的PyQt4.Qt.QAbstractTableModel类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。