Ejemplo n.º 1
0
    def setupUi(self, CommentsDialog):
        CommentsDialog.setObjectName("CommentsDialog")
        CommentsDialog.resize(400, 400)
        sizePolicy = QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.MinimumExpanding,
            QtWidgets.QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            CommentsDialog.sizePolicy().hasHeightForWidth())
        CommentsDialog.setSizePolicy(sizePolicy)
        self.verticalLayout = QtWidgets.QVBoxLayout(CommentsDialog)
        self.verticalLayout.setObjectName("verticalLayout")
        self.textbox = Editor(CommentsDialog)
        self.textbox.setObjectName("textbox")
        self.verticalLayout.addWidget(self.textbox)
        self.buttonBox = QtWidgets.QDialogButtonBox(CommentsDialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel
                                          | QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(CommentsDialog)
        self.buttonBox.accepted.connect(CommentsDialog.accept)
        self.buttonBox.rejected.connect(CommentsDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(CommentsDialog)
Ejemplo n.º 2
0
class Ui_CommentsDialog(object):
    def setupUi(self, CommentsDialog):
        CommentsDialog.setObjectName(_fromUtf8("CommentsDialog"))
        CommentsDialog.resize(400, 400)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding,
                                       QtGui.QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            CommentsDialog.sizePolicy().hasHeightForWidth())
        CommentsDialog.setSizePolicy(sizePolicy)
        self.verticalLayout = QtGui.QVBoxLayout(CommentsDialog)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.textbox = Editor(CommentsDialog)
        self.textbox.setObjectName(_fromUtf8("textbox"))
        self.verticalLayout.addWidget(self.textbox)
        self.buttonBox = QtGui.QDialogButtonBox(CommentsDialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel
                                          | QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(CommentsDialog)
        QtCore.QObject.connect(self.buttonBox,
                               QtCore.SIGNAL(_fromUtf8("accepted()")),
                               CommentsDialog.accept)
        QtCore.QObject.connect(self.buttonBox,
                               QtCore.SIGNAL(_fromUtf8("rejected()")),
                               CommentsDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(CommentsDialog)

    def retranslateUi(self, CommentsDialog):
        CommentsDialog.setWindowTitle(_("Edit Comments"))
Ejemplo n.º 3
0
class Comments(Base):
    def setup_ui(self, parent):
        self._box = QGroupBox(parent)
        self._box.setTitle('&' + self.col_metadata['name'])
        self._layout = QVBoxLayout()
        self._tb = CommentsEditor(self._box)
        self._tb.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
        # self._tb.setTabChangesFocus(True)
        self._layout.addWidget(self._tb)
        self._box.setLayout(self._layout)
        self.widgets = [self._box]

    def setter(self, val):
        if not val or not val.strip():
            val = ''
        else:
            val = comments_to_html(val)
        self._tb.html = val
        self._tb.wyswyg_dirtied()

    def getter(self):
        val = unicode(self._tb.html).strip()
        if not val:
            val = None
        return val
Ejemplo n.º 4
0
class Comments(Base):

    def setup_ui(self, parent):
        self._box = QGroupBox(parent)
        self._box.setTitle('&'+self.col_metadata['name'])
        self._layout = QVBoxLayout()
        self._tb = CommentsEditor(self._box, toolbar_prefs_name=u'metadata-comments-editor-widget-hidden-toolbars')
        self._tb.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
        # self._tb.setTabChangesFocus(True)
        self._layout.addWidget(self._tb)
        self._box.setLayout(self._layout)
        self.widgets = [self._box]

    def setter(self, val):
        if not val or not val.strip():
            val = ''
        else:
            val = comments_to_html(val)
        self._tb.html = val
        self._tb.wyswyg_dirtied()

    def getter(self):
        val = unicode(self._tb.html).strip()
        if not val:
            val = None
        return val

    @dynamic_property
    def tab(self):
        def fget(self):
            return self._tb.tab

        def fset(self, val):
            self._tb.tab = val
        return property(fget=fget, fset=fset)
Ejemplo n.º 5
0
class Ui_CommentsDialog(object):
    def setupUi(self, CommentsDialog):
        CommentsDialog.setObjectName(_fromUtf8("CommentsDialog"))
        CommentsDialog.resize(400, 400)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(CommentsDialog.sizePolicy().hasHeightForWidth())
        CommentsDialog.setSizePolicy(sizePolicy)
        self.verticalLayout = QtGui.QVBoxLayout(CommentsDialog)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.textbox = Editor(CommentsDialog)
        self.textbox.setObjectName(_fromUtf8("textbox"))
        self.verticalLayout.addWidget(self.textbox)
        self.buttonBox = QtGui.QDialogButtonBox(CommentsDialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(CommentsDialog)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), CommentsDialog.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), CommentsDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(CommentsDialog)

    def retranslateUi(self, CommentsDialog):
        CommentsDialog.setWindowTitle(_("Edit Comments"))
Ejemplo n.º 6
0
class Comments(Base):

    def setup_ui(self, parent):
        self._box = QGroupBox(parent)
        self._box.setTitle('&'+self.col_metadata['name'])
        self._layout = QVBoxLayout()
        self._tb = CommentsEditor(self._box)
        self._tb.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
        # self._tb.setTabChangesFocus(True)
        self._layout.addWidget(self._tb)
        self._box.setLayout(self._layout)
        self.widgets = [self._box]

    def setter(self, val):
        if not val or not val.strip():
            val = ''
        else:
            val = comments_to_html(val)
        self._tb.html = val
        self._tb.wyswyg_dirtied()

    def getter(self):
        val = unicode(self._tb.html).strip()
        if not val:
            val = None
        return val
Ejemplo n.º 7
0
 def __init__(self, field, is_new, parent, metadata, extra):
     Editor.__init__(self, parent, one_line_toolbar=False)
     self.is_new = is_new
     self.field = field
     self.metadata = metadata
     self.hide_tabs()
     if not is_new:
         self.hide_toolbars()
         self.set_readonly(True)
Ejemplo n.º 8
0
Archivo: diff.py Proyecto: sss/calibre
 def __init__(self, field, is_new, parent, metadata, extra):
     Editor.__init__(self, parent, one_line_toolbar=False)
     self.is_new = is_new
     self.field = field
     self.metadata = metadata
     self.hide_tabs()
     if not is_new:
         self.hide_toolbars()
         self.set_readonly(True)
Ejemplo n.º 9
0
    def __init__(self, parent, text, column_name=None):
        QDialog.__init__(self, parent)
        self.setObjectName("CommentsDialog")
        self.setWindowTitle(_("Edit comments"))
        self.verticalLayout = l = QVBoxLayout(self)
        self.textbox = tb = Editor(self)
        self.buttonBox = bb = QDialogButtonBox(
            QDialogButtonBox.StandardButton.Ok
            | QDialogButtonBox.StandardButton.Cancel, self)
        bb.accepted.connect(self.accept)
        bb.rejected.connect(self.reject)
        l.addWidget(tb)
        l.addWidget(bb)
        # Remove help icon on title bar
        icon = self.windowIcon()
        self.setWindowFlags(self.windowFlags()
                            & (~Qt.WindowType.WindowContextHelpButtonHint))
        self.setWindowIcon(icon)

        self.textbox.html = comments_to_html(text) if text else ''
        self.textbox.wyswyg_dirtied()
        # self.textbox.setTabChangesFocus(True)

        if column_name:
            self.setWindowTitle(_('Edit "{0}"').format(column_name))

        geom = gprefs.get('comments_dialog_geom', None)
        if geom is not None:
            QApplication.instance().safe_restore_geometry(self, geom)
        else:
            self.resize(self.sizeHint())
Ejemplo n.º 10
0
 def setup_ui(self, parent):
     self._box = QGroupBox(parent)
     self._box.setTitle('&'+self.col_metadata['name'])
     self._layout = QVBoxLayout()
     self._tb = CommentsEditor(self._box, toolbar_prefs_name=u'metadata-comments-editor-widget-hidden-toolbars')
     self._tb.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
     # self._tb.setTabChangesFocus(True)
     self._layout.addWidget(self._tb)
     self._box.setLayout(self._layout)
     self.widgets = [self._box]
Ejemplo n.º 11
0
 def setup_ui(self, parent):
     self._box = QGroupBox(parent)
     self._box.setTitle("&" + self.col_metadata["name"])
     self._layout = QVBoxLayout()
     self._tb = CommentsEditor(self._box)
     self._tb.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
     # self._tb.setTabChangesFocus(True)
     self._layout.addWidget(self._tb)
     self._box.setLayout(self._layout)
     self.widgets = [self._box]
class Comments(Base):
    def setup_ui(self, parent):
        self._box = QGroupBox(parent)
        self._box.setTitle('&' + self.col_metadata['name'])
        self._layout = QVBoxLayout()
        self._tb = CommentsEditor(
            self._box,
            toolbar_prefs_name='metadata-comments-editor-widget-hidden-toolbars'
        )
        self._tb.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
        # self._tb.setTabChangesFocus(True)
        self._layout.addWidget(self._tb)
        self._box.setLayout(self._layout)
        self.widgets = [self._box]

    def setter(self, val):
        if not val or not val.strip():
            val = ''
        else:
            val = comments_to_html(val)
        self._tb.html = val
        self._tb.wyswyg_dirtied()

    def getter(self):
        val = str(self._tb.html).strip()
        if not val:
            val = None
        return val

    @dynamic_property
    def tab(self):
        def fget(self):
            return self._tb.tab

        def fset(self, val):
            self._tb.tab = val

        return property(fget=fget, fset=fset)
Ejemplo n.º 13
0
class Comments(Base):
    def setup_ui(self, parent):
        self._box = QGroupBox(parent)
        self._box.setTitle('&' + self.col_metadata['name'])
        self._layout = QVBoxLayout()
        self._tb = CommentsEditor(
            self._box,
            toolbar_prefs_name=
            u'metadata-comments-editor-widget-hidden-toolbars')
        self._tb.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
        # self._tb.setTabChangesFocus(True)
        self._layout.addWidget(self._tb)
        self._box.setLayout(self._layout)
        self.widgets = [self._box]

    def initialize(self, book_id):
        path = self.db.abspath(book_id, index_is_id=True)
        if path:
            self._tb.set_base_url(
                QUrl.fromLocalFile(os.path.join(path, 'metadata.html')))
        return Base.initialize(self, book_id)

    def setter(self, val):
        if not val or not val.strip():
            val = ''
        else:
            val = comments_to_html(val)
        self._tb.html = val
        self._tb.wyswyg_dirtied()

    def getter(self):
        val = unicode(self._tb.html).strip()
        if not val:
            val = None
        return val

    @dynamic_property
    def tab(self):
        def fget(self):
            return self._tb.tab

        def fset(self, val):
            self._tb.tab = val

        return property(fget=fget, fset=fset)
Ejemplo n.º 14
0
class Comments(Base):

    def setup_ui(self, parent):
        self._box = QGroupBox(parent)
        self._box.setTitle('&'+self.col_metadata['name'])
        self._layout = QVBoxLayout()
        self._tb = CommentsEditor(self._box, toolbar_prefs_name=u'metadata-comments-editor-widget-hidden-toolbars')
        self._tb.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
        # self._tb.setTabChangesFocus(True)
        self._layout.addWidget(self._tb)
        self._box.setLayout(self._layout)
        self.widgets = [self._box]

    def initialize(self, book_id):
        path = self.db.abspath(book_id, index_is_id=True)
        if path:
            self._tb.set_base_url(QUrl.fromLocalFile(os.path.join(path, 'metadata.html')))
        return Base.initialize(self, book_id)

    def setter(self, val):
        if not val or not val.strip():
            val = ''
        else:
            val = comments_to_html(val)
        self._tb.html = val
        self._tb.wyswyg_dirtied()

    def getter(self):
        val = unicode(self._tb.html).strip()
        if not val:
            val = None
        return val

    @dynamic_property
    def tab(self):
        def fget(self):
            return self._tb.tab

        def fset(self, val):
            self._tb.tab = val
        return property(fget=fget, fset=fset)
Ejemplo n.º 15
0
    def setupUi(self, Form):
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(600, 500)
        self.horizontalLayout = QtGui.QHBoxLayout(Form)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.groupBox_4 = QtGui.QGroupBox(Form)
        self.groupBox_4.setObjectName(_fromUtf8("groupBox_4"))
        self._2 = QtGui.QGridLayout(self.groupBox_4)
        self._2.setObjectName(_fromUtf8("_2"))
        self._4 = QtGui.QVBoxLayout()
        self._4.setSpacing(6)
        self._4.setMargin(0)
        self._4.setObjectName(_fromUtf8("_4"))
        self.label_5 = QtGui.QLabel(self.groupBox_4)
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self._4.addWidget(self.label_5)
        self._5 = QtGui.QHBoxLayout()
        self._5.setSpacing(6)
        self._5.setMargin(0)
        self._5.setObjectName(_fromUtf8("_5"))
        self.cover_path = QtGui.QLineEdit(self.groupBox_4)
        self.cover_path.setReadOnly(True)
        self.cover_path.setObjectName(_fromUtf8("cover_path"))
        self._5.addWidget(self.cover_path)
        self.cover_button = QtGui.QToolButton(self.groupBox_4)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8(I("document_open.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.cover_button.setIcon(icon)
        self.cover_button.setObjectName(_fromUtf8("cover_button"))
        self._5.addWidget(self.cover_button)
        self._4.addLayout(self._5)
        self._2.addLayout(self._4, 1, 0, 1, 1)
        self.opt_prefer_metadata_cover = QtGui.QCheckBox(self.groupBox_4)
        self.opt_prefer_metadata_cover.setChecked(True)
        self.opt_prefer_metadata_cover.setObjectName(_fromUtf8("opt_prefer_metadata_cover"))
        self._2.addWidget(self.opt_prefer_metadata_cover, 2, 0, 1, 1)
        self._3 = QtGui.QHBoxLayout()
        self._3.setObjectName(_fromUtf8("_3"))
        self.cover = ImageView(self.groupBox_4)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.cover.sizePolicy().hasHeightForWidth())
        self.cover.setSizePolicy(sizePolicy)
        self.cover.setObjectName(_fromUtf8("cover"))
        self._3.addWidget(self.cover)
        self._2.addLayout(self._3, 0, 0, 1, 1)
        self.horizontalLayout.addWidget(self.groupBox_4)
        self.verticalLayout_2 = QtGui.QVBoxLayout()
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self._7 = QtGui.QGridLayout()
        self._7.setObjectName(_fromUtf8("_7"))
        self.label = QtGui.QLabel(Form)
        self.label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label.setObjectName(_fromUtf8("label"))
        self._7.addWidget(self.label, 0, 0, 1, 1)
        self.title = EnLineEdit(Form)
        self.title.setObjectName(_fromUtf8("title"))
        self._7.addWidget(self.title, 0, 1, 1, 1)
        self.label_2 = QtGui.QLabel(Form)
        self.label_2.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self._7.addWidget(self.label_2, 1, 0, 1, 1)
        self.label_6 = QtGui.QLabel(Form)
        self.label_6.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self._7.addWidget(self.label_6, 2, 0, 1, 1)
        self.author_sort = EnLineEdit(Form)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.author_sort.sizePolicy().hasHeightForWidth())
        self.author_sort.setSizePolicy(sizePolicy)
        self.author_sort.setObjectName(_fromUtf8("author_sort"))
        self._7.addWidget(self.author_sort, 2, 1, 1, 1)
        self.label_3 = QtGui.QLabel(Form)
        self.label_3.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self._7.addWidget(self.label_3, 3, 0, 1, 1)
        self.label_4 = QtGui.QLabel(Form)
        self.label_4.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self._7.addWidget(self.label_4, 4, 0, 1, 1)
        self.tags = EditWithComplete(Form)
        self.tags.setObjectName(_fromUtf8("tags"))
        self._7.addWidget(self.tags, 4, 1, 1, 1)
        self.label_7 = QtGui.QLabel(Form)
        self.label_7.setTextFormat(QtCore.Qt.PlainText)
        self.label_7.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_7.setObjectName(_fromUtf8("label_7"))
        self._7.addWidget(self.label_7, 5, 0, 1, 1)
        self.series = EditWithComplete(Form)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(10)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.series.sizePolicy().hasHeightForWidth())
        self.series.setSizePolicy(sizePolicy)
        self.series.setEditable(True)
        self.series.setInsertPolicy(QtGui.QComboBox.InsertAlphabetically)
        self.series.setObjectName(_fromUtf8("series"))
        self._7.addWidget(self.series, 5, 1, 1, 1)
        self.series_index = QtGui.QDoubleSpinBox(Form)
        self.series_index.setMaximum(9999999999.99)
        self.series_index.setProperty("value", 1.0)
        self.series_index.setObjectName(_fromUtf8("series_index"))
        self._7.addWidget(self.series_index, 6, 1, 1, 1)
        self.publisher = EditWithComplete(Form)
        self.publisher.setEditable(True)
        self.publisher.setObjectName(_fromUtf8("publisher"))
        self._7.addWidget(self.publisher, 3, 1, 1, 1)
        self.author = EditWithComplete(Form)
        self.author.setEditable(True)
        self.author.setObjectName(_fromUtf8("author"))
        self._7.addWidget(self.author, 1, 1, 1, 1)
        self.verticalLayout_2.addLayout(self._7)
        self.comment = Editor(Form)
        self.comment.setObjectName(_fromUtf8("comment"))
        self.verticalLayout_2.addWidget(self.comment)
        self.horizontalLayout.addLayout(self.verticalLayout_2)
        self.label_5.setBuddy(self.cover_path)
        self.label.setBuddy(self.title)
        self.label_2.setBuddy(self.author)
        self.label_6.setBuddy(self.author_sort)
        self.label_3.setBuddy(self.publisher)
        self.label_4.setBuddy(self.tags)
        self.label_7.setBuddy(self.series)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
        Form.setTabOrder(self.title, self.author)
        Form.setTabOrder(self.author, self.author_sort)
        Form.setTabOrder(self.author_sort, self.publisher)
        Form.setTabOrder(self.publisher, self.tags)
        Form.setTabOrder(self.tags, self.series)
        Form.setTabOrder(self.series, self.series_index)
        Form.setTabOrder(self.series_index, self.cover_path)
        Form.setTabOrder(self.cover_path, self.cover_button)
        Form.setTabOrder(self.cover_button, self.opt_prefer_metadata_cover)
Ejemplo n.º 16
0
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(600, 500)
        self.horizontalLayout = QtWidgets.QHBoxLayout(Form)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.groupBox_4 = QtWidgets.QGroupBox(Form)
        self.groupBox_4.setObjectName("groupBox_4")
        self._2 = QtWidgets.QGridLayout(self.groupBox_4)
        self._2.setObjectName("_2")
        self._4 = QtWidgets.QVBoxLayout()
        self._4.setContentsMargins(0, 0, 0, 0)
        self._4.setSpacing(6)
        self._4.setObjectName("_4")
        self.label_5 = QtWidgets.QLabel(self.groupBox_4)
        self.label_5.setObjectName("label_5")
        self._4.addWidget(self.label_5)
        self._5 = QtWidgets.QHBoxLayout()
        self._5.setContentsMargins(0, 0, 0, 0)
        self._5.setSpacing(6)
        self._5.setObjectName("_5")
        self.cover_path = QtWidgets.QLineEdit(self.groupBox_4)
        self.cover_path.setClearButtonEnabled(True)
        self.cover_path.setObjectName("cover_path")
        self._5.addWidget(self.cover_path)
        self.cover_button = QtWidgets.QToolButton(self.groupBox_4)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(I("document_open.png")),
                       QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.cover_button.setIcon(icon)
        self.cover_button.setObjectName("cover_button")
        self._5.addWidget(self.cover_button)
        self._4.addLayout(self._5)
        self._2.addLayout(self._4, 1, 0, 1, 1)
        self.opt_prefer_metadata_cover = QtWidgets.QCheckBox(self.groupBox_4)
        self.opt_prefer_metadata_cover.setChecked(True)
        self.opt_prefer_metadata_cover.setObjectName(
            "opt_prefer_metadata_cover")
        self._2.addWidget(self.opt_prefer_metadata_cover, 2, 0, 1, 1)
        self._3 = QtWidgets.QHBoxLayout()
        self._3.setObjectName("_3")
        self.cover = ImageView(self.groupBox_4)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.cover.sizePolicy().hasHeightForWidth())
        self.cover.setSizePolicy(sizePolicy)
        self.cover.setObjectName("cover")
        self._3.addWidget(self.cover)
        self._2.addLayout(self._3, 0, 0, 1, 1)
        self.horizontalLayout.addWidget(self.groupBox_4)
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self._7 = QtWidgets.QGridLayout()
        self._7.setObjectName("_7")
        self.label = QtWidgets.QLabel(Form)
        self.label.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing
                                | QtCore.Qt.AlignVCenter)
        self.label.setObjectName("label")
        self._7.addWidget(self.label, 0, 0, 1, 1)
        self.title = EnLineEdit(Form)
        self.title.setObjectName("title")
        self._7.addWidget(self.title, 0, 1, 1, 1)
        self.label_2 = QtWidgets.QLabel(Form)
        self.label_2.setAlignment(QtCore.Qt.AlignRight
                                  | QtCore.Qt.AlignTrailing
                                  | QtCore.Qt.AlignVCenter)
        self.label_2.setObjectName("label_2")
        self._7.addWidget(self.label_2, 1, 0, 1, 1)
        self.label_6 = QtWidgets.QLabel(Form)
        self.label_6.setAlignment(QtCore.Qt.AlignRight
                                  | QtCore.Qt.AlignTrailing
                                  | QtCore.Qt.AlignVCenter)
        self.label_6.setObjectName("label_6")
        self._7.addWidget(self.label_6, 2, 0, 1, 1)
        self.author_sort = EnLineEdit(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.author_sort.sizePolicy().hasHeightForWidth())
        self.author_sort.setSizePolicy(sizePolicy)
        self.author_sort.setObjectName("author_sort")
        self._7.addWidget(self.author_sort, 2, 1, 1, 1)
        self.label_3 = QtWidgets.QLabel(Form)
        self.label_3.setAlignment(QtCore.Qt.AlignRight
                                  | QtCore.Qt.AlignTrailing
                                  | QtCore.Qt.AlignVCenter)
        self.label_3.setObjectName("label_3")
        self._7.addWidget(self.label_3, 3, 0, 1, 1)
        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._7.addWidget(self.label_4, 4, 0, 1, 1)
        self.tags = EditWithComplete(Form)
        self.tags.setObjectName("tags")
        self._7.addWidget(self.tags, 4, 1, 1, 1)
        self.label_7 = QtWidgets.QLabel(Form)
        self.label_7.setTextFormat(QtCore.Qt.PlainText)
        self.label_7.setAlignment(QtCore.Qt.AlignRight
                                  | QtCore.Qt.AlignTrailing
                                  | QtCore.Qt.AlignVCenter)
        self.label_7.setObjectName("label_7")
        self._7.addWidget(self.label_7, 5, 0, 1, 1)
        self.series = EditWithComplete(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(10)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.series.sizePolicy().hasHeightForWidth())
        self.series.setSizePolicy(sizePolicy)
        self.series.setEditable(True)
        self.series.setInsertPolicy(QtWidgets.QComboBox.InsertAlphabetically)
        self.series.setObjectName("series")
        self._7.addWidget(self.series, 5, 1, 1, 1)
        self.series_index = QtWidgets.QDoubleSpinBox(Form)
        self.series_index.setMaximum(9999999999.99)
        self.series_index.setProperty("value", 1.0)
        self.series_index.setObjectName("series_index")
        self._7.addWidget(self.series_index, 6, 1, 1, 1)
        self.publisher = EditWithComplete(Form)
        self.publisher.setEditable(True)
        self.publisher.setObjectName("publisher")
        self._7.addWidget(self.publisher, 3, 1, 1, 1)
        self.author = EditWithComplete(Form)
        self.author.setEditable(True)
        self.author.setObjectName("author")
        self._7.addWidget(self.author, 1, 1, 1, 1)
        self.verticalLayout_2.addLayout(self._7)
        self.comment = Editor(Form)
        self.comment.setObjectName("comment")
        self.verticalLayout_2.addWidget(self.comment)
        self.horizontalLayout.addLayout(self.verticalLayout_2)
        self.label_5.setBuddy(self.cover_path)
        self.label.setBuddy(self.title)
        self.label_2.setBuddy(self.author)
        self.label_6.setBuddy(self.author_sort)
        self.label_3.setBuddy(self.publisher)
        self.label_4.setBuddy(self.tags)
        self.label_7.setBuddy(self.series)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
        Form.setTabOrder(self.title, self.author)
        Form.setTabOrder(self.author, self.author_sort)
        Form.setTabOrder(self.author_sort, self.publisher)
        Form.setTabOrder(self.publisher, self.tags)
        Form.setTabOrder(self.tags, self.series)
        Form.setTabOrder(self.series, self.series_index)
        Form.setTabOrder(self.series_index, self.cover_path)
        Form.setTabOrder(self.cover_path, self.cover_button)
        Form.setTabOrder(self.cover_button, self.opt_prefer_metadata_cover)
