当前位置: 首页>>代码示例>>Python>>正文


Python Editor.setObjectName方法代码示例

本文整理汇总了Python中calibre.gui2.comments_editor.Editor.setObjectName方法的典型用法代码示例。如果您正苦于以下问题:Python Editor.setObjectName方法的具体用法?Python Editor.setObjectName怎么用?Python Editor.setObjectName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在calibre.gui2.comments_editor.Editor的用法示例。


在下文中一共展示了Editor.setObjectName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Ui_CommentsDialog

# 需要导入模块: from calibre.gui2.comments_editor import Editor [as 别名]
# 或者: from calibre.gui2.comments_editor.Editor import setObjectName [as 别名]
class Ui_CommentsDialog(object):
    def setupUi(self, CommentsDialog):
        CommentsDialog.setObjectName(_fromUtf8("CommentsDialog"))
        CommentsDialog.resize(400, 400)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(CommentsDialog.sizePolicy().hasHeightForWidth())
        CommentsDialog.setSizePolicy(sizePolicy)
        self.verticalLayout = QtGui.QVBoxLayout(CommentsDialog)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.textbox = Editor(CommentsDialog)
        self.textbox.setObjectName(_fromUtf8("textbox"))
        self.verticalLayout.addWidget(self.textbox)
        self.buttonBox = QtGui.QDialogButtonBox(CommentsDialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.verticalLayout.addWidget(self.buttonBox)

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

    def retranslateUi(self, CommentsDialog):
        CommentsDialog.setWindowTitle(_("Edit Comments"))
开发者ID:Eksmo,项目名称:calibre,代码行数:29,代码来源:comments_dialog_ui.py

示例2: Ui_Form

# 需要导入模块: from calibre.gui2.comments_editor import Editor [as 别名]
# 或者: from calibre.gui2.comments_editor.Editor import setObjectName [as 别名]
class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(600, 500)
        Form.setWindowTitle(_("Form"))
        self.horizontalLayout = QtGui.QHBoxLayout(Form)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.groupBox_4 = QtGui.QGroupBox(Form)
        self.groupBox_4.setTitle(_("Book Cover"))
        self.groupBox_4.setObjectName(_fromUtf8("groupBox_4"))
        self._2 = QtGui.QGridLayout(self.groupBox_4)
        self._2.setObjectName(_fromUtf8("_2"))
        self._4 = QtGui.QVBoxLayout()
        self._4.setSpacing(6)
        self._4.setMargin(0)
        self._4.setObjectName(_fromUtf8("_4"))
        self.label_5 = QtGui.QLabel(self.groupBox_4)
        self.label_5.setText(_("Change &cover image:"))
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self._4.addWidget(self.label_5)
        self._5 = QtGui.QHBoxLayout()
        self._5.setSpacing(6)
        self._5.setMargin(0)
        self._5.setObjectName(_fromUtf8("_5"))
        self.cover_path = QtGui.QLineEdit(self.groupBox_4)
        self.cover_path.setReadOnly(True)
        self.cover_path.setObjectName(_fromUtf8("cover_path"))
        self._5.addWidget(self.cover_path)
        self.cover_button = QtGui.QToolButton(self.groupBox_4)
        self.cover_button.setToolTip(_("Browse for an image to use as the cover of this book."))
        self.cover_button.setText(_("..."))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8(I("document_open.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.cover_button.setIcon(icon)
        self.cover_button.setObjectName(_fromUtf8("cover_button"))
        self._5.addWidget(self.cover_button)
        self._4.addLayout(self._5)
        self._2.addLayout(self._4, 1, 0, 1, 1)
        self.opt_prefer_metadata_cover = QtGui.QCheckBox(self.groupBox_4)
        self.opt_prefer_metadata_cover.setText(_("Use cover from &source file"))
        self.opt_prefer_metadata_cover.setChecked(True)
        self.opt_prefer_metadata_cover.setObjectName(_fromUtf8("opt_prefer_metadata_cover"))
        self._2.addWidget(self.opt_prefer_metadata_cover, 2, 0, 1, 1)
        self._3 = QtGui.QHBoxLayout()
        self._3.setObjectName(_fromUtf8("_3"))
        self.cover = ImageView(self.groupBox_4)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.cover.sizePolicy().hasHeightForWidth())
        self.cover.setSizePolicy(sizePolicy)
        self.cover.setObjectName(_fromUtf8("cover"))
        self._3.addWidget(self.cover)
        self._2.addLayout(self._3, 0, 0, 1, 1)
        self.horizontalLayout.addWidget(self.groupBox_4)
        self.verticalLayout_2 = QtGui.QVBoxLayout()
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self._7 = QtGui.QGridLayout()
        self._7.setObjectName(_fromUtf8("_7"))
        self.label = QtGui.QLabel(Form)
        self.label.setText(_("&Title: "))
        self.label.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
        self.label.setObjectName(_fromUtf8("label"))
        self._7.addWidget(self.label, 0, 0, 1, 1)
        self.title = EnLineEdit(Form)
        self.title.setToolTip(_("Change the title of this book"))
        self.title.setObjectName(_fromUtf8("title"))
        self._7.addWidget(self.title, 0, 1, 1, 1)
        self.label_2 = QtGui.QLabel(Form)
        self.label_2.setText(_("&Author(s): "))
        self.label_2.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self._7.addWidget(self.label_2, 1, 0, 1, 1)
        self.label_6 = QtGui.QLabel(Form)
        self.label_6.setText(_("Author So&rt:"))
        self.label_6.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self._7.addWidget(self.label_6, 2, 0, 1, 1)
        self.author_sort = EnLineEdit(Form)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.author_sort.sizePolicy().hasHeightForWidth())
        self.author_sort.setSizePolicy(sizePolicy)
        self.author_sort.setToolTip(
            _("Change the author(s) of this book. Multiple authors should be separated by a comma")
        )
        self.author_sort.setObjectName(_fromUtf8("author_sort"))
        self._7.addWidget(self.author_sort, 2, 1, 1, 1)
        self.label_3 = QtGui.QLabel(Form)
        self.label_3.setText(_("&Publisher: "))
        self.label_3.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self._7.addWidget(self.label_3, 3, 0, 1, 1)
        self.label_4 = QtGui.QLabel(Form)
        self.label_4.setText(_("Ta&gs: "))
        self.label_4.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self._7.addWidget(self.label_4, 4, 0, 1, 1)
        self.tags = EditWithComplete(Form)
#.........这里部分代码省略.........
开发者ID:yeyanchao,项目名称:calibre,代码行数:103,代码来源:metadata_ui.py


注:本文中的calibre.gui2.comments_editor.Editor.setObjectName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。