Beispiel #1
0
class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(430, 74)
        self.gridLayout = QtWidgets.QGridLayout(Form)
        self.gridLayout.setObjectName("gridLayout")
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.msg = QtWidgets.QLabel(Form)
        self.msg.setWordWrap(True)
        self.msg.setObjectName("msg")
        self.verticalLayout.addWidget(self.msg)
        self.edit = HistoryLineEdit(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(100)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.edit.sizePolicy().hasHeightForWidth())
        self.edit.setSizePolicy(sizePolicy)
        self.edit.setMinimumSize(QtCore.QSize(350, 0))
        self.edit.setSizeAdjustPolicy(
            QtWidgets.QComboBox.AdjustToMinimumContentsLengthWithIcon)
        self.edit.setMinimumContentsLength(30)
        self.edit.setObjectName("edit")
        self.verticalLayout.addWidget(self.edit)
        self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1)
        self.button = QtWidgets.QToolButton(Form)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(I("wizard.png")), QtGui.QIcon.Normal,
                       QtGui.QIcon.Off)
        self.button.setIcon(icon)
        self.button.setIconSize(QtCore.QSize(40, 40))
        self.button.setObjectName("button")
        self.gridLayout.addWidget(self.button, 0, 1, 1, 1)
        self.msg.setBuddy(self.edit)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):

        Form.setWindowTitle(_("Form"))
        self.msg.setText(_("TextLabel"))
        self.button.setToolTip(
            _("Use a wizard to help construct the Regular expression"))
        self.button.setText(_("..."))
