本文整理汇总了Python中PyQt4.QtCore.QMetaObject.connectSlotsByName方法的典型用法代码示例。如果您正苦于以下问题:Python QMetaObject.connectSlotsByName方法的具体用法?Python QMetaObject.connectSlotsByName怎么用?Python QMetaObject.connectSlotsByName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.QtCore.QMetaObject
的用法示例。
在下文中一共展示了QMetaObject.connectSlotsByName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setupUi
# 需要导入模块: from PyQt4.QtCore import QMetaObject [as 别名]
# 或者: from PyQt4.QtCore.QMetaObject import connectSlotsByName [as 别名]
def setupUi(self, dialog, nepomukType=None, excludeList=None):
self.dialog = dialog
dialog.setObjectName("dialog")
dialog.resize(500, 300)
self.gridlayout = QGridLayout(dialog)
self.gridlayout.setMargin(9)
self.gridlayout.setSpacing(6)
self.gridlayout.setObjectName("gridlayout")
self.table = ResourcesByTypeTable(mainWindow=dialog.parent(), nepomukType=nepomukType, excludeList=excludeList, dialog=self)
self.table.table.setColumnWidth(0,250)
self.gridlayout.addWidget(self.table, 0, 0, 1, 1)
self.buttonBox = QDialogButtonBox(dialog)
self.buttonBox.setOrientation(Qt.Horizontal)
self.buttonBox.setStandardButtons(QDialogButtonBox.Cancel | QDialogButtonBox.NoButton | QDialogButtonBox.Ok)
self.buttonBox.setObjectName("buttonBox")
self.gridlayout.addWidget(self.buttonBox, 1, 0, 1, 1)
self.retranslateUi(dialog)
self.table.table.activated.connect(self.activated)
self.buttonBox.accepted.connect(dialog.accept)
self.buttonBox.rejected.connect(dialog.reject)
QMetaObject.connectSlotsByName(dialog)
示例2: setupUi
# 需要导入模块: from PyQt4.QtCore import QMetaObject [as 别名]
# 或者: from PyQt4.QtCore.QMetaObject import connectSlotsByName [as 别名]
def setupUi(self, SLim):
SLim.setObjectName(_fromUtf8("SLim"))
SLim.resize(800, 601)
self.centralwidget = QWidget(SLim)
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
self.verticalLayout = QVBoxLayout(self.centralwidget)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
SLim.setCentralWidget(self.centralwidget)
self.menubar = QMenuBar(SLim)
self.menubar.setGeometry(QRect(0, 0, 800, 20))
self.menubar.setObjectName(_fromUtf8("menubar"))
SLim.setMenuBar(self.menubar)
self.statusbar = QStatusBar(SLim)
self.statusbar.setObjectName(_fromUtf8("statusbar"))
SLim.setStatusBar(self.statusbar)
ui_settings = slimUISettings()
QMetaObject.connectSlotsByName(SLim)
self.loopers = []
self.loopers.append(LooperWidget(self.centralwidget, 0, ui_settings.looper))
self.loopers.append(LooperWidget(self.centralwidget, 1, ui_settings.looper))
for looper in self.loopers:
self.verticalLayout.addWidget(looper)
self.retranslateUi(SLim)
示例3: setupUi
# 需要导入模块: from PyQt4.QtCore import QMetaObject [as 别名]
# 或者: from PyQt4.QtCore.QMetaObject import connectSlotsByName [as 别名]
def setupUi(self):
self.valueItems = {}
self.dependentItems = {}
self.resize(650, 450)
self.buttonBox = QDialogButtonBox()
self.buttonBox.setOrientation(Qt.Horizontal)
self.buttonBox.setStandardButtons(QDialogButtonBox.Cancel
| QDialogButtonBox.Ok)
self.infoText = QTextEdit()
numbers = self.getAvailableValuesOfType(ParameterNumber, OutputNumber)
text = self.tr('You can refer to model values in your formula, using '
'single-letter variables, as follows:\n', 'CalculatorModelerParametersDialog')
ichar = 97
if numbers:
for number in numbers:
text += chr(ichar) + '->' + self.resolveValueDescription(number) + '\n'
ichar += 1
else:
text += self.tr('\n - No numerical variables are available.', 'CalculatorModelerParametersDialog')
self.infoText.setText(text)
self.infoText.setEnabled(False)
self.formulaText = QLineEdit()
if hasattr(self.formulaText, 'setPlaceholderText'):
self.formulaText.setPlaceholderText(self.tr('[Enter your formula here]', 'CalculatorModelerParametersDialog'))
self.setWindowTitle(self.tr('Calculator', 'CalculatorModelerParametersDialog'))
self.verticalLayout = QVBoxLayout()
self.verticalLayout.setSpacing(2)
self.verticalLayout.setMargin(0)
self.verticalLayout.addWidget(self.infoText)
self.verticalLayout.addWidget(self.formulaText)
self.verticalLayout.addWidget(self.buttonBox)
self.setLayout(self.verticalLayout)
QObject.connect(self.buttonBox, SIGNAL('accepted()'), self.okPressed)
QObject.connect(self.buttonBox, SIGNAL('rejected()'), self.cancelPressed)
QMetaObject.connectSlotsByName(self)
示例4: __createLayout
# 需要导入模块: from PyQt4.QtCore import QMetaObject [as 别名]
# 或者: from PyQt4.QtCore.QMetaObject import connectSlotsByName [as 别名]
def __createLayout( self ):
""" Creates the dialog layout """
self.resize( 579, 297 )
self.setSizeGripEnabled( True )
self.gridlayout = QGridLayout( self )
self.descriptionLabel = QLabel( self )
self.descriptionLabel.setText( "Description:" )
self.gridlayout.addWidget( self.descriptionLabel, 0, 0, 1, 1 )
self.descriptionEdit = QLineEdit( self )
self.gridlayout.addWidget( self.descriptionEdit, 0, 1, 1, 3 )
sizePolicy = QSizePolicy( QSizePolicy.Expanding, QSizePolicy.Preferred )
sizePolicy.setHorizontalStretch( 0 )
sizePolicy.setVerticalStretch( 0 )
self.completedCheckBox = QCheckBox( self )
self.completedCheckBox.setText( "Completed" )
sizePolicy = QSizePolicy( QSizePolicy.Expanding, QSizePolicy.Fixed )
sizePolicy.setHorizontalStretch( 0 )
sizePolicy.setVerticalStretch( 0 )
sizePolicy.setHeightForWidth( self.completedCheckBox.sizePolicy().hasHeightForWidth() )
self.completedCheckBox.setSizePolicy( sizePolicy )
self.gridlayout.addWidget( self.completedCheckBox, 3, 3, 1, 1 )
self.filenameLabel = QLabel( self )
self.filenameLabel.setText( "File name:" )
self.gridlayout.addWidget( self.filenameLabel, 4, 0, 1, 1 )
self.filenameEdit = QLineEdit( self )
self.filenameEdit.setFocusPolicy( Qt.NoFocus )
self.filenameEdit.setReadOnly( True )
self.gridlayout.addWidget( self.filenameEdit, 4, 1, 1, 3 )
self.lineLabel = QLabel( self )
self.lineLabel.setText( "Line:" )
self.gridlayout.addWidget( self.lineLabel, 5, 0, 1, 1 )
self.linenoEdit = QLineEdit( self )
self.linenoEdit.setFocusPolicy( Qt.NoFocus )
self.linenoEdit.setReadOnly( True )
self.gridlayout.addWidget( self.linenoEdit, 5, 1, 1, 3 )
self.buttonBox = QDialogButtonBox( self )
self.buttonBox.setOrientation( Qt.Horizontal )
self.buttonBox.setStandardButtons( QDialogButtonBox.Cancel | \
QDialogButtonBox.Ok )
self.gridlayout.addWidget( self.buttonBox, 6, 0, 1, 4 )
self.descriptionLabel.setBuddy( self.descriptionEdit )
self.buttonBox.accepted.connect( self.accept )
self.buttonBox.rejected.connect( self.reject )
QMetaObject.connectSlotsByName( self )
self.setTabOrder( self.completedCheckBox, self.buttonBox )
return
示例5: setupUi
# 需要导入模块: from PyQt4.QtCore import QMetaObject [as 别名]
# 或者: from PyQt4.QtCore.QMetaObject import connectSlotsByName [as 别名]
def setupUi(self, TestLayout):
TestLayout.setObjectName("ListEdit")
TestLayout.resize(440,240)
self.centralwidget = QtGui.QWidget(TestLayout)
self.centralwidget.setObjectName("centralwidget")
self.horizontalLayout = QtGui.QHBoxLayout(self.centralwidget)
self.horizontalLayout.setObjectName("horizontalLayout")
self.verticalLayout = QtGui.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
self.editBox = QtGui.QLineEdit(self.centralwidget)
self.editBox.setObjectName("editBox")
self.verticalLayout.addWidget(self.editBox)
self.listBox = QtGui.QListWidget(self.centralwidget)
self.listBox.setObjectName("listBox")
self.verticalLayout.addWidget(self.listBox)
self.horizontalLayout.addLayout(self.verticalLayout)
self.verticalLayout_2 = QtGui.QVBoxLayout()
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.addButton = QtGui.QPushButton(self.centralwidget)
self.addButton.setObjectName("addButton")
self.addButton.setText("Add")
self.verticalLayout_2.addWidget(self.addButton)
self.removeButton = QtGui.QPushButton(self.centralwidget)
self.removeButton.setObjectName("removeButton")
self.removeButton.setText("Remove")
self.verticalLayout_2.addWidget(self.removeButton)
self.clearButton = QtGui.QPushButton(self.centralwidget)
self.clearButton.setObjectName("clearButton")
self.clearButton.setText("Clear")
self.loadButton = QtGui.QPushButton(self.centralwidget)
self.loadButton.setObjectName("clearButton")
self.loadButton.setText("Load File")
self.verticalLayout_2.addWidget(self.loadButton)
self.verticalLayout_2.addWidget(self.clearButton)
spacerItem = QtGui.QSpacerItem(20,40,QtGui.QSizePolicy.Minimum,QtGui.QSizePolicy.Expanding)
self.verticalLayout_2.addItem(spacerItem)
self.horizontalLayout_2 = QtGui.QHBoxLayout()
self.okButton = QtGui.QPushButton(self.centralwidget)
self.okButton.setText("OK")
self.cancelButton = QtGui.QPushButton(self.centralwidget)
self.cancelButton.setText("Cancel")
self.horizontalLayout_2.addWidget(self.okButton)
self.horizontalLayout_2.addWidget(self.cancelButton)
self.verticalLayout_2.addLayout(self.horizontalLayout_2)
self.horizontalLayout.addLayout(self.verticalLayout_2)
QMetaObject.connectSlotsByName(TestLayout)
# connect buttons
self.connect(self.addButton, QtCore.SIGNAL("clicked()"), self.addToList)
self.connect(self.removeButton, QtCore.SIGNAL("clicked()"), self.removeFromList)
self.connect(self.clearButton, QtCore.SIGNAL("clicked()"), self.clearList)
self.connect(self.loadButton, QtCore.SIGNAL("clicked()"), self.loadListFile)
self.connect(self.okButton, QtCore.SIGNAL("clicked()"), self.ListUpdate)
self.connect(self.cancelButton, QtCore.SIGNAL("clicked()"), self.cancelListUpdate)
示例6: setupUi
# 需要导入模块: from PyQt4.QtCore import QMetaObject [as 别名]
# 或者: from PyQt4.QtCore.QMetaObject import connectSlotsByName [as 别名]
def setupUi(self):
self.setObjectName(u'splash_screen')
self.setWindowFlags(self.windowFlags() | Qt.WindowStaysOnTopHint)
self.setContextMenuPolicy(Qt.PreventContextMenu)
splash_image = QPixmap(u':/icons/128/luma')
self.setPixmap(splash_image)
self.setMask(splash_image.mask())
self.resize(128, 128)
QMetaObject.connectSlotsByName(self)
示例7: setupUi
# 需要导入模块: from PyQt4.QtCore import QMetaObject [as 别名]
# 或者: from PyQt4.QtCore.QMetaObject import connectSlotsByName [as 别名]
def setupUi (self, MainWindow):
'''sets up the Maya UI.
@param MainWindow
'''
MainWindow.setObjectName ('MainWindow')
MainWindow.resize (800, 1396)
sizePolicy = QSizePolicy (QSizePolicy.Preferred, QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch (0)
sizePolicy.setVerticalStretch (0)
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
MainWindow.setSizePolicy(sizePolicy)
font = QFont ()
font.setPointSize (11)
MainWindow.setFont (font)
MainWindow.setWindowTitle (QApplication.translate("MainWindow", "Location Tool", None, QApplication.UnicodeUTF8))
MainWindow.setTabShape (QTabWidget.Rounded)
MainWindow.setDockOptions (QMainWindow.AllowTabbedDocks|QMainWindow.AnimatedDocks)
self.scrollAreaWidgetContents_3 = QWidget (MainWindow)
self.scrollAreaWidgetContents_3.setGeometry (QRect(10, 10, 900, 940))
self.scrollAreaWidgetContents_3.setObjectName ('scrollAreaWidgetContents_3')
self._view = View0.View ("JADEview", self.graph_view, self.scene, self.scrollAreaWidgetContents_3)
self._view.setObjectName ('JADEview') # real ui name
self._view.graphicsView.setObjectName ('JADEInnerView')
self.connect (self.scene, SIGNAL("selectionChanged()"), self._view.selectionChanged)
self._view.wireViewItemsUp ()
self._view.getGraphicsView().setScene (self.scene)
self._view.setToolboxCSSColorScheme ('background-color: rgb(68,68,68);color: rgb(200,200,200)') # this needs to be done since the toolbox's background didn't have a uniform colour otherwise.
#self._view.setGraphicsViewCSSBackground () # the CSS background doesn't seem to work in Maya as there seems to be a problem with cleaning QGraphicsLineItems when they move, that doesn't happen when there's no CSS applied to the background.
self.graphicsView = self._view.getGraphicsView ()
self.node_coords = QPoint (0,0)
layout = QHBoxLayout (self.scrollAreaWidgetContents_3)
layout.setContentsMargins (QMargins(0,0,0,0));
layout.addWidget (self._view)
QMetaObject.connectSlotsByName (MainWindow)
"""
cmds.control('JADEInnerView', edit=True, ebg=True, bgc=[.5,.5,.9])
print cmds.control('JADEInnerView', query=True, p=True)
"""
# wiring the Maya Contextual pop-up Menus - yes, in Maya we've split the pop-up menu definition in three pop-up menus although only one will be present at any time.
self.menu = cmds.popupMenu ('JADEmenu', parent='JADEInnerView', button=3, pmc = 'ClientMaya.ui.ctxMenu()', aob=True)
self.menuAddOuts = cmds.popupMenu ('JADEmenuAddOuts', parent='JADEInnerView', button=3, pmc = 'ClientMaya.ui.ctxMenuAddOuts()', aob=True, alt=True)
self.menuAddIns = cmds.popupMenu ('JADEmenuAddIns', parent='JADEInnerView', button=3, pmc = 'ClientMaya.ui.ctxMenuAddIns()', aob=True, ctl=True)
# this class property is used to keep track of the mouse position.
self._mouse = QCursor
# self._view's zoom slider (we need this to correct the bias added to sort the mouse position when the zoom changes - ONLY in Maya)
self._zoom_slider = self._view.getZoomSlider()
示例8: __init__
# 需要导入模块: from PyQt4.QtCore import QMetaObject [as 别名]
# 或者: from PyQt4.QtCore.QMetaObject import connectSlotsByName [as 别名]
def __init__(self, s):
QDialog.__init__(self)
self.setModal(True)
self.resize(600, 400)
self.setWindowTitle(self.tr('Unit test'))
layout = QVBoxLayout()
self.text = QTextEdit()
self.text.setEnabled(True)
self.text.setText(s)
layout.addWidget(self.text)
self.setLayout(layout)
QMetaObject.connectSlotsByName(self)
示例9: __init__
# 需要导入模块: from PyQt4.QtCore import QMetaObject [as 别名]
# 或者: from PyQt4.QtCore.QMetaObject import connectSlotsByName [as 别名]
def __init__(self, parent=None):
super(ProxyPreferencesWidget, self).__init__(parent, Qt.Dialog)
self.setObjectName('Dialog')
self.resize(325, 142)
self.setMinimumSize(QSize(325, 142))
self.setMaximumSize(QSize(325, 142))
self.formLayout = QFormLayout(self)
self.formLayout.setObjectName('formLayout')
self.proxyEnable = QCheckBox(self)
self.proxyEnable.setObjectName('proxyEnable')
self.proxyEnable.stateChanged.connect(self.enable_edit)
self.formLayout.setWidget(0, QFormLayout.LabelRole, self.proxyEnable)
self.proxyServer = QLineEdit(self)
self.proxyServer.setObjectName('proxyServer')
self.formLayout.setWidget(1, QFormLayout.FieldRole, self.proxyServer)
self.proxyLogin = QLineEdit(self)
self.proxyLogin.setObjectName('proxyLogin')
self.formLayout.setWidget(2, QFormLayout.FieldRole, self.proxyLogin)
#self.proxyPass = QLineEdit(self)
plug_path = os.path.abspath(__file__)
plug_path = os.path.dirname(plug_path)
self.proxyPass = ButtonInLineEdit(self, plug_path + '/eye.svg')
self.proxyPass.setObjectName('proxyPass')
self.proxyPass.setEchoMode(QLineEdit.Password)
self.formLayout.setWidget(3, QFormLayout.FieldRole, self.proxyPass)
self.buttonBox = QDialogButtonBox(self)
self.buttonBox.setOrientation(Qt.Horizontal)
self.buttonBox.setStandardButtons(QDialogButtonBox.Cancel | QDialogButtonBox.Ok)
self.buttonBox.setObjectName('buttonBox')
self.formLayout.setWidget(4, QFormLayout.FieldRole, self.buttonBox)
self.label = QLabel(self)
self.label.setObjectName('label')
self.formLayout.setWidget(1, QFormLayout.LabelRole, self.label)
self.label_2 = QLabel(self)
self.label_2.setObjectName('label_2')
self.formLayout.setWidget(2, QFormLayout.LabelRole, self.label_2)
self.label_3 = QLabel(self)
self.label_3.setObjectName('label_3')
self.formLayout.setWidget(3, QFormLayout.LabelRole, self.label_3)
self.setWindowTitle('Proxy preferences')
self.proxyEnable.setText('Enable Proxy')
self.label.setText('Proxy server:port')
self.label_2.setText('Login')
self.label_3.setText('Password')
QObject.connect(self.buttonBox, SIGNAL('accepted()'), self.save_settings)
QObject.connect(self.buttonBox, SIGNAL('rejected()'), self.reject)
QObject.connect(self.proxyPass.Button, SIGNAL('pressed()'), lambda: self.proxyPass.setEchoMode(QLineEdit.Normal))
QObject.connect(self.proxyPass.Button, SIGNAL('released()'), lambda: self.proxyPass.setEchoMode(QLineEdit.Password))
QMetaObject.connectSlotsByName(self)
示例10: __init__
# 需要导入模块: from PyQt4.QtCore import QMetaObject [as 别名]
# 或者: from PyQt4.QtCore.QMetaObject import connectSlotsByName [as 别名]
def __init__(self):
QMainWindow.__init__(self)
self.setObjectName('EzSphinx')
self.setWindowTitle('EzSphinx')
# TODO: Use setuptools resources here
pngpath = os.path.join(os.getcwd(), os.path.dirname(sys.argv[0]),
'images', 'ezsphinx.png')
self._icon = QIcon(pngpath)
self.setWindowIcon(self._icon)
QApplication.instance().setWindowIcon(self._icon)
QMetaObject.connectSlotsByName(self)
self.config = EasyConfigParser()
self._setup_ui()
# load last user settings
self._load_preferences()
示例11: setupUi
# 需要导入模块: from PyQt4.QtCore import QMetaObject [as 别名]
# 或者: from PyQt4.QtCore.QMetaObject import connectSlotsByName [as 别名]
def setupUi(self, MainWindow):
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(300, 270)
self.centralwidget = QWidget(MainWindow)
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
self.buttonSave = QPushButton(self.centralwidget)
self.buttonSave.setGeometry(QRect(120, 235, 71, 32))
self.buttonSave.setObjectName(_fromUtf8("buttonSave"))
self.inputFolder = QLineEdit(self.centralwidget)
self.inputFolder.setGeometry(QRect(130, 10, 131, 23))
self.inputFolder.setObjectName(_fromUtf8("inputFolder"))
self.buttonSelectFolder = QToolButton(self.centralwidget)
self.buttonSelectFolder.setGeometry(QRect(263, 10, 27, 23))
self.buttonSelectFolder.setToolButtonStyle(Qt.ToolButtonIconOnly)
self.buttonSelectFolder.setAutoRaise(False)
self.buttonSelectFolder.setArrowType(Qt.NoArrow)
self.buttonSelectFolder.setObjectName(_fromUtf8("buttonSelectFolder"))
self.labelFolder = QLabel(self.centralwidget)
self.labelFolder.setGeometry(QRect(10, 13, 101, 16))
self.labelFolder.setObjectName(_fromUtf8("labelFolder"))
self.inputLogin = QLineEdit(self.centralwidget)
self.inputLogin.setGeometry(QRect(130, 40, 161, 23))
self.inputLogin.setObjectName(_fromUtf8("inputLogin"))
self.inputPassword = QLineEdit(self.centralwidget)
self.inputPassword.setGeometry(QRect(130, 70, 161, 23))
self.inputPassword.setObjectName(_fromUtf8("inputPassword"))
self.labelLogin = QLabel(self.centralwidget)
self.labelLogin.setGeometry(QRect(10, 42, 62, 16))
self.labelLogin.setObjectName(_fromUtf8("labelLogin"))
self.labelPassword = QLabel(self.centralwidget)
self.labelPassword.setGeometry(QRect(10, 72, 62, 16))
self.labelPassword.setObjectName(_fromUtf8("labelPassword"))
self.output = QPlainTextEdit(self.centralwidget)
self.output.setEnabled(True)
self.output.setGeometry(QRect(10, 100, 281, 131))
self.output.viewport().setProperty("cursor", QCursor(Qt.IBeamCursor))
self.output.setReadOnly(True)
self.output.setObjectName(_fromUtf8("output"))
font = QApplication.font()
font.setPointSize(11)
self.output.setFont(font)
MainWindow.setCentralWidget(self.centralwidget)
self.retranslateUi(MainWindow)
self.connectSignals()
QMetaObject.connectSlotsByName(MainWindow)
示例12: __init__
# 需要导入模块: from PyQt4.QtCore import QMetaObject [as 别名]
# 或者: from PyQt4.QtCore.QMetaObject import connectSlotsByName [as 别名]
def __init__(self,parent=None):
super(dialog, self).__init__(parent)
self.setModal(True)
self.setGeometry(100,100,600,400)
self.ok=QPushButton(self)
self.ok.move(200,350)
self.ok.setText("ok")
self.ok.setObjectName("ok_pushbutton")
self.cancle = QPushButton(self)
self.cancle.move(400,350)
self.cancle.setText("cancle")
self.cancle.setObjectName("cancle_pushbutton")
QMetaObject.connectSlotsByName(self) #信号和槽 自动连接
示例13: setupUi
# 需要导入模块: from PyQt4.QtCore import QMetaObject [as 别名]
# 或者: from PyQt4.QtCore.QMetaObject import connectSlotsByName [as 别名]
def setupUi(self):
self.setObjectName("ReferencedTableEditor")
self.gridLayout = QGridLayout(self)
self.gridLayout.setVerticalSpacing(10)
self.gridLayout.setObjectName("gridLayout")
self.label_2 = QLabel(self)
self.label_2.setMaximumSize(QSize(100, 16777215))
self.label_2.setObjectName("label_2")
self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
self.cbo_source_field = QComboBox(self)
self.cbo_source_field.setMinimumSize(QSize(0, 30))
self.cbo_source_field.setObjectName("cbo_source_field")
self.gridLayout.addWidget(self.cbo_source_field, 2, 1, 1, 1)
self.label = QLabel(self)
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 2, 0, 1, 1)
self.label_3 = QLabel(self)
self.label_3.setObjectName("label_3")
self.gridLayout.addWidget(self.label_3, 3, 0, 1, 1)
self.cbo_referencing_col = QComboBox(self)
self.cbo_referencing_col.setMinimumSize(QSize(0, 30))
self.cbo_referencing_col.setObjectName("cbo_referencing_col")
self.gridLayout.addWidget(self.cbo_referencing_col, 3, 1, 1, 1)
self.cbo_ref_table = QComboBox(self)
self.cbo_ref_table.setMinimumSize(QSize(0, 30))
self.cbo_ref_table.setObjectName("cbo_ref_table")
self.gridLayout.addWidget(self.cbo_ref_table, 1, 1, 1, 1)
self.label_2.setText(QApplication.translate("ReferencedTableEditor",
"References"))
self.label.setText(QApplication.translate("ReferencedTableEditor",
"Data source field"))
self.label_3.setText(QApplication.translate("ReferencedTableEditor",
"Referencing"))
self._current_profile = current_profile()
self._current_profile_tables = []
if self._current_profile is not None:
self._current_profile_tables = self._current_profile.table_names()
#Connect signals
QMetaObject.connectSlotsByName(self)
self.cbo_ref_table.currentIndexChanged[str].connect(self._load_source_table_fields)
示例14: setupUi
# 需要导入模块: from PyQt4.QtCore import QMetaObject [as 别名]
# 或者: from PyQt4.QtCore.QMetaObject import connectSlotsByName [as 别名]
def setupUi(self, showprogress):
showprogress.setObjectName("showprogress")
showprogress.resize(335, 310)
self.verticalLayout = QVBoxLayout(showprogress)
self.verticalLayout.setObjectName("verticalLayout")
self.barProgress = QProgressBar(showprogress)
self.barProgress.setProperty("value", QVariant(0))
self.barProgress.setObjectName("barProgress")
self.verticalLayout.addWidget(self.barProgress)
self.infoText = QTextEdit(showprogress)
palette = QPalette()
brush = QBrush(QColor(255, 255, 255))
brush.setStyle(Qt.SolidPattern)
palette.setBrush(QPalette.Active, QPalette.Text, brush)
brush = QBrush(QColor(0, 0, 0))
brush.setStyle(Qt.SolidPattern)
palette.setBrush(QPalette.Active, QPalette.Base, brush)
brush = QBrush(QColor(255, 255, 255))
brush.setStyle(Qt.SolidPattern)
palette.setBrush(QPalette.Inactive, QPalette.Text, brush)
brush = QBrush(QColor(0, 0, 0))
brush.setStyle(Qt.SolidPattern)
palette.setBrush(QPalette.Inactive, QPalette.Base, brush)
brush = QBrush(QColor(126, 125, 124))
brush.setStyle(Qt.SolidPattern)
palette.setBrush(QPalette.Disabled, QPalette.Text, brush)
brush = QBrush(QColor(255, 255, 255))
brush.setStyle(Qt.SolidPattern)
palette.setBrush(QPalette.Disabled, QPalette.Base, brush)
self.infoText.setPalette(palette)
self.infoText.setObjectName("infoText")
self.verticalLayout.addWidget(self.infoText)
self.horizontalLayout = QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
spacerItem = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem)
self.fermer = QPushButton(showprogress)
self.fermer.setObjectName("fermer")
self.horizontalLayout.addWidget(self.fermer)
self.verticalLayout.addLayout(self.horizontalLayout)
self.retranslateUi(showprogress)
QMetaObject.connectSlotsByName(showprogress)
示例15: addClusterPage
# 需要导入模块: from PyQt4.QtCore import QMetaObject [as 别名]
# 或者: from PyQt4.QtCore.QMetaObject import connectSlotsByName [as 别名]
def addClusterPage (self, new_cluster_id):
self.enableAllClusterPagesDeleteButton () # enable all the cluster page's delete buttons (as I can be bothered to go look for the one that got previously disabled)
tmp_w = QWidget ()
tmp_l = QLabel (tmp_w)
tmp_e = QLineEdit (tmp_w)
tmp_b = QPushButton (tmp_w)
self._cluster_page_list.append ([new_cluster_id, tmp_w, tmp_l, tmp_e, tmp_b])
tmp_w.setGeometry (QRect (0, 0, 131, 241))
tmp_w.setObjectName ('Cluster_' + str (new_cluster_id))
tmp_l.setGeometry (QRect (4, 6, 62, 16))
tmp_l.setFont (self.font)
tmp_l.setObjectName ('label_' + str (new_cluster_id))
tmp_e.setGeometry (QRect (2, 20, 60, 16))
tmp_e.setObjectName ('groupLineEdit_' + str (new_cluster_id))
tmp_b.setGeometry (QRect (2, 50, 60, 16))
tmp_b.setFont (self.font)
tmp_b.setObjectName ('pushButton_' + str (new_cluster_id))
self._toolBox.addItem (tmp_w, 'cluster_page_'+str(new_cluster_id))
self._toolBox.setItemText (self._toolBox.indexOf (tmp_w), QApplication.translate ('Form', 'C_'+str(new_cluster_id), None, QApplication.UnicodeUTF8))
tmp_l.setText (QApplication.translate ("Form", "name cluster", None, QApplication.UnicodeUTF8))
tmp_b.setText (QApplication.translate ("Form", "delete", None, QApplication.UnicodeUTF8))
self._toolBox.setCurrentIndex (new_cluster_id)
QMetaObject.connectSlotsByName (self)
# hook up the delete button (use a closure)
receiver = lambda : self.removeCluster (new_cluster_id)
self.connect (tmp_b, SIGNAL ("clicked()"), receiver) # connect the 'add cluster' button to the method generating new cluster pages.
receiver2 = lambda value : self.updateClusterModelName (new_cluster_id, value)
self.connect (tmp_e, SIGNAL ("textChanged(QString)"), receiver2)