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


Python QGroupBox.setTitle方法代码示例

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


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

示例1: __init__

# 需要导入模块: from PySide.QtGui import QGroupBox [as 别名]
# 或者: from PySide.QtGui.QGroupBox import setTitle [as 别名]
 def __init__(self, parent=None):
   super(Hatcher, self).__init__(parent)
   browser_container = BrowserContainer()
   record_table = RecordTable(browser_container._browser)
   layout = QGridLayout()
   layout_table = QVBoxLayout()
   layout_table.addWidget(record_table)
   groupbox_table = QGroupBox()
   groupbox_table.setTitle(self.tr("Record table"))
   groupbox_table.setLayout(layout_table)
   row = 0; col = 0;
   layout.addWidget(browser_container, row, col, 1, 4)
   row += 1; col += 1
   layout.addWidget(groupbox_table, row, col, 1, 2)
   self.setLayout(layout)
开发者ID:github-account-because-they-want-it,项目名称:VisualScrape,代码行数:17,代码来源:ui_top.py

示例2: group

# 需要导入模块: from PySide.QtGui import QGroupBox [as 别名]
# 或者: from PySide.QtGui.QGroupBox import setTitle [as 别名]
def group(title='', *widgets):
    """
    Creates a groupBox with the widgets inside

    :param   title: group's title
    :param widgets: widgets you wqnt to qdd
    :type  widgets: tuple[QWidget]

    :return: the group box
    :rtype: QGroupBox
    """
    g = QGroupBox()
    g.setTitle(title)
    l = QVBoxLayout()
    apply_layout(l, *widgets)
    l.setContentsMargins(4, 4, 4, 4)
    g.setLayout(l)
    return g
开发者ID:DavideAlidosi,项目名称:May9,代码行数:20,代码来源:mass_attr.py

示例3: Ui_editTeamDialog

# 需要导入模块: from PySide.QtGui import QGroupBox [as 别名]
# 或者: from PySide.QtGui.QGroupBox import setTitle [as 别名]

#.........这里部分代码省略.........
        self.teamUserInfoLayout.addWidget(teamLabel, 1, 0)
        self.teamNameEdit = QLineEdit()
        self.teamNameEdit.setMinimumWidth(200)
        self.teamUserInfoLayout.addWidget(self.teamNameEdit, 1, 1)

        emailLabel = QLabel()
        self.teamUserInfoLayout.addWidget(emailLabel, 2, 0)
        self.emailEdit = QLineEdit()
        self.teamUserInfoLayout.addWidget(self.emailEdit, 2, 1)

        self.topLayout.addLayout(self.teamUserInfoLayout)
        self.topLayout.addStretch()

        self.mainVerticalLayout.addLayout(self.topLayout)
        self.mainVerticalLayout.addItem(QSpacerItem(0, 15))
        
        #self.mainVerticalLayout.addStretch()

        self.formationLayout = QHBoxLayout()

        self.formationRadioButtons = RadioButtonGroup("Formation", Formation.formations)
        self.formationRadioButtons.setFlat(True)
        self.formationLayout.addWidget(self.formationRadioButtons)
        self.formationLayout.addStretch()

        self.mainVerticalLayout.addLayout(self.formationLayout)
        
        self.playersGroupBox = QGroupBox()

        self.gridLayout = QGridLayout(self.playersGroupBox)

        self.goalkeeperLabel = QLabel(self.playersGroupBox)
        self.gridLayout.addWidget(self.goalkeeperLabel, 0, 0)

        self.positionLabels = [QLabel(self.playersGroupBox) for i in range(11)]
        self.searchBoxes = [QLineEdit(self.playersGroupBox) for i in range(11)]
        self.selections = [QComboBox(self.playersGroupBox) for i in range(11)]
        self.clubLabels = [QLabel(self.playersGroupBox) for i in range(11)]
        self.valueLabels = [QLabel(self.playersGroupBox) for i in range(11)]
        
        for i, positionLabel in enumerate(self.positionLabels):
            self.gridLayout.addWidget(positionLabel, i, 0)
        
        for i, searchBox in enumerate(self.searchBoxes):
            searchBox.setToolTip("Search for a player by code or name")
            self.gridLayout.addWidget(searchBox, i, 1)
            searchBox.returnPressed.connect(partial(self.playerSearch, i))
        
        for i, selection in enumerate(self.selections):
            selection.setToolTip("Select a player")
            selection.setSizeAdjustPolicy(QComboBox.AdjustToContentsOnFirstShow)
            selection.setCurrentIndex(-1)
            self.gridLayout.addWidget(selection, i, 2)
        
        clubWidth = self.clubLabels[0].fontMetrics().width("Wolverhampton Wanderers")
        for i, clubLabel in enumerate(self.clubLabels):
            clubLabel.setFixedWidth(clubWidth)
            self.gridLayout.addWidget(clubLabel, i, 3)
            
        valueWidth = self.valueLabels[0].fontMetrics().width("0.0")
        for i, valueLabel in enumerate(self.valueLabels):
            valueLabel.setFixedWidth(valueWidth)
            self.gridLayout.addWidget(valueLabel, i, 4)

        
        self.mainVerticalLayout.addWidget(self.playersGroupBox)
        self.mainVerticalLayout.addItem(QSpacerItem(0, 15))
        
        self.totalCostLayout = QHBoxLayout()
        self.totalCostLabel = QLabel()
        self.totalCostLayout.addWidget(self.totalCostLabel)

        self.mainVerticalLayout.addLayout(self.totalCostLayout)
        self.mainVerticalLayout.addItem(QSpacerItem(0, 15))
        
        self.buttonLayout = QHBoxLayout()
        
        okButton = QPushButton("OK")
        okButton.setAutoDefault(False)
        cancelButton = QPushButton("Cancel")
        cancelButton.setAutoDefault(False)
        self.buttonLayout.addWidget(okButton)
        self.buttonLayout.addWidget(cancelButton)
        buttonSpacer = QSpacerItem(0, 0, QSizePolicy.Expanding, QSizePolicy.Minimum)
        self.buttonLayout.addItem(buttonSpacer)
        self.mainVerticalLayout.addLayout(self.buttonLayout)

        okButton.clicked.connect(editTeamDialog.accept)
        cancelButton.clicked.connect(editTeamDialog.reject)

        managerLabel.setText("Manager")
        teamLabel.setText("Team Name")
        emailLabel.setText("Email")

        self.playersGroupBox.setTitle("Players")

        for formationRadioButton in self.formationRadioButtons:
            formationRadioButton.clicked.connect(partial(self.formationChanged, str(formationRadioButton.text())))
        
        self.totalCostLabel.setText("Total Cost")
开发者ID:LS80,项目名称:FFL,代码行数:104,代码来源:ui_editTeam.py

示例4: RenderSlicerParamWidget

# 需要导入模块: from PySide.QtGui import QGroupBox [as 别名]
# 或者: from PySide.QtGui.QGroupBox import setTitle [as 别名]
class RenderSlicerParamWidget(QWidget):
	"""
	RenderSlicerParamWidget shows parameters with which slicers can be
	manipulated.
	"""
	def __init__(self, renderController, parent=None):
		super(RenderSlicerParamWidget, self).__init__(parent=parent)

		self.renderController = renderController
		self.renderController.slicesChanged.connect(self.setSlices)
		self.renderController.clippingBoxChanged.connect(self.showsClippingBox)
		self.renderController.clippingPlanesChanged.connect(self.showsClippingPlanes)

		self.sliceLabelTexts = ["Axial:", "Coronal:", "Sagittal:"]
		self.sliceLabels = [QLabel(text) for text in self.sliceLabelTexts]
		self.sliceCheckBoxes = [QCheckBox() for i in range(3)]
		for index in range(3):
			self.sliceCheckBoxes[index].clicked.connect(self.checkBoxChanged)
			self.sliceLabels[index].setAlignment(Qt.AlignRight | Qt.AlignVCenter)
			self.sliceCheckBoxes[index].setEnabled(True)

		slicesLayout = QGridLayout()
		slicesLayout.setAlignment(Qt.AlignTop)
		for index in range(3):
			slicesLayout.addWidget(self.sliceLabels[index], index+1, 0)
			slicesLayout.addWidget(self.sliceCheckBoxes[index], index+1, 1)

		self.slicesGroupBox = QGroupBox()
		self.slicesGroupBox.setTitle("Visible slices")
		self.slicesGroupBox.setLayout(slicesLayout)

		# Create option to show clipping box
		self.clippingCheckBox = QCheckBox()
		self.clippingCheckBox.setChecked(self.renderController.clippingBox)
		self.clippingCheckBox.clicked.connect(self.clippingCheckBoxChanged)
		self.clippingPlanesCheckBox = QCheckBox()
		self.clippingPlanesCheckBox.setChecked(self.renderController.clippingPlanes)
		self.clippingPlanesCheckBox.clicked.connect(self.clippingPlanesCheckBoxChanged)
		self.resetButton = QPushButton("Reset")
		self.resetButton.clicked.connect(self.resetClippingBox)

		clippingLabel = QLabel("Clipping box:")
		clippingLabel.setAlignment(Qt.AlignRight | Qt.AlignVCenter)
		clippingPlanesLabel = QLabel("Clipping planes:")
		clippingPlanesLabel.setAlignment(Qt.AlignRight | Qt.AlignVCenter)

		clipLayout = QGridLayout()
		clipLayout.addWidget(clippingLabel, 0, 0)
		clipLayout.addWidget(self.clippingCheckBox, 0, 1)
		clipLayout.addWidget(clippingPlanesLabel, 1, 0)
		clipLayout.addWidget(self.clippingPlanesCheckBox, 1, 1)
		clipLayout.addWidget(self.resetButton, 2, 0)

		self.clippingGroupBox = QGroupBox()
		self.clippingGroupBox.setTitle("Clipping box")
		self.clippingGroupBox.setLayout(clipLayout)

		# Create a nice layout for the labels
		layout = QGridLayout()
		layout.setAlignment(Qt.AlignTop)
		layout.addWidget(self.slicesGroupBox, 0, 0)
		layout.addWidget(self.clippingGroupBox, 0, 1)
		self.setLayout(layout)

	@Slot()
	def checkBoxChanged(self):
		"""
		Callback function for the check boxes.
		"""
		for index in range(3):
			showCheckBox = self.sliceCheckBoxes[index].checkState() == Qt.Checked
			self.renderController.setSliceVisibility(index, showCheckBox)

	@Slot(object)
	def setSlices(self, slices):
		for index in range(len(slices)):
			checkBox = self.sliceCheckBoxes[index]
			checkBox.setChecked(slices[index])

	@Slot()
	def clippingCheckBoxChanged(self):
		"""
		Callback function for the clipping check box.
		"""
		self.renderController.showClippingBox(self.clippingCheckBox.checkState() == Qt.Checked)

	@Slot()
	def clippingPlanesCheckBoxChanged(self):
		"""
		Callback function for the clipping check box.
		"""
		self.renderController.showClippingPlanes(self.clippingPlanesCheckBox.checkState() == Qt.Checked)

	@Slot()
	def resetClippingBox(self):
		self.renderController.resetClippingBox()

	@Slot(bool)
	def showsClippingBox(self, show):
		self.clippingCheckBox.setChecked(show)
#.........这里部分代码省略.........
开发者ID:berendkleinhaneveld,项目名称:Registrationshop,代码行数:103,代码来源:RenderSlicerParamWidget.py

示例5: optdlg

# 需要导入模块: from PySide.QtGui import QGroupBox [as 别名]
# 或者: from PySide.QtGui.QGroupBox import setTitle [as 别名]
class optdlg(QDialog):
	def __init__(self, parent=None):
		super(optdlg, self).__init__(parent)
		self.setFixedSize(484, 399)
		appicom = QIcon(":/icons/njnlogo.png")
		self.setWindowIcon(appicom)
		self.setWindowTitle("Nigandu English to Tamil Dictionary | OPTIONS")

		self.buttonBox = QDialogButtonBox(self)
		self.buttonBox.setEnabled(True)
		self.buttonBox.setGeometry(QRect(350, 20, 121, 200))

		self.buttonBox.setOrientation(Qt.Vertical)
		self.buttonBox.setStandardButtons(QDialogButtonBox.Apply|QDialogButtonBox.Cancel|QDialogButtonBox.Ok)
		self.buttonBox.setCenterButtons(True)
		self.restorebtn = QPushButton(self)
		self.restorebtn.setGeometry(QRect(354, 360, 121, 23))
		self.restorebtn.setText("&RestoreDefults")

		self.fontbox = QGroupBox(self)
		self.fontbox.setGeometry(QRect(10, 10, 331, 141))
		self.spinBox = QSpinBox(self.fontbox)
		self.spinBox.setGeometry(QRect(100, 20, 81, 21))
		self.spinBox.setMinimum(10)
		self.spinBox.setMaximum(24)
		self.label = QLabel(self.fontbox)
		self.label.setGeometry(QRect(20, 20, 71, 21))
		self.label.setText("Font Size:")
		self.fontbox.setTitle("Font")
		self.samplefontbox = QGroupBox(self)
		self.samplefontbox.setGeometry(QRect(20, 50, 291, 91))
		self.samplefontbox.setTitle("Sample Text")
		self.sampletxt = QLabel(self.samplefontbox)
		self.sampletxt.setGeometry(QRect(20, 20, 251, 61))
		self.sampletxt.setText("AaBbCcDdEeFfGgHhIiJjKkLlYyZz")

		self.clipbox = QGroupBox(self)
		self.clipbox.setGeometry(QRect(10, 160, 331, 61))
		self.clipbox.setTitle("ClipBoard Options")
		self.checkclip = QCheckBox(self.clipbox)
		self.checkclip.setGeometry(QRect(20, 20, 301, 31))
		self.checkclip.setText("Allow copy from clipboard on start-up")


		self.histbox = QGroupBox(self)
		self.histbox.setGeometry(QRect(10, 230, 331, 91))
		self.histbox.setTitle("History")
		self.checkshowhistdock = QCheckBox(self.histbox)
		self.checkshowhistdock.setGeometry(QRect(20, 60, 301, 17))

		self.checkshowhistdock.setText("Show History Dock on the right side")
		self.checkdelhist = QCheckBox(self.histbox)
		self.checkdelhist.setGeometry(QRect(20, 30, 301, 17))
		self.checkdelhist.setText("Clear all the past history records")

		self.bkmbox = QGroupBox(self)
		self.bkmbox.setGeometry(QRect(10, 330, 331, 61))
		self.bkmbox.setTitle("Book Marks")
		self.checkshowbkmdock = QCheckBox(self.bkmbox)
		self.checkshowbkmdock.setGeometry(QRect(20, 30, 301, 17))
		self.checkshowbkmdock.setText("Show Book Marks Dock on the right side.")

		self.spinBox.valueChanged[int].connect(self.setsampletxt)
		self.restorebtn.clicked.connect(self.setdeafults)
		self.buttonBox.rejected.connect(self.close)


	def setdeafults(self):
		self.spinBox.setValue(13)
		self.checkshowhistdock.setChecked(True)
		self.checkshowbkmdock.setChecked(True)
		self.checkclip.setChecked(True)
		self.checkdelhist.setChecked(False)

	def setsampletxt(self, i):
		font = QFont()
		font.setPixelSize(i)
		self.sampletxt.setFont(font)
开发者ID:jnoortheen,项目名称:nigandu,代码行数:80,代码来源:options.py

示例6: Ui_MainWindow

# 需要导入模块: from PySide.QtGui import QGroupBox [as 别名]
# 或者: from PySide.QtGui.QGroupBox import setTitle [as 别名]

#.........这里部分代码省略.........
        self.export_html_btn.setObjectName("export_html_btn")
        self.export_html_btn.setEnabled(False)

        links_gbox_buttons_layout.addWidget(self.export_txt_btn)
        links_gbox_buttons_layout.addWidget(self.export_html_btn)
        
        ### menubar
        self.menubar = QMenuBar(MainWindow)
        # self.menubar.setGeometry(QRect(0, 0, 860, 21))
        self.menubar.setObjectName("menubar")
        self.menu_file = QMenu(self.menubar)
        self.menu_file.setObjectName("menu_file")
        self.menu_help = QMenu(self.menubar)
        self.menu_help.setObjectName("menu_help")
        MainWindow.setMenuBar(self.menubar)
        self.action_about = QAction(MainWindow)
        self.action_about.setObjectName("action_about")
        self.action_About_Qt = QAction(MainWindow)
        self.action_About_Qt.setObjectName("action_About_Qt")
        self.action_exit = QAction(MainWindow)
        self.action_exit.setObjectName("action_exit")
        self.actionSave = QAction(MainWindow)
        self.actionSave.setObjectName("actionSave")
        self.action_Gmail_Advanced_Search_Syntax = QAction(MainWindow)
        self.action_Gmail_Advanced_Search_Syntax.setObjectName("action_Gmail_Advanced_Search_Syntax")
        self.menu_file.addAction(self.action_exit)
        self.menu_help.addAction(self.action_Gmail_Advanced_Search_Syntax)
        self.menu_help.addSeparator()
        self.menu_help.addAction(self.action_about)
        self.menu_help.addAction(self.action_About_Qt)
        self.menubar.addAction(self.menu_file.menuAction())
        self.menubar.addAction(self.menu_help.menuAction())
        
        self.retranslateUi(MainWindow)
        QMetaObject.connectSlotsByName(MainWindow)
        MainWindow.setTabOrder(self.client_secrets_file_path_le, self.client_secret_file_path_tBtn)
        MainWindow.setTabOrder(self.client_secret_file_path_tBtn, self.remove_account_btn)
        MainWindow.setTabOrder(self.remove_account_btn, self.add_account_btn)
        MainWindow.setTabOrder(self.add_account_btn, self.accounts_cb)
        MainWindow.setTabOrder(self.decryption_key_le, self.connect_btn)
        MainWindow.setTabOrder(self.connect_btn, self.log_te)
        MainWindow.setTabOrder(self.log_te, self.mailboxes_lw)
        MainWindow.setTabOrder(self.mailboxes_lw, self.after_date_cb)
        MainWindow.setTabOrder(self.after_date_cb, self.after_date_edit)
        MainWindow.setTabOrder(self.after_date_edit, self.before_date_cb)
        MainWindow.setTabOrder(self.before_date_cb, self.before_date_edit)
        MainWindow.setTabOrder(self.before_date_edit, self.from_le)
        MainWindow.setTabOrder(self.from_le, self.to_le)
        MainWindow.setTabOrder(self.to_le, self.subject_le)
        MainWindow.setTabOrder(self.subject_le, self.thread_count_sb)
        MainWindow.setTabOrder(self.thread_count_sb, self.html_radio)
        MainWindow.setTabOrder(self.html_radio, self.text_radio)
        MainWindow.setTabOrder(self.text_radio, self.search_btn)
        MainWindow.setTabOrder(self.search_btn, self.parameters_cb)
        MainWindow.setTabOrder(self.parameters_cb, self.parameters_le)
        MainWindow.setTabOrder(self.parameters_le, self.disconnect_btn)
        MainWindow.setTabOrder(self.disconnect_btn, self.links_text_edit)
        MainWindow.setTabOrder(self.links_text_edit, self.export_txt_btn)
        MainWindow.setTabOrder(self.export_txt_btn, self.export_html_btn)
        MainWindow.setTabOrder(self.export_html_btn, self.mailboxes_lw)

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(QApplication.translate("MainWindow", "Gmail URL Parser", None, QApplication.UnicodeUTF8))
        self.login_gbox.setTitle(QApplication.translate("MainWindow", "  Client secrets file path  ", None, QApplication.UnicodeUTF8))
        self.client_secrets_file_path_le.setPlaceholderText(QApplication.translate("MainWindow", "Please select your client secrets file", None, QApplication.UnicodeUTF8))
        self.lb_client_secrets_file_path.setText(QApplication.translate("MainWindow", "Path", None, QApplication.UnicodeUTF8))
        self.connect_btn.setText(QApplication.translate("MainWindow", "Connect", None, QApplication.UnicodeUTF8))
        self.client_secret_file_path_tBtn.setText(QApplication.translate("MainWindow", "...", None, QApplication.UnicodeUTF8))
        self.lb_account.setText(QApplication.translate("MainWindow", "Account", None, QApplication.UnicodeUTF8))
        self.add_account_btn.setText(QApplication.translate("MainWindow", "+", None, QApplication.UnicodeUTF8))
        self.remove_account_btn.setText(QApplication.translate("MainWindow", "-", None, QApplication.UnicodeUTF8))
        self.decryption_key_le.setPlaceholderText(QApplication.translate("MainWindow", "Decryption key", None, QApplication.UnicodeUTF8))
        self.lb_decryption_key.setText(QApplication.translate("MainWindow", "Key", None, QApplication.UnicodeUTF8))
        self.log_gbox.setTitle(QApplication.translate("MainWindow", "  Log  ", None, QApplication.UnicodeUTF8))
        self.search_gbox.setTitle(QApplication.translate("MainWindow", "  Search Parameters  ", None, QApplication.UnicodeUTF8))
        self.lb_to.setText(QApplication.translate("MainWindow", "To", None, QApplication.UnicodeUTF8))
        self.lb_from.setText(QApplication.translate("MainWindow", "From", None, QApplication.UnicodeUTF8))
        self.lb_subject.setText(QApplication.translate("MainWindow", "Subject", None, QApplication.UnicodeUTF8))
        self.search_btn.setText(QApplication.translate("MainWindow", "Search", None, QApplication.UnicodeUTF8))
        self.after_date_edit.setDisplayFormat(QApplication.translate("MainWindow", "yyyy-MM-dd", None, QApplication.UnicodeUTF8))
        self.before_date_edit.setDisplayFormat(QApplication.translate("MainWindow", "yyyy-MM-dd", None, QApplication.UnicodeUTF8))
        self.lb_select_mailbox.setToolTip(QApplication.translate("MainWindow", "<html><head/><body><p>Select multiple items to select labels</p></body></html>", None, QApplication.UnicodeUTF8))
        self.lb_select_mailbox.setText(QApplication.translate("MainWindow", "Select Mailbox or Labels", None, QApplication.UnicodeUTF8))
        self.after_date_cb.setText(QApplication.translate("MainWindow", "After", None, QApplication.UnicodeUTF8))
        self.before_date_cb.setText(QApplication.translate("MainWindow", "Before", None, QApplication.UnicodeUTF8))
        self.html_radio.setText(QApplication.translate("MainWindow", "html", None, QApplication.UnicodeUTF8))
        self.text_radio.setText(QApplication.translate("MainWindow", "text", None, QApplication.UnicodeUTF8))
        self.lb_threads.setText(QApplication.translate("MainWindow", "Threads", None, QApplication.UnicodeUTF8))
        self.links_gbox.setTitle(QApplication.translate("MainWindow", "  Links  ", None, QApplication.UnicodeUTF8))
        self.disconnect_btn.setText(QApplication.translate("MainWindow", "Disconnect", None, QApplication.UnicodeUTF8))
        self.export_txt_btn.setText(QApplication.translate("MainWindow", "Export as txt", None, QApplication.UnicodeUTF8))
        self.export_html_btn.setText(QApplication.translate("MainWindow", "Export as HTML", None, QApplication.UnicodeUTF8))
        self.menu_file.setTitle(QApplication.translate("MainWindow", "File", None, QApplication.UnicodeUTF8))
        self.menu_help.setTitle(QApplication.translate("MainWindow", "Help", None, QApplication.UnicodeUTF8))
        self.action_about.setText(QApplication.translate("MainWindow", "About", None, QApplication.UnicodeUTF8))
        self.action_About_Qt.setText(QApplication.translate("MainWindow", "About Qt", None, QApplication.UnicodeUTF8))
        self.action_exit.setText(QApplication.translate("MainWindow", "Exit", None, QApplication.UnicodeUTF8))
        self.action_exit.setShortcut(QApplication.translate("MainWindow", "Ctrl+Q", None, QApplication.UnicodeUTF8))
        self.actionSave.setText(QApplication.translate("MainWindow", "Save", None, QApplication.UnicodeUTF8))
        self.action_Gmail_Advanced_Search_Syntax.setText(QApplication.translate("MainWindow", "Gmail Advanced Search Syntax", None, QApplication.UnicodeUTF8))
开发者ID:erdinc-me,项目名称:GmailURLParser,代码行数:104,代码来源:gui_gmailURLParser.py

示例7: Ui_MainWindow

# 需要导入模块: from PySide.QtGui import QGroupBox [as 别名]
# 或者: from PySide.QtGui.QGroupBox import setTitle [as 别名]
class Ui_MainWindow(QMainWindow):
    """Cette classe contient tous les widgets de notre application."""
    
    defaultPalette = QPalette()
    defaultPalette.setColor(QPalette.Base, QColor("#151515"))
    defaultPalette.setColor(QPalette.Text, Qt.white)

    def __init__(self):
        super(Ui_MainWindow, self).__init__()
        # initialise la GUI avec un exemple
        self.text = "Ceci est un petit texte d'exemple."
        # les variables sont en place, initialise la GUI
        self.initUI()
        # exécute l'exemple
        self.orgText.setText(self.text)
        self.encode_text(False)
        self.logLab.setText(
            u"Saisir du texte ou importer un fichier, puis pousser \n"
            u"le bouton correspondant à l'opération souhaitée.")

    def initUI(self):
        """Met en place les éléments de l'interface."""
        # -+++++++------------------- main window -------------------+++++++- #
        self.setWindowTitle(u"Encodage / Décodage de Huffman")
        self.centerAndResize()
        centralwidget = QWidget(self)
        mainGrid = QGridLayout(centralwidget)
        mainGrid.setColumnMinimumWidth(0, 450)
        # -+++++++------------------ groupe analyse -----------------+++++++- #
        analysGroup = QGroupBox(u"Analyse", centralwidget)
        self.analysGrid = QGridLayout(analysGroup)
        #         ----------- groupe de la table des codes ----------         #
        codeTableGroup = QGroupBox(u"Table des codes", analysGroup)
        codeTableGrid = QGridLayout(codeTableGroup)
        # un tableau pour les codes
        self.codesTableModel = MyTableModel()
        self.codesTable = QTableView(codeTableGroup)
        self.codesTable.setModel(self.codesTableModel)
        self.codesTable.setFont(QFont("Mono", 8))
        self.codesTable.resizeColumnsToContents()
        self.codesTable.setSortingEnabled(True)
        codeTableGrid.addWidget(self.codesTable, 0, 0, 1, 1)
        self.analysGrid.addWidget(codeTableGroup, 1, 0, 1, 1)
        #        ----------- label du ratio de compression ----------         #
        self.ratioLab = QLabel(u"Ratio de compression: ", analysGroup)
        font = QFont()
        font.setBold(True)
        font.setWeight(75)
        font.setKerning(True)
        self.ratioLab.setFont(font)
        self.analysGrid.addWidget(self.ratioLab, 2, 0, 1, 1)
        # -+++++++-------- groupe de la table de comparaison --------+++++++- #
        self.compGroup = QGroupBox(analysGroup)
        self.compGroup.setTitle(u"Comparaisons")
        compGrid = QGridLayout(self.compGroup)
        # un tableau pour le ratio
        self.compTable = QTableWidget(self.compGroup)
        sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.compTable.sizePolicy().hasHeightForWidth())
        self.compTable.setSizePolicy(sizePolicy)
        self.compTable.setBaseSize(QSize(0, 0))
        font = QFont()
        font.setWeight(50)
        self.compTable.setFont(font)
        self.compTable.setEditTriggers(QAbstractItemView.NoEditTriggers)
        self.compTable.setShowGrid(True)
        self.compTable.setGridStyle(Qt.SolidLine)
        # lignes / colonnes
        self.compTable.setColumnCount(2)
        self.compTable.setRowCount(3)
        self.compTable.setVerticalHeaderItem(0, QTableWidgetItem("Taille (bits)"))
        self.compTable.setVerticalHeaderItem(1, QTableWidgetItem("Entropie"))
        self.compTable.setVerticalHeaderItem(2, QTableWidgetItem("Taille moy. (bits)"))
        for i in range(2):
            self.compTable.verticalHeaderItem(i).setTextAlignment(
                Qt.AlignRight)
        self.compTable.setHorizontalHeaderItem(0, QTableWidgetItem("ASCII"))
        self.compTable.setHorizontalHeaderItem(1, QTableWidgetItem("Huffman"))
        
        # nom des items
        self.compTabASCIIMem = QTableWidgetItem()
        self.compTable.setItem(0, 0, self.compTabASCIIMem)
        self.compTabASCIIEnt = QTableWidgetItem()
        self.compTable.setItem(1, 0, self.compTabASCIIEnt)
        self.compTabASCIIAvg = QTableWidgetItem()
        self.compTable.setItem(2, 0, self.compTabASCIIAvg)
        self.compTabHuffMem = QTableWidgetItem()
        self.compTable.setItem(0, 1, self.compTabHuffMem)
        self.compTabHuffEnt = QTableWidgetItem()
        self.compTable.setItem(1, 1, self.compTabHuffEnt)
        self.compTabHuffAvg = QTableWidgetItem()
        self.compTable.setItem(2, 1, self.compTabHuffAvg)
        # parem du tableau
        self.compTable.horizontalHeader().setCascadingSectionResizes(False)
        self.compTable.verticalHeader().setVisible(True)
        font = QFont("Mono", 8)
        self.compTable.setFont(font)
#.........这里部分代码省略.........
开发者ID:mathieufrh,项目名称:huffmanwizard,代码行数:103,代码来源:huffgui.py

示例8: Ui_MainWindow

# 需要导入模块: from PySide.QtGui import QGroupBox [as 别名]
# 或者: from PySide.QtGui.QGroupBox import setTitle [as 别名]

#.........这里部分代码省略.........
        self.links_text_edit.setObjectName("links_text_edit")
        links_gbox_links_layout.addWidget(self.links_text_edit)

        self.export_txt_btn = QPushButton(self.links_gbox)
        self.export_txt_btn.setObjectName("export_txt_btn")
        self.export_txt_btn.setEnabled(False)
        self.export_html_btn = QPushButton(self.links_gbox)
        self.export_html_btn.setObjectName("export_html_btn")
        self.export_html_btn.setEnabled(False)

        links_gbox_buttons_layout.addWidget(self.export_txt_btn)
        links_gbox_buttons_layout.addWidget(self.export_html_btn)

        # menubar
        self.menubar = QMenuBar(MainWindow)
        self.menubar.setObjectName("menubar")
        self.menu_file = QMenu(self.menubar)
        self.menu_file.setObjectName("menu_file")
        self.menu_about = QMenu(self.menubar)
        self.menu_about.setObjectName("menu_about")
        MainWindow.setMenuBar(self.menubar)
        self.action_about = QAction(MainWindow)
        self.action_about.setObjectName("action_about")
        self.action_About_Qt = QAction(MainWindow)
        self.action_About_Qt.setObjectName("action_About_Qt")
        self.action_exit = QAction(MainWindow)
        self.action_exit.setObjectName("action_exit")
        self.actionSave = QAction(MainWindow)
        self.actionSave.setObjectName("actionSave")
        self.menu_file.addAction(self.action_exit)
        self.menu_about.addAction(self.action_about)
        self.menu_about.addAction(self.action_About_Qt)
        self.menubar.addAction(self.menu_file.menuAction())
        self.menubar.addAction(self.menu_about.menuAction())

        self.retranslateUi(MainWindow)
        QMetaObject.connectSlotsByName(MainWindow)
        MainWindow.setTabOrder(self.presets_cbox, self.imap_server_le)
        MainWindow.setTabOrder(self.imap_server_le, self.adress_le)
        MainWindow.setTabOrder(self.adress_le, self.pass_le)
        MainWindow.setTabOrder(self.pass_le, self.connect_btn)
        MainWindow.setTabOrder(self.connect_btn, self.log_te)
        MainWindow.setTabOrder(self.log_te, self.since_date_cb)
        MainWindow.setTabOrder(self.since_date_cb, self.since_date_edit)
        MainWindow.setTabOrder(self.since_date_edit, self.before_date_cb)
        MainWindow.setTabOrder(self.before_date_cb, self.before_date_edit)
        MainWindow.setTabOrder(self.before_date_edit, self.mailboxes_lw)
        MainWindow.setTabOrder(self.mailboxes_lw, self.from_le)
        MainWindow.setTabOrder(self.from_le, self.to_le)
        MainWindow.setTabOrder(self.to_le, self.subject_le)
        MainWindow.setTabOrder(self.subject_le, self.search_btn)
        MainWindow.setTabOrder(self.search_btn, self.links_text_edit)
        MainWindow.setTabOrder(self.links_text_edit, self.export_txt_btn)
        MainWindow.setTabOrder(self.export_txt_btn, self.export_html_btn)
        MainWindow.setTabOrder(self.export_html_btn, self.disconnect_btn)
        MainWindow.setTabOrder(self.disconnect_btn, self.add_preset_btn)
        MainWindow.setTabOrder(self.add_preset_btn, self.remove_preset_btn)
        MainWindow.setTabOrder(self.remove_preset_btn, self.ssl_cb)

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(QApplication.translate("MainWindow", "Email Link Extractor", None, QApplication.UnicodeUTF8))
        self.login_gbox.setTitle(QApplication.translate("MainWindow", "  Login", None, QApplication.UnicodeUTF8))
        self.lb_presets.setText(QApplication.translate("MainWindow", "Server Presets", None, QApplication.UnicodeUTF8))
        self.add_preset_btn.setText(QApplication.translate("MainWindow", "+", None, QApplication.UnicodeUTF8))
        self.remove_preset_btn.setText(QApplication.translate("MainWindow", "-", None, QApplication.UnicodeUTF8))
        self.lb_imap_server.setText(QApplication.translate("MainWindow", "IMAP Server", None, QApplication.UnicodeUTF8))
        self.lb_ssl.setText(QApplication.translate("MainWindow", "SSL", None, QApplication.UnicodeUTF8))
        self.ssl_cb.setText(QApplication.translate("MainWindow", "Port : 993", None, QApplication.UnicodeUTF8))
        self.lb_adress.setText(QApplication.translate("MainWindow", "Adress", None, QApplication.UnicodeUTF8))
        self.lb_pass.setText(QApplication.translate("MainWindow", "Password", None, QApplication.UnicodeUTF8))
        self.connect_btn.setText(QApplication.translate("MainWindow", "Connect", None, QApplication.UnicodeUTF8))
        self.lb_select_mailbox.setText(QApplication.translate("MainWindow", "Select Mailbox", None, QApplication.UnicodeUTF8))

        self.search_gbox.setTitle(QApplication.translate("MainWindow", "  Search Parameters", None, QApplication.UnicodeUTF8))
        self.since_date_cb.setText(QApplication.translate("MainWindow", "Since", None, QApplication.UnicodeUTF8))
        self.since_date_edit.setDisplayFormat(QApplication.translate("MainWindow", "dd-MMM-yyyy", None, QApplication.UnicodeUTF8))
        self.before_date_cb.setText(QApplication.translate("MainWindow", "Before", None, QApplication.UnicodeUTF8))
        self.before_date_edit.setDisplayFormat(QApplication.translate("MainWindow", "dd-MMM-yyyy", None, QApplication.UnicodeUTF8))

        self.html_radio.setText(QApplication.translate("MainWindow", "html", None, QApplication.UnicodeUTF8))
        self.text_radio.setText(QApplication.translate("MainWindow", "text", None, QApplication.UnicodeUTF8))
        # self.lb_threads.setText(QApplication.translate("MainWindow", "Threads", None, QApplication.UnicodeUTF8))

        self.lb_from.setText(QApplication.translate("MainWindow", "From", None, QApplication.UnicodeUTF8))
        self.lb_to.setText(QApplication.translate("MainWindow", "To", None, QApplication.UnicodeUTF8))
        self.lb_subject.setText(QApplication.translate("MainWindow", "Subject", None, QApplication.UnicodeUTF8))
        self.search_btn.setText(QApplication.translate("MainWindow", "Search", None, QApplication.UnicodeUTF8))

        self.links_gbox.setTitle(QApplication.translate("MainWindow", "  Links", None, QApplication.UnicodeUTF8))
        self.export_html_btn.setText(QApplication.translate("MainWindow", "Export as HTML", None, QApplication.UnicodeUTF8))
        self.export_txt_btn.setText(QApplication.translate("MainWindow", "Export as txt", None, QApplication.UnicodeUTF8))
        self.log_gbox.setTitle(QApplication.translate("MainWindow", "  Log", None, QApplication.UnicodeUTF8))
        self.disconnect_btn.setText(QApplication.translate("MainWindow", "Disconnect", None, QApplication.UnicodeUTF8))
        self.menu_file.setTitle(QApplication.translate("MainWindow", "File", None, QApplication.UnicodeUTF8))
        self.menu_about.setTitle(QApplication.translate("MainWindow", "About", None, QApplication.UnicodeUTF8))
        self.action_about.setText(QApplication.translate("MainWindow", "About", None, QApplication.UnicodeUTF8))
        self.action_About_Qt.setText(QApplication.translate("MainWindow", "About Qt", None, QApplication.UnicodeUTF8))
        self.action_exit.setText(QApplication.translate("MainWindow", "Exit", None, QApplication.UnicodeUTF8))
        self.action_exit.setShortcut(QApplication.translate("MainWindow", "Ctrl+Q", None, QApplication.UnicodeUTF8))
        self.actionSave.setText(QApplication.translate("MainWindow", "Save", None, QApplication.UnicodeUTF8))
开发者ID:erdinc-me,项目名称:IMAPLinkParser,代码行数:104,代码来源:gui_IMAPLinkParser.py


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