本文整理汇总了Python中PySide.QtGui.QCheckBox.setObjectName方法的典型用法代码示例。如果您正苦于以下问题:Python QCheckBox.setObjectName方法的具体用法?Python QCheckBox.setObjectName怎么用?Python QCheckBox.setObjectName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtGui.QCheckBox
的用法示例。
在下文中一共展示了QCheckBox.setObjectName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: populate_fields
# 需要导入模块: from PySide.QtGui import QCheckBox [as 别名]
# 或者: from PySide.QtGui.QCheckBox import setObjectName [as 别名]
def populate_fields(self, fields):
for field, hidden in fields:
item = QCheckBox(self.fieldScrollArea)
item.setObjectName(field)
item.setText(field)
item.setChecked(not hidden)
self.fieldLayout.addWidget(item)
示例2: ConfigDialog
# 需要导入模块: from PySide.QtGui import QCheckBox [as 别名]
# 或者: from PySide.QtGui.QCheckBox import setObjectName [as 别名]
#.........这里部分代码省略.........
def connectChildren(self, widget):
widgetName = str(widget.objectName())
if self.subitems.has_key(widgetName) and isinstance(widget, QCheckBox):
widget.stateChanged.connect(lambda: self.updateSubwidgets(self, widget))
self.updateSubwidgets(self, widget)
def updateSubwidgets(self, container, parentwidget, subwidgets=None):
widgetName = parentwidget.objectName()
if not subwidgets:
subwidgets = self.subitems[widgetName]
for widget in container.children():
self.updateSubwidgets(widget, parentwidget, subwidgets)
if hasattr(widget, 'objectName') and widget.objectName() and widget.objectName() in subwidgets:
widget.setDisabled(not parentwidget.isChecked())
def addBasicTab(self):
config = self.config
playerpaths = self.playerpaths
resourcespath = self.resourcespath
error = self.error
if self.datacleared == True:
error = constants.ERROR_MESSAGE_MARKER + "{}".format(getMessage("gui-data-cleared-notification"))
if config['host'] == None:
host = ""
elif ":" in config['host']:
host = config['host']
else:
host = config['host'] + ":" + str(config['port'])
self.connectionSettingsGroup = QtGui.QGroupBox(getMessage("connection-group-title"))
self.hostTextbox = QLineEdit(host, self)
self.hostLabel = QLabel(getMessage("host-label"), self)
self.usernameTextbox = QLineEdit(self)
self.usernameTextbox.setObjectName("name")
self.serverpassLabel = QLabel(getMessage("password-label"), self)
self.defaultroomTextbox = QLineEdit(self)
self.usernameLabel = QLabel(getMessage("name-label"), self)
self.serverpassTextbox = QLineEdit(self)
self.defaultroomLabel = QLabel(getMessage("room-label"), self)
self.hostLabel.setObjectName("host")
self.hostTextbox.setObjectName(constants.LOAD_SAVE_MANUALLY_MARKER + "host")
self.usernameLabel.setObjectName("name")
self.usernameTextbox.setObjectName("name")
self.serverpassLabel.setObjectName("password")
self.serverpassTextbox.setObjectName("password")
self.defaultroomLabel.setObjectName("room")
self.defaultroomTextbox.setObjectName("room")
self.connectionSettingsLayout = QtGui.QGridLayout()
self.connectionSettingsLayout.addWidget(self.hostLabel, 0, 0)
self.connectionSettingsLayout.addWidget(self.hostTextbox, 0, 1)
self.connectionSettingsLayout.addWidget(self.serverpassLabel, 1, 0)
self.connectionSettingsLayout.addWidget(self.serverpassTextbox, 1, 1)
self.connectionSettingsLayout.addWidget(self.usernameLabel, 2, 0)
self.connectionSettingsLayout.addWidget(self.usernameTextbox, 2, 1)
self.connectionSettingsLayout.addWidget(self.defaultroomLabel, 3, 0)
self.connectionSettingsLayout.addWidget(self.defaultroomTextbox, 3, 1)
self.connectionSettingsGroup.setLayout(self.connectionSettingsLayout)
self.mediaplayerSettingsGroup = QtGui.QGroupBox(getMessage("media-setting-title"))
self.executableiconImage = QtGui.QImage()
self.executableiconLabel = QLabel(self)
self.executableiconLabel.setMinimumWidth(16)
self.executablepathCombobox = QtGui.QComboBox(self)
self.executablepathCombobox.setEditable(True)
示例3: ConfigDialog
# 需要导入模块: from PySide.QtGui import QCheckBox [as 别名]
# 或者: from PySide.QtGui.QCheckBox import setObjectName [as 别名]
#.........这里部分代码省略.........
def connectChildren(self, widget):
widgetName = str(widget.objectName())
if self.subitems.has_key(widgetName) and isinstance(widget, QCheckBox):
widget.stateChanged.connect(lambda: self.updateSubwidgets(self, widget))
self.updateSubwidgets(self, widget)
def updateSubwidgets(self, container, parentwidget, subwidgets=None):
widgetName = parentwidget.objectName()
if not subwidgets:
subwidgets = self.subitems[widgetName]
for widget in container.children():
self.updateSubwidgets(widget, parentwidget, subwidgets)
if hasattr(widget, 'objectName') and widget.objectName() and widget.objectName() in subwidgets:
widget.setDisabled(not parentwidget.isChecked())
def addBasicTab(self):
config = self.config
playerpaths = self.playerpaths
resourcespath = self.resourcespath
error = self.error
if self.datacleared == True:
error = constants.ERROR_MESSAGE_MARKER + "{}".format(getMessage("gui-data-cleared-notification"))
if config['host'] == None:
host = ""
elif ":" in config['host']:
host = config['host']
else:
host = config['host'] + ":" + str(config['port'])
self.connectionSettingsGroup = QtGui.QGroupBox(getMessage("connection-group-title"))
self.hostTextbox = QLineEdit(host, self)
self.hostLabel = QLabel(getMessage("host-label"), self)
self.usernameTextbox = QLineEdit(self)
self.usernameTextbox.setObjectName("name")
self.serverpassLabel = QLabel(getMessage("password-label"), self)
self.defaultroomTextbox = QLineEdit(self)
self.usernameLabel = QLabel(getMessage("name-label"), self)
self.serverpassTextbox = QLineEdit(self)
self.defaultroomLabel = QLabel(getMessage("room-label"), self)
self.hostLabel.setObjectName("host")
self.hostTextbox.setObjectName(constants.LOAD_SAVE_MANUALLY_MARKER + "host")
self.usernameLabel.setObjectName("name")
self.usernameTextbox.setObjectName("name")
self.serverpassLabel.setObjectName("password")
self.serverpassTextbox.setObjectName("password")
self.defaultroomLabel.setObjectName("room")
self.defaultroomTextbox.setObjectName("room")
self.connectionSettingsLayout = QtGui.QGridLayout()
self.connectionSettingsLayout.addWidget(self.hostLabel, 0, 0)
self.connectionSettingsLayout.addWidget(self.hostTextbox, 0, 1)
self.connectionSettingsLayout.addWidget(self.serverpassLabel, 1, 0)
self.connectionSettingsLayout.addWidget(self.serverpassTextbox, 1, 1)
self.connectionSettingsLayout.addWidget(self.usernameLabel, 2, 0)
self.connectionSettingsLayout.addWidget(self.usernameTextbox, 2, 1)
self.connectionSettingsLayout.addWidget(self.defaultroomLabel, 3, 0)
self.connectionSettingsLayout.addWidget(self.defaultroomTextbox, 3, 1)
self.connectionSettingsGroup.setLayout(self.connectionSettingsLayout)
self.connectionSettingsGroup.setMaximumHeight(self.connectionSettingsGroup.minimumSizeHint().height())
self.mediaplayerSettingsGroup = QtGui.QGroupBox(getMessage("media-setting-title"))
self.executableiconImage = QtGui.QImage()
self.executableiconLabel = QLabel(self)
self.executableiconLabel.setMinimumWidth(16)
self.executablepathCombobox = QtGui.QComboBox(self)
示例4: Ui_MainWindow
# 需要导入模块: from PySide.QtGui import QCheckBox [as 别名]
# 或者: from PySide.QtGui.QCheckBox import setObjectName [as 别名]
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
lbMinWidth = 65
# leMinWidth = 200
MainWindow.setObjectName("MainWindow")
MainWindow.resize(400, 310)
# self.centralwidget = QWidget(MainWindow)
self.mainSplitter = QSplitter(Qt.Horizontal, MainWindow)
self.mainSplitter.setObjectName("centralwidget")
self.mainSplitter.setProperty("childrenCollapsible", False)
MainWindow.setCentralWidget(self.mainSplitter)
self.leftSplitter = QSplitter(Qt.Vertical, self.mainSplitter)
self.leftSplitter.setProperty("childrenCollapsible", False)
##### login_gbox
self.login_gbox = QGroupBox(self.leftSplitter)
self.login_gbox.setFlat(True)
self.login_gbox.setObjectName("login_gbox")
login_gbox_layout = QVBoxLayout(self.login_gbox)
login_gbox_csf_layout = QHBoxLayout()
login_gbox_account_layout = QHBoxLayout()
login_gbox_connect_layout = QHBoxLayout()
login_gbox_layout.addLayout(login_gbox_csf_layout)
login_gbox_layout.addLayout(login_gbox_account_layout)
login_gbox_layout.addLayout(login_gbox_connect_layout)
self.lb_client_secrets_file_path = QLabel(self.login_gbox)
self.lb_client_secrets_file_path.setObjectName("lb_client_secrets_file_path")
self.lb_client_secrets_file_path.setMinimumWidth(lbMinWidth)
self.client_secrets_file_path_le = QLineEdit(self.login_gbox)
self.client_secrets_file_path_le.setObjectName("client_secrets_file_path_le")
self.client_secret_file_path_tBtn = QToolButton(self.login_gbox)
self.client_secret_file_path_tBtn.setObjectName("client_secret_file_path_tBtn")
login_gbox_csf_layout.addWidget(self.lb_client_secrets_file_path)
login_gbox_csf_layout.addWidget(self.client_secrets_file_path_le)
login_gbox_csf_layout.addWidget(self.client_secret_file_path_tBtn)
self.lb_account = QLabel(self.login_gbox)
self.lb_account.setMaximumWidth(lbMinWidth)
self.lb_account.setObjectName("lb_account")
self.remove_account_btn = QToolButton(self.login_gbox)
self.remove_account_btn.setObjectName("remove_account_btn")
self.remove_account_btn.setMinimumWidth(20)
self.remove_account_btn.setEnabled(False)
self.add_account_btn = QToolButton(self.login_gbox)
self.add_account_btn.setObjectName("add_account_btn")
self.add_account_btn.setMinimumWidth(20)
self.accounts_cb = QComboBox(self.login_gbox)
self.accounts_cb.setObjectName("accounts_cb")
login_gbox_account_layout.addWidget(self.lb_account)
login_gbox_account_layout.addWidget(self.remove_account_btn)
login_gbox_account_layout.addWidget(self.add_account_btn)
login_gbox_account_layout.addWidget(self.accounts_cb)
self.lb_decryption_key = QLabel(self.login_gbox)
self.lb_decryption_key.setObjectName("lb_decryption_key")
self.lb_decryption_key.setMinimumWidth(lbMinWidth)
self.lb_decryption_key.hide()
self.decryption_key_le = QLineEdit(self.login_gbox)
self.decryption_key_le.setEchoMode(QLineEdit.Password)
self.decryption_key_le.setObjectName("decryption_key_le")
self.decryption_key_le.hide()
self.connect_btn = QPushButton(self.login_gbox)
self.connect_btn.setEnabled(False)
self.connect_btn.setObjectName("connect_btn")
login_gbox_connect_layout.addWidget(self.lb_decryption_key)
login_gbox_connect_layout.addWidget(self.decryption_key_le)
login_gbox_connect_layout.addWidget(self.connect_btn)
#### search_gbox
self.search_gbox = QGroupBox(self.leftSplitter)
self.search_gbox.setFlat(True)
self.search_gbox.setObjectName("search_gbox")
self.search_gbox.hide()
search_gbox_layout = QVBoxLayout(self.search_gbox)
search_gbox_mailbox_layout = QVBoxLayout()
search_gbox_date_layout = QHBoxLayout()
search_gbox_from_layout = QHBoxLayout()
search_gbox_to_layout = QHBoxLayout()
search_gbox_subject_layout = QHBoxLayout()
search_gbox_threads_layout = QHBoxLayout()
search_gbox_paramaters_layout = QHBoxLayout()
search_gbox_layout.addLayout(search_gbox_mailbox_layout)
search_gbox_layout.addLayout(search_gbox_date_layout)
#.........这里部分代码省略.........
示例5: Ui_MainWindow
# 需要导入模块: from PySide.QtGui import QCheckBox [as 别名]
# 或者: from PySide.QtGui.QCheckBox import setObjectName [as 别名]
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(810, 492)
lbMinWidth = 65
lbMinWidthLogin = 110
# leMinWidth = 200
# self.centralwidget = QWidget(MainWindow)
self.mainSplitter = QSplitter(Qt.Horizontal, MainWindow)
self.mainSplitter.setObjectName("centralwidget")
self.mainSplitter.setProperty("childrenCollapsible", False)
MainWindow.setCentralWidget(self.mainSplitter)
self.leftSplitter = QSplitter(Qt.Vertical, self.mainSplitter)
self.leftSplitter.setProperty("childrenCollapsible", False)
# login_gbox
self.login_gbox = QGroupBox(self.leftSplitter)
self.login_gbox.setFlat(True)
self.login_gbox.setObjectName("login_gbox")
login_gbox_layout = QVBoxLayout(self.login_gbox)
login_gbox_presets_layout = QHBoxLayout()
login_gbox_server_layout = QHBoxLayout()
login_gbox_ssl_layout = QHBoxLayout()
login_gbox_address_layout = QHBoxLayout()
login_gbox_pass_layout = QHBoxLayout()
login_gbox_connect_layout = QHBoxLayout()
login_gbox_layout.addLayout(login_gbox_presets_layout)
login_gbox_layout.addLayout(login_gbox_server_layout)
login_gbox_layout.addLayout(login_gbox_ssl_layout)
login_gbox_layout.addLayout(login_gbox_address_layout)
login_gbox_layout.addLayout(login_gbox_pass_layout)
login_gbox_layout.addLayout(login_gbox_connect_layout)
self.lb_presets = QLabel(self.login_gbox)
self.lb_presets.setObjectName("lb_presets")
self.lb_presets.setMinimumWidth(lbMinWidthLogin)
self.lb_presets.setMaximumWidth(lbMinWidthLogin)
self.presets_cbox = QComboBox(self.login_gbox)
self.presets_cbox.setObjectName("presets_cbox")
self.add_preset_btn = QPushButton(self.login_gbox)
self.add_preset_btn.setObjectName("add_preset_btn")
self.add_preset_btn.setMaximumWidth(30)
self.remove_preset_btn = QPushButton(self.login_gbox)
self.remove_preset_btn.setObjectName("remove_preset_btn")
self.remove_preset_btn.setMaximumWidth(20)
login_gbox_presets_layout.addWidget(self.lb_presets)
login_gbox_presets_layout.addWidget(self.presets_cbox)
login_gbox_presets_layout.addWidget(self.add_preset_btn)
login_gbox_presets_layout.addWidget(self.remove_preset_btn)
self.lb_imap_server = QLabel(self.login_gbox)
self.lb_imap_server.setObjectName("lb_imap_server")
self.lb_imap_server.setMinimumWidth(lbMinWidthLogin)
self.imap_server_le = QLineEdit(self.login_gbox)
self.imap_server_le.setObjectName("imap_server_le")
login_gbox_server_layout.addWidget(self.lb_imap_server)
login_gbox_server_layout.addWidget(self.imap_server_le)
self.lb_ssl = QLabel(self.login_gbox)
self.lb_ssl.setObjectName("lb_ssl")
self.lb_ssl.setMinimumWidth(lbMinWidthLogin)
self.lb_ssl.setMaximumWidth(lbMinWidthLogin)
self.ssl_cb = QCheckBox(self.login_gbox)
self.ssl_cb.setEnabled(False)
self.ssl_cb.setCheckable(True)
self.ssl_cb.setChecked(True)
self.ssl_cb.setObjectName("ssl_cb")
login_gbox_ssl_layout.addWidget(self.lb_ssl)
login_gbox_ssl_layout.addWidget(self.ssl_cb)
self.lb_adress = QLabel(self.login_gbox)
self.lb_adress.setObjectName("lb_adress")
self.lb_adress.setMinimumWidth(lbMinWidthLogin)
self.adress_le = QLineEdit(self.login_gbox)
self.adress_le.setInputMethodHints(Qt.ImhNone)
self.adress_le.setObjectName("adress_le")
login_gbox_address_layout.addWidget(self.lb_adress)
login_gbox_address_layout.addWidget(self.adress_le)
self.lb_pass = QLabel(self.login_gbox)
self.lb_pass.setObjectName("lb_pass")
self.lb_pass.setMinimumWidth(lbMinWidthLogin)
self.pass_le = QLineEdit(self.login_gbox)
self.pass_le.setText("")
self.pass_le.setEchoMode(QLineEdit.Password)
self.pass_le.setObjectName("pass_le")
login_gbox_pass_layout.addWidget(self.lb_pass)
login_gbox_pass_layout.addWidget(self.pass_le)
self.connect_btn = QPushButton(self.login_gbox)
self.connect_btn.setObjectName("connect_btn")
login_gbox_connect_layout.addStretch()
login_gbox_connect_layout.addWidget(self.connect_btn)
# search_gbox
#.........这里部分代码省略.........
示例6: __init__
# 需要导入模块: from PySide.QtGui import QCheckBox [as 别名]
# 或者: from PySide.QtGui.QCheckBox import setObjectName [as 别名]
def __init__(self, *args, **kwargs ):
QMainWindow.__init__( self, *args, **kwargs )
self.installEventFilter( self )
self.setWindowTitle( Window_global.title )
mainWidget = QWidget()
self.setCentralWidget( mainWidget )
vLayout = QVBoxLayout( mainWidget )
hLayoutListWidget = QHBoxLayout()
widgetPutList = UI_objectList()
widgetBaseList = UI_objectList()
widgetPutList.label.setText( 'Put Object List' )
widgetBaseList.label.setText( 'Ground Object List' )
buttonPut = QPushButton( 'Put Object' )
widgetPutList.listWidget.setObjectName( Window_global.listWidgetPutName )
widgetBaseList.listWidget.setObjectName( Window_global.listWidgetGroundName )
widgetGroupList = UI_objectList()
widgetGroupList.label.setText( 'Duplicate Group List' )
widgetGroupList.listWidget.setObjectName( Window_global.duGroupListName )
widgetGroupList.listWidget.setSelectionMode( QAbstractItemView.SingleSelection )
hLayoutListWidget.addWidget( widgetPutList )
hLayoutListWidget.addWidget( widgetBaseList )
randomGroupBox = QGroupBox( 'Random' )
vLayoutRandom = QVBoxLayout( randomGroupBox )
rotateValidator = QDoubleValidator(-1000000, 1000000, 2, self )
scaleValidator = QDoubleValidator( 0.0, 100, 2, self )
randomOptionR = UI_randomOption2( 'Rotate', rotateValidator, -45, 45 )
randomOptionS = UI_randomOption2( 'Scale', scaleValidator, 0.8, 1.2 )
randomOptionRA = UI_randomOption( 'Rotate All', rotateValidator, -45, 45 )
randomOptionSA = UI_randomOption( 'Scale All', scaleValidator, 0.8, 1.2 )
randomOptionR.setObjectName( Window_global.randomOptionRotName )
randomOptionS.setObjectName( Window_global.randomOptionScaleName )
randomOptionRA.setObjectName( Window_global.randomOptionRotAName )
randomOptionSA.setObjectName( Window_global.randomOptionScaleAName )
vLayoutRandom.addWidget( randomOptionR )
vLayoutRandom.addWidget( randomOptionS )
vLayoutRandom.addWidget( randomOptionRA )
vLayoutRandom.addWidget( randomOptionSA )
offsetGroupBox = QGroupBox( 'Offset' )
vLayoutOffset = QVBoxLayout( offsetGroupBox )
componentCheck = QCheckBox( "Component check" )
offsetSlider1 = UI_OffsetSlider( "Offset By Object", -1, 1, 0 )
offsetSlider2 = UI_OffsetSlider( "Offset By Ground", -100, 100, 0 )
componentCheck.setObjectName( Window_global.componentCheckName )
offsetSlider1.setObjectName( Window_global.offsetByObjectName )
offsetSlider2.setObjectName( Window_global.offsetByGroundName )
vLayoutOffset.addWidget( componentCheck )
vLayoutOffset.addWidget( offsetSlider1 )
vLayoutOffset.addWidget( offsetSlider2 )
orientGroupBox = QGroupBox( 'Orient Option' )
vLayoutOrient = QVBoxLayout( orientGroupBox )
orientNormalCheck = QCheckBox("Ground Normal Affects")
hLayoutCombobox = QHBoxLayout()
orientTypeText = QLabel( 'Orient Edit Type : ' )
orientTypeComboBox = QComboBox()
orientTypeComboBox.addItem( 'All' )
orientTypeComboBox.addItem( 'Only Y' )
hLayoutCombobox.addWidget( orientTypeText )
hLayoutCombobox.addWidget( orientTypeComboBox )
vLayoutOrient.addWidget( orientNormalCheck )
vLayoutOrient.addLayout( hLayoutCombobox )
orientNormalCheck.setObjectName( Window_global.checkNormalOrientName )
orientTypeComboBox.setObjectName( Window_global.orientEditModeName )
vLayout.addLayout( hLayoutListWidget )
vLayout.addWidget( widgetGroupList )
vLayout.addWidget( randomGroupBox )
vLayout.addWidget( offsetGroupBox )
vLayout.addWidget( orientGroupBox )
vLayout.addWidget( buttonPut )
Window_global.loadInfo()
QtCore.QObject.connect( buttonPut, QtCore.SIGNAL( 'clicked()' ), Window_cmd.setTool_putObjectOnGround )