From 3c75dae2d5c28c820b082339db951276843f24a9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 26 Mar 2015 18:34:23 +0530 Subject: [PATCH] GUI config widget for DOCX output --- src/calibre/gui2/convert/docx_output.py | 28 +++++++++++++ src/calibre/gui2/convert/docx_output.ui | 54 +++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 src/calibre/gui2/convert/docx_output.py create mode 100644 src/calibre/gui2/convert/docx_output.ui diff --git a/src/calibre/gui2/convert/docx_output.py b/src/calibre/gui2/convert/docx_output.py new file mode 100644 index 0000000000..d07ccd3728 --- /dev/null +++ b/src/calibre/gui2/convert/docx_output.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- + +__license__ = 'GPL 3' +__copyright__ = '2009, John Schember ' +__docformat__ = 'restructuredtext en' + +from calibre.gui2.convert.docx_output_ui import Ui_Form +from calibre.gui2.convert import Widget + +paper_size_model = None +orientation_model = None + +class PluginWidget(Widget, Ui_Form): + + TITLE = _('DOCX Output') + HELP = _('Options specific to')+' DOCX '+_('output') + COMMIT_NAME = 'docx_output' + ICON = I('mimetypes/docx.png') + + def __init__(self, parent, get_option, get_help, db=None, book_id=None): + Widget.__init__(self, parent, [ + 'docx_page_size', 'docx_custom_page_size', + ]) + for x in get_option('docx_page_size').option.choices: + self.opt_docx_page_size.addItem(x) + + self.initialize_options(get_option, get_help, db, book_id) + self.layout().setFieldGrowthPolicy(self.layout().ExpandingFieldsGrow) diff --git a/src/calibre/gui2/convert/docx_output.ui b/src/calibre/gui2/convert/docx_output.ui new file mode 100644 index 0000000000..53f05c7790 --- /dev/null +++ b/src/calibre/gui2/convert/docx_output.ui @@ -0,0 +1,54 @@ + + + Form + + + + 0 + 0 + 638 + 588 + + + + Form + + + + + + Paper Si&ze: + + + opt_docx_page_size + + + + + + + + + + &Custom size: + + + opt_docx_custom_page_size + + + + + + + + 0 + 0 + + + + + + + + +