Ejemplo n.º 17
0
class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(600, 500)
        self.horizontalLayout = QtWidgets.QHBoxLayout(Form)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.groupBox_4 = QtWidgets.QGroupBox(Form)
        self.groupBox_4.setObjectName("groupBox_4")
        self._2 = QtWidgets.QGridLayout(self.groupBox_4)
        self._2.setObjectName("_2")
        self._4 = QtWidgets.QVBoxLayout()
        self._4.setContentsMargins(0, 0, 0, 0)
        self._4.setSpacing(6)
        self._4.setObjectName("_4")
        self.label_5 = QtWidgets.QLabel(self.groupBox_4)
        self.label_5.setObjectName("label_5")
        self._4.addWidget(self.label_5)
        self._5 = QtWidgets.QHBoxLayout()
        self._5.setContentsMargins(0, 0, 0, 0)
        self._5.setSpacing(6)
        self._5.setObjectName("_5")
        self.cover_path = QtWidgets.QLineEdit(self.groupBox_4)
        self.cover_path.setClearButtonEnabled(True)
        self.cover_path.setObjectName("cover_path")
        self._5.addWidget(self.cover_path)
        self.cover_button = QtWidgets.QToolButton(self.groupBox_4)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(I("document_open.png")),
                       QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.cover_button.setIcon(icon)
        self.cover_button.setObjectName("cover_button")
        self._5.addWidget(self.cover_button)
        self._4.addLayout(self._5)
        self._2.addLayout(self._4, 1, 0, 1, 1)
        self.opt_prefer_metadata_cover = QtWidgets.QCheckBox(self.groupBox_4)
        self.opt_prefer_metadata_cover.setChecked(True)
        self.opt_prefer_metadata_cover.setObjectName(
            "opt_prefer_metadata_cover")
        self._2.addWidget(self.opt_prefer_metadata_cover, 2, 0, 1, 1)
        self._3 = QtWidgets.QHBoxLayout()
        self._3.setObjectName("_3")
        self.cover = ImageView(self.groupBox_4)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.cover.sizePolicy().hasHeightForWidth())
        self.cover.setSizePolicy(sizePolicy)
        self.cover.setObjectName("cover")
        self._3.addWidget(self.cover)
        self._2.addLayout(self._3, 0, 0, 1, 1)
        self.horizontalLayout.addWidget(self.groupBox_4)
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self._7 = QtWidgets.QGridLayout()
        self._7.setObjectName("_7")
        self.label = QtWidgets.QLabel(Form)
        self.label.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing
                                | QtCore.Qt.AlignVCenter)
        self.label.setObjectName("label")
        self._7.addWidget(self.label, 0, 0, 1, 1)
        self.title = EnLineEdit(Form)
        self.title.setObjectName("title")
        self._7.addWidget(self.title, 0, 1, 1, 1)
        self.label_2 = QtWidgets.QLabel(Form)
        self.label_2.setAlignment(QtCore.Qt.AlignRight
                                  | QtCore.Qt.AlignTrailing
                                  | QtCore.Qt.AlignVCenter)
        self.label_2.setObjectName("label_2")
        self._7.addWidget(self.label_2, 1, 0, 1, 1)
        self.label_6 = QtWidgets.QLabel(Form)
        self.label_6.setAlignment(QtCore.Qt.AlignRight
                                  | QtCore.Qt.AlignTrailing
                                  | QtCore.Qt.AlignVCenter)
        self.label_6.setObjectName("label_6")
        self._7.addWidget(self.label_6, 2, 0, 1, 1)
        self.author_sort = EnLineEdit(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.author_sort.sizePolicy().hasHeightForWidth())
        self.author_sort.setSizePolicy(sizePolicy)
        self.author_sort.setObjectName("author_sort")
        self._7.addWidget(self.author_sort, 2, 1, 1, 1)
        self.label_3 = QtWidgets.QLabel(Form)
        self.label_3.setAlignment(QtCore.Qt.AlignRight
                                  | QtCore.Qt.AlignTrailing
                                  | QtCore.Qt.AlignVCenter)
        self.label_3.setObjectName("label_3")
        self._7.addWidget(self.label_3, 3, 0, 1, 1)
        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._7.addWidget(self.label_4, 4, 0, 1, 1)
        self.tags = EditWithComplete(Form)
        self.tags.setObjectName("tags")
        self._7.addWidget(self.tags, 4, 1, 1, 1)
        self.label_7 = QtWidgets.QLabel(Form)
        self.label_7.setTextFormat(QtCore.Qt.PlainText)
        self.label_7.setAlignment(QtCore.Qt.AlignRight
                                  | QtCore.Qt.AlignTrailing
                                  | QtCore.Qt.AlignVCenter)
        self.label_7.setObjectName("label_7")
        self._7.addWidget(self.label_7, 5, 0, 1, 1)
        self.series = EditWithComplete(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(10)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.series.sizePolicy().hasHeightForWidth())
        self.series.setSizePolicy(sizePolicy)
        self.series.setEditable(True)
        self.series.setInsertPolicy(QtWidgets.QComboBox.InsertAlphabetically)
        self.series.setObjectName("series")
        self._7.addWidget(self.series, 5, 1, 1, 1)
        self.series_index = QtWidgets.QDoubleSpinBox(Form)
        self.series_index.setMaximum(9999999999.99)
        self.series_index.setProperty("value", 1.0)
        self.series_index.setObjectName("series_index")
        self._7.addWidget(self.series_index, 6, 1, 1, 1)
        self.publisher = EditWithComplete(Form)
        self.publisher.setEditable(True)
        self.publisher.setObjectName("publisher")
        self._7.addWidget(self.publisher, 3, 1, 1, 1)
        self.author = EditWithComplete(Form)
        self.author.setEditable(True)
        self.author.setObjectName("author")
        self._7.addWidget(self.author, 1, 1, 1, 1)
        self.verticalLayout_2.addLayout(self._7)
        self.comment = Editor(Form)
        self.comment.setObjectName("comment")
        self.verticalLayout_2.addWidget(self.comment)
        self.horizontalLayout.addLayout(self.verticalLayout_2)
        self.label_5.setBuddy(self.cover_path)
        self.label.setBuddy(self.title)
        self.label_2.setBuddy(self.author)
        self.label_6.setBuddy(self.author_sort)
        self.label_3.setBuddy(self.publisher)
        self.label_4.setBuddy(self.tags)
        self.label_7.setBuddy(self.series)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
        Form.setTabOrder(self.title, self.author)
        Form.setTabOrder(self.author, self.author_sort)
        Form.setTabOrder(self.author_sort, self.publisher)
        Form.setTabOrder(self.publisher, self.tags)
        Form.setTabOrder(self.tags, self.series)
        Form.setTabOrder(self.series, self.series_index)
        Form.setTabOrder(self.series_index, self.cover_path)
        Form.setTabOrder(self.cover_path, self.cover_button)
        Form.setTabOrder(self.cover_button, self.opt_prefer_metadata_cover)

    def retranslateUi(self, Form):

        Form.setWindowTitle(_("Form"))
        self.groupBox_4.setTitle(_("Book cover"))
        self.label_5.setText(_("Change &cover image:"))
        self.cover_button.setToolTip(
            _("Browse for an image to use as the cover of this book."))
        self.cover_button.setText(_("..."))
        self.opt_prefer_metadata_cover.setText(
            _("Use cover from &source file"))
        self.label.setText(_("&Title:"))
        self.title.setToolTip(_("Change the title of this book"))
        self.label_2.setText(_("&Author(s):"))
        self.label_6.setText(_("Author so&rt:"))
        self.author_sort.setToolTip(
            _("Change the author(s) of this book. Multiple authors should be separated by a comma"
              ))
        self.label_3.setText(_("&Publisher:"))
        self.label_4.setText(_("Ta&gs:"))
        self.tags.setToolTip(
            _("Tags categorize the book. This is particularly useful while searching. <br><br>They can be any words or phrases, separated by commas."
              ))
        self.label_7.setText(_("&Series:"))
        self.series.setToolTip(
            _("List of known series. You can add new series."))
        self.series.setWhatsThis(
            _("List of known series. You can add new series."))
        self.series_index.setPrefix(_("Book "))
