# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file '/home/kovid/work/calibre/src/calibre/gui2/convert/look_and_feel.ui'
#
# Created: Wed Nov  5 09:01:06 2014
#      by: PyQt5 UI code generator 5.3.1
#
# WARNING! All changes made in this file will be lost!

from PyQt5 import QtCore, QtGui, QtWidgets

class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(699, 619)
        self.gridLayout = QtWidgets.QGridLayout(Form)
        self.gridLayout.setObjectName("gridLayout")
        self.opt_keep_ligatures = QtWidgets.QCheckBox(Form)
        self.opt_keep_ligatures.setObjectName("opt_keep_ligatures")
        self.gridLayout.addWidget(self.opt_keep_ligatures, 12, 1, 1, 2)
        self.label_18 = QtWidgets.QLabel(Form)
        self.label_18.setObjectName("label_18")
        self.gridLayout.addWidget(self.label_18, 1, 0, 1, 1)
        self.label_7 = QtWidgets.QLabel(Form)
        self.label_7.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_7.setObjectName("label_7")
        self.gridLayout.addWidget(self.label_7, 9, 3, 1, 1)
        self.opt_input_encoding = EncodingComboBox(Form)
        self.opt_input_encoding.setEditable(True)
        self.opt_input_encoding.setObjectName("opt_input_encoding")
        self.gridLayout.addWidget(self.opt_input_encoding, 5, 1, 1, 2)
        self.opt_remove_paragraph_spacing = QtWidgets.QCheckBox(Form)
        self.opt_remove_paragraph_spacing.setObjectName("opt_remove_paragraph_spacing")
        self.gridLayout.addWidget(self.opt_remove_paragraph_spacing, 8, 0, 1, 2)
        self.label_4 = QtWidgets.QLabel(Form)
        self.label_4.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_4.setObjectName("label_4")
        self.gridLayout.addWidget(self.label_4, 8, 3, 1, 1)
        self.opt_line_height = QtWidgets.QDoubleSpinBox(Form)
        self.opt_line_height.setDecimals(1)
        self.opt_line_height.setObjectName("opt_line_height")
        self.gridLayout.addWidget(self.opt_line_height, 3, 4, 1, 1)
        self.opt_insert_blank_line = QtWidgets.QCheckBox(Form)
        self.opt_insert_blank_line.setObjectName("opt_insert_blank_line")
        self.gridLayout.addWidget(self.opt_insert_blank_line, 9, 0, 1, 2)
        self.opt_insert_blank_line_size = QtWidgets.QDoubleSpinBox(Form)
        self.opt_insert_blank_line_size.setDecimals(1)
        self.opt_insert_blank_line_size.setObjectName("opt_insert_blank_line_size")
        self.gridLayout.addWidget(self.opt_insert_blank_line_size, 9, 4, 1, 1)
        self.label_5 = QtWidgets.QLabel(Form)
        self.label_5.setObjectName("label_5")
        self.gridLayout.addWidget(self.label_5, 10, 0, 1, 1)
        self.opt_change_justification = QtWidgets.QComboBox(Form)
        self.opt_change_justification.setObjectName("opt_change_justification")
        self.gridLayout.addWidget(self.opt_change_justification, 10, 2, 1, 3)
        self.opt_smarten_punctuation = QtWidgets.QCheckBox(Form)
        self.opt_smarten_punctuation.setObjectName("opt_smarten_punctuation")
        self.gridLayout.addWidget(self.opt_smarten_punctuation, 11, 0, 1, 1)
        self.opt_unsmarten_punctuation = QtWidgets.QCheckBox(Form)
        self.opt_unsmarten_punctuation.setObjectName("opt_unsmarten_punctuation")
        self.gridLayout.addWidget(self.opt_unsmarten_punctuation, 12, 0, 1, 1)
        self.label = QtWidgets.QLabel(Form)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 3, 3, 1, 1)
        self.label_6 = QtWidgets.QLabel(Form)
        self.label_6.setObjectName("label_6")
        self.gridLayout.addWidget(self.label_6, 3, 0, 1, 1)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.opt_font_size_mapping = QtWidgets.QLineEdit(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.opt_font_size_mapping.sizePolicy().hasHeightForWidth())
        self.opt_font_size_mapping.setSizePolicy(sizePolicy)
        self.opt_font_size_mapping.setObjectName("opt_font_size_mapping")
        self.horizontalLayout.addWidget(self.opt_font_size_mapping)
        self.button_font_key = QtWidgets.QToolButton(Form)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(I("wizard.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.button_font_key.setIcon(icon)
        self.button_font_key.setIconSize(QtCore.QSize(32, 32))
        self.button_font_key.setObjectName("button_font_key")
        self.horizontalLayout.addWidget(self.button_font_key)
        self.gridLayout.addLayout(self.horizontalLayout, 2, 1, 1, 3)
        self.label_3 = QtWidgets.QLabel(Form)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 5, 0, 1, 1)
        self.opt_minimum_line_height = QtWidgets.QDoubleSpinBox(Form)
        self.opt_minimum_line_height.setDecimals(1)
        self.opt_minimum_line_height.setMaximum(900.0)
        self.opt_minimum_line_height.setObjectName("opt_minimum_line_height")
        self.gridLayout.addWidget(self.opt_minimum_line_height, 3, 1, 1, 1)
        self.opt_base_font_size = QtWidgets.QDoubleSpinBox(Form)
        self.opt_base_font_size.setDecimals(1)
        self.opt_base_font_size.setMinimum(0.0)
        self.opt_base_font_size.setMaximum(50.0)
        self.opt_base_font_size.setSingleStep(1.0)
        self.opt_base_font_size.setProperty("value", 15.0)
        self.opt_base_font_size.setObjectName("opt_base_font_size")
        self.gridLayout.addWidget(self.opt_base_font_size, 1, 1, 1, 1)
        self.opt_disable_font_rescaling = QtWidgets.QCheckBox(Form)
        self.opt_disable_font_rescaling.setObjectName("opt_disable_font_rescaling")
        self.gridLayout.addWidget(self.opt_disable_font_rescaling, 0, 0, 1, 5)
        self.opt_embed_font_family = FontFamilyChooser(Form)
        self.opt_embed_font_family.setObjectName("opt_embed_font_family")
        self.gridLayout.addWidget(self.opt_embed_font_family, 6, 1, 1, 2)
        self.label_2 = QtWidgets.QLabel(Form)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
        self.label_10 = QtWidgets.QLabel(Form)
        self.label_10.setObjectName("label_10")
        self.gridLayout.addWidget(self.label_10, 6, 0, 1, 1)
        self.tabWidget = QtWidgets.QTabWidget(Form)
        self.tabWidget.setObjectName("tabWidget")
        self.extra_css_tab = QtWidgets.QWidget()
        self.extra_css_tab.setObjectName("extra_css_tab")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.extra_css_tab)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.opt_extra_css = QtWidgets.QTextEdit(self.extra_css_tab)
        self.opt_extra_css.setObjectName("opt_extra_css")
        self.gridLayout_2.addWidget(self.opt_extra_css, 0, 0, 1, 1)
        self.tabWidget.addTab(self.extra_css_tab, "")
        self.opt_filter_css = QtWidgets.QWidget()
        self.opt_filter_css.setObjectName("opt_filter_css")
        self.gridLayout_3 = QtWidgets.QGridLayout(self.opt_filter_css)
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.label_8 = QtWidgets.QLabel(self.opt_filter_css)
        self.label_8.setWordWrap(True)
        self.label_8.setObjectName("label_8")
        self.gridLayout_3.addWidget(self.label_8, 0, 0, 1, 5)
        self.filter_css_fonts = QtWidgets.QCheckBox(self.opt_filter_css)
        self.filter_css_fonts.setObjectName("filter_css_fonts")
        self.gridLayout_3.addWidget(self.filter_css_fonts, 1, 0, 1, 1)
        self.filter_css_margins = QtWidgets.QCheckBox(self.opt_filter_css)
        self.filter_css_margins.setObjectName("filter_css_margins")
        self.gridLayout_3.addWidget(self.filter_css_margins, 1, 1, 1, 1)
        self.filter_css_padding = QtWidgets.QCheckBox(self.opt_filter_css)
        self.filter_css_padding.setObjectName("filter_css_padding")
        self.gridLayout_3.addWidget(self.filter_css_padding, 1, 2, 1, 1)
        self.filter_css_floats = QtWidgets.QCheckBox(self.opt_filter_css)
        self.filter_css_floats.setObjectName("filter_css_floats")
        self.gridLayout_3.addWidget(self.filter_css_floats, 1, 3, 1, 1)
        self.filter_css_colors = QtWidgets.QCheckBox(self.opt_filter_css)
        self.filter_css_colors.setObjectName("filter_css_colors")
        self.gridLayout_3.addWidget(self.filter_css_colors, 1, 4, 1, 1)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.label_9 = QtWidgets.QLabel(self.opt_filter_css)
        self.label_9.setObjectName("label_9")
        self.horizontalLayout_2.addWidget(self.label_9)
        self.filter_css_others = QtWidgets.QLineEdit(self.opt_filter_css)
        self.filter_css_others.setObjectName("filter_css_others")
        self.horizontalLayout_2.addWidget(self.filter_css_others)
        self.gridLayout_3.addLayout(self.horizontalLayout_2, 2, 0, 1, 5)
        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.gridLayout_3.addItem(spacerItem, 3, 0, 1, 1)
        self.tabWidget.addTab(self.opt_filter_css, "")
        self.gridLayout.addWidget(self.tabWidget, 13, 0, 1, 5)
        self.opt_remove_paragraph_spacing_indent_size = QtWidgets.QDoubleSpinBox(Form)
        self.opt_remove_paragraph_spacing_indent_size.setDecimals(1)
        self.opt_remove_paragraph_spacing_indent_size.setMinimum(-0.1)
        self.opt_remove_paragraph_spacing_indent_size.setSingleStep(0.1)
        self.opt_remove_paragraph_spacing_indent_size.setObjectName("opt_remove_paragraph_spacing_indent_size")
        self.gridLayout.addWidget(self.opt_remove_paragraph_spacing_indent_size, 8, 4, 1, 1)
        self.opt_subset_embedded_fonts = QtWidgets.QCheckBox(Form)
        self.opt_subset_embedded_fonts.setObjectName("opt_subset_embedded_fonts")
        self.gridLayout.addWidget(self.opt_subset_embedded_fonts, 7, 3, 1, 1)
        self.opt_embed_all_fonts = QtWidgets.QCheckBox(Form)
        self.opt_embed_all_fonts.setObjectName("opt_embed_all_fonts")
        self.gridLayout.addWidget(self.opt_embed_all_fonts, 7, 0, 1, 3)
        self.opt_asciiize = QtWidgets.QCheckBox(Form)
        self.opt_asciiize.setObjectName("opt_asciiize")
        self.gridLayout.addWidget(self.opt_asciiize, 11, 1, 1, 2)
        self.opt_expand_css = QtWidgets.QCheckBox(Form)
        self.opt_expand_css.setObjectName("opt_expand_css")
        self.gridLayout.addWidget(self.opt_expand_css, 11, 3, 1, 2)
        self.opt_linearize_tables = QtWidgets.QCheckBox(Form)
        self.opt_linearize_tables.setObjectName("opt_linearize_tables")
        self.gridLayout.addWidget(self.opt_linearize_tables, 12, 3, 1, 2)
        self.label_18.setBuddy(self.opt_base_font_size)
        self.label_7.setBuddy(self.opt_insert_blank_line_size)
        self.label_4.setBuddy(self.opt_remove_paragraph_spacing_indent_size)
        self.label_5.setBuddy(self.opt_change_justification)
        self.label.setBuddy(self.opt_line_height)
        self.label_6.setBuddy(self.opt_minimum_line_height)
        self.label_3.setBuddy(self.opt_input_encoding)
        self.label_2.setBuddy(self.opt_font_size_mapping)
        self.label_10.setBuddy(self.opt_embed_font_family)
        self.label_9.setBuddy(self.filter_css_others)

        self.retranslateUi(Form)
        self.tabWidget.setCurrentIndex(0)
        self.opt_disable_font_rescaling.toggled['bool'].connect(self.opt_base_font_size.setDisabled)
        self.opt_disable_font_rescaling.toggled['bool'].connect(self.opt_font_size_mapping.setDisabled)
        self.opt_remove_paragraph_spacing.toggled['bool'].connect(self.label_4.setEnabled)
        self.opt_remove_paragraph_spacing.toggled['bool'].connect(self.opt_remove_paragraph_spacing_indent_size.setEnabled)
        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):

        Form.setWindowTitle(_("Form"))
        self.opt_keep_ligatures.setText(_("Keep &ligatures"))
        self.label_18.setText(_("Base &font size:"))
        self.label_7.setText(_("&Line size:"))
        self.opt_remove_paragraph_spacing.setText(_("Remove &spacing between paragraphs"))
        self.label_4.setText(_("&Indent size:"))
        self.opt_line_height.setSuffix(_(" pt"))
        self.opt_insert_blank_line.setText(_("Insert &blank line between paragraphs"))
        self.opt_insert_blank_line_size.setSuffix(_(" em"))
        self.label_5.setText(_("Text &justification:"))
        self.opt_smarten_punctuation.setText(_("Smarten &punctuation"))
        self.opt_unsmarten_punctuation.setText(_("&UnSmarten punctuation"))
        self.label.setText(_("Line &height:"))
        self.label_6.setText(_("Minimum &line height:"))
        self.button_font_key.setToolTip(_("Wizard to help you choose an appropriate font size key"))
        self.button_font_key.setText(_("..."))
        self.label_3.setText(_("Input character &encoding:"))
        self.opt_minimum_line_height.setSuffix(_(" %"))
        self.opt_base_font_size.setSuffix(_(" pt"))
        self.opt_disable_font_rescaling.setText(_("&Disable font size rescaling"))
        self.label_2.setText(_("Font size &key:"))
        self.label_10.setText(_("&Embed font family:"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.extra_css_tab), _("&Extra CSS"))
        self.label_8.setText(_("Select what style information you want completely removed:"))
        self.filter_css_fonts.setToolTip(_("Removes the font-family CSS property"))
        self.filter_css_fonts.setText(_("&Fonts"))
        self.filter_css_margins.setToolTip(_("Removes the margin CSS properties. Note that page margins are not affected by this setting."))
        self.filter_css_margins.setText(_("&Margins"))
        self.filter_css_padding.setToolTip(_("Removes the padding CSS properties"))
        self.filter_css_padding.setText(_("&Padding"))
        self.filter_css_floats.setToolTip(_("Convert floating images/text into static images/text"))
        self.filter_css_floats.setText(_("F&loats"))
        self.filter_css_colors.setToolTip(_("Removes foreground and background colors"))
        self.filter_css_colors.setText(_("&Colors"))
        self.label_9.setText(_("&Other CSS Properties:"))
        self.filter_css_others.setToolTip(_("Comma separated list of CSS properties to remove. For example: display, color, font-family"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.opt_filter_css), _("&Filter Style Information"))
        self.opt_remove_paragraph_spacing_indent_size.setToolTip(_("<p>When calibre removes inter paragraph spacing, it automatically sets a paragraph indent, to ensure that paragraphs can be easily distinguished. This option controls the width of that indent."))
        self.opt_remove_paragraph_spacing_indent_size.setSpecialValueText(_("No change"))
        self.opt_remove_paragraph_spacing_indent_size.setSuffix(_(" em"))
        self.opt_subset_embedded_fonts.setText(_("&Subset all embedded fonts"))
        self.opt_embed_all_fonts.setText(_("&Embed referenced fonts"))
        self.opt_asciiize.setText(_("&Transliterate unicode characters to ASCII"))
        self.opt_expand_css.setText(_("E&xpand CSS"))
        self.opt_linearize_tables.setText(_("&Linearize tables"))

from calibre.gui2.widgets import EncodingComboBox
from calibre.gui2.font_family_chooser import FontFamilyChooser

