def __init__(self, parent=None): QAbstractTableModel.__init__(self, parent) self.gui_parent = parent self.plugins = [] self.enabled_overrides = {} self.cover_overrides = {}
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)." ), ], ), ) )
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).') ])))
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
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?'))
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') ])
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"), ], )
def flags(self, index): """ return the item flags """ if not index.isValid(): return Qt.ItemIsEnabled return Qt.ItemFlags(QAbstractTableModel.flags(self, index))
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'])
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'])
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)
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)
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') ])))
def flags(self, index): if index.column() == 3: return QAbstractTableModel.flags(self, index) | Qt.ItemIsUserCheckable else: return QAbstractTableModel.flags(self, index) | Qt.ItemIsEditable
def __init__(self, results, parent=None): QAbstractTableModel.__init__(self, parent) self.results = results self.yes_icon = QVariant(QIcon(I('ok.png')))
def flags(self, index): flags = QAbstractTableModel.flags(self, index) if index.isValid(): if index.row() == 0: flags |= Qt.ItemIsDropEnabled return flags
def __init__(self, parent): QAbstractTableModel.__init__(self, parent) self._imdb = [] self._headers = ["Id"] self._main = None self.rowSelected = None
def __init__(self, parent=None): QAbstractTableModel.__init__(self, parent) self.ls_data = []
def flags(self, index): ans = QAbstractTableModel.flags(self, index) return ans | Qt.ItemIsUserCheckable
def flags(self, index): col = index.column() ans = QAbstractTableModel.flags(self, index) if col == 0: return ans | Qt.ItemIsUserCheckable return Qt.ItemIsEditable | ans
def flags(self, index): flags = QAbstractTableModel.flags(self, index) flags |= Qt.ItemIsEditable return flags
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')])
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)
def __init__(self, parent, bookmarks): QAbstractTableModel.__init__(self, parent) self.bookmarks = bookmarks[:]
def __init__(self, parent=None): QAbstractTableModel.__init__(self, parent) self.items = [] self.font_data = {} self.sorted_on = ('name', True)