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

# Form implementation generated from reading ui file '/home/kovid/work/calibre/src/calibre/gui2/dialogs/metadata_single.ui'
#
# Created: Sun Jan  2 15:47:45 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(994, 716)
        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, 986, 677))
        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.gridLayout_5 = QtGui.QGridLayout(self.central_tabWidgetPage1)
        self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5"))
        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.label1 = QtGui.QLabel(self.meta_box)
        self.label1.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label1.setObjectName(_fromUtf8("label1"))
        self.gridLayout_3.addWidget(self.label1, 1, 0, 1, 1)
        self.title_sort = EnLineEdit(self.meta_box)
        self.title_sort.setObjectName(_fromUtf8("title_sort"))
        self.gridLayout_3.addWidget(self.title_sort, 1, 1, 1, 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, 2, 0, 1, 1)
        self.authors = EnComboBox(self.meta_box)
        self.authors.setEditable(True)
        self.authors.setObjectName(_fromUtf8("authors"))
        self.gridLayout_3.addWidget(self.authors, 2, 1, 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, 3, 0, 1, 1)
        self.author_sort = EnLineEdit(self.meta_box)
        self.author_sort.setObjectName(_fromUtf8("author_sort"))
        self.gridLayout_3.addWidget(self.author_sort, 3, 1, 1, 1)
        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, 4, 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, 4, 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, 5, 0, 1, 1)
        self.publisher = EnComboBox(self.meta_box)
        self.publisher.setEditable(True)
        self.publisher.setObjectName(_fromUtf8("publisher"))
        self.gridLayout_3.addWidget(self.publisher, 5, 1, 1, 2)
        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, 6, 0, 1, 1)
        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, 7, 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.gridLayout_3.addLayout(self._3, 7, 1, 1, 1)
        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, 8, 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, 9, 0, 1, 1)
        self.isbn = QtGui.QLineEdit(self.meta_box)
        self.isbn.setObjectName(_fromUtf8("isbn"))
        self.gridLayout_3.addWidget(self.isbn, 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, 10, 0, 1, 1)
        self.date = QtGui.QDateEdit(self.meta_box)
        self.date.setCalendarPopup(True)
        self.date.setObjectName(_fromUtf8("date"))
        self.gridLayout_3.addWidget(self.date, 10, 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, 11, 0, 1, 1)
        self.pubdate = QtGui.QDateEdit(self.meta_box)
        self.pubdate.setCalendarPopup(True)
        self.pubdate.setObjectName(_fromUtf8("pubdate"))
        self.gridLayout_3.addWidget(self.pubdate, 11, 1, 1, 2)
        self.verticalLayout_7 = QtGui.QVBoxLayout()
        self.verticalLayout_7.setObjectName(_fromUtf8("verticalLayout_7"))
        spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout_7.addItem(spacerItem)
        self.auto_title_sort = QtGui.QToolButton(self.meta_box)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(_fromUtf8(I("auto_author_sort.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.auto_title_sort.setIcon(icon1)
        self.auto_title_sort.setObjectName(_fromUtf8("auto_title_sort"))
        self.verticalLayout_7.addWidget(self.auto_title_sort)
        spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout_7.addItem(spacerItem1)
        self.swap_button = QtGui.QToolButton(self.meta_box)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(_fromUtf8(I("swap.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.swap_button.setIcon(icon2)
        self.swap_button.setIconSize(QtCore.QSize(16, 16))
        self.swap_button.setObjectName(_fromUtf8("swap_button"))
        self.verticalLayout_7.addWidget(self.swap_button)
        spacerItem2 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout_7.addItem(spacerItem2)
        self.auto_author_sort = QtGui.QToolButton(self.meta_box)
        self.auto_author_sort.setIcon(icon1)
        self.auto_author_sort.setObjectName(_fromUtf8("auto_author_sort"))
        self.verticalLayout_7.addWidget(self.auto_author_sort)
        spacerItem3 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout_7.addItem(spacerItem3)
        self.gridLayout_3.addLayout(self.verticalLayout_7, 0, 2, 4, 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.gridLayout_3.addLayout(self._2, 6, 1, 1, 1)
        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.gridLayout_3.addWidget(self.tag_editor_button, 6, 2, 1, 1)
        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.gridLayout_3.addWidget(self.remove_series_button, 7, 2, 1, 1)
        self.vboxlayout.addWidget(self.meta_box)
        self.fetch_metadata_button = QtGui.QPushButton(self.layoutWidget)
        self.fetch_metadata_button.setObjectName(_fromUtf8("fetch_metadata_button"))
        self.vboxlayout.addWidget(self.fetch_metadata_button)
        spacerItem4 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
        self.vboxlayout.addItem(spacerItem4)
        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.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_button = QtGui.QPushButton(self.bc_box)
        icon5 = QtGui.QIcon()
        icon5.addPixmap(QtGui.QPixmap(_fromUtf8(I("document_open.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.cover_button.setIcon(icon5)
        self.cover_button.setObjectName(_fromUtf8("cover_button"))
        self._5.addWidget(self.cover_button)
        self.trim_cover_button = QtGui.QPushButton(self.bc_box)
        icon6 = QtGui.QIcon()
        icon6.addPixmap(QtGui.QPixmap(_fromUtf8(I("trim.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.trim_cover_button.setIcon(icon6)
        self.trim_cover_button.setObjectName(_fromUtf8("trim_cover_button"))
        self._5.addWidget(self.trim_cover_button)
        self.reset_cover = QtGui.QPushButton(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.layoutWidget1 = QtGui.QWidget(self.splitter)
        self.layoutWidget1.setObjectName(_fromUtf8("layoutWidget1"))
        self.verticalLayout_3 = QtGui.QVBoxLayout(self.layoutWidget1)
        self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
        self.af_group_box = QtGui.QGroupBox(self.layoutWidget1)
        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, 140))
        self.formats.setBaseSize(QtCore.QSize(100, 0))
        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)
        icon7 = QtGui.QIcon()
        icon7.addPixmap(QtGui.QPixmap(_fromUtf8(I("add_book.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.add_format_button.setIcon(icon7)
        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)
        icon8 = QtGui.QIcon()
        icon8.addPixmap(QtGui.QPixmap(_fromUtf8(I("book.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.button_set_cover.setIcon(icon8)
        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_3.addWidget(self.af_group_box)
        self.groupBox = QtGui.QGroupBox(self.layoutWidget1)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(10)
        sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth())
        self.groupBox.setSizePolicy(sizePolicy)
        self.groupBox.setObjectName(_fromUtf8("groupBox"))
        self.verticalLayout_8 = QtGui.QVBoxLayout(self.groupBox)
        self.verticalLayout_8.setMargin(0)
        self.verticalLayout_8.setObjectName(_fromUtf8("verticalLayout_8"))
        self.comments = Editor(self.groupBox)
        self.comments.setObjectName(_fromUtf8("comments"))
        self.verticalLayout_8.addWidget(self.comments)
        self.verticalLayout_3.addWidget(self.groupBox)
        self.gridLayout_5.addWidget(self.splitter, 0, 0, 1, 1)
        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.label1.setBuddy(self.title_sort)
        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_11.setBuddy(self.date)
        self.label_10.setBuddy(self.pubdate)
        self.label_5.setBuddy(self.cover_button)

        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.auto_title_sort)
        MetadataSingleDialog.setTabOrder(self.auto_title_sort, self.title_sort)
        MetadataSingleDialog.setTabOrder(self.title_sort, self.swap_button)
        MetadataSingleDialog.setTabOrder(self.swap_button, self.authors)
        MetadataSingleDialog.setTabOrder(self.authors, self.auto_author_sort)
        MetadataSingleDialog.setTabOrder(self.auto_author_sort, self.author_sort)
        MetadataSingleDialog.setTabOrder(self.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.fetch_metadata_button)
        MetadataSingleDialog.setTabOrder(self.fetch_metadata_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.add_format_button)
        MetadataSingleDialog.setTabOrder(self.add_format_button, self.remove_format_button)
        MetadataSingleDialog.setTabOrder(self.remove_format_button, self.cover_button)
        MetadataSingleDialog.setTabOrder(self.cover_button, self.trim_cover_button)
        MetadataSingleDialog.setTabOrder(self.trim_cover_button, 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.button_box)
        MetadataSingleDialog.setTabOrder(self.button_box, self.scrollArea)
        MetadataSingleDialog.setTabOrder(self.scrollArea, self.central_widget)

    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.label1.setText(_("Title &sort: "))
        self.title_sort.setToolTip(_("Specify how this book should be sorted when by title. For example, The Exorcist might be sorted as Exorcist, The."))
        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.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.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 "))
        self.label_9.setText(_("IS&BN:"))
        self.label_11.setText(_("&Date:"))
        self.date.setDisplayFormat(_("dd MMM yyyy"))
        self.label_10.setText(_("Publishe&d:"))
        self.pubdate.setDisplayFormat("MMM yyyy")
        self.auto_title_sort.setToolTip(_("Automatically create the title sort entry based on the current title entry.\n"
"Using this button to create title sort will change title sort from red to green."))
        self.auto_title_sort.setText(_("..."))
        self.swap_button.setToolTip(_("Swap the author and title"))
        self.swap_button.setText(_("..."))
        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.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.remove_series_button.setToolTip(_("Remove unused series (Series that have no books)"))
        self.remove_series_button.setText(_("..."))
        self.fetch_metadata_button.setText(_("&Fetch metadata from server"))
        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(_("&Remove"))
        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.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.groupBox.setTitle(_("&Comments"))
        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 FormatList, ImageView
from calibre.gui2.widgets import EnLineEdit, TagsLineEdit, EnComboBox
from calibre.gui2.comments_editor import Editor

