本文整理汇总了Python中calibre.gui2.widgets.HistoryLineEdit.setObjectName方法的典型用法代码示例。如果您正苦于以下问题:Python HistoryLineEdit.setObjectName方法的具体用法?Python HistoryLineEdit.setObjectName怎么用?Python HistoryLineEdit.setObjectName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类calibre.gui2.widgets.HistoryLineEdit
的用法示例。
在下文中一共展示了HistoryLineEdit.setObjectName方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Ui_Form
# 需要导入模块: from calibre.gui2.widgets import HistoryLineEdit [as 别名]
# 或者: from calibre.gui2.widgets.HistoryLineEdit import setObjectName [as 别名]
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
示例2: Ui_EditAuthorsDialog
# 需要导入模块: from calibre.gui2.widgets import HistoryLineEdit [as 别名]
# 或者: from calibre.gui2.widgets.HistoryLineEdit import setObjectName [as 别名]
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
示例3: Ui_TagListEditor
# 需要导入模块: from calibre.gui2.widgets import HistoryLineEdit [as 别名]
# 或者: from calibre.gui2.widgets.HistoryLineEdit import setObjectName [as 别名]
class Ui_TagListEditor(object):
def setupUi(self, TagListEditor):
TagListEditor.setObjectName(_fromUtf8("TagListEditor"))
TagListEditor.resize(397, 335)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(_fromUtf8(I("chapters.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
TagListEditor.setWindowIcon(icon)
self.gridlayout = QtGui.QGridLayout(TagListEditor)
self.gridlayout.setObjectName(_fromUtf8("gridlayout"))
self.horizontalLayout_11 = QtGui.QHBoxLayout()
self.horizontalLayout_11.setObjectName(_fromUtf8("horizontalLayout_11"))
self.search_box = HistoryLineEdit(TagListEditor)
self.search_box.setObjectName(_fromUtf8("search_box"))
self.horizontalLayout_11.addWidget(self.search_box)
self.search_button = QtGui.QToolButton(TagListEditor)
self.search_button.setObjectName(_fromUtf8("search_button"))
self.horizontalLayout_11.addWidget(self.search_button)
self.gridlayout.addLayout(self.horizontalLayout_11, 0, 1, 1, 1)
self.verticalLayout_2 = QtGui.QVBoxLayout()
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
self.delete_button = QtGui.QToolButton(TagListEditor)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(_fromUtf8(I("trash.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.delete_button.setIcon(icon1)
self.delete_button.setIconSize(QtCore.QSize(32, 32))
self.delete_button.setObjectName(_fromUtf8("delete_button"))
self.verticalLayout_2.addWidget(self.delete_button)
self.rename_button = QtGui.QToolButton(TagListEditor)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(_fromUtf8(I("edit_input.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.rename_button.setIcon(icon2)
self.rename_button.setIconSize(QtCore.QSize(32, 32))
self.rename_button.setObjectName(_fromUtf8("rename_button"))
self.verticalLayout_2.addWidget(self.rename_button)
self.gridlayout.addLayout(self.verticalLayout_2, 1, 0, 1, 1)
self.table = QtGui.QTableWidget(TagListEditor)
self.table.setAlternatingRowColors(True)
self.table.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
self.table.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
self.table.setObjectName(_fromUtf8("table"))
self.table.setColumnCount(0)
self.table.setRowCount(0)
self.gridlayout.addWidget(self.table, 1, 1, 1, 1)
self.buttonBox = QtGui.QDialogButtonBox(TagListEditor)
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
self.buttonBox.setCenterButtons(True)
self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
self.gridlayout.addWidget(self.buttonBox, 3, 0, 1, 2)
self.retranslateUi(TagListEditor)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), TagListEditor.accept)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), TagListEditor.reject)
QtCore.QMetaObject.connectSlotsByName(TagListEditor)
def retranslateUi(self, TagListEditor):
TagListEditor.setWindowTitle(_("Category Editor"))
self.search_box.setToolTip(_("Search for an item in the Tag column"))
self.search_button.setText(_("Find"))
self.search_button.setToolTip(_("Copy the selected color name to the clipboard"))
self.delete_button.setToolTip(_("Delete item from database. This will unapply the item from all books and then remove it from the database."))
self.delete_button.setText(_("..."))
self.rename_button.setToolTip(_("Rename the item in every book where it is used."))
self.rename_button.setText(_("..."))
self.rename_button.setShortcut(_("Ctrl+S"))
示例4: Ui_Dialog
# 需要导入模块: from calibre.gui2.widgets import HistoryLineEdit [as 别名]
# 或者: from calibre.gui2.widgets.HistoryLineEdit import setObjectName [as 别名]
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName(_fromUtf8("Dialog"))
Dialog.resize(872, 610)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(_fromUtf8(I("store.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
Dialog.setWindowIcon(icon)
Dialog.setSizeGripEnabled(True)
self.verticalLayout_5 = QtGui.QVBoxLayout(Dialog)
self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5"))
self.top_layout = QtGui.QHBoxLayout()
self.top_layout.setObjectName(_fromUtf8("top_layout"))
self.label = QtGui.QLabel(Dialog)
self.label.setObjectName(_fromUtf8("label"))
self.top_layout.addWidget(self.label)
self.adv_search_button = QtGui.QToolButton(Dialog)
self.adv_search_button.setObjectName(_fromUtf8("adv_search_button"))
self.top_layout.addWidget(self.adv_search_button)
self.search_edit = HistoryLineEdit(Dialog)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.search_edit.sizePolicy().hasHeightForWidth())
self.search_edit.setSizePolicy(sizePolicy)
self.search_edit.setObjectName(_fromUtf8("search_edit"))
self.top_layout.addWidget(self.search_edit)
self.search = QtGui.QPushButton(Dialog)
self.search.setObjectName(_fromUtf8("search"))
self.top_layout.addWidget(self.search)
self.verticalLayout_5.addLayout(self.top_layout)
self.store_splitter = QtGui.QSplitter(Dialog)
self.store_splitter.setOrientation(QtCore.Qt.Horizontal)
self.store_splitter.setObjectName(_fromUtf8("store_splitter"))
self.groupBox = QtGui.QGroupBox(self.store_splitter)
self.groupBox.setObjectName(_fromUtf8("groupBox"))
self.verticalLayout_2 = QtGui.QVBoxLayout(self.groupBox)
self.verticalLayout_2.setSpacing(0)
self.verticalLayout_2.setMargin(0)
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
self.store_list = QtGui.QScrollArea(self.groupBox)
self.store_list.setWidgetResizable(True)
self.store_list.setObjectName(_fromUtf8("store_list"))
self.scrollAreaWidgetContents = QtGui.QWidget()
self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 193, 127))
self.scrollAreaWidgetContents.setObjectName(_fromUtf8("scrollAreaWidgetContents"))
self.store_list.setWidget(self.scrollAreaWidgetContents)
self.verticalLayout_2.addWidget(self.store_list)
self.verticalLayout = QtGui.QVBoxLayout()
self.verticalLayout.setSpacing(0)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.select_all_stores = QtGui.QPushButton(self.groupBox)
self.select_all_stores.setObjectName(_fromUtf8("select_all_stores"))
self.verticalLayout.addWidget(self.select_all_stores)
self.select_invert_stores = QtGui.QPushButton(self.groupBox)
self.select_invert_stores.setObjectName(_fromUtf8("select_invert_stores"))
self.verticalLayout.addWidget(self.select_invert_stores)
self.select_none_stores = QtGui.QPushButton(self.groupBox)
self.select_none_stores.setObjectName(_fromUtf8("select_none_stores"))
self.verticalLayout.addWidget(self.select_none_stores)
self.verticalLayout_2.addLayout(self.verticalLayout)
self.verticalLayoutWidget = QtGui.QWidget(self.store_splitter)
self.verticalLayoutWidget.setObjectName(_fromUtf8("verticalLayoutWidget"))
self.verticalLayout_4 = QtGui.QVBoxLayout(self.verticalLayoutWidget)
self.verticalLayout_4.setMargin(0)
self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4"))
self.results_view = ResultsView(self.verticalLayoutWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(1)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.results_view.sizePolicy().hasHeightForWidth())
self.results_view.setSizePolicy(sizePolicy)
self.results_view.setMinimumSize(QtCore.QSize(0, 0))
self.results_view.setAlternatingRowColors(True)
self.results_view.setIconSize(QtCore.QSize(32, 32))
self.results_view.setRootIsDecorated(False)
self.results_view.setUniformRowHeights(False)
self.results_view.setItemsExpandable(False)
self.results_view.setSortingEnabled(True)
self.results_view.setExpandsOnDoubleClick(False)
self.results_view.setObjectName(_fromUtf8("results_view"))
self.results_view.header().setStretchLastSection(False)
self.verticalLayout_4.addWidget(self.results_view)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.configure = QtGui.QToolButton(self.verticalLayoutWidget)
self.configure.setObjectName(_fromUtf8("configure"))
self.horizontalLayout.addWidget(self.configure)
self.open_external = QtGui.QCheckBox(self.verticalLayoutWidget)
self.open_external.setObjectName(_fromUtf8("open_external"))
self.horizontalLayout.addWidget(self.open_external)
spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem)
self.verticalLayout_4.addLayout(self.horizontalLayout)
self.verticalLayout_5.addWidget(self.store_splitter)
self.bottom_layout = QtGui.QHBoxLayout()
self.bottom_layout.setObjectName(_fromUtf8("bottom_layout"))
self.label_2 = QtGui.QLabel(Dialog)
self.label_2.setObjectName(_fromUtf8("label_2"))
self.bottom_layout.addWidget(self.label_2)
self.total = QtGui.QLabel(Dialog)
#.........这里部分代码省略.........
示例5: Ui_MetadataBulkDialog
# 需要导入模块: from calibre.gui2.widgets import HistoryLineEdit [as 别名]
# 或者: from calibre.gui2.widgets.HistoryLineEdit import setObjectName [as 别名]
class Ui_MetadataBulkDialog(object):
def setupUi(self, MetadataBulkDialog):
MetadataBulkDialog.setObjectName(_fromUtf8("MetadataBulkDialog"))
MetadataBulkDialog.resize(962, 645)
MetadataBulkDialog.setWindowTitle(_("Edit Meta information"))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(_fromUtf8(I("edit_input.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MetadataBulkDialog.setWindowIcon(icon)
self.gridLayout_2 = QtGui.QGridLayout(MetadataBulkDialog)
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
self.box_title = QtGui.QLabel(MetadataBulkDialog)
self.box_title.setText(_fromUtf8(""))
self.box_title.setAlignment(QtCore.Qt.AlignCenter)
self.box_title.setObjectName(_fromUtf8("box_title"))
self.gridLayout_2.addWidget(self.box_title, 0, 0, 1, 1)
self.scrollArea = QtGui.QScrollArea(MetadataBulkDialog)
self.scrollArea.setFrameShape(QtGui.QFrame.NoFrame)
self.scrollArea.setLineWidth(0)
self.scrollArea.setWidgetResizable(True)
self.scrollArea.setObjectName(_fromUtf8("scrollArea"))
self.scrollAreaWidgetContents = QtGui.QWidget()
self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 950, 576))
self.scrollAreaWidgetContents.setObjectName(_fromUtf8("scrollAreaWidgetContents"))
self.verticalLayout_2 = QtGui.QVBoxLayout(self.scrollAreaWidgetContents)
self.verticalLayout_2.setMargin(0)
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
self.central_widget = QtGui.QTabWidget(self.scrollAreaWidgetContents)
self.central_widget.setObjectName(_fromUtf8("central_widget"))
self.tabWidgetPage1 = QtGui.QWidget()
self.tabWidgetPage1.setObjectName(_fromUtf8("tabWidgetPage1"))
self.gridLayout = QtGui.QGridLayout(self.tabWidgetPage1)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.label_2 = QtGui.QLabel(self.tabWidgetPage1)
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.gridLayout.addWidget(self.label_2, 0, 0, 1, 1)
self.authors = EditWithComplete(self.tabWidgetPage1)
self.authors.setEditable(True)
self.authors.setObjectName(_fromUtf8("authors"))
self.gridLayout.addWidget(self.authors, 0, 1, 1, 1)
self.horizontalLayout_2 = QtGui.QHBoxLayout()
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
self.auto_author_sort = QtGui.QCheckBox(self.tabWidgetPage1)
self.auto_author_sort.setText(_("A&utomatically set author sort"))
self.auto_author_sort.setObjectName(_fromUtf8("auto_author_sort"))
self.horizontalLayout_2.addWidget(self.auto_author_sort)
self.swap_title_and_author = QtGui.QCheckBox(self.tabWidgetPage1)
self.swap_title_and_author.setText(_("&Swap title and author"))
self.swap_title_and_author.setObjectName(_fromUtf8("swap_title_and_author"))
self.horizontalLayout_2.addWidget(self.swap_title_and_author)
self.gridLayout.addLayout(self.horizontalLayout_2, 1, 1, 1, 1)
self.label_8 = QtGui.QLabel(self.tabWidgetPage1)
self.label_8.setText(_("Author s&ort: "))
self.label_8.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_8.setObjectName(_fromUtf8("label_8"))
self.gridLayout.addWidget(self.label_8, 2, 0, 1, 1)
self.author_sort = EnLineEdit(self.tabWidgetPage1)
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."))
self.author_sort.setObjectName(_fromUtf8("author_sort"))
self.gridLayout.addWidget(self.author_sort, 2, 1, 1, 1)
self.label_6 = QtGui.QLabel(self.tabWidgetPage1)
self.label_6.setText(_("&Rating:"))
self.label_6.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_6.setObjectName(_fromUtf8("label_6"))
self.gridLayout.addWidget(self.label_6, 3, 0, 1, 1)
self.rating = QtGui.QSpinBox(self.tabWidgetPage1)
self.rating.setToolTip(_("Rating of this book. 0-5 stars"))
self.rating.setWhatsThis(_("Rating of this book. 0-5 stars"))
self.rating.setButtonSymbols(QtGui.QAbstractSpinBox.PlusMinus)
self.rating.setSpecialValueText(_("No change"))
self.rating.setSuffix(_(" stars"))
self.rating.setMinimum(-1)
self.rating.setMaximum(5)
self.rating.setProperty("value", -1)
self.rating.setObjectName(_fromUtf8("rating"))
self.gridLayout.addWidget(self.rating, 3, 1, 1, 1)
self.label_3 = QtGui.QLabel(self.tabWidgetPage1)
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.gridLayout.addWidget(self.label_3, 4, 0, 1, 1)
self.publisher = EditWithComplete(self.tabWidgetPage1)
self.publisher.setEditable(True)
self.publisher.setObjectName(_fromUtf8("publisher"))
self.gridLayout.addWidget(self.publisher, 4, 1, 1, 1)
self.label_4 = QtGui.QLabel(self.tabWidgetPage1)
self.label_4.setText(_("Add ta&gs: "))
self.label_4.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_4.setObjectName(_fromUtf8("label_4"))
self.gridLayout.addWidget(self.label_4, 5, 0, 1, 1)
self.tags = EditWithComplete(self.tabWidgetPage1)
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.gridLayout.addWidget(self.tags, 5, 1, 1, 1)
self.tag_editor_button = QtGui.QToolButton(self.tabWidgetPage1)
self.tag_editor_button.setToolTip(_("Open Tag Editor"))
self.tag_editor_button.setText(_("Open Tag Editor"))
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(_fromUtf8(I("chapters.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
#.........这里部分代码省略.........
示例6: Ui_Dialog
# 需要导入模块: from calibre.gui2.widgets import HistoryLineEdit [as 别名]
# 或者: from calibre.gui2.widgets.HistoryLineEdit import setObjectName [as 别名]
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName(_fromUtf8("Dialog"))
Dialog.resize(691, 614)
Dialog.setWindowTitle(_("Dialog"))
self.verticalLayout = QtGui.QVBoxLayout(Dialog)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.horizontalLayout_2 = QtGui.QHBoxLayout()
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
self.label = QtGui.QLabel(Dialog)
self.label.setText(_("&Query:"))
self.label.setObjectName(_fromUtf8("label"))
self.horizontalLayout_2.addWidget(self.label)
self.adv_search_button = QtGui.QToolButton(Dialog)
self.adv_search_button.setText(_("..."))
self.adv_search_button.setObjectName(_fromUtf8("adv_search_button"))
self.horizontalLayout_2.addWidget(self.adv_search_button)
self.search_query = HistoryLineEdit(Dialog)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.search_query.sizePolicy().hasHeightForWidth())
self.search_query.setSizePolicy(sizePolicy)
self.search_query.setObjectName(_fromUtf8("search_query"))
self.horizontalLayout_2.addWidget(self.search_query)
self.search_button = QtGui.QPushButton(Dialog)
self.search_button.setText(_("Search"))
self.search_button.setObjectName(_fromUtf8("search_button"))
self.horizontalLayout_2.addWidget(self.search_button)
self.verticalLayout.addLayout(self.horizontalLayout_2)
self.results_view = QtGui.QTreeView(Dialog)
self.results_view.setAlternatingRowColors(True)
self.results_view.setRootIsDecorated(False)
self.results_view.setItemsExpandable(False)
self.results_view.setSortingEnabled(True)
self.results_view.setExpandsOnDoubleClick(False)
self.results_view.setObjectName(_fromUtf8("results_view"))
self.results_view.header().setCascadingSectionResizes(False)
self.verticalLayout.addWidget(self.results_view)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.label_2 = QtGui.QLabel(Dialog)
self.label_2.setText(_("Books:"))
self.label_2.setObjectName(_fromUtf8("label_2"))
self.horizontalLayout.addWidget(self.label_2)
self.total = QtGui.QLabel(Dialog)
self.total.setText(_("0"))
self.total.setObjectName(_fromUtf8("total"))
self.horizontalLayout.addWidget(self.total)
spacerItem = QtGui.QSpacerItem(308, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem)
self.close_button = QtGui.QPushButton(Dialog)
self.close_button.setText(_("Close"))
self.close_button.setObjectName(_fromUtf8("close_button"))
self.horizontalLayout.addWidget(self.close_button)
self.verticalLayout.addLayout(self.horizontalLayout)
self.label.setBuddy(self.search_query)
self.retranslateUi(Dialog)
QtCore.QObject.connect(self.close_button, QtCore.SIGNAL(_fromUtf8("clicked()")), Dialog.accept)
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
pass
示例7: Ui_Dialog
# 需要导入模块: from calibre.gui2.widgets import HistoryLineEdit [as 别名]
# 或者: from calibre.gui2.widgets.HistoryLineEdit import setObjectName [as 别名]
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName(_fromUtf8("Dialog"))
Dialog.resize(602, 245)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(_fromUtf8(I("lt.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
Dialog.setWindowIcon(icon)
self.gridLayout = QtGui.QGridLayout(Dialog)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.old_location = QtGui.QLabel(Dialog)
self.old_location.setWordWrap(True)
self.old_location.setObjectName(_fromUtf8("old_location"))
self.gridLayout.addWidget(self.old_location, 0, 0, 1, 4)
self.label_2 = QtGui.QLabel(Dialog)
self.label_2.setObjectName(_fromUtf8("label_2"))
self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
self.existing_library = QtGui.QRadioButton(Dialog)
self.existing_library.setChecked(True)
self.existing_library.setObjectName(_fromUtf8("existing_library"))
self.gridLayout.addWidget(self.existing_library, 4, 0, 1, 4)
self.hbox1 = QtGui.QHBoxLayout()
self.hbox1.setObjectName(_fromUtf8("hbox1"))
self.empty_library = QtGui.QRadioButton(Dialog)
self.empty_library.setObjectName(_fromUtf8("empty_library"))
self.hbox1.addWidget(self.empty_library)
self.copy_structure = QtGui.QCheckBox(Dialog)
self.copy_structure.setObjectName(_fromUtf8("copy_structure"))
self.hbox1.addWidget(self.copy_structure)
self.gridLayout.addLayout(self.hbox1, 5, 0, 1, 3)
self.move_library = QtGui.QRadioButton(Dialog)
self.move_library.setObjectName(_fromUtf8("move_library"))
self.gridLayout.addWidget(self.move_library, 6, 0, 1, 3)
self.buttonBox = QtGui.QDialogButtonBox(Dialog)
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
self.gridLayout.addWidget(self.buttonBox, 8, 2, 1, 1)
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.gridLayout.addItem(spacerItem, 7, 2, 1, 1)
spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.gridLayout.addItem(spacerItem1, 3, 0, 1, 1)
spacerItem2 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.gridLayout.addItem(spacerItem2, 1, 0, 1, 1)
self.browse_button = QtGui.QToolButton(Dialog)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(_fromUtf8(I("document_open.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.browse_button.setIcon(icon1)
self.browse_button.setObjectName(_fromUtf8("browse_button"))
self.gridLayout.addWidget(self.browse_button, 2, 3, 1, 1)
self.location = HistoryLineEdit(Dialog)
self.location.setObjectName(_fromUtf8("location"))
self.gridLayout.addWidget(self.location, 2, 1, 1, 2)
self.label_2.setBuddy(self.location)
self.retranslateUi(Dialog)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), Dialog.accept)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
Dialog.setWindowTitle(_("Choose your calibre library"))
self.old_location.setText(_("Your calibre library is currently located at {0}"))
self.label_2.setText(_("New &Location:"))
self.existing_library.setText(_("Use the previously &existing library at the new location"))
self.empty_library.setText(_("&Create an empty library at the new location"))
self.copy_structure.setText(_("&Copy structure from the current library"))
self.copy_structure.setToolTip(_("Copy the custom columns, saved searches, column widths, plugboards,\n"
"user categories, and other information from the old to the new library"))
self.move_library.setText(_("&Move current library to new location"))
self.browse_button.setText(_("..."))
示例8: Ui_Form
# 需要导入模块: from calibre.gui2.widgets import HistoryLineEdit [as 别名]
# 或者: from calibre.gui2.widgets.HistoryLineEdit import setObjectName [as 别名]
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName(_fromUtf8("Form"))
Form.resize(610, 553)
self.verticalLayout = QtGui.QVBoxLayout(Form)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.label = QtGui.QLabel(Form)
self.label.setObjectName(_fromUtf8("label"))
self.horizontalLayout.addWidget(self.label)
self.adv_search_builder = QtGui.QToolButton(Form)
self.adv_search_builder.setObjectName(_fromUtf8("adv_search_builder"))
self.horizontalLayout.addWidget(self.adv_search_builder)
self.query = HistoryLineEdit(Form)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.query.sizePolicy().hasHeightForWidth())
self.query.setSizePolicy(sizePolicy)
self.query.setObjectName(_fromUtf8("query"))
self.horizontalLayout.addWidget(self.query)
self.search = QtGui.QPushButton(Form)
self.search.setObjectName(_fromUtf8("search"))
self.horizontalLayout.addWidget(self.search)
self.verticalLayout.addLayout(self.horizontalLayout)
self.results_view = ResultsView(Form)
self.results_view.setAlternatingRowColors(True)
self.results_view.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
self.results_view.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
self.results_view.setRootIsDecorated(False)
self.results_view.setUniformRowHeights(True)
self.results_view.setItemsExpandable(False)
self.results_view.setSortingEnabled(True)
self.results_view.setExpandsOnDoubleClick(False)
self.results_view.setObjectName(_fromUtf8("results_view"))
self.results_view.header().setStretchLastSection(False)
self.verticalLayout.addWidget(self.results_view)
self.horizontalLayout_2 = QtGui.QHBoxLayout()
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
self.label_2 = QtGui.QLabel(Form)
self.label_2.setObjectName(_fromUtf8("label_2"))
self.horizontalLayout_2.addWidget(self.label_2)
self.enable_all = QtGui.QPushButton(Form)
self.enable_all.setObjectName(_fromUtf8("enable_all"))
self.horizontalLayout_2.addWidget(self.enable_all)
self.enable_none = QtGui.QPushButton(Form)
self.enable_none.setObjectName(_fromUtf8("enable_none"))
self.horizontalLayout_2.addWidget(self.enable_none)
self.enable_invert = QtGui.QPushButton(Form)
self.enable_invert.setObjectName(_fromUtf8("enable_invert"))
self.horizontalLayout_2.addWidget(self.enable_invert)
spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem)
self.verticalLayout.addLayout(self.horizontalLayout_2)
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
Form.setWindowTitle(_("Form"))
self.label.setText(_("Query:"))
self.adv_search_builder.setText(_("..."))
self.search.setText(_("Search"))
self.label_2.setText(_("Enable"))
self.enable_all.setText(_("All"))
self.enable_none.setText(_("None"))
self.enable_invert.setText(_("Invert"))