def __init__(self, candidate, parent=None): self.candidate = candidate self.filename = None Dialog.__init__(self, _('Choose file name'), 'choose-file-name', parent=parent)
def __init__(self, parent, force_entire_book=False): self.prefs = self.prefsPrep() self.parent = parent self.force_entire_book = force_entire_book self.criteria = None Dialog.__init__(self, _('Chinese Conversion'), 'chinese_conversion_dialog', parent)
def __init__(self, old_family, embedded_families, parent=None): self.old_family = old_family self.local_families = {icu_lower(f) for f in font_scanner.find_font_families()} | { icu_lower(f) for f in embedded_families} Dialog.__init__(self, _('Change font'), 'change-font-family', parent=parent) self.setMinimumWidth(300) self.resize(self.sizeHint())
def __init__(self, parent): self.prefs = self.prefsPrep() self.criteria = None self.parent = parent self.help_file_name = '{0}_smarten_help.html'.format(PLUGIN_SAFE_NAME) Dialog.__init__(self, _('Smarten Punctuation (the sequel)'), 'toolbag_smarter_dialog', parent)
def __init__(self, parent): from calibre_plugins.diaps_toolbag.span_div_config import plugin_prefs as prefs self.criteria = None self.prefs = prefs self.parent = parent self.help_file_name = '{0}_span_div_help.html'.format(PLUGIN_SAFE_NAME) self.taglist = TAGLIST Dialog.__init__(self, _('Edit Spans & Divs'), 'toolbag_spans_divs_dialog', parent)
def __init__(self, revert_button_msg=None, parent=None, show_open_in_editor=False): self.context = 3 self.beautify = False self.apply_diff_calls = [] self.show_open_in_editor = show_open_in_editor self.revert_button_msg = revert_button_msg Dialog.__init__(self, _('Differences between books'), 'diff-dialog', parent=parent) self.view.line_activated.connect(self.line_activated)
def __init__(self, parent=None): self.resources_replaced = False self.show_diff = False Dialog.__init__(self, _('Download external resources'), 'download-external-resources', parent) self.state = 0 self.get_done.connect(self._get_done) self.download_done.connect(self._download_done) self.replace_done.connect(self._replace_done) self.progress.connect(self.download_status.progress, type=Qt.ConnectionType.QueuedConnection)
def __init__(self, parent=None): self.resources_replaced = False self.show_diff = False Dialog.__init__(self, _('Download external resources'), 'download-external-resources', parent) self.state = 0 self.get_done.connect(self._get_done) self.download_done.connect(self._download_done) self.replace_done.connect(self._replace_done) self.progress.connect(self.download_status.progress, type=Qt.QueuedConnection)
def __init__(self, parent=None, for_browsing=False): self.for_browsing = for_browsing Dialog.__init__( self, _('Images in book') if for_browsing else _('Choose an image'), 'browse-image-dialog' if for_browsing else 'insert-image-dialog', parent) self.chosen_image = None self.chosen_image_is_external = False
def __init__(self, revert_button_msg=None, parent=None, show_open_in_editor=False, show_as_window=False): self.context = 3 self.beautify = False self.apply_diff_calls = [] self.show_open_in_editor = show_open_in_editor self.revert_button_msg = revert_button_msg Dialog.__init__(self, _('Differences between books'), 'diff-dialog', parent=parent) if show_as_window: self.setWindowFlags(Qt.Window) self.view.line_activated.connect(self.line_activated)
def __init__(self, names=None, jpeg_quality=None, parent=None): self.names, self.jpeg_quality = names, jpeg_quality self.keep_going = True self.result = (None, '') Dialog.__init__(self, _('Compressing images...'), 'compress-images-progress', parent=parent) self.gui_loop.connect(self.update_progress, type=Qt.ConnectionType.QueuedConnection) self.cidone.connect(self.accept, type=Qt.ConnectionType.QueuedConnection) t = Thread(name='RunCompressImages', target=self.run_compress) t.daemon = True t.start()
def __init__(self, names=None, jpeg_quality=None, parent=None): self.names, self.jpeg_quality = names, jpeg_quality self.keep_going = True self.result = (None, '') Dialog.__init__(self, _('Compressing Images...'), 'compress-images-progress', parent=parent) self.gui_loop.connect(self.update_progress, type=Qt.QueuedConnection) self.cidone.connect(self.accept, type=Qt.QueuedConnection) t = Thread(name='RunCompressImages', target=self.run_compress) t.daemon = True t.start()
def __init__(self, search=None, search_index=-1, parent=None, state=None): self.search = search or {} self.original_name = self.search.get('name', None) self.search_index = search_index Dialog.__init__(self, _('Edit search'), 'edit-saved-search', parent=parent) if state is not None: self.find.setText(state['find']) self.replace.setText(state['replace']) self.case_sensitive.setChecked(state['case_sensitive']) self.dot_all.setChecked(state['dot_all'])
def __init__(self, parent=None, for_browsing=False): self.for_browsing = for_browsing Dialog.__init__( self, _("Images in book") if for_browsing else _("Choose an image"), "browse-image-dialog" if for_browsing else "insert-image-dialog", parent, ) self.chosen_image = None self.chosen_image_is_external = False
def __init__(self, revert_button_msg=None, parent=None, show_open_in_editor=False, show_as_window=False): self.context = 3 self.beautify = False self.apply_diff_calls = [] self.show_open_in_editor = show_open_in_editor self.revert_button_msg = revert_button_msg Dialog.__init__(self, _('Differences between books'), 'diff-dialog', parent=parent) self.setWindowFlags(self.windowFlags() | Qt.WindowMinMaxButtonsHint) if show_as_window: self.setWindowFlags(Qt.Window) self.view.line_activated.connect(self.line_activated)
def __init__(self, parent=None): self.__current_word = None self.thread = None self.cancel = False dictionaries.initialize() self.current_word_changed_timer = t = QTimer() t.timeout.connect(self.do_current_word_changed) t.setSingleShot(True), t.setInterval(100) Dialog.__init__(self, _('Check spelling'), 'spell-check', parent) self.work_finished.connect(self.work_done, type=Qt.QueuedConnection) self.setAttribute(Qt.WA_DeleteOnClose, False)
def __init__(self, search=None, search_index=-1, parent=None, state=None): self.search = search or {} self.original_name = self.search.get('name', None) self.search_index = search_index Dialog.__init__(self, _('Edit search'), 'edit-saved-search', parent=parent) if state is not None: self.find.setText(state['find']) self.replace.setText(state['replace']) self.case_sensitive.setChecked(state['case_sensitive']) self.dot_all.setChecked(state['dot_all']) self.mode_box.mode = state.get('mode')
def __init__(self, parent=None): self.fmt = 'epub' Dialog.__init__(self, _('Create new book'), 'create-new-book', parent=parent)
def __init__(self, candidate, parent=None): self.candidate = candidate self.filename = None Dialog.__init__(self, _("Choose file name"), "choose-file-name", parent=parent)
def __init__(self, parent=None): Dialog.__init__(self, _("Create/edit custom theme"), "custom-theme-editor", parent=parent)
def __init__(self, parent, files): self.files = files Dialog.__init__(self, _('Changed Files'), 'toolbag_show_results_dialog', parent)
def __init__(self, func_name='', parent=None): self._func_name = func_name Dialog.__init__(self, _('Create/edit a function'), 'edit-sr-func', parent=parent)
def __init__(self, parent=None): self.initialized = False Dialog.__init__(self, _('Insert character'), 'charmap_dialog', parent) self.setWindowIcon(QIcon(I('character-set.png'))) self.setFocusProxy(parent)
def __init__(self, parent=None): self.initialized = False Dialog.__init__(self, _('Insert character'), 'charmap_dialog', parent) self.setWindowIcon(QIcon(I('character-set.png'))) self.focus_widget = None
def __init__(self, parent=None): self.ignore_changes = False Dialog.__init__(self, _('Customize templates'), 'customize-templates', parent=parent)
def __init__(self, parent=None): Dialog.__init__(self, _("Manage Fonts"), "manage-fonts", parent=parent)
def __init__(self, parent=None): Dialog.__init__(self, _('Create/edit custom theme'), 'custom-theme-editor', parent=parent)
def __init__(self, parent=None): Dialog.__init__(self, _('Create custom theme'), 'custom-theme-create', parent=parent)
def __init__(self, parent=None): Dialog.__init__(self, _('Check external links'), 'check-external-links-dialog', parent) self.progress_made.connect(self.on_progress_made, type=Qt.ConnectionType.QueuedConnection)
def __init__(self, gui): self.gui = gui self.qlinedit_widgets = {} Dialog.__init__(self, _('Edit Spans & Divs Customization'), '{}plugin:spandiv_config'.format(PLUGIN_SAFE_NAME), gui)
def __init__(self, parent=None): Dialog.__init__(self, 'Debug output', 'sr-function-debug-output') self.setAttribute(Qt.WA_DeleteOnClose, False)
def __init__(self, parent=None): self.ignore_changes = False Dialog.__init__(self, _("Customize templates"), "customize-templates", parent=parent)
def __init__(self, parent=None): Dialog.__init__(self, _('Compress images'), 'compress-images', parent=parent)
def __init__(self, parent=None): Dialog.__init__(self, _('Create/edit snippets'), 'snippet-editor', parent=parent) self.setWindowIcon(QIcon(I('snippets.png')))
def __init__(self, parent=None): Dialog.__init__(self, _('Compress Images'), 'compress-images', parent=parent)
def __init__(self, parent=None): Dialog.__init__(self, _('Manage Fonts'), 'manage-fonts', parent=parent)
def __init__(self, parent=None, for_browsing=False): self.for_browsing = for_browsing Dialog.__init__(self, _('Images in book') if for_browsing else _('Choose an image'), 'browse-image-dialog' if for_browsing else 'insert-image-dialog', parent) self.chosen_image = None self.chosen_image_is_external = False
def __init__(self, msg=None, parent=None): self.msg = msg Dialog.__init__(self, _('Choose folder'), 'choose-folder', parent=parent)
def __init__(self, parent=None): Dialog.__init__(self, _("Create custom theme"), "custom-theme-create", parent=parent)
def __init__(self, parent=None): Dialog.__init__(self, _('Saved Searches'), 'saved-searches', parent=parent)
def __init__(self, parent=None): Dialog.__init__(self, _('Check external links'), 'check-external-links-dialog', parent) self.progress_made.connect(self.on_progress_made, type=Qt.QueuedConnection)
def __init__(self, parent=None): Dialog.__init__(self, _('Reports'), 'reports-dialog', parent=parent) self.data_gathered.connect(self.display_data, type=Qt.QueuedConnection) self.setAttribute(Qt.WA_DeleteOnClose, False) self.setWindowIcon(QIcon(I('reports.png')))
def __init__(self, family, faces, parent=None): Dialog.__init__(self, _('Font faces for %s') % family, 'editor-embedding-data', parent) self.family, self.faces = family, faces self.populate_text()