Exemple #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}')
Exemple #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)
Exemple #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)
Exemple #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')))
Exemple #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)
Exemple #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()
Exemple #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()
Exemple #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()}
 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()}
Exemple #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
Exemple #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)
Exemple #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()}
 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()}
Exemple #14
0
 def __init__(self, parent=None):
     self.loaded_ruleset = None
     Dialog.__init__(self, self.DIALOG_TITLE, self.PREFS_NAME, parent=parent)
Exemple #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)
Exemple #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}')
Exemple #17
0
 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)
Exemple #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)
Exemple #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)
Exemple #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()
Exemple #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)
Exemple #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)
Exemple #24
0
 def __init__(self, parent=None):
     self.loaded_ruleset = None
     Dialog.__init__(self, self.DIALOG_TITLE, self.PREFS_NAME, parent=parent)
Exemple #25
0
 def __init__(self, rules, parent=None):
     self.rules = rules
     Dialog.__init__(self, self.DIALOG_TITLE, self.PREFS_NAME, parent=parent)
Exemple #26
0
 def __init__(self, parent=None):
     Dialog.__init__(self, self.DIALOG_TITLE, self.PREFS_NAME, parent=None)
Exemple #27
0
 def __init__(self, rules, parent=None):
     self.rules = rules
     Dialog.__init__(self, _('Test tag mapper rules'), 'test-tag-mapper-rules', parent=parent)
Exemple #28
0
 def __init__(self, parent=None):
     Dialog.__init__(self, _('Edit rule'), 'edit-tag-mapper-rule', parent=None)
Exemple #29
0
 def __init__(self, parent=None):
     Dialog.__init__(self,
                     title=_('Create rules for identifiers'),
                     name='id-links-rules-editor',
                     parent=parent)
Exemple #30
0
 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, recipe_model, parent=None):
     self.recipe_model = recipe_model
     Dialog.__init__(self,
                     _("Add custom news source"),
                     'add-custom-news-source',
                     parent=parent)
Exemple #32
0
 def __init__(self, parent=None):
     self.loaded_ruleset = None
     Dialog.__init__(self, _('Edit tag mapper rules'), 'edit-tag-mapper-rules', parent=parent)
Exemple #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)
Exemple #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
Exemple #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)
Exemple #36
0
 def __init__(self, notes, parent=None):
     self.initial_notes = notes
     Dialog.__init__(self,
                     name='edit-notes-highlight',
                     title=_('Edit notes'),
                     parent=parent)
Exemple #37
0
 def __init__(self, parent=None):
     Dialog.__init__(self, title=_('Create rules for identifiers'), name='id-links-rules-editor', parent=parent)
Exemple #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)
Exemple #39
0
 def __init__(self, rules, parent=None):
     self.rules = rules
     Dialog.__init__(self, self.DIALOG_TITLE, self.PREFS_NAME, parent=parent)
 def __init__(self, parent, initial_search=None):
     self.initial_search = initial_search
     Dialog.__init__(
         self, _('Manage saved searches'), 'manage-saved-searches', parent)
Exemple #41
0
 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, locations):
     self.locations = locations
     Dialog.__init__(self, _('Choose library'),
                     'copy_to_choose_library_dialog', parent)
     self.resort()
     self.current_changed()
Exemple #43
0
 def __init__(self, parent=None):
     Dialog.__init__(self, _('Edit rule'), 'edit-tag-mapper-rule', parent=None)
Exemple #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
Exemple #45
0
 def __init__(self, parent=None):
     self.loaded_ruleset = None
     Dialog.__init__(self, _('Edit tag mapper rules'), 'edit-tag-mapper-rules', parent=parent)
Exemple #46
0
 def __init__(self, parent, report):
     self.report = report
     Dialog.__init__(self, _('Create an icon theme'), 'create-icon-theme', parent)
Exemple #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)
Exemple #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)
Exemple #49
0
 def __init__(self, db, parent=None):
     self.db = db
     Dialog.__init__(self, _('Configure the Book details window'),
                     'book-details-popup-conf', parent)
Exemple #50
0
 def __init__(self, rules, parent=None):
     self.rules = compile_rules(rules)
     Dialog.__init__(self,
                     self.DIALOG_TITLE,
                     self.PREFS_NAME,
                     parent=parent)
Exemple #51
0
 def __init__(self, title, name, parent=None):
     BaseDialog.__init__(self, title, name, parent=parent, prefs=tprefs)
Exemple #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)
Exemple #53
0
 def __init__(self, parent, report):
     self.report = report
     Dialog.__init__(self, _('Create an icon theme'), 'create-icon-theme',
                     parent)
Exemple #54
0
 def __init__(self, parent=None):
     Dialog.__init__(self,
                     _('Configure the toolbar'),
                     'configure-viewer-toolbar',
                     parent=parent,
                     prefs=vprefs)