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

# Form implementation generated from reading ui file '/work/a/ports/deskutils/calibre/work/calibre/src/calibre/gui2/dialogs/metadata_single.ui'
#
# Created: Tue Feb  1 01:53:07 2011
#      by: PyQt4 UI code generator 4.8.1
#
# WARNING! All changes made in this file will be lost!

from PyQt4 import QtCore, QtGui

try:
    _fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
    _fromUtf8 = lambda s: s

class Ui_MetadataSingleDialog(object):
    def setupUi(self, MetadataSingleDialog):
        MetadataSingleDialog.setObjectName(_fromUtf8("MetadataSingleDialog"))
        MetadataSingleDialog.resize(887, 750)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(MetadataSingleDialog.sizePolicy().hasHeightForWidth())
        MetadataSingleDialog.setSizePolicy(sizePolicy)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8(I("edit_input.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        MetadataSingleDialog.setWindowIcon(icon)
        MetadataSingleDialog.setSizeGripEnabled(True)
        MetadataSingleDialog.setModal(True)
        self.verticalLayout_6 = QtGui.QVBoxLayout(MetadataSingleDialog)
        self.verticalLayout_6.setObjectName(_fromUtf8("verticalLayout_6"))
        self.scrollArea = QtGui.QScrollArea(MetadataSingleDialog)
        self.scrollArea.setFrameShape(QtGui.QFrame.NoFrame)
        self.scrollArea.setWidgetResizable(True)
        self.scrollArea.setObjectName(_fromUtf8("scrollArea"))
        self.scrollAreaWidgetContents = QtGui.QWidget(self.scrollArea)
        self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 879, 711))
        self.scrollAreaWidgetContents.setObjectName(_fromUtf8("scrollAreaWidgetContents"))
        self.verticalLayout_5 = QtGui.QVBoxLayout(self.scrollAreaWidgetContents)
        self.verticalLayout_5.setMargin(0)
        self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5"))
        self.central_widget = QtGui.QTabWidget(self.scrollAreaWidgetContents)
        self.central_widget.setMinimumSize(QtCore.QSize(800, 665))
        self.central_widget.setObjectName(_fromUtf8("central_widget"))
        self.central_tabWidgetPage1 = QtGui.QWidget()
        self.central_tabWidgetPage1.setObjectName(_fromUtf8("central_tabWidgetPage1"))
        self.verticalLayout_3 = QtGui.QVBoxLayout(self.central_tabWidgetPage1)
        self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
        self.splitter = QtGui.QSplitter(self.central_tabWidgetPage1)
        self.splitter.setOrientation(QtCore.Qt.Horizontal)
        self.splitter.setObjectName(_fromUtf8("splitter"))
        self.layoutWidget = QtGui.QWidget(self.splitter)
        self.layoutWidget.setObjectName(_fromUtf8("layoutWidget"))
        self.vboxlayout = QtGui.QVBoxLayout(self.layoutWidget)
        self.vboxlayout.setObjectName(_fromUtf8("vboxlayout"))
        self.meta_box = QtGui.QGroupBox(self.layoutWidget)
        self.meta_box.setObjectName(_fromUtf8("meta_box"))
        self.gridLayout_3 = QtGui.QGridLayout(self.meta_box)
        self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3"))
        self.label = QtGui.QLabel(self.meta_box)
        self.label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout_3.addWidget(self.label, 0, 0, 1, 1)
        self.title = EnLineEdit(self.meta_box)
        self.title.setObjectName(_fromUtf8("title"))
        self.gridLayout_3.addWidget(self.title, 0, 1, 1, 1)
        self.swap_button = QtGui.QToolButton(self.meta_box)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(_fromUtf8(I("swap.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.swap_button.setIcon(icon1)
        self.swap_button.setIconSize(QtCore.QSize(16, 16))
        self.swap_button.setObjectName(_fromUtf8("swap_button"))
        self.gridLayout_3.addWidget(self.swap_button, 0, 2, 2, 1)
        self.label_2 = QtGui.QLabel(self.meta_box)
        self.label_2.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.gridLayout_3.addWidget(self.label_2, 1, 0, 1, 1)
        self.label_8 = QtGui.QLabel(self.meta_box)
        self.label_8.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_8.setObjectName(_fromUtf8("label_8"))
        self.gridLayout_3.addWidget(self.label_8, 2, 0, 1, 1)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.author_sort = EnLineEdit(self.meta_box)
        self.author_sort.setObjectName(_fromUtf8("author_sort"))
        self.horizontalLayout.addWidget(self.author_sort)
        self.auto_author_sort = QtGui.QToolButton(self.meta_box)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(_fromUtf8(I("auto_author_sort.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.auto_author_sort.setIcon(icon2)
        self.auto_author_sort.setObjectName(_fromUtf8("auto_author_sort"))
        self.horizontalLayout.addWidget(self.auto_author_sort)
        self.gridLayout_3.addLayout(self.horizontalLayout, 2, 1, 1, 2)
        self.label_6 = QtGui.QLabel(self.meta_box)
        self.label_6.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self.gridLayout_3.addWidget(self.label_6, 3, 0, 1, 1)
        self.rating = QtGui.QSpinBox(self.meta_box)
        self.rating.setButtonSymbols(QtGui.QAbstractSpinBox.PlusMinus)
        self.rating.setMaximum(5)
        self.rating.setObjectName(_fromUtf8("rating"))
        self.gridLayout_3.addWidget(self.rating, 3, 1, 1, 2)
        self.label_3 = QtGui.QLabel(self.meta_box)
        self.label_3.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.gridLayout_3.addWidget(self.label_3, 4, 0, 1, 1)
        self.label_4 = QtGui.QLabel(self.meta_box)
        self.label_4.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.gridLayout_3.addWidget(self.label_4, 5, 0, 1, 1)
        self._2 = QtGui.QHBoxLayout()
        self._2.setObjectName(_fromUtf8("_2"))
        self.tags = TagsLineEdit(self.meta_box)
        self.tags.setObjectName(_fromUtf8("tags"))
        self._2.addWidget(self.tags)
        self.tag_editor_button = QtGui.QToolButton(self.meta_box)
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap(_fromUtf8(I("chapters.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.tag_editor_button.setIcon(icon3)
        self.tag_editor_button.setObjectName(_fromUtf8("tag_editor_button"))
        self._2.addWidget(self.tag_editor_button)
        self.gridLayout_3.addLayout(self._2, 5, 1, 1, 2)
        self.label_7 = QtGui.QLabel(self.meta_box)
        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.gridLayout_3.addWidget(self.label_7, 6, 0, 1, 1)
        self._3 = QtGui.QHBoxLayout()
        self._3.setSpacing(5)
        self._3.setObjectName(_fromUtf8("_3"))
        self.series = EnComboBox(self.meta_box)
        self.series.setEditable(True)
        self.series.setInsertPolicy(QtGui.QComboBox.InsertAlphabetically)
        self.series.setObjectName(_fromUtf8("series"))
        self._3.addWidget(self.series)
        self.remove_series_button = QtGui.QToolButton(self.meta_box)
        icon4 = QtGui.QIcon()
        icon4.addPixmap(QtGui.QPixmap(_fromUtf8(I("trash.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.remove_series_button.setIcon(icon4)
        self.remove_series_button.setObjectName(_fromUtf8("remove_series_button"))
        self._3.addWidget(self.remove_series_button)
        self.gridLayout_3.addLayout(self._3, 6, 1, 1, 2)
        self.label_9 = QtGui.QLabel(self.meta_box)
        self.label_9.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_9.setObjectName(_fromUtf8("label_9"))
        self.gridLayout_3.addWidget(self.label_9, 8, 0, 1, 1)
        self.isbn = QtGui.QLineEdit(self.meta_box)
        self.isbn.setObjectName(_fromUtf8("isbn"))
        self.gridLayout_3.addWidget(self.isbn, 8, 1, 1, 2)
        self.label_10 = QtGui.QLabel(self.meta_box)
        self.label_10.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_10.setObjectName(_fromUtf8("label_10"))
        self.gridLayout_3.addWidget(self.label_10, 10, 0, 1, 1)
        self.publisher = EnComboBox(self.meta_box)
        self.publisher.setEditable(True)
        self.publisher.setObjectName(_fromUtf8("publisher"))
        self.gridLayout_3.addWidget(self.publisher, 4, 1, 1, 2)
        self.series_index = QtGui.QDoubleSpinBox(self.meta_box)
        self.series_index.setEnabled(False)
        self.series_index.setMaximum(9999.99)
        self.series_index.setObjectName(_fromUtf8("series_index"))
        self.gridLayout_3.addWidget(self.series_index, 7, 1, 1, 2)
        self.pubdate = QtGui.QDateEdit(self.meta_box)
        self.pubdate.setCalendarPopup(True)
        self.pubdate.setObjectName(_fromUtf8("pubdate"))
        self.gridLayout_3.addWidget(self.pubdate, 10, 1, 1, 2)
        self.authors = EnComboBox(self.meta_box)
        self.authors.setEditable(True)
        self.authors.setObjectName(_fromUtf8("authors"))
        self.gridLayout_3.addWidget(self.authors, 1, 1, 1, 1)
        self.date = QtGui.QDateEdit(self.meta_box)
        self.date.setCalendarPopup(True)
        self.date.setObjectName(_fromUtf8("date"))
        self.gridLayout_3.addWidget(self.date, 9, 1, 1, 2)
        self.label_11 = QtGui.QLabel(self.meta_box)
        self.label_11.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_11.setObjectName(_fromUtf8("label_11"))
        self.gridLayout_3.addWidget(self.label_11, 9, 0, 1, 1)
        self.vboxlayout.addWidget(self.meta_box)
        self.groupBox_2 = QtGui.QGroupBox(self.layoutWidget)
        self.groupBox_2.setObjectName(_fromUtf8("groupBox_2"))
        self.gridLayout_4 = QtGui.QGridLayout(self.groupBox_2)
        self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4"))
        self.comments = QtGui.QTextEdit(self.groupBox_2)
        self.comments.setTabChangesFocus(True)
        self.comments.setAcceptRichText(False)
        self.comments.setObjectName(_fromUtf8("comments"))
        self.gridLayout_4.addWidget(self.comments, 0, 0, 1, 1)
        self.vboxlayout.addWidget(self.groupBox_2)
        self.fetch_metadata_button = QtGui.QPushButton(self.layoutWidget)
        self.fetch_metadata_button.setObjectName(_fromUtf8("fetch_metadata_button"))
        self.vboxlayout.addWidget(self.fetch_metadata_button)
        self.layoutWidget_2 = QtGui.QWidget(self.splitter)
        self.layoutWidget_2.setObjectName(_fromUtf8("layoutWidget_2"))
        self.verticalLayout_2 = QtGui.QVBoxLayout(self.layoutWidget_2)
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.af_group_box = QtGui.QGroupBox(self.layoutWidget_2)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.af_group_box.sizePolicy().hasHeightForWidth())
        self.af_group_box.setSizePolicy(sizePolicy)
        self.af_group_box.setObjectName(_fromUtf8("af_group_box"))
        self.verticalLayout = QtGui.QVBoxLayout(self.af_group_box)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.gridLayout = QtGui.QGridLayout()
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.formats = FormatList(self.af_group_box)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.formats.sizePolicy().hasHeightForWidth())
        self.formats.setSizePolicy(sizePolicy)
        self.formats.setMaximumSize(QtCore.QSize(16777215, 130))
        self.formats.setDragDropMode(QtGui.QAbstractItemView.DropOnly)
        self.formats.setIconSize(QtCore.QSize(64, 64))
        self.formats.setObjectName(_fromUtf8("formats"))
        self.gridLayout.addWidget(self.formats, 0, 1, 3, 1)
        self.add_format_button = QtGui.QToolButton(self.af_group_box)
        icon5 = QtGui.QIcon()
        icon5.addPixmap(QtGui.QPixmap(_fromUtf8(I("add_book.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.add_format_button.setIcon(icon5)
        self.add_format_button.setIconSize(QtCore.QSize(32, 32))
        self.add_format_button.setObjectName(_fromUtf8("add_format_button"))
        self.gridLayout.addWidget(self.add_format_button, 0, 2, 1, 1)
        self.remove_format_button = QtGui.QToolButton(self.af_group_box)
        self.remove_format_button.setIcon(icon4)
        self.remove_format_button.setIconSize(QtCore.QSize(32, 32))
        self.remove_format_button.setObjectName(_fromUtf8("remove_format_button"))
        self.gridLayout.addWidget(self.remove_format_button, 2, 2, 1, 1)
        self.button_set_cover = QtGui.QToolButton(self.af_group_box)
        icon6 = QtGui.QIcon()
        icon6.addPixmap(QtGui.QPixmap(_fromUtf8(I("book.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.button_set_cover.setIcon(icon6)
        self.button_set_cover.setIconSize(QtCore.QSize(32, 32))
        self.button_set_cover.setObjectName(_fromUtf8("button_set_cover"))
        self.gridLayout.addWidget(self.button_set_cover, 0, 0, 1, 1)
        self.button_set_metadata = QtGui.QToolButton(self.af_group_box)
        self.button_set_metadata.setText(_fromUtf8(""))
        self.button_set_metadata.setIcon(icon)
        self.button_set_metadata.setIconSize(QtCore.QSize(32, 32))
        self.button_set_metadata.setObjectName(_fromUtf8("button_set_metadata"))
        self.gridLayout.addWidget(self.button_set_metadata, 2, 0, 1, 1)
        self.verticalLayout.addLayout(self.gridLayout)
        self.verticalLayout_2.addWidget(self.af_group_box)
        self.bc_box = QtGui.QGroupBox(self.layoutWidget_2)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(10)
        sizePolicy.setHeightForWidth(self.bc_box.sizePolicy().hasHeightForWidth())
        self.bc_box.setSizePolicy(sizePolicy)
        self.bc_box.setObjectName(_fromUtf8("bc_box"))
        self.verticalLayout_4 = QtGui.QVBoxLayout(self.bc_box)
        self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4"))
        self.cover = ImageView(self.bc_box)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(100)
        sizePolicy.setHeightForWidth(self.cover.sizePolicy().hasHeightForWidth())
        self.cover.setSizePolicy(sizePolicy)
        self.cover.setObjectName(_fromUtf8("cover"))
        self.verticalLayout_4.addWidget(self.cover)
        self._4 = QtGui.QVBoxLayout()
        self._4.setSpacing(6)
        self._4.setSizeConstraint(QtGui.QLayout.SetMaximumSize)
        self._4.setMargin(0)
        self._4.setObjectName(_fromUtf8("_4"))
        self.label_5 = QtGui.QLabel(self.bc_box)
        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.bc_box)
        self.cover_path.setReadOnly(True)
        self.cover_path.setObjectName(_fromUtf8("cover_path"))
        self._5.addWidget(self.cover_path)
        self.cover_button = QtGui.QPushButton(self.bc_box)
        icon7 = QtGui.QIcon()
        icon7.addPixmap(QtGui.QPixmap(_fromUtf8(I("document_open.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.cover_button.setIcon(icon7)
        self.cover_button.setObjectName(_fromUtf8("cover_button"))
        self._5.addWidget(self.cover_button)
        self.trim_cover_button = QtGui.QToolButton(self.bc_box)
        icon8 = QtGui.QIcon()
        icon8.addPixmap(QtGui.QPixmap(_fromUtf8(I("trim.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.trim_cover_button.setIcon(icon8)
        self.trim_cover_button.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)
        self.trim_cover_button.setObjectName(_fromUtf8("trim_cover_button"))
        self._5.addWidget(self.trim_cover_button)
        self.reset_cover = QtGui.QToolButton(self.bc_box)
        self.reset_cover.setIcon(icon4)
        self.reset_cover.setObjectName(_fromUtf8("reset_cover"))
        self._5.addWidget(self.reset_cover)
        self._4.addLayout(self._5)
        self.verticalLayout_4.addLayout(self._4)
        self._6 = QtGui.QHBoxLayout()
        self._6.setObjectName(_fromUtf8("_6"))
        self.fetch_cover_button = QtGui.QPushButton(self.bc_box)
        self.fetch_cover_button.setObjectName(_fromUtf8("fetch_cover_button"))
        self._6.addWidget(self.fetch_cover_button)
        self.generate_cover_button = QtGui.QPushButton(self.bc_box)
        self.generate_cover_button.setObjectName(_fromUtf8("generate_cover_button"))
        self._6.addWidget(self.generate_cover_button)
        self.verticalLayout_4.addLayout(self._6)
        self.verticalLayout_2.addWidget(self.bc_box)
        self.verticalLayout_3.addWidget(self.splitter)
        self.central_widget.addTab(self.central_tabWidgetPage1, _fromUtf8(""))
        self.tab = QtGui.QWidget()
        self.tab.setObjectName(_fromUtf8("tab"))
        self.gridLayout_2 = QtGui.QGridLayout(self.tab)
        self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
        self.central_widget.addTab(self.tab, _fromUtf8(""))
        self.verticalLayout_5.addWidget(self.central_widget)
        self.scrollArea.setWidget(self.scrollAreaWidgetContents)
        self.verticalLayout_6.addWidget(self.scrollArea)
        self.button_box = QtGui.QDialogButtonBox(MetadataSingleDialog)
        self.button_box.setOrientation(QtCore.Qt.Horizontal)
        self.button_box.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.button_box.setObjectName(_fromUtf8("button_box"))
        self.verticalLayout_6.addWidget(self.button_box)
        self.label.setBuddy(self.title)
        self.label_2.setBuddy(self.authors)
        self.label_8.setBuddy(self.author_sort)
        self.label_6.setBuddy(self.rating)
        self.label_3.setBuddy(self.publisher)
        self.label_4.setBuddy(self.tags)
        self.label_7.setBuddy(self.series)
        self.label_9.setBuddy(self.isbn)
        self.label_10.setBuddy(self.pubdate)
        self.label_11.setBuddy(self.date)
        self.label_5.setBuddy(self.cover_path)

        self.retranslateUi(MetadataSingleDialog)
        self.central_widget.setCurrentIndex(0)
        QtCore.QObject.connect(self.button_box, QtCore.SIGNAL(_fromUtf8("accepted()")), MetadataSingleDialog.accept)
        QtCore.QObject.connect(self.button_box, QtCore.SIGNAL(_fromUtf8("rejected()")), MetadataSingleDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(MetadataSingleDialog)
        MetadataSingleDialog.setTabOrder(self.title, self.swap_button)
        MetadataSingleDialog.setTabOrder(self.swap_button, self.authors)
        MetadataSingleDialog.setTabOrder(self.authors, self.author_sort)
        MetadataSingleDialog.setTabOrder(self.author_sort, self.auto_author_sort)
        MetadataSingleDialog.setTabOrder(self.auto_author_sort, self.rating)
        MetadataSingleDialog.setTabOrder(self.rating, self.publisher)
        MetadataSingleDialog.setTabOrder(self.publisher, self.tags)
        MetadataSingleDialog.setTabOrder(self.tags, self.tag_editor_button)
        MetadataSingleDialog.setTabOrder(self.tag_editor_button, self.series)
        MetadataSingleDialog.setTabOrder(self.series, self.remove_series_button)
        MetadataSingleDialog.setTabOrder(self.remove_series_button, self.series_index)
        MetadataSingleDialog.setTabOrder(self.series_index, self.isbn)
        MetadataSingleDialog.setTabOrder(self.isbn, self.date)
        MetadataSingleDialog.setTabOrder(self.date, self.pubdate)
        MetadataSingleDialog.setTabOrder(self.pubdate, self.comments)
        MetadataSingleDialog.setTabOrder(self.comments, self.fetch_metadata_button)
        MetadataSingleDialog.setTabOrder(self.fetch_metadata_button, self.add_format_button)
        MetadataSingleDialog.setTabOrder(self.add_format_button, self.remove_format_button)
        MetadataSingleDialog.setTabOrder(self.remove_format_button, self.button_set_cover)
        MetadataSingleDialog.setTabOrder(self.button_set_cover, self.button_set_metadata)
        MetadataSingleDialog.setTabOrder(self.button_set_metadata, self.formats)
        MetadataSingleDialog.setTabOrder(self.formats, self.cover_path)
        MetadataSingleDialog.setTabOrder(self.cover_path, self.reset_cover)
        MetadataSingleDialog.setTabOrder(self.reset_cover, self.fetch_cover_button)
        MetadataSingleDialog.setTabOrder(self.fetch_cover_button, self.generate_cover_button)
        MetadataSingleDialog.setTabOrder(self.generate_cover_button, self.scrollArea)
        MetadataSingleDialog.setTabOrder(self.scrollArea, self.central_widget)
        MetadataSingleDialog.setTabOrder(self.central_widget, self.button_box)

    def retranslateUi(self, MetadataSingleDialog):
        MetadataSingleDialog.setWindowTitle(_("Edit Meta Information"))
        self.meta_box.setTitle(_("Meta information"))
        self.label.setText(_("&Title: "))
        self.title.setToolTip(_("Change the title of this book"))
        self.swap_button.setToolTip(_("Swap the author and title"))
        self.swap_button.setText(_("..."))
        self.label_2.setText(_("&Author(s): "))
        self.label_8.setText(_("Author S&ort: "))
        self.author_sort.setToolTip(_("Specify how the author(s) of this book should be sorted. For example Charles Dickens should be sorted as Dickens, Charles.\n"
"If the box is colored green, then text matches the individual author\'s sort strings. If it is colored red, then the authors and this text do not match."))
        self.auto_author_sort.setToolTip(_("Automatically create the author sort entry based on the current author entry.\n"
"Using this button to create author sort will change author sort from red to green."))
        self.auto_author_sort.setText(_("..."))
        self.label_6.setText(_("&Rating:"))
        self.rating.setToolTip(_("Rating of this book. 0-5 stars"))
        self.rating.setWhatsThis(_("Rating of this book. 0-5 stars"))
        self.rating.setSuffix(_(" stars"))
        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.tag_editor_button.setToolTip(_("Open Tag Editor"))
        self.tag_editor_button.setText(_("Open Tag Editor"))
        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.remove_series_button.setToolTip(_("Remove unused series (Series that have no books)"))
        self.remove_series_button.setText(_("..."))
        self.label_9.setText(_("IS&BN:"))
        self.label_10.setText(_("Publishe&d:"))
        self.series_index.setPrefix(_("Book "))
        self.pubdate.setDisplayFormat("MMM yyyy")
        self.date.setDisplayFormat(_("dd MMM yyyy"))
        self.label_11.setText(_("&Date:"))
        self.groupBox_2.setTitle(_("&Comments"))
        self.fetch_metadata_button.setText(_("&Fetch metadata from server"))
        self.af_group_box.setTitle(_("Available Formats"))
        self.add_format_button.setToolTip(_("Add a new format for this book to the database"))
        self.add_format_button.setText(_("..."))
        self.remove_format_button.setToolTip(_("Remove the selected formats for this book from the database."))
        self.remove_format_button.setText(_("..."))
        self.button_set_cover.setToolTip(_("Set the cover for the book from the selected format"))
        self.button_set_cover.setText(_("..."))
        self.button_set_metadata.setToolTip(_("Update metadata from the metadata in the selected format"))
        self.bc_box.setTitle(_("Book Cover"))
        self.label_5.setText(_("Change &cover image:"))
        self.cover_button.setText(_("&Browse"))
        self.trim_cover_button.setToolTip(_("Remove border (if any) from cover"))
        self.trim_cover_button.setText(_("T&rim"))
        self.reset_cover.setToolTip(_("Reset cover to default"))
        self.reset_cover.setText(_("..."))
        self.fetch_cover_button.setText(_("Download co&ver"))
        self.generate_cover_button.setToolTip(_("Generate a default cover based on the title and author"))
        self.generate_cover_button.setText(_("&Generate cover"))
        self.central_widget.setTabText(self.central_widget.indexOf(self.central_tabWidgetPage1), _("&Basic metadata"))
        self.central_widget.setTabText(self.central_widget.indexOf(self.tab), _("&Custom metadata"))

from calibre.gui2.widgets import TagsLineEdit, EnLineEdit, EnComboBox
from calibre.gui2.widgets import FormatList, ImageView