Ejemplo n.º 18
0
    def setupUi(self, Form):
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(600, 500)
        Form.setWindowTitle(_("Form"))
        self.horizontalLayout = QtGui.QHBoxLayout(Form)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.groupBox_4 = QtGui.QGroupBox(Form)
        self.groupBox_4.setTitle(_("Book Cover"))
        self.groupBox_4.setObjectName(_fromUtf8("groupBox_4"))
        self._2 = QtGui.QGridLayout(self.groupBox_4)
        self._2.setObjectName(_fromUtf8("_2"))
        self._4 = QtGui.QVBoxLayout()
        self._4.setSpacing(6)
        self._4.setMargin(0)
        self._4.setObjectName(_fromUtf8("_4"))
        self.label_5 = QtGui.QLabel(self.groupBox_4)
        self.label_5.setText(_("Change &cover image:"))
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self._4.addWidget(self.label_5)
        self._5 = QtGui.QHBoxLayout()
        self._5.setSpacing(6)
        self._5.setMargin(0)
        self._5.setObjectName(_fromUtf8("_5"))
        self.cover_path = QtGui.QLineEdit(self.groupBox_4)
        self.cover_path.setReadOnly(True)
        self.cover_path.setObjectName(_fromUtf8("cover_path"))
        self._5.addWidget(self.cover_path)
        self.cover_button = QtGui.QToolButton(self.groupBox_4)
        self.cover_button.setToolTip(_("Browse for an image to use as the cover of this book."))
        self.cover_button.setText(_("..."))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8(I("document_open.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.cover_button.setIcon(icon)
        self.cover_button.setObjectName(_fromUtf8("cover_button"))
        self._5.addWidget(self.cover_button)
        self._4.addLayout(self._5)
        self._2.addLayout(self._4, 1, 0, 1, 1)
        self.opt_prefer_metadata_cover = QtGui.QCheckBox(self.groupBox_4)
        self.opt_prefer_metadata_cover.setText(_("Use cover from &source file"))
        self.opt_prefer_metadata_cover.setChecked(True)
        self.opt_prefer_metadata_cover.setObjectName(_fromUtf8("opt_prefer_metadata_cover"))
        self._2.addWidget(self.opt_prefer_metadata_cover, 2, 0, 1, 1)
        self._3 = QtGui.QHBoxLayout()
        self._3.setObjectName(_fromUtf8("_3"))
        self.cover = ImageView(self.groupBox_4)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.cover.sizePolicy().hasHeightForWidth())
        self.cover.setSizePolicy(sizePolicy)
        self.cover.setObjectName(_fromUtf8("cover"))
        self._3.addWidget(self.cover)
        self._2.addLayout(self._3, 0, 0, 1, 1)
        self.horizontalLayout.addWidget(self.groupBox_4)
        self.verticalLayout_2 = QtGui.QVBoxLayout()
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self._7 = QtGui.QGridLayout()
        self._7.setObjectName(_fromUtf8("_7"))
        self.label = QtGui.QLabel(Form)
        self.label.setText(_("&Title: "))
        self.label.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
        self.label.setObjectName(_fromUtf8("label"))
        self._7.addWidget(self.label, 0, 0, 1, 1)
        self.title = EnLineEdit(Form)
        self.title.setToolTip(_("Change the title of this book"))
        self.title.setObjectName(_fromUtf8("title"))
        self._7.addWidget(self.title, 0, 1, 1, 1)
        self.label_2 = QtGui.QLabel(Form)
        self.label_2.setText(_("&Author(s): "))
        self.label_2.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self._7.addWidget(self.label_2, 1, 0, 1, 1)
        self.label_6 = QtGui.QLabel(Form)
        self.label_6.setText(_("Author So&rt:"))
        self.label_6.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self._7.addWidget(self.label_6, 2, 0, 1, 1)
        self.author_sort = EnLineEdit(Form)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.author_sort.sizePolicy().hasHeightForWidth())
        self.author_sort.setSizePolicy(sizePolicy)
        self.author_sort.setToolTip(
            _("Change the author(s) of this book. Multiple authors should be separated by a comma")
        )
        self.author_sort.setObjectName(_fromUtf8("author_sort"))
        self._7.addWidget(self.author_sort, 2, 1, 1, 1)
        self.label_3 = QtGui.QLabel(Form)
        self.label_3.setText(_("&Publisher: "))
        self.label_3.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self._7.addWidget(self.label_3, 3, 0, 1, 1)
        self.label_4 = QtGui.QLabel(Form)
        self.label_4.setText(_("Ta&gs: "))
        self.label_4.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self._7.addWidget(self.label_4, 4, 0, 1, 1)
        self.tags = EditWithComplete(Form)
        self.tags.setToolTip(
            _(
                "Tags categorize the book. This is particularly useful while searching. <br><br>They can be any words or phrases, separated by commas."
            )
        )
        self.tags.setObjectName(_fromUtf8("tags"))
        self._7.addWidget(self.tags, 4, 1, 1, 1)
        self.label_7 = QtGui.QLabel(Form)
        self.label_7.setText(_("&Series:"))
        self.label_7.setTextFormat(QtCore.Qt.PlainText)
        self.label_7.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
        self.label_7.setObjectName(_fromUtf8("label_7"))
        self._7.addWidget(self.label_7, 5, 0, 1, 1)
        self.series = EditWithComplete(Form)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(10)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.series.sizePolicy().hasHeightForWidth())
        self.series.setSizePolicy(sizePolicy)
        self.series.setToolTip(_("List of known series. You can add new series."))
        self.series.setWhatsThis(_("List of known series. You can add new series."))
        self.series.setEditable(True)
        self.series.setInsertPolicy(QtGui.QComboBox.InsertAlphabetically)
        self.series.setObjectName(_fromUtf8("series"))
        self._7.addWidget(self.series, 5, 1, 1, 1)
        self.series_index = QtGui.QDoubleSpinBox(Form)
        self.series_index.setPrefix(_("Book "))
        self.series_index.setMaximum(9999999999.99)
        self.series_index.setProperty("value", 1.0)
        self.series_index.setObjectName(_fromUtf8("series_index"))
        self._7.addWidget(self.series_index, 6, 1, 1, 1)
        self.publisher = EditWithComplete(Form)
        self.publisher.setEditable(True)
        self.publisher.setObjectName(_fromUtf8("publisher"))
        self._7.addWidget(self.publisher, 3, 1, 1, 1)
        self.author = EditWithComplete(Form)
        self.author.setEditable(True)
        self.author.setObjectName(_fromUtf8("author"))
        self._7.addWidget(self.author, 1, 1, 1, 1)
        self.verticalLayout_2.addLayout(self._7)
        self.comment = Editor(Form)
        self.comment.setObjectName(_fromUtf8("comment"))
        self.verticalLayout_2.addWidget(self.comment)
        self.horizontalLayout.addLayout(self.verticalLayout_2)
        self.label_5.setBuddy(self.cover_path)
        self.label.setBuddy(self.title)
        self.label_2.setBuddy(self.author)
        self.label_6.setBuddy(self.author_sort)
        self.label_3.setBuddy(self.publisher)
        self.label_4.setBuddy(self.tags)
        self.label_7.setBuddy(self.series)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
        Form.setTabOrder(self.title, self.author)
        Form.setTabOrder(self.author, self.author_sort)
        Form.setTabOrder(self.author_sort, self.publisher)
        Form.setTabOrder(self.publisher, self.tags)
        Form.setTabOrder(self.tags, self.series)
        Form.setTabOrder(self.series, self.series_index)
        Form.setTabOrder(self.series_index, self.cover_path)
        Form.setTabOrder(self.cover_path, self.cover_button)
        Form.setTabOrder(self.cover_button, self.opt_prefer_metadata_cover)