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


Python QAbstractTableModel.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from PyQt5.Qt import QAbstractTableModel [as 别名]
# 或者: from PyQt5.Qt.QAbstractTableModel import __init__ [as 别名]
 def __init__(self, accounts, subjects, aliases={}, tags={}):
     QAbstractTableModel.__init__(self)
     self.accounts = accounts
     self.subjects = subjects
     self.aliases = aliases
     self.tags = tags
     self.sorted_on = (0, True)
     self.account_order = self.accounts.keys()
     self.do_sort()
     self.headers  = map(unicode, [_('Email'), _('Formats'), _('Subject'),
         _('Auto send'), _('Alias'), _('Auto send only tags')])
     self.default_font = QFont()
     self.default_font.setBold(True)
     self.default_font = (self.default_font)
     self.tooltips =[None] + list(map(unicode, 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 to this email address '
                  '(provided it is in one of the listed formats and has not been filtered by tags).'),
          _('Friendly name to use for this email address'),
          _('If specified, only news with one of these tags will be sent to'
            ' this email address. All news downloads have their title as a'
            ' tag, so you can use this to easily control which news downloads'
            ' are sent to this email address.')
          ])))
开发者ID:artbycrunk,项目名称:calibre,代码行数:31,代码来源:emailp.py

示例2: __init__

# 需要导入模块: from PyQt5.Qt import QAbstractTableModel [as 别名]
# 或者: from PyQt5.Qt.QAbstractTableModel import __init__ [as 别名]
    def __init__(self, parent=None):
        QAbstractTableModel.__init__(self, parent)
        self.gui_parent = parent

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

示例3: __init__

# 需要导入模块: from PyQt5.Qt import QAbstractTableModel [as 别名]
# 或者: from PyQt5.Qt.QAbstractTableModel import __init__ [as 别名]
 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(unicode, [_("Email"), _("Formats"), _("Subject"), _("Auto send"), _("Alias")])
     self.default_font = QFont()
     self.default_font.setBold(True)
     self.default_font = self.default_font
     self.tooltips = [None] + list(
         map(
             unicode,
             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:mirror,项目名称:calibre,代码行数:36,代码来源:emailp.py

示例4: __init__

# 需要导入模块: from PyQt5.Qt import QAbstractTableModel [as 别名]
# 或者: from PyQt5.Qt.QAbstractTableModel import __init__ [as 别名]
    def __init__(self, parent=None, columns_to_center=[], *args):
        """
        datain: a list of lists
        headerdata: a list of strings
        """
        QAbstractTableModel.__init__(self, parent, *args)
        self.arraydata = parent.tabledata
        self.centered_columns = columns_to_center
        self.headerdata = parent.annotations_header
        self.show_confidence_colors = parent.show_confidence_colors

        self.AUTHOR_COL = parent.AUTHOR_COL
        self.CONFIDENCE_COL = parent.CONFIDENCE_COL
        self.ENABLED_COL = parent.ENABLED_COL
        self.LAST_ANNOTATION_COL = parent.LAST_ANNOTATION_COL
        self.READER_APP_COL = parent.READER_APP_COL
        self.TITLE_COL = parent.TITLE_COL
开发者ID:mkarpiarz,项目名称:calibre-annotations,代码行数:19,代码来源:annotated_books.py

示例5: __init__

# 需要导入模块: from PyQt5.Qt import QAbstractTableModel [as 别名]
# 或者: from PyQt5.Qt.QAbstractTableModel import __init__ [as 别名]
    def __init__(self):
        QAbstractTableModel.__init__(self)
        SearchQueryParser.__init__(self, ['all'])

        self.wait_icon     = (QIcon(I('jobs.png')))
        self.running_icon  = (QIcon(I('exec.png')))
        self.error_icon    = (QIcon(I('dialog_error.png')))
        self.done_icon     = (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:kba,项目名称:calibre,代码行数:21,代码来源:jobs.py

示例6: __init__

# 需要导入模块: from PyQt5.Qt import QAbstractTableModel [as 别名]
# 或者: from PyQt5.Qt.QAbstractTableModel import __init__ [as 别名]
 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(unicode, [_('Email'), _('Formats'), _('Subject'),
         _('Auto send'), _('Alias')])
     self.default_font = QFont()
     self.default_font.setBold(True)
     self.default_font = (self.default_font)
     self.tooltips =[None] + list(map(unicode, 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:AtulKumar2,项目名称:calibre,代码行数:24,代码来源:emailp.py

示例7: __init__

# 需要导入模块: from PyQt5.Qt import QAbstractTableModel [as 别名]
# 或者: from PyQt5.Qt.QAbstractTableModel import __init__ [as 别名]
 def __init__(self, display_plugins):
     QAbstractTableModel.__init__(self)
     self.display_plugins = display_plugins
     self.headers = list(map(unicode_type, [_('Plugin name'), _('Donate'), _('Status'), _('Installed'),
                                   _('Available'), _('Released'), _('calibre'), _('Author')]))
开发者ID:j-howell,项目名称:calibre,代码行数:7,代码来源:plugin_updater.py

示例8: __init__

# 需要导入模块: from PyQt5.Qt import QAbstractTableModel [as 别名]
# 或者: from PyQt5.Qt.QAbstractTableModel import __init__ [as 别名]
 def __init__(self, parent=None):
     QAbstractTableModel.__init__(self, parent)
     self.items = []
     self.font_data = {}
     self.sorted_on = ('name', True)
开发者ID:JimmXinu,项目名称:calibre,代码行数:7,代码来源:manage_fonts.py

示例9: __init__

# 需要导入模块: from PyQt5.Qt import QAbstractTableModel [as 别名]
# 或者: from PyQt5.Qt.QAbstractTableModel import __init__ [as 别名]
 def __init__(self, parent, books = [], db = None):
     QAbstractTableModel.__init__(self, parent)
     self.db = db
     self.books = self.makeMetadataFromParsedOpds(books)
     self.filterBooks()
开发者ID:sbobovyc,项目名称:opds-reader,代码行数:7,代码来源:model.py

示例10: __init__

# 需要导入模块: from PyQt5.Qt import QAbstractTableModel [as 别名]
# 或者: from PyQt5.Qt.QAbstractTableModel import __init__ [as 别名]
 def __init__(self, results, parent=None):
     QAbstractTableModel.__init__(self, parent)
     self.results = results
     self.yes_icon = (QIcon(I('ok.png')))
开发者ID:j-howell,项目名称:calibre,代码行数:6,代码来源:single_download.py

示例11: __init__

# 需要导入模块: from PyQt5.Qt import QAbstractTableModel [as 别名]
# 或者: from PyQt5.Qt.QAbstractTableModel import __init__ [as 别名]
 def __init__(self, parent=None):
     self.files = self.sort_keys = ()
     self.total_size = 0
     QAbstractTableModel.__init__(self, parent)
开发者ID:thuvh,项目名称:calibre,代码行数:6,代码来源:reports.py


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