Beispiel #2
0
class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(430, 74)
        Form.setWindowTitle(_("Form"))
        self.gridLayout = QtGui.QGridLayout(Form)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.msg = QtGui.QLabel(Form)
        self.msg.setText(_("TextLabel"))
        self.msg.setWordWrap(True)
        self.msg.setObjectName(_fromUtf8("msg"))
        self.verticalLayout.addWidget(self.msg)
        self.edit = HistoryLineEdit(Form)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(100)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.edit.sizePolicy().hasHeightForWidth())
        self.edit.setSizePolicy(sizePolicy)
        self.edit.setMinimumSize(QtCore.QSize(350, 0))
        self.edit.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLengthWithIcon)
        self.edit.setMinimumContentsLength(30)
        self.edit.setObjectName(_fromUtf8("edit"))
        self.verticalLayout.addWidget(self.edit)
        self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1)
        self.button = QtGui.QToolButton(Form)
        self.button.setToolTip(_("Use a wizard to help construct the Regular expression"))
        self.button.setText(_("..."))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8(I("wizard.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.button.setIcon(icon)
        self.button.setIconSize(QtCore.QSize(40, 40))
        self.button.setObjectName(_fromUtf8("button"))
        self.gridLayout.addWidget(self.button, 0, 1, 1, 1)
        self.msg.setBuddy(self.edit)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        pass
class Ui_EditAuthorsDialog(object):
    def setupUi(self, EditAuthorsDialog):
        EditAuthorsDialog.setObjectName(_fromUtf8("EditAuthorsDialog"))
        EditAuthorsDialog.resize(768, 342)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(EditAuthorsDialog.sizePolicy().hasHeightForWidth())
        EditAuthorsDialog.setSizePolicy(sizePolicy)
        EditAuthorsDialog.setWindowTitle(_("Manage authors"))
        self.verticalLayout = QtGui.QVBoxLayout(EditAuthorsDialog)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.hboxlayout = QtGui.QHBoxLayout()
        self.hboxlayout.setObjectName(_fromUtf8("hboxlayout"))
        self.label = QtGui.QLabel(EditAuthorsDialog)
        self.label.setText(_("&Search for:"))
        self.label.setObjectName(_fromUtf8("label"))
        self.hboxlayout.addWidget(self.label)
        self.find_box = HistoryLineEdit(EditAuthorsDialog)
        self.find_box.setMinimumSize(QtCore.QSize(200, 0))
        self.find_box.setObjectName(_fromUtf8("find_box"))
        self.hboxlayout.addWidget(self.find_box)
        self.find_button = QtGui.QPushButton(EditAuthorsDialog)
        self.find_button.setText(_("F&ind"))
        self.find_button.setObjectName(_fromUtf8("find_button"))
        self.hboxlayout.addWidget(self.find_button)
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.hboxlayout.addItem(spacerItem)
        self.verticalLayout.addLayout(self.hboxlayout)
        self.table = QtGui.QTableWidget(EditAuthorsDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.table.sizePolicy().hasHeightForWidth())
        self.table.setSizePolicy(sizePolicy)
        self.table.setColumnCount(0)
        self.table.setObjectName(_fromUtf8("table"))
        self.table.setRowCount(0)
        self.verticalLayout.addWidget(self.table)
        self.gridlayout = QtGui.QGridLayout()
        self.gridlayout.setObjectName(_fromUtf8("gridlayout"))
        self.sort_by_author = QtGui.QPushButton(EditAuthorsDialog)
        self.sort_by_author.setText(_("Sort by author"))
        self.sort_by_author.setObjectName(_fromUtf8("sort_by_author"))
        self.gridlayout.addWidget(self.sort_by_author, 0, 0, 1, 1)
        self.sort_by_author_sort = QtGui.QPushButton(EditAuthorsDialog)
        self.sort_by_author_sort.setText(_("Sort by author sort"))
        self.sort_by_author_sort.setObjectName(_fromUtf8("sort_by_author_sort"))
        self.gridlayout.addWidget(self.sort_by_author_sort, 0, 1, 1, 1)
        self.recalc_author_sort = QtGui.QPushButton(EditAuthorsDialog)
        self.recalc_author_sort.setToolTip(_("Reset all the author sort values to a value automatically\n"
"generated from the author. Exactly how this value is automatically\n"
"generated can be controlled via Preferences->Advanced->Tweaks"))
        self.recalc_author_sort.setText(_("Recalculate all author sort values"))
        self.recalc_author_sort.setObjectName(_fromUtf8("recalc_author_sort"))
        self.gridlayout.addWidget(self.recalc_author_sort, 1, 0, 1, 1)
        self.auth_sort_to_author = QtGui.QPushButton(EditAuthorsDialog)
        self.auth_sort_to_author.setToolTip(_("Copy author sort to author for every author. You typically use this button\n"
"after changing Preferences->Advanced->Tweaks->Author sort name algorithm"))
        self.auth_sort_to_author.setText(_("Copy all author sort values to author"))
        self.auth_sort_to_author.setObjectName(_fromUtf8("auth_sort_to_author"))
        self.gridlayout.addWidget(self.auth_sort_to_author, 1, 1, 1, 1)
        self.buttonBox = QtGui.QDialogButtonBox(EditAuthorsDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.buttonBox.sizePolicy().hasHeightForWidth())
        self.buttonBox.setSizePolicy(sizePolicy)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setCenterButtons(False)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.gridlayout.addWidget(self.buttonBox, 1, 2, 1, 1)
        self.verticalLayout.addLayout(self.gridlayout)
        self.label.setBuddy(self.find_box)

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

    def retranslateUi(self, EditAuthorsDialog):
        pass
Beispiel #4
0
class Ui_MatchBooks(object):
    def setupUi(self, MatchBooks):
        MatchBooks.setObjectName("MatchBooks")
        MatchBooks.resize(751, 342)
        sizePolicy = QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.Expanding,
            QtWidgets.QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            MatchBooks.sizePolicy().hasHeightForWidth())
        MatchBooks.setSizePolicy(sizePolicy)
        self.gridlayout = QtWidgets.QGridLayout(MatchBooks)
        self.gridlayout.setObjectName("gridlayout")
        self.search_text = HistoryLineEdit(MatchBooks)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(100)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.search_text.sizePolicy().hasHeightForWidth())
        self.search_text.setSizePolicy(sizePolicy)
        self.search_text.setMinimumSize(QtCore.QSize(350, 0))
        self.search_text.setSizeAdjustPolicy(
            QtWidgets.QComboBox.AdjustToMinimumContentsLengthWithIcon)
        self.search_text.setMinimumContentsLength(30)
        self.search_text.setObjectName("search_text")
        self.gridlayout.addWidget(self.search_text, 0, 0, 1, 1)
        self.search_button = QtWidgets.QPushButton(MatchBooks)
        self.search_button.setObjectName("search_button")
        self.gridlayout.addWidget(self.search_button, 0, 1, 1, 1)
        self.label = QtWidgets.QLabel(MatchBooks)
        self.label.setObjectName("label")
        self.gridlayout.addWidget(self.label, 1, 0, 1, 2)
        self.books_table = QtWidgets.QTableWidget(MatchBooks)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(4)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.books_table.sizePolicy().hasHeightForWidth())
        self.books_table.setSizePolicy(sizePolicy)
        self.books_table.setRowCount(0)
        self.books_table.setColumnCount(0)
        self.books_table.setObjectName("books_table")
        self.gridlayout.addWidget(self.books_table, 2, 0, 1, 2)
        self.label1 = QtWidgets.QLabel(MatchBooks)
        self.label1.setWordWrap(True)
        self.label1.setObjectName("label1")
        self.gridlayout.addWidget(self.label1, 3, 0, 1, 2)
        self.hboxlayout = QtWidgets.QHBoxLayout()
        self.hboxlayout.setObjectName("hboxlayout")
        spacerItem = QtWidgets.QSpacerItem(0, 0,
                                           QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Minimum)
        self.hboxlayout.addItem(spacerItem)
        self.buttonBox = QtWidgets.QDialogButtonBox(MatchBooks)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel
                                          | QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setCenterButtons(False)
        self.buttonBox.setObjectName("buttonBox")
        self.hboxlayout.addWidget(self.buttonBox)
        self.gridlayout.addLayout(self.hboxlayout, 4, 0, 1, 2)

        self.retranslateUi(MatchBooks)
        self.buttonBox.rejected.connect(MatchBooks.reject)
        QtCore.QMetaObject.connectSlotsByName(MatchBooks)

    def retranslateUi(self, MatchBooks):

        MatchBooks.setWindowTitle(_("Match books"))
        self.search_button.setText(_("Search"))
        self.label.setText(_("Do a search to find the book you want to match"))
        self.label1.setText(
            _("<p>Remember to update metadata on the device when you are done (Right click the device icon and select <i>Update cached metadata</i>)</p>"
              ))
Beispiel #5
0
class Ui_EditAuthorsDialog(object):
    def setupUi(self, EditAuthorsDialog):
        EditAuthorsDialog.setObjectName(_fromUtf8("EditAuthorsDialog"))
        EditAuthorsDialog.resize(768, 342)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            EditAuthorsDialog.sizePolicy().hasHeightForWidth())
        EditAuthorsDialog.setSizePolicy(sizePolicy)
        self.verticalLayout = QtGui.QVBoxLayout(EditAuthorsDialog)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.hboxlayout = QtGui.QHBoxLayout()
        self.hboxlayout.setObjectName(_fromUtf8("hboxlayout"))
        self.label = QtGui.QLabel(EditAuthorsDialog)
        self.label.setObjectName(_fromUtf8("label"))
        self.hboxlayout.addWidget(self.label)
        self.find_box = HistoryLineEdit(EditAuthorsDialog)
        self.find_box.setMinimumSize(QtCore.QSize(200, 0))
        self.find_box.setObjectName(_fromUtf8("find_box"))
        self.hboxlayout.addWidget(self.find_box)
        self.find_button = QtGui.QPushButton(EditAuthorsDialog)
        self.find_button.setObjectName(_fromUtf8("find_button"))
        self.hboxlayout.addWidget(self.find_button)
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Minimum)
        self.hboxlayout.addItem(spacerItem)
        self.verticalLayout.addLayout(self.hboxlayout)
        self.table = QtGui.QTableWidget(EditAuthorsDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.table.sizePolicy().hasHeightForWidth())
        self.table.setSizePolicy(sizePolicy)
        self.table.setColumnCount(0)
        self.table.setObjectName(_fromUtf8("table"))
        self.table.setRowCount(0)
        self.verticalLayout.addWidget(self.table)
        self.gridlayout = QtGui.QGridLayout()
        self.gridlayout.setObjectName(_fromUtf8("gridlayout"))
        self.sort_by_author = QtGui.QPushButton(EditAuthorsDialog)
        self.sort_by_author.setObjectName(_fromUtf8("sort_by_author"))
        self.gridlayout.addWidget(self.sort_by_author, 0, 0, 1, 1)
        self.sort_by_author_sort = QtGui.QPushButton(EditAuthorsDialog)
        self.sort_by_author_sort.setObjectName(
            _fromUtf8("sort_by_author_sort"))
        self.gridlayout.addWidget(self.sort_by_author_sort, 0, 1, 1, 1)
        self.recalc_author_sort = QtGui.QPushButton(EditAuthorsDialog)
        self.recalc_author_sort.setObjectName(_fromUtf8("recalc_author_sort"))
        self.gridlayout.addWidget(self.recalc_author_sort, 1, 0, 1, 1)
        self.auth_sort_to_author = QtGui.QPushButton(EditAuthorsDialog)
        self.auth_sort_to_author.setObjectName(
            _fromUtf8("auth_sort_to_author"))
        self.gridlayout.addWidget(self.auth_sort_to_author, 1, 1, 1, 1)
        self.buttonBox = QtGui.QDialogButtonBox(EditAuthorsDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.buttonBox.sizePolicy().hasHeightForWidth())
        self.buttonBox.setSizePolicy(sizePolicy)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel
                                          | QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setCenterButtons(False)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.gridlayout.addWidget(self.buttonBox, 1, 2, 1, 1)
        self.verticalLayout.addLayout(self.gridlayout)
        self.label.setBuddy(self.find_box)

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

    def retranslateUi(self, EditAuthorsDialog):
        EditAuthorsDialog.setWindowTitle(_("Manage authors"))
        self.label.setText(_("&Search for:"))
        self.find_button.setText(_("F&ind"))
        self.sort_by_author.setText(_("Sort by author"))
        self.sort_by_author_sort.setText(_("Sort by author sort"))
        self.recalc_author_sort.setToolTip(
            _("Reset all the author sort values to a value automatically\n"
              "generated from the author. Exactly how this value is automatically\n"
              "generated can be controlled via Preferences->Advanced->Tweaks"))
        self.recalc_author_sort.setText(
            _("Recalculate all author sort values"))
        self.auth_sort_to_author.setToolTip(
            _("Copy author sort to author for every author. You typically use this button\n"
              "after changing Preferences->Advanced->Tweaks->Author sort name algorithm"
              ))
        self.auth_sort_to_author.setText(
            _("Copy all author sort values to author"))
Beispiel #6
0
class Ui_EditAuthorsDialog(object):
    def setupUi(self, EditAuthorsDialog):
        EditAuthorsDialog.setObjectName("EditAuthorsDialog")
        EditAuthorsDialog.resize(768, 342)
        sizePolicy = QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.Expanding,
            QtWidgets.QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            EditAuthorsDialog.sizePolicy().hasHeightForWidth())
        EditAuthorsDialog.setSizePolicy(sizePolicy)
        self.verticalLayout = QtWidgets.QVBoxLayout(EditAuthorsDialog)
        self.verticalLayout.setObjectName("verticalLayout")
        self.gridlayout = QtWidgets.QGridLayout()
        self.gridlayout.setObjectName("gridlayout")
        self.label = QtWidgets.QLabel(EditAuthorsDialog)
        self.label.setObjectName("label")
        self.gridlayout.addWidget(self.label, 0, 0, 1, 1)
        self.find_box = HistoryLineEdit(EditAuthorsDialog)
        self.find_box.setMinimumSize(QtCore.QSize(200, 0))
        self.find_box.setClearButtonEnabled(True)
        self.find_box.setObjectName("find_box")
        self.gridlayout.addWidget(self.find_box, 0, 1, 1, 1)
        self.find_button = QtWidgets.QPushButton(EditAuthorsDialog)
        self.find_button.setObjectName("find_button")
        self.gridlayout.addWidget(self.find_button, 0, 2, 1, 1)
        spacerItem = QtWidgets.QSpacerItem(40, 20,
                                           QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Minimum)
        self.gridlayout.addItem(spacerItem, 0, 3, 1, 1)
        self.apply_vl_checkbox = QtWidgets.QCheckBox(EditAuthorsDialog)
        self.apply_vl_checkbox.setObjectName("apply_vl_checkbox")
        self.gridlayout.addWidget(self.apply_vl_checkbox, 0, 4, 1, 1)
        self.label1 = QtWidgets.QLabel(EditAuthorsDialog)
        self.label1.setObjectName("label1")
        self.gridlayout.addWidget(self.label1, 1, 0, 1, 1)
        self.filter_box = HistoryLineEdit(EditAuthorsDialog)
        self.filter_box.setMinimumSize(QtCore.QSize(200, 0))
        self.filter_box.setClearButtonEnabled(True)
        self.filter_box.setObjectName("filter_box")
        self.gridlayout.addWidget(self.filter_box, 1, 1, 1, 1)
        self.filter_button = QtWidgets.QPushButton(EditAuthorsDialog)
        self.filter_button.setObjectName("filter_button")
        self.gridlayout.addWidget(self.filter_button, 1, 2, 1, 1)
        self.verticalLayout.addLayout(self.gridlayout)
        self.table = QtWidgets.QTableWidget(EditAuthorsDialog)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.table.sizePolicy().hasHeightForWidth())
        self.table.setSizePolicy(sizePolicy)
        self.table.setColumnCount(0)
        self.table.setObjectName("table")
        self.table.setRowCount(0)
        self.verticalLayout.addWidget(self.table)
        self.gridlayout1 = QtWidgets.QGridLayout()
        self.gridlayout1.setObjectName("gridlayout1")
        self.recalc_author_sort = QtWidgets.QPushButton(EditAuthorsDialog)
        self.recalc_author_sort.setObjectName("recalc_author_sort")
        self.gridlayout1.addWidget(self.recalc_author_sort, 1, 0, 1, 1)
        self.auth_sort_to_author = QtWidgets.QPushButton(EditAuthorsDialog)
        self.auth_sort_to_author.setObjectName("auth_sort_to_author")
        self.gridlayout1.addWidget(self.auth_sort_to_author, 1, 1, 1, 1)
        self.buttonBox = QtWidgets.QDialogButtonBox(EditAuthorsDialog)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.buttonBox.sizePolicy().hasHeightForWidth())
        self.buttonBox.setSizePolicy(sizePolicy)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel
                                          | QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setCenterButtons(False)
        self.buttonBox.setObjectName("buttonBox")
        self.gridlayout1.addWidget(self.buttonBox, 1, 2, 1, 1)
        self.verticalLayout.addLayout(self.gridlayout1)
        self.label.setBuddy(self.find_box)
        self.label1.setBuddy(self.filter_box)

        self.retranslateUi(EditAuthorsDialog)
        self.buttonBox.accepted.connect(EditAuthorsDialog.accept)
        self.buttonBox.rejected.connect(EditAuthorsDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(EditAuthorsDialog)

    def retranslateUi(self, EditAuthorsDialog):

        EditAuthorsDialog.setWindowTitle(_("Manage authors"))
        self.label.setText(_("&Search for:"))
        self.find_button.setText(_("S&earch"))
        self.apply_vl_checkbox.setToolTip(
            _("<p>Only show authors in the\n"
              "          current Virtual library. Edits already done may be hidden but will\n"
              "          not be forgotten.</p>"))
        self.apply_vl_checkbox.setText(
            _("Only show authors in the current &Virtual library"))
        self.label1.setText(_("Filter &by:"))
        self.filter_box.setToolTip(
            _("<p>Only show authors that contain the text in this box.\n"
              "          The match ignores case.</p>"))
        self.filter_button.setText(_("Fi&lter"))
        self.recalc_author_sort.setToolTip(
            _("Reset all the author sort values to a value automatically\n"
              "generated from the author. Exactly how this value is automatically\n"
              "generated can be controlled via Preferences->Advanced->Tweaks"))
        self.recalc_author_sort.setText(
            _("&Recalculate all author sort values"))
        self.auth_sort_to_author.setToolTip(
            _("Copy author sort to author for every author. You typically use this button\n"
              "after changing Preferences->Advanced->Tweaks->Author sort name algorithm"
              ))
        self.auth_sort_to_author.setText(
            _("&Copy all author sort values to author"))
Beispiel #7
0
class Ui_TagListEditor(object):
    def setupUi(self, TagListEditor):
        TagListEditor.setObjectName("TagListEditor")
        TagListEditor.resize(676, 335)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(I("chapters.png")), QtGui.QIcon.Normal,
                       QtGui.QIcon.Off)
        TagListEditor.setWindowIcon(icon)
        self.gridlayout = QtWidgets.QGridLayout(TagListEditor)
        self.gridlayout.setObjectName("gridlayout")
        self.label = QtWidgets.QLabel(TagListEditor)
        self.label.setObjectName("label")
        self.gridlayout.addWidget(self.label, 0, 0, 1, 1)
        self.search_box = HistoryLineEdit(TagListEditor)
        self.search_box.setMinimumSize(QtCore.QSize(200, 0))
        self.search_box.setClearButtonEnabled(True)
        self.search_box.setObjectName("search_box")
        self.gridlayout.addWidget(self.search_box, 0, 1, 1, 1)
        self.search_button = QtWidgets.QPushButton(TagListEditor)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(I("search.png")), QtGui.QIcon.Normal,
                        QtGui.QIcon.Off)
        self.search_button.setIcon(icon1)
        self.search_button.setObjectName("search_button")
        self.gridlayout.addWidget(self.search_button, 0, 2, 1, 1)
        spacerItem = QtWidgets.QSpacerItem(40, 20,
                                           QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Minimum)
        self.gridlayout.addItem(spacerItem, 0, 3, 1, 1)
        self.apply_vl_checkbox = QtWidgets.QCheckBox(TagListEditor)
        self.apply_vl_checkbox.setObjectName("apply_vl_checkbox")
        self.gridlayout.addWidget(self.apply_vl_checkbox, 0, 4, 1, 1)
        self.label1 = QtWidgets.QLabel(TagListEditor)
        self.label1.setObjectName("label1")
        self.gridlayout.addWidget(self.label1, 1, 0, 1, 1)
        self.filter_box = HistoryLineEdit(TagListEditor)
        self.filter_box.setMinimumSize(QtCore.QSize(200, 0))
        self.filter_box.setClearButtonEnabled(True)
        self.filter_box.setObjectName("filter_box")
        self.gridlayout.addWidget(self.filter_box, 1, 1, 1, 1)
        self.filter_button = QtWidgets.QPushButton(TagListEditor)
        self.filter_button.setIcon(icon1)
        self.filter_button.setObjectName("filter_button")
        self.gridlayout.addWidget(self.filter_button, 1, 2, 1, 1)
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        spacerItem1 = QtWidgets.QSpacerItem(20, 40,
                                            QtWidgets.QSizePolicy.Minimum,
                                            QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem1)
        self.delete_button = QtWidgets.QToolButton(TagListEditor)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(I("trash.png")), QtGui.QIcon.Normal,
                        QtGui.QIcon.Off)
        self.delete_button.setIcon(icon2)
        self.delete_button.setIconSize(QtCore.QSize(32, 32))
        self.delete_button.setObjectName("delete_button")
        self.verticalLayout_2.addWidget(self.delete_button)
        spacerItem2 = QtWidgets.QSpacerItem(20, 40,
                                            QtWidgets.QSizePolicy.Minimum,
                                            QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem2)
        self.rename_button = QtWidgets.QToolButton(TagListEditor)
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap(I("edit_input.png")), QtGui.QIcon.Normal,
                        QtGui.QIcon.Off)
        self.rename_button.setIcon(icon3)
        self.rename_button.setIconSize(QtCore.QSize(32, 32))
        self.rename_button.setObjectName("rename_button")
        self.verticalLayout_2.addWidget(self.rename_button)
        spacerItem3 = QtWidgets.QSpacerItem(20, 40,
                                            QtWidgets.QSizePolicy.Minimum,
                                            QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem3)
        self.undo_button = QtWidgets.QToolButton(TagListEditor)
        icon4 = QtGui.QIcon()
        icon4.addPixmap(QtGui.QPixmap(I("edit-undo.png")), QtGui.QIcon.Normal,
                        QtGui.QIcon.Off)
        self.undo_button.setIcon(icon4)
        self.undo_button.setIconSize(QtCore.QSize(32, 32))
        self.undo_button.setObjectName("undo_button")
        self.verticalLayout_2.addWidget(self.undo_button)
        spacerItem4 = QtWidgets.QSpacerItem(20, 40,
                                            QtWidgets.QSizePolicy.Minimum,
                                            QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem4)
        self.gridlayout.addLayout(self.verticalLayout_2, 2, 0, 1, 1)
        self.table = TleTableWidget(TagListEditor)
        self.table.setAlternatingRowColors(True)
        self.table.setSelectionMode(
            QtWidgets.QAbstractItemView.ExtendedSelection)
        self.table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
        self.table.setObjectName("table")
        self.table.setColumnCount(0)
        self.table.setRowCount(0)
        self.gridlayout.addWidget(self.table, 2, 1, 1, 4)
        self.buttonBox = QtWidgets.QDialogButtonBox(TagListEditor)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel
                                          | QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.gridlayout.addWidget(self.buttonBox, 3, 0, 1, 5)
        self.label.setBuddy(self.search_box)
        self.label1.setBuddy(self.filter_box)

        self.retranslateUi(TagListEditor)
        self.buttonBox.accepted.connect(TagListEditor.accept)
        self.buttonBox.rejected.connect(TagListEditor.reject)
        QtCore.QMetaObject.connectSlotsByName(TagListEditor)

    def retranslateUi(self, TagListEditor):

        TagListEditor.setWindowTitle(_("Category editor"))
        self.label.setText(_("&Search for:"))
        self.search_box.setToolTip(_("Search for an item in the first column"))
        self.search_button.setToolTip(
            _("Find items containing the search string"))
        self.search_button.setText(_("S&earch"))
        self.apply_vl_checkbox.setToolTip(
            _("<p>Show items only if they appear in the\n"
              "          current Virtual library. Edits already done may be hidden but will\n"
              "          not be forgotten.</p>"))
        self.apply_vl_checkbox.setText(
            _("Only show items in the current &Virtual library"))
        self.label1.setText(_("&Filter by:"))
        self.filter_box.setToolTip(
            _("Filter items using the text in this box"))
        self.filter_button.setToolTip(
            _("Show only items containing this text"))
        self.filter_button.setText(_("F&ilter"))
        self.delete_button.setToolTip(
            _("Delete selected items from the database. This will unapply the items from all books and then remove them from the database."
              ))
        self.delete_button.setText(_("..."))
        self.delete_button.setShortcut(_("Ctrl+D"))
        self.rename_button.setToolTip(
            _("Rename the items in every book where they are used"))
        self.rename_button.setText(_("..."))
        self.rename_button.setShortcut(_("Ctrl+R"))
        self.undo_button.setToolTip(
            _("Undo any deletes or edits on the selected lines"))
        self.undo_button.setText(_("..."))
        self.undo_button.setShortcut(_("Ctrl+U"))