Пример #1
0
 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}')
Пример #2
0
 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)
Пример #3
0
 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)
Пример #4
0
 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')))
Пример #5
0
 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)
Пример #6
0
 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()
Пример #7
0
 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()
Пример #8
0
 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()}
Пример #9
0
 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()}
Пример #10
0
 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
Пример #11
0
 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)
Пример #12
0
 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()}
Пример #13
0
 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()}
Пример #14
0
 def __init__(self, parent=None):
     self.loaded_ruleset = None
     Dialog.__init__(self, self.DIALOG_TITLE, self.PREFS_NAME, parent=parent)
Пример #15
0
 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)
Пример #16
0
 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}')
Пример #17
0
 def __init__(self, parent=None):
     Dialog.__init__(self, self.DIALOG_TITLE, self.PREFS_NAME, parent=None)
Пример #18
0
 def __init__(self, rules, parent=None):
     self.rules = compile_rules(rules)
     Dialog.__init__(self, self.DIALOG_TITLE, self.PREFS_NAME, parent=parent)
Пример #19
0
 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)
Пример #20
0
 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)
Пример #21
0
 def __init__(self, parent, locations):
     self.locations = locations
     Dialog.__init__(self, _('Choose library'), 'copy_to_choose_library_dialog', parent)
     self.resort()
     self.current_changed()
Пример #22
0
 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)
Пример #23
0
 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)
Пример #24
0
 def __init__(self, parent=None):
     self.loaded_ruleset = None
     Dialog.__init__(self, self.DIALOG_TITLE, self.PREFS_NAME, parent=parent)
Пример #25
0
 def __init__(self, rules, parent=None):
     self.rules = rules
     Dialog.__init__(self, self.DIALOG_TITLE, self.PREFS_NAME, parent=parent)
Пример #26
0
 def __init__(self, parent=None):
     Dialog.__init__(self, self.DIALOG_TITLE, self.PREFS_NAME, parent=None)
Пример #27
0
 def __init__(self, rules, parent=None):
     self.rules = rules
     Dialog.__init__(self, _('Test tag mapper rules'), 'test-tag-mapper-rules', parent=parent)
Пример #28
0
 def __init__(self, parent=None):
     Dialog.__init__(self, _('Edit rule'), 'edit-tag-mapper-rule', parent=None)
Пример #29
0
 def __init__(self, parent=None):
     Dialog.__init__(self,
                     title=_('Create rules for identifiers'),
                     name='id-links-rules-editor',
                     parent=parent)
Пример #30
0
 def __init__(self, rules, parent=None):
     self.rules = rules
     Dialog.__init__(self, _('Test tag mapper rules'), 'test-tag-mapper-rules', parent=parent)
Пример #31
0
 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)
Пример #32
0
 def __init__(self, parent=None):
     self.loaded_ruleset = None
     Dialog.__init__(self, _('Edit tag mapper rules'), 'edit-tag-mapper-rules', parent=parent)
Пример #33
0
 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)
Пример #34
0
 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
Пример #35
0
 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)
Пример #36
0
 def __init__(self, notes, parent=None):
     self.initial_notes = notes
     Dialog.__init__(self,
                     name='edit-notes-highlight',
                     title=_('Edit notes'),
                     parent=parent)
Пример #37
0
 def __init__(self, parent=None):
     Dialog.__init__(self, title=_('Create rules for identifiers'), name='id-links-rules-editor', parent=parent)
Пример #38
0
 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)
Пример #39
0
 def __init__(self, rules, parent=None):
     self.rules = rules
     Dialog.__init__(self, self.DIALOG_TITLE, self.PREFS_NAME, parent=parent)
Пример #40
0
 def __init__(self, parent, initial_search=None):
     self.initial_search = initial_search
     Dialog.__init__(
         self, _('Manage saved searches'), 'manage-saved-searches', parent)
Пример #41
0
 def __init__(self, db, parent=None):
     self.db = db
     Dialog.__init__(self, _('Configure the Book details window'), 'book-details-popup-conf', parent)
Пример #42
0
 def __init__(self, parent, locations):
     self.locations = locations
     Dialog.__init__(self, _('Choose library'),
                     'copy_to_choose_library_dialog', parent)
     self.resort()
     self.current_changed()
Пример #43
0
 def __init__(self, parent=None):
     Dialog.__init__(self, _('Edit rule'), 'edit-tag-mapper-rule', parent=None)
Пример #44
0
 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
Пример #45
0
 def __init__(self, parent=None):
     self.loaded_ruleset = None
     Dialog.__init__(self, _('Edit tag mapper rules'), 'edit-tag-mapper-rules', parent=parent)
Пример #46
0
 def __init__(self, parent, report):
     self.report = report
     Dialog.__init__(self, _('Create an icon theme'), 'create-icon-theme', parent)
Пример #47
0
 def __init__(self, notes, parent=None):
     self.initial_notes = notes
     Dialog.__init__(self,
                     _('Edit notes for highlight'),
                     'library-annotations-browser-edit-notes',
                     parent=parent)
Пример #48
0
 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)
Пример #49
0
 def __init__(self, db, parent=None):
     self.db = db
     Dialog.__init__(self, _('Configure the Book details window'),
                     'book-details-popup-conf', parent)
Пример #50
0
 def __init__(self, rules, parent=None):
     self.rules = compile_rules(rules)
     Dialog.__init__(self,
                     self.DIALOG_TITLE,
                     self.PREFS_NAME,
                     parent=parent)
Пример #51
0
 def __init__(self, title, name, parent=None):
     BaseDialog.__init__(self, title, name, parent=parent, prefs=tprefs)
Пример #52
0
 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)
Пример #53
0
 def __init__(self, parent, report):
     self.report = report
     Dialog.__init__(self, _('Create an icon theme'), 'create-icon-theme',
                     parent)
Пример #54
0
 def __init__(self, parent=None):
     Dialog.__init__(self,
                     _('Configure the toolbar'),
                     'configure-viewer-toolbar',
                     parent=parent,
                     prefs=vprefs)