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

# Form implementation generated from reading ui file '/home/kovid/work/calibre/src/calibre/gui2/convert/heuristics.ui'
#
# Created: Thu Jul 10 08:02:03 2014
#      by: PyQt4 UI code generator 4.11.1
#
# WARNING! All changes made in this file will be lost!

from PyQt4 import QtCore, QtGui

try:
    _fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
    def _fromUtf8(s):
        return s

try:
    _encoding = QtGui.QApplication.UnicodeUTF8
    pass
except AttributeError:
    pass

class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(724, 470)
        self.verticalLayout = QtGui.QVBoxLayout(Form)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.label = QtGui.QLabel(Form)
        self.label.setWordWrap(True)
        self.label.setOpenExternalLinks(True)
        self.label.setObjectName(_fromUtf8("label"))
        self.verticalLayout.addWidget(self.label)
        spacerItem = QtGui.QSpacerItem(20, 15, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
        self.verticalLayout.addItem(spacerItem)
        self.opt_enable_heuristics = QtGui.QCheckBox(Form)
        self.opt_enable_heuristics.setObjectName(_fromUtf8("opt_enable_heuristics"))
        self.verticalLayout.addWidget(self.opt_enable_heuristics)
        self.heuristic_options = QtGui.QGroupBox(Form)
        self.heuristic_options.setObjectName(_fromUtf8("heuristic_options"))
        self.verticalLayout_2 = QtGui.QVBoxLayout(self.heuristic_options)
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.opt_unwrap_lines = QtGui.QCheckBox(self.heuristic_options)
        self.opt_unwrap_lines.setObjectName(_fromUtf8("opt_unwrap_lines"))
        self.verticalLayout_2.addWidget(self.opt_unwrap_lines)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem1)
        self.huf_label = QtGui.QLabel(self.heuristic_options)
        self.huf_label.setObjectName(_fromUtf8("huf_label"))
        self.horizontalLayout.addWidget(self.huf_label)
        self.opt_html_unwrap_factor = QtGui.QDoubleSpinBox(self.heuristic_options)
        self.opt_html_unwrap_factor.setToolTip(_fromUtf8(""))
        self.opt_html_unwrap_factor.setMaximum(1.0)
        self.opt_html_unwrap_factor.setSingleStep(0.05)
        self.opt_html_unwrap_factor.setProperty("value", 0.4)
        self.opt_html_unwrap_factor.setObjectName(_fromUtf8("opt_html_unwrap_factor"))
        self.horizontalLayout.addWidget(self.opt_html_unwrap_factor)
        spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem2)
        self.verticalLayout_2.addLayout(self.horizontalLayout)
        self.opt_markup_chapter_headings = QtGui.QCheckBox(self.heuristic_options)
        self.opt_markup_chapter_headings.setObjectName(_fromUtf8("opt_markup_chapter_headings"))
        self.verticalLayout_2.addWidget(self.opt_markup_chapter_headings)
        self.opt_renumber_headings = QtGui.QCheckBox(self.heuristic_options)
        self.opt_renumber_headings.setObjectName(_fromUtf8("opt_renumber_headings"))
        self.verticalLayout_2.addWidget(self.opt_renumber_headings)
        self.opt_delete_blank_paragraphs = QtGui.QCheckBox(self.heuristic_options)
        self.opt_delete_blank_paragraphs.setObjectName(_fromUtf8("opt_delete_blank_paragraphs"))
        self.verticalLayout_2.addWidget(self.opt_delete_blank_paragraphs)
        self.opt_format_scene_breaks = QtGui.QCheckBox(self.heuristic_options)
        self.opt_format_scene_breaks.setObjectName(_fromUtf8("opt_format_scene_breaks"))
        self.verticalLayout_2.addWidget(self.opt_format_scene_breaks)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setSizeConstraint(QtGui.QLayout.SetDefaultConstraint)
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.label_2 = QtGui.QLabel(self.heuristic_options)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
        self.label_2.setSizePolicy(sizePolicy)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.horizontalLayout_2.addWidget(self.label_2)
        self.opt_replace_scene_breaks = QtGui.QComboBox(self.heuristic_options)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.opt_replace_scene_breaks.sizePolicy().hasHeightForWidth())
        self.opt_replace_scene_breaks.setSizePolicy(sizePolicy)
        self.opt_replace_scene_breaks.setEditable(True)
        self.opt_replace_scene_breaks.setInsertPolicy(QtGui.QComboBox.InsertAtTop)
        self.opt_replace_scene_breaks.setObjectName(_fromUtf8("opt_replace_scene_breaks"))
        self.horizontalLayout_2.addWidget(self.opt_replace_scene_breaks)
        self.verticalLayout_2.addLayout(self.horizontalLayout_2)
        self.opt_dehyphenate = QtGui.QCheckBox(self.heuristic_options)
        self.opt_dehyphenate.setObjectName(_fromUtf8("opt_dehyphenate"))
        self.verticalLayout_2.addWidget(self.opt_dehyphenate)
        self.opt_italicize_common_cases = QtGui.QCheckBox(self.heuristic_options)
        self.opt_italicize_common_cases.setObjectName(_fromUtf8("opt_italicize_common_cases"))
        self.verticalLayout_2.addWidget(self.opt_italicize_common_cases)
        self.opt_fix_indents = QtGui.QCheckBox(self.heuristic_options)
        self.opt_fix_indents.setObjectName(_fromUtf8("opt_fix_indents"))
        self.verticalLayout_2.addWidget(self.opt_fix_indents)
        spacerItem3 = QtGui.QSpacerItem(131, 35, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem3)
        self.verticalLayout.addWidget(self.heuristic_options)
        self.huf_label.setBuddy(self.opt_html_unwrap_factor)
        self.label_2.setBuddy(self.opt_replace_scene_breaks)

        self.retranslateUi(Form)
        QtCore.QObject.connect(self.opt_enable_heuristics, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.opt_html_unwrap_factor.setEnabled)
        QtCore.QObject.connect(self.opt_enable_heuristics, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.huf_label.setEnabled)
        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        Form.setWindowTitle(_("Form"))
        self.label.setText(_("<b>Heuristic processing</b> means that calibre will scan your book for common patterns and fix them. As the name implies, this involves guesswork, which means that it could end up worsening the result of a conversion, if calibre guesses wrong. Therefore, it is disabled by default. Often, if a conversion does not turn out as you expect, turning on heuristics can improve matters. Read more about the various heuristic processing options in the <a href=\"http://manual.calibre-ebook.com/conversion.html#heuristic-processing\">User Manual</a>."))
        self.opt_enable_heuristics.setText(_("Enable &heuristic processing"))
        self.heuristic_options.setTitle(_("Heuristic Processing"))
        self.opt_unwrap_lines.setText(_("Unwrap lines"))
        self.huf_label.setText(_("Line &un-wrap factor :"))
        self.opt_markup_chapter_headings.setText(_("Detect and markup unformatted chapter headings and sub headings"))
        self.opt_renumber_headings.setText(_("Renumber sequences of <h1> or <h2> tags to prevent splitting"))
        self.opt_delete_blank_paragraphs.setText(_("Delete blank lines between paragraphs"))
        self.opt_format_scene_breaks.setText(_("Ensure scene breaks are consistently formatted"))
        self.label_2.setText(_("Replace soft scene &breaks:"))
        self.opt_dehyphenate.setText(_("Remove unnecessary hyphens"))
        self.opt_italicize_common_cases.setText(_("Italicize common words and patterns"))
        self.opt_fix_indents.setText(_("Replace entity indents with CSS indents"))

