From 3f0e2c389c96666af8a4bb0b8417388121c82ed0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 4 May 2009 19:19:47 -0700 Subject: [PATCH] GUI for comic input --- src/calibre/gui2/convert/comic_input.py | 28 +++ src/calibre/gui2/convert/comic_input.ui | 304 ++++++++++++++++++++++++ src/calibre/gui2/convert/single.py | 4 +- 3 files changed, 334 insertions(+), 2 deletions(-) create mode 100644 src/calibre/gui2/convert/comic_input.py create mode 100644 src/calibre/gui2/convert/comic_input.ui diff --git a/src/calibre/gui2/convert/comic_input.py b/src/calibre/gui2/convert/comic_input.py new file mode 100644 index 0000000000..00e095fb2a --- /dev/null +++ b/src/calibre/gui2/convert/comic_input.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python +# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai +from __future__ import with_statement + +__license__ = 'GPL v3' +__copyright__ = '2009, Kovid Goyal ' +__docformat__ = 'restructuredtext en' + + +from calibre.gui2.convert.comic_input_ui import Ui_Form +from calibre.gui2.convert import Widget + +class PluginWidget(Widget, Ui_Form): + + TITLE = _('Comic Input') + + def __init__(self, parent, get_option, get_help, db=None, book_id=None): + Widget.__init__(self, parent, 'comic_input', + ['colors', 'dont_normalize', 'keep_aspect_ratio', 'right2left', + 'despeckle', 'no_sort', 'no_process', 'landscape', + 'dont_sharpen', 'disable_trim', 'wide'] + ) + self.db, self.book_id = db, book_id + self.initialize_options(get_option, get_help, db, book_id) + self.opt_no_process.toggle() + self.opt_no_process.toggle() + + diff --git a/src/calibre/gui2/convert/comic_input.ui b/src/calibre/gui2/convert/comic_input.ui new file mode 100644 index 0000000000..2ca98fa7b4 --- /dev/null +++ b/src/calibre/gui2/convert/comic_input.ui @@ -0,0 +1,304 @@ + + + Form + + + + 0 + 0 + 599 + 305 + + + + Form + + + + + + &Number of Colors: + + + opt_colors + + + + + + + 8 + + + 3200000 + + + 8 + + + + + + + Disable &normalize + + + + + + + Keep &aspect ratio + + + + + + + Disable &Sharpening + + + + + + + Disable &Trimming + + + + + + + &Wide + + + + + + + &Landscape + + + + + + + &Right to left + + + + + + + Don't so&rt + + + + + + + De&speckle + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + &Disable comic processing + + + + + + + + + opt_no_process + toggled(bool) + label_3 + setDisabled(bool) + + + 184 + 11 + + + 210 + 44 + + + + + opt_no_process + toggled(bool) + opt_colors + setDisabled(bool) + + + 284 + 17 + + + 371 + 39 + + + + + opt_no_process + toggled(bool) + opt_dont_normalize + setDisabled(bool) + + + 107 + 15 + + + 20 + 67 + + + + + opt_no_process + toggled(bool) + opt_keep_aspect_ratio + setDisabled(bool) + + + 171 + 11 + + + 38 + 98 + + + + + opt_no_process + toggled(bool) + opt_dont_sharpen + setDisabled(bool) + + + 126 + 12 + + + 110 + 124 + + + + + opt_no_process + toggled(bool) + opt_disable_trim + setDisabled(bool) + + + 153 + 5 + + + 67 + 155 + + + + + opt_no_process + toggled(bool) + opt_wide + setDisabled(bool) + + + 164 + 13 + + + 84 + 180 + + + + + opt_no_process + toggled(bool) + opt_landscape + setDisabled(bool) + + + 129 + 11 + + + 145 + 209 + + + + + opt_no_process + toggled(bool) + opt_right2left + setDisabled(bool) + + + 183 + 15 + + + 52 + 225 + + + + + opt_no_process + toggled(bool) + opt_no_sort + setDisabled(bool) + + + 162 + 11 + + + 105 + 256 + + + + + opt_no_process + toggled(bool) + opt_despeckle + setDisabled(bool) + + + 254 + 19 + + + 180 + 296 + + + + + diff --git a/src/calibre/gui2/convert/single.py b/src/calibre/gui2/convert/single.py index 7bf18e90c7..ccd3406ad6 100644 --- a/src/calibre/gui2/convert/single.py +++ b/src/calibre/gui2/convert/single.py @@ -131,7 +131,7 @@ class Config(ResizableDialog, Ui_Dialog): try: output_widget = __import__(name) pw = output_widget.PluginWidget - pw.ICON = ':/images/forward.svg' + pw.ICON = ':/images/back.svg' pw.HELP = _('Options specific to the output format.') output_widget = widget_factory(pw) except ImportError: @@ -228,7 +228,7 @@ if __name__ == '__main__': images_rc a=Application([]) db = LibraryDatabase2('/home/kovid/documents/library') - d = Config(None, db, 998) + d = Config(None, db, 594) d.show() a.exec_()