def __init__(self, key='', name='', template='', parent=None): title = _('Edit rule') if key else _('Create a new rule') Dialog.__init__(self, title=title, name='id-links-rule-editor', parent=parent) self.key.setText(key), self.nw.setText(name), self.template.setText( template or 'http://example.com/{id}')
def __init__(self, parent=None, initial_panel=None): self.initial_panel = initial_panel self.abort_disk_usage = Event() self.restart_needed = False Dialog.__init__(self, _('Export/import all calibre data'), 'exim-calibre', parent=parent)
def __init__(self, parent, source_to_edit=None): self.all_names = {x['name'] for x in parent.all_entries} self.initial_name = self.initial_url = None self.langs = [] if source_to_edit is not None: self.langs = source_to_edit['langs'] self.initial_name = source_to_edit['name'] self.initial_url = source_to_edit['url'] Dialog.__init__(self, _('Edit lookup source'), 'viewer-edit-lookup-location', parent=parent)
def __init__(self, parent=None): self.current_restriction = None Dialog.__init__(self, _('Annotations browser'), 'library-annotations-browser', parent=parent, default_buttons=QDialogButtonBox.StandardButton.Close) self.setAttribute(Qt.WidgetAttribute.WA_DeleteOnClose, False) self.setWindowIcon(QIcon(I('highlight.png')))
def __init__(self, tts_client, ui_settings, backend_settings, parent): self.tts_client = tts_client self.ui_settings = ui_settings self.backend_settings = backend_settings Dialog.__init__(self, _('Configure Read aloud'), 'read-aloud-config', parent, prefs=vprefs)
def __init__(self, file_type='jpeg', parent=None, prefs=oprefs): self.file_type = file_type self.programs = self.find_error = self.selected_entry = None self.select_manually = False Dialog.__init__(self, _('Choose a program'), 'choose-open-with-program-dialog', parent=parent, prefs=prefs) self.found.connect(self.programs_found, type=Qt.ConnectionType.QueuedConnection) self.pi.startAnimation() t = Thread(target=self.find_programs) t.daemon = True t.start()
def __init__(self, file_type='jpeg', parent=None, prefs=oprefs): self.file_type = file_type self.programs = self.find_error = self.selected_entry = None self.select_manually = False Dialog.__init__(self, _('Choose a program'), 'choose-open-with-program-dialog', parent=parent, prefs=prefs) self.found.connect(self.programs_found, type=Qt.QueuedConnection) self.pi.startAnimation() t = Thread(target=self.find_programs) t.daemon = True t.start()
def __init__(self, parent=None, search=None): self.initial_search = search Dialog.__init__(self, _('Add a new Saved search'), 'add-saved-search', parent) from calibre.gui2.ui import get_gui db = get_gui().current_db self.searches = {} for name in db.saved_search_names(): self.searches[name] = db.saved_search_lookup(name) self.search_names = {icu_lower(n) for n in db.saved_search_names()}
def __init__(self, parent=None, search=None): self.initial_search = search Dialog.__init__( self, _('Add a new Saved search'), 'add-saved-search', parent) from calibre.gui2.ui import get_gui db = get_gui().current_db self.searches = {} for name in db.saved_search_names(): self.searches[name] = db.saved_search_lookup(name) self.search_names = {icu_lower(n) for n in db.saved_search_names()}
def __init__(self, parent=None): try: self.current_theme = json.loads(I('icon-theme.json', data=True))['title'] except Exception: self.current_theme = None Dialog.__init__(self, _('Choose an icon theme'), 'choose-icon-theme-dialog', parent) self.themes_downloaded.connect(self.show_themes, type=Qt.QueuedConnection) self.cover_downloaded.connect(self.set_cover, type=Qt.QueuedConnection) self.keep_downloading = True self.commit_changes = None self.new_theme_title = None
def __init__(self, book_title, parent=None, prefs=vprefs): self.book_title = book_title self.default_file_name = sanitize_file_name(book_title[:75] + '.pdf') self.paper_size_map = { a: getattr(QPageSize, a.capitalize()) for a in PAPER_SIZES } Dialog.__init__(self, _('Print to PDF'), 'print-to-pdf', prefs=prefs, parent=parent)
def __init__(self, parent=None, search=None, commit_changes=True, label=None, validate=None): self.initial_search = search self.validate = validate self.label = label self.commit_changes = commit_changes Dialog.__init__( self, _('Add a new Saved search'), 'add-saved-search', parent) from calibre.gui2.ui import get_gui db = get_gui().current_db self.searches = {} for name in db.saved_search_names(): self.searches[name] = db.saved_search_lookup(name) self.search_names = {icu_lower(n):n for n in db.saved_search_names()}
def __init__(self, parent=None): self.loaded_ruleset = None Dialog.__init__(self, self.DIALOG_TITLE, self.PREFS_NAME, parent=parent)
def __init__(self, file_type='jpeg', parent=None): self.file_type = file_type.lower() Dialog.__init__(self, _('Edit the applications for %s files') % file_type.upper(), 'edit-open-with-programs', parent=parent)
def __init__(self, key='', name='', template='', parent=None): title = _('Edit rule') if key else _('Create a new rule') Dialog.__init__(self, title=title, name='id-links-rule-editor', parent=parent) self.key.setText(key), self.nw.setText(name), self.template.setText(template or 'http://example.com/{id}')
def __init__(self, parent=None): Dialog.__init__(self, self.DIALOG_TITLE, self.PREFS_NAME, parent=None)
def __init__(self, rules, parent=None): self.rules = compile_rules(rules) Dialog.__init__(self, self.DIALOG_TITLE, self.PREFS_NAME, parent=parent)
def __init__(self, dest_id, src_ids, gui): self.dest_id, self.src_ids = dest_id, src_ids self.mi = gui.current_db.new_api.get_metadata(dest_id) Dialog.__init__(self, _('Merge books'), 'choose-merge-dialog', parent=gui)
def __init__(self, parent, job): self.job = job self.html_view = hasattr(job, 'html_details') and not getattr( job, 'ignore_html_details', False) Dialog.__init__(self, job.description, 'job-detail-view-dialog', parent)
def __init__(self, parent, locations): self.locations = locations Dialog.__init__(self, _('Choose library'), 'copy_to_choose_library_dialog', parent) self.resort() self.current_changed()
def __init__(self, msg, name, parent, mi): self.msg, self.mi, self.conf_name = msg, mi, name Dialog.__init__(self, _('Are you sure?'), 'confirm-merge-dialog', parent)
def __init__(self, recipe_model, parent=None): self.recipe_model = recipe_model Dialog.__init__(self, _("Add custom news source"), 'add-custom-news-source', parent=parent)
def __init__(self, rules, parent=None): self.rules = rules Dialog.__init__(self, self.DIALOG_TITLE, self.PREFS_NAME, parent=parent)
def __init__(self, rules, parent=None): self.rules = rules Dialog.__init__(self, _('Test tag mapper rules'), 'test-tag-mapper-rules', parent=parent)
def __init__(self, parent=None): Dialog.__init__(self, _('Edit rule'), 'edit-tag-mapper-rule', parent=None)
def __init__(self, parent=None): Dialog.__init__(self, title=_('Create rules for identifiers'), name='id-links-rules-editor', parent=parent)
def __init__(self, parent=None): self.loaded_ruleset = None Dialog.__init__(self, _('Edit tag mapper rules'), 'edit-tag-mapper-rules', parent=parent)
def __init__(self, book_title, parent=None, prefs=vprefs): self.book_title = book_title self.default_file_name = book_title[:75] + '.pdf' self.paper_size_map = {a:getattr(QPageSize, a.capitalize()) for a in PAPER_SIZES} Dialog.__init__(self, _('Print to PDF'), 'print-to-pdf', prefs=prefs, parent=parent)
def __init__(self, parent, text, column_name=None): title = _('Edit "{0}"').format(column_name) if column_name else _('Edit text') Dialog.__init__(self, title, 'edit-plain-text-dialog', parent=parent) self.text = text
def __init__(self, file_type='jpeg', parent=None): self.file_type = file_type.lower() Dialog.__init__(self, _('Edit the applications used for %s files') % file_type.upper(), 'edit-open-with-programs', parent=parent)
def __init__(self, notes, parent=None): self.initial_notes = notes Dialog.__init__(self, name='edit-notes-highlight', title=_('Edit notes'), parent=parent)
def __init__(self, parent, initial_search=None): self.initial_search = initial_search Dialog.__init__( self, _('Manage saved searches'), 'manage-saved-searches', parent)
def __init__(self, db, parent=None): self.db = db Dialog.__init__(self, _('Configure the Book details window'), 'book-details-popup-conf', parent)
def __init__(self, parent, text, column_name=None): title = _('Edit "{0}"').format(column_name) if column_name else _( 'Edit text') Dialog.__init__(self, title, 'edit-plain-text-dialog', parent=parent) self.text = text
def __init__(self, parent, report): self.report = report Dialog.__init__(self, _('Create an icon theme'), 'create-icon-theme', parent)
def __init__(self, notes, parent=None): self.initial_notes = notes Dialog.__init__(self, _('Edit notes for highlight'), 'library-annotations-browser-edit-notes', parent=parent)
def __init__(self, parent, job): self.job = job self.html_view = hasattr(job, 'html_details') and not getattr(job, 'ignore_html_details', False) Dialog.__init__(self, job.description, 'job-detail-view-dialog', parent)
def __init__(self, title, name, parent=None): BaseDialog.__init__(self, title, name, parent=parent, prefs=tprefs)
def __init__(self, parent=None, initial_panel=None): self.initial_panel = initial_panel self.abort_disk_usage = Event() self.restart_needed = False Dialog.__init__(self, _('Export/Import all calibre data'), 'exim-calibre', parent=parent)
def __init__(self, parent=None): Dialog.__init__(self, _('Configure the toolbar'), 'configure-viewer-toolbar', parent=parent, prefs=vprefs)