Python PyQt4.QtGui.QSizePolicy() Examples

The following are 30 code examples of PyQt4.QtGui.QSizePolicy(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module PyQt4.QtGui , or try the search function .
Example #1
Source File: plot_view.py    From qkit with GNU General Public License v2.0 6 votes vote down vote up
def setupView(self,Form):
        """Set up slots for views.
        
        The x- and y-values of higher dimensional datasets can be selected to
        be displayed in the 1d plot.

        Args:
            self: Object of the Ui_Form class.
            Form: PlotWindow object that inherits the used calls here from the
                underlying QWidget class.
        Returns:
            No return variable. The function operates on the given object.
        """
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        self._addTraceSelectorIndicator(Form,sizePolicy,TraceSelector = "VTraceXSelector", 
                                        TraceIndicator="VTraceXValue", prefix = self.selector_labels[3]+': ')
        self._addTraceSelectorIndicator(Form,sizePolicy,TraceSelector = "VTraceYSelector", 
                                        TraceIndicator="VTraceYValue", prefix = self.selector_labels[4]+': ')        

        spacerItem = QtGui.QSpacerItem(40, 1, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        
        self._addIndicatorLabels(Form,sizePolicy,indicators=["PointX","PointY"]) 
Example #2
Source File: ui_geom_property.py    From stdm with GNU General Public License v2.0 5 votes vote down vote up
def setupUi(self, GeometryProperty):
        GeometryProperty.setObjectName(_fromUtf8("GeometryProperty"))
        GeometryProperty.resize(290, 108)
        self.gridLayout_2 = QtGui.QGridLayout(GeometryProperty)
        self.gridLayout_2.setSizeConstraint(QtGui.QLayout.SetMaximumSize)
        self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
        self.gridLayout = QtGui.QGridLayout()
        self.gridLayout.setSizeConstraint(QtGui.QLayout.SetMaximumSize)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.label = QtGui.QLabel(GeometryProperty)
        self.label.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.cboGeoType = QtGui.QComboBox(GeometryProperty)
        self.cboGeoType.setMaximumSize(QtCore.QSize(500, 16777215))
        self.cboGeoType.setObjectName(_fromUtf8("cboGeoType"))
        self.gridLayout.addWidget(self.cboGeoType, 0, 1, 1, 1)
        self.label_2 = QtGui.QLabel(GeometryProperty)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
        self.label_2.setSizePolicy(sizePolicy)
        self.label_2.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
        self.btnCoord = QtGui.QPushButton(GeometryProperty)
        self.btnCoord.setObjectName(_fromUtf8("btnCoord"))
        self.gridLayout.addWidget(self.btnCoord, 1, 1, 1, 1)
        self.gridLayout.setColumnStretch(1, 1)
        self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
        self.buttonBox = QtGui.QDialogButtonBox(GeometryProperty)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.gridLayout_2.addWidget(self.buttonBox, 1, 0, 1, 1)

        self.retranslateUi(GeometryProperty)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), GeometryProperty.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), GeometryProperty.reject)
        QtCore.QMetaObject.connectSlotsByName(GeometryProperty) 
Example #3
Source File: display.py    From ccad with GNU Lesser General Public License v3.0 5 votes vote down vote up
def __init__(self, parent=None):
        super(GLWidget, self).__init__(parent)
        self.setMouseTracking(True)
        #self.setFocusPolicy(_QtCore.Qt.WheelFocus)
        self.setAttribute(_QtCore.Qt.WA_PaintOnScreen)
        self.setAttribute(_QtCore.Qt.WA_NoSystemBackground)
        self.setSizePolicy(_QtGui.QSizePolicy(_QtGui.QSizePolicy.Expanding,
                                              _QtGui.QSizePolicy.Expanding))
        self.occ_view = None
        self.SCR = (400, 400) 
Example #4
Source File: pad_ui.py    From wacom-gui with GNU General Public License v3.0 5 votes vote down vote up
def setupUi(self, PadWidget):
        PadWidget.setObjectName(_fromUtf8("PadWidget"))
        PadWidget.resize(840, 520)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(PadWidget.sizePolicy().hasHeightForWidth())
        PadWidget.setSizePolicy(sizePolicy)
        PadWidget.setMinimumSize(QtCore.QSize(840, 520))
        PadWidget.setMaximumSize(QtCore.QSize(840, 520))
        PadWidget.setStyleSheet(_fromUtf8("QTabBar::tab:selected {\n"
"                                    border-bottom: 3px solid qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #6DD7E8);\n"
"                                }\n"
"                                QTabBar::tab {\n"
"                                    padding: 5px 15px 3px 15px;\n"
"                                    margin-top: 10px;\n"
"                                    color: #080808;\n"
"                                    border-top-left-radius: 4px;\n"
"                                    border-top-right-radius: 4px;\n"
"                                }\n"
"border-style: none;\n"
"border-width: 0px;"))
        self.keys = QtGui.QWidget()
        self.keys.setObjectName(_fromUtf8("keys"))
        self.gridLayoutWidget = QtGui.QWidget(self.keys)
        self.gridLayoutWidget.setGeometry(QtCore.QRect(0, 0, 831, 481))
        self.gridLayoutWidget.setObjectName(_fromUtf8("gridLayoutWidget"))
        self.keysLayout = QtGui.QGridLayout(self.gridLayoutWidget)
        self.keysLayout.setMargin(0)
        self.keysLayout.setObjectName(_fromUtf8("keysLayout"))
        PadWidget.addTab(self.keys, _fromUtf8(""))

        self.retranslateUi(PadWidget)
        PadWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(PadWidget) 
Example #5
Source File: TransformGuiTemplate_pyqt.py    From qgisSpaceSyntaxToolkit with GNU General Public License v3.0 5 votes vote down vote up
def setupUi(self, Form):
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(224, 117)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(Form.sizePolicy().hasHeightForWidth())
        Form.setSizePolicy(sizePolicy)
        self.verticalLayout = QtGui.QVBoxLayout(Form)
        self.verticalLayout.setSpacing(1)
        self.verticalLayout.setMargin(0)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.translateLabel = QtGui.QLabel(Form)
        self.translateLabel.setObjectName(_fromUtf8("translateLabel"))
        self.verticalLayout.addWidget(self.translateLabel)
        self.rotateLabel = QtGui.QLabel(Form)
        self.rotateLabel.setObjectName(_fromUtf8("rotateLabel"))
        self.verticalLayout.addWidget(self.rotateLabel)
        self.scaleLabel = QtGui.QLabel(Form)
        self.scaleLabel.setObjectName(_fromUtf8("scaleLabel"))
        self.verticalLayout.addWidget(self.scaleLabel)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.mirrorImageBtn = QtGui.QPushButton(Form)
        self.mirrorImageBtn.setToolTip(_fromUtf8(""))
        self.mirrorImageBtn.setObjectName(_fromUtf8("mirrorImageBtn"))
        self.horizontalLayout.addWidget(self.mirrorImageBtn)
        self.reflectImageBtn = QtGui.QPushButton(Form)
        self.reflectImageBtn.setObjectName(_fromUtf8("reflectImageBtn"))
        self.horizontalLayout.addWidget(self.reflectImageBtn)
        self.verticalLayout.addLayout(self.horizontalLayout)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form) 
Example #6
Source File: ui_About.py    From qgisSpaceSyntaxToolkit with GNU General Public License v3.0 5 votes vote down vote up
def setupUi(self, AboutDialog):
        AboutDialog.setObjectName(_fromUtf8("AboutDialog"))
        AboutDialog.setWindowModality(QtCore.Qt.ApplicationModal)
        AboutDialog.resize(370, 400)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(AboutDialog.sizePolicy().hasHeightForWidth())
        AboutDialog.setSizePolicy(sizePolicy)
        AboutDialog.setMinimumSize(QtCore.QSize(370, 400))
        self.verticalLayout = QtGui.QVBoxLayout(AboutDialog)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.messageText = QtGui.QTextEdit(AboutDialog)
        self.messageText.setEnabled(True)
        self.messageText.setAutoFillBackground(False)
        self.messageText.setFrameShape(QtGui.QFrame.NoFrame)
        self.messageText.setFrameShadow(QtGui.QFrame.Plain)
        self.messageText.setLineWidth(0)
        self.messageText.setUndoRedoEnabled(False)
        self.messageText.setReadOnly(True)
        self.messageText.setObjectName(_fromUtf8("messageText"))
        self.verticalLayout.addWidget(self.messageText)
        self.logoLabel = QtGui.QLabel(AboutDialog)
        self.logoLabel.setAutoFillBackground(True)
        self.logoLabel.setText(_fromUtf8(""))
        self.logoLabel.setObjectName(_fromUtf8("logoLabel"))
        self.verticalLayout.addWidget(self.logoLabel)
        self.closeButton = QtGui.QPushButton(AboutDialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.closeButton.sizePolicy().hasHeightForWidth())
        self.closeButton.setSizePolicy(sizePolicy)
        self.closeButton.setObjectName(_fromUtf8("closeButton"))
        self.verticalLayout.addWidget(self.closeButton)

        self.retranslateUi(AboutDialog)
        QtCore.QMetaObject.connectSlotsByName(AboutDialog) 
Example #7
Source File: TransformGuiTemplate_pyqt.py    From soapy with GNU General Public License v3.0 5 votes vote down vote up
def setupUi(self, Form):
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(224, 117)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(Form.sizePolicy().hasHeightForWidth())
        Form.setSizePolicy(sizePolicy)
        self.verticalLayout = QtGui.QVBoxLayout(Form)
        self.verticalLayout.setSpacing(1)
        self.verticalLayout.setMargin(0)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.translateLabel = QtGui.QLabel(Form)
        self.translateLabel.setObjectName(_fromUtf8("translateLabel"))
        self.verticalLayout.addWidget(self.translateLabel)
        self.rotateLabel = QtGui.QLabel(Form)
        self.rotateLabel.setObjectName(_fromUtf8("rotateLabel"))
        self.verticalLayout.addWidget(self.rotateLabel)
        self.scaleLabel = QtGui.QLabel(Form)
        self.scaleLabel.setObjectName(_fromUtf8("scaleLabel"))
        self.verticalLayout.addWidget(self.scaleLabel)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.mirrorImageBtn = QtGui.QPushButton(Form)
        self.mirrorImageBtn.setToolTip(_fromUtf8(""))
        self.mirrorImageBtn.setObjectName(_fromUtf8("mirrorImageBtn"))
        self.horizontalLayout.addWidget(self.mirrorImageBtn)
        self.reflectImageBtn = QtGui.QPushButton(Form)
        self.reflectImageBtn.setObjectName(_fromUtf8("reflectImageBtn"))
        self.horizontalLayout.addWidget(self.reflectImageBtn)
        self.verticalLayout.addLayout(self.horizontalLayout)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form) 
Example #8
Source File: ui_composer_data_field.py    From stdm with GNU General Public License v2.0 5 votes vote down vote up
def setupUi(self, frmComposerFieldEditor):
        frmComposerFieldEditor.setObjectName(_fromUtf8("frmComposerFieldEditor"))
        frmComposerFieldEditor.resize(281, 76)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(frmComposerFieldEditor.sizePolicy().hasHeightForWidth())
        frmComposerFieldEditor.setSizePolicy(sizePolicy)
        self.gridLayout = QtGui.QGridLayout(frmComposerFieldEditor)
        self.gridLayout.setVerticalSpacing(11)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.cboDataField = QtGui.QComboBox(frmComposerFieldEditor)
        self.cboDataField.setMinimumSize(QtCore.QSize(0, 30))
        self.cboDataField.setObjectName(_fromUtf8("cboDataField"))
        self.gridLayout.addWidget(self.cboDataField, 1, 1, 1, 1)
        self.label_2 = QtGui.QLabel(frmComposerFieldEditor)
        self.label_2.setMaximumSize(QtCore.QSize(80, 16777215))
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
        self.label = QtGui.QLabel(frmComposerFieldEditor)
        self.label.setStyleSheet(_fromUtf8("padding: 2px; font-weight: bold; background-color: rgb(200, 200, 200);"))
        self.label.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout.addWidget(self.label, 0, 0, 1, 2)

        self.retranslateUi(frmComposerFieldEditor)
        QtCore.QMetaObject.connectSlotsByName(frmComposerFieldEditor) 
Example #9
Source File: ui_about_stdm.py    From stdm with GNU General Public License v2.0 5 votes vote down vote up
def setupUi(self, frmAbout):
        frmAbout.setObjectName(_fromUtf8("frmAbout"))
        frmAbout.resize(718, 541)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(frmAbout.sizePolicy().hasHeightForWidth())
        frmAbout.setSizePolicy(sizePolicy)
        frmAbout.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.gridLayout = QtGui.QGridLayout(frmAbout)
        self.gridLayout.setMargin(9)
        self.gridLayout.setSpacing(6)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.txtAbout = QtGui.QTextEdit(frmAbout)
        self.txtAbout.setReadOnly(True)
        self.txtAbout.setObjectName(_fromUtf8("txtAbout"))
        self.gridLayout.addWidget(self.txtAbout, 0, 0, 1, 2)
        self.btnSTDMHome = QtGui.QPushButton(frmAbout)
        self.btnSTDMHome.setMinimumSize(QtCore.QSize(0, 30))
        self.btnSTDMHome.setObjectName(_fromUtf8("btnSTDMHome"))
        self.gridLayout.addWidget(self.btnSTDMHome, 1, 0, 1, 1)
        self.btnContactUs = QtGui.QPushButton(frmAbout)
        self.btnContactUs.setMinimumSize(QtCore.QSize(0, 30))
        self.btnContactUs.setObjectName(_fromUtf8("btnContactUs"))
        self.gridLayout.addWidget(self.btnContactUs, 1, 1, 1, 1)
        self.buttonBox = QtGui.QDialogButtonBox(frmAbout)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Close)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.gridLayout.addWidget(self.buttonBox, 2, 0, 1, 2)

        self.retranslateUi(frmAbout)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), frmAbout.reject)
        QtCore.QMetaObject.connectSlotsByName(frmAbout) 
Example #10
Source File: ui_source_document_dialog.py    From stdm with GNU General Public License v2.0 5 votes vote down vote up
def setupUi(self, SourceDocumentTranslatorDialog):
        SourceDocumentTranslatorDialog.setObjectName(_fromUtf8("SourceDocumentTranslatorDialog"))
        SourceDocumentTranslatorDialog.resize(497, 127)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(SourceDocumentTranslatorDialog.sizePolicy().hasHeightForWidth())
        SourceDocumentTranslatorDialog.setSizePolicy(sizePolicy)
        SourceDocumentTranslatorDialog.setMinimumSize(QtCore.QSize(0, 127))
        self.gridLayout = QtGui.QGridLayout(SourceDocumentTranslatorDialog)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.vlNotification = QtGui.QVBoxLayout()
        self.vlNotification.setObjectName(_fromUtf8("vlNotification"))
        self.gridLayout.addLayout(self.vlNotification, 0, 0, 1, 3)
        self.label = QtGui.QLabel(SourceDocumentTranslatorDialog)
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
        self.txtRootFolder = QtGui.QLineEdit(SourceDocumentTranslatorDialog)
        self.txtRootFolder.setMinimumSize(QtCore.QSize(0, 30))
        self.txtRootFolder.setObjectName(_fromUtf8("txtRootFolder"))
        self.gridLayout.addWidget(self.txtRootFolder, 1, 1, 1, 1)
        self.btn_source_doc_folder = QtGui.QToolButton(SourceDocumentTranslatorDialog)
        self.btn_source_doc_folder.setMinimumSize(QtCore.QSize(30, 30))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/stdm/images/icons/open_file.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.btn_source_doc_folder.setIcon(icon)
        self.btn_source_doc_folder.setObjectName(_fromUtf8("btn_source_doc_folder"))
        self.gridLayout.addWidget(self.btn_source_doc_folder, 1, 2, 1, 1)
        self.buttonBox = QtGui.QDialogButtonBox(SourceDocumentTranslatorDialog)
        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, 2, 0, 1, 3)

        self.retranslateUi(SourceDocumentTranslatorDialog)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), SourceDocumentTranslatorDialog.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), SourceDocumentTranslatorDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(SourceDocumentTranslatorDialog) 
Example #11
Source File: TransformGuiTemplate_pyqt.py    From tf-pose with Apache License 2.0 5 votes vote down vote up
def setupUi(self, Form):
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(224, 117)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(Form.sizePolicy().hasHeightForWidth())
        Form.setSizePolicy(sizePolicy)
        self.verticalLayout = QtGui.QVBoxLayout(Form)
        self.verticalLayout.setMargin(0)
        self.verticalLayout.setSpacing(1)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.translateLabel = QtGui.QLabel(Form)
        self.translateLabel.setObjectName(_fromUtf8("translateLabel"))
        self.verticalLayout.addWidget(self.translateLabel)
        self.rotateLabel = QtGui.QLabel(Form)
        self.rotateLabel.setObjectName(_fromUtf8("rotateLabel"))
        self.verticalLayout.addWidget(self.rotateLabel)
        self.scaleLabel = QtGui.QLabel(Form)
        self.scaleLabel.setObjectName(_fromUtf8("scaleLabel"))
        self.verticalLayout.addWidget(self.scaleLabel)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.mirrorImageBtn = QtGui.QPushButton(Form)
        self.mirrorImageBtn.setToolTip(_fromUtf8(""))
        self.mirrorImageBtn.setObjectName(_fromUtf8("mirrorImageBtn"))
        self.horizontalLayout.addWidget(self.mirrorImageBtn)
        self.reflectImageBtn = QtGui.QPushButton(Form)
        self.reflectImageBtn.setObjectName(_fromUtf8("reflectImageBtn"))
        self.horizontalLayout.addWidget(self.reflectImageBtn)
        self.verticalLayout.addLayout(self.horizontalLayout)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form) 
Example #12
Source File: ui_composer_data_field.py    From stdm with GNU General Public License v2.0 5 votes vote down vote up
def setupUi(self, frmComposerFieldEditor):
        frmComposerFieldEditor.setObjectName(_fromUtf8("frmComposerFieldEditor"))
        frmComposerFieldEditor.resize(281, 83)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(frmComposerFieldEditor.sizePolicy().hasHeightForWidth())
        frmComposerFieldEditor.setSizePolicy(sizePolicy)
        self.gridLayout = QtGui.QGridLayout(frmComposerFieldEditor)
        self.gridLayout.setVerticalSpacing(11)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.cboDataField = QtGui.QComboBox(frmComposerFieldEditor)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.cboDataField.sizePolicy().hasHeightForWidth())
        self.cboDataField.setSizePolicy(sizePolicy)
        self.cboDataField.setMinimumSize(QtCore.QSize(0, 30))
        self.cboDataField.setObjectName(_fromUtf8("cboDataField"))
        self.gridLayout.addWidget(self.cboDataField, 1, 1, 1, 1)
        self.label_2 = QtGui.QLabel(frmComposerFieldEditor)
        self.label_2.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
        self.label = QtGui.QLabel(frmComposerFieldEditor)
        self.label.setStyleSheet(_fromUtf8("padding: 2px; font-weight: bold; background-color: rgb(200, 200, 200);"))
        self.label.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout.addWidget(self.label, 0, 0, 1, 2)

        self.retranslateUi(frmComposerFieldEditor)
        QtCore.QMetaObject.connectSlotsByName(frmComposerFieldEditor) 
Example #13
Source File: masterDialog.py    From crazyflieROS with GNU General Public License v2.0 5 votes vote down vote up
def setupUi(self, Dialog):
        Dialog.setObjectName(_fromUtf8("Dialog"))
        Dialog.resize(452, 139)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(Dialog.sizePolicy().hasHeightForWidth())
        Dialog.setSizePolicy(sizePolicy)
        self.gridLayout = QtGui.QGridLayout(Dialog)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.label = QtGui.QLabel(Dialog)
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.label.setWordWrap(True)
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.progressBar = QtGui.QProgressBar(Dialog)
        self.progressBar.setMinimum(0)
        self.progressBar.setMaximum(0)
        self.progressBar.setProperty("value", -1)
        self.progressBar.setObjectName(_fromUtf8("progressBar"))
        self.gridLayout.addWidget(self.progressBar, 1, 0, 1, 1)
        self.buttonBox = QtGui.QDialogButtonBox(Dialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Help)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.gridLayout.addWidget(self.buttonBox, 2, 0, 1, 1)

        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) 
Example #14
Source File: version_updater_UI_pyqt4.py    From anima with MIT License 5 votes vote down vote up
def setupUi(self, Dialog):
        Dialog.setObjectName(_fromUtf8("Dialog"))
        Dialog.setWindowModality(QtCore.Qt.ApplicationModal)
        Dialog.resize(1304, 753)
        self.verticalLayout = QtGui.QVBoxLayout(Dialog)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.label = QtGui.QLabel(Dialog)
        self.label.setObjectName(_fromUtf8("label"))
        self.verticalLayout.addWidget(self.label)
        self.versions_treeView = QtGui.QTreeView(Dialog)
        self.versions_treeView.setObjectName(_fromUtf8("versions_treeView"))
        self.verticalLayout.addWidget(self.versions_treeView)
        self.horizontalWidget = QtGui.QWidget(Dialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.horizontalWidget.sizePolicy().hasHeightForWidth())
        self.horizontalWidget.setSizePolicy(sizePolicy)
        self.horizontalWidget.setObjectName(_fromUtf8("horizontalWidget"))
        self.horizontalLayout = QtGui.QHBoxLayout(self.horizontalWidget)
        self.horizontalLayout.setMargin(0)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.selectNone_pushButton = QtGui.QPushButton(self.horizontalWidget)
        self.selectNone_pushButton.setObjectName(_fromUtf8("selectNone_pushButton"))
        self.horizontalLayout.addWidget(self.selectNone_pushButton)
        self.selectAll_pushButton = QtGui.QPushButton(self.horizontalWidget)
        self.selectAll_pushButton.setObjectName(_fromUtf8("selectAll_pushButton"))
        self.horizontalLayout.addWidget(self.selectAll_pushButton)
        self.update_pushButton = QtGui.QPushButton(self.horizontalWidget)
        self.update_pushButton.setObjectName(_fromUtf8("update_pushButton"))
        self.horizontalLayout.addWidget(self.update_pushButton)
        self.cancel_pushButton = QtGui.QPushButton(self.horizontalWidget)
        self.cancel_pushButton.setObjectName(_fromUtf8("cancel_pushButton"))
        self.horizontalLayout.addWidget(self.cancel_pushButton)
        self.verticalLayout.addWidget(self.horizontalWidget)

        self.retranslateUi(Dialog)
        QtCore.QMetaObject.connectSlotsByName(Dialog) 
Example #15
Source File: plot_view.py    From qkit with GNU General Public License v2.0 5 votes vote down vote up
def setupVector(self,Form):
        """Set up slots for value_vector.
        
        It is possible to plot the data over the x_axis and display the numeric
        values in a table.
        Args:
            self: Object of the Ui_Form class.
            Form: PlotWindow object that inherits the used calls here from the
                underlying QWidget class.
        Returns:
            No return variable. The function operates on the given object.
        """
        self.PlotTypeSelector = QtGui.QComboBox(Form)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.PlotTypeSelector.sizePolicy().hasHeightForWidth())
        self.PlotTypeSelector.setSizePolicy(sizePolicy)
        self.PlotTypeSelector.setObjectName(_fromUtf8("PlotTypeSelector"))
        self.PlotTypeSelector.addItem(_fromUtf8(""))
        self.PlotTypeSelector.addItem(_fromUtf8(""))
        self.horizontalLayout.addWidget(self.PlotTypeSelector)
        self.PlotTypeSelector.setItemText(0, _translate("Form", "Line Plot", None))
        self.PlotTypeSelector.setItemText(1, _translate("Form", "Table", None))
        
        spacerItem = QtGui.QSpacerItem(40, 1, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self._addIndicatorLabels(Form,sizePolicy,indicators=["PointX","PointY"]) 
Example #16
Source File: infoWindowUI.py    From tutorials with MIT License 5 votes vote down vote up
def setupUi(self, InfoWindow):
        InfoWindow.setObjectName(_fromUtf8("InfoWindow"))
        InfoWindow.resize(611, 396)
        self.verticalLayout = QtGui.QVBoxLayout(InfoWindow)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.infoLabel = QtGui.QLabel(InfoWindow)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.infoLabel.sizePolicy().hasHeightForWidth())
        self.infoLabel.setSizePolicy(sizePolicy)
        self.infoLabel.setAlignment(QtCore.Qt.AlignCenter)
        self.infoLabel.setObjectName(_fromUtf8("infoLabel"))
        self.verticalLayout.addWidget(self.infoLabel)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.setInfoDumbButton = QtGui.QPushButton(InfoWindow)
        self.setInfoDumbButton.setObjectName(_fromUtf8("setInfoDumbButton"))
        self.horizontalLayout.addWidget(self.setInfoDumbButton)
        self.setInfoSmartButton = QtGui.QPushButton(InfoWindow)
        self.setInfoSmartButton.setObjectName(_fromUtf8("setInfoSmartButton"))
        self.horizontalLayout.addWidget(self.setInfoSmartButton)
        spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem1)
        self.verticalLayout.addLayout(self.horizontalLayout)

        self.retranslateUi(InfoWindow)
        QtCore.QMetaObject.connectSlotsByName(InfoWindow) 
Example #17
Source File: ui_spatial_unit_manager.py    From stdm with GNU General Public License v2.0 5 votes vote down vote up
def setupUi(self, SpatialUnitManagerWidget):
        SpatialUnitManagerWidget.setObjectName(_fromUtf8("SpatialUnitManagerWidget"))
        SpatialUnitManagerWidget.resize(405, 220)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(SpatialUnitManagerWidget.sizePolicy().hasHeightForWidth())
        SpatialUnitManagerWidget.setSizePolicy(sizePolicy)
        self.dockWidgetContents = QtGui.QWidget()
        self.dockWidgetContents.setObjectName(_fromUtf8("dockWidgetContents"))
        self.gridLayout_2 = QtGui.QGridLayout(self.dockWidgetContents)
        self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
        self.import_gpx_file_button = QtGui.QPushButton(self.dockWidgetContents)
        self.import_gpx_file_button.setObjectName(_fromUtf8("import_gpx_file_button"))
        self.gridLayout_2.addWidget(self.import_gpx_file_button, 1, 0, 1, 1)
        self.groupBox = QtGui.QGroupBox(self.dockWidgetContents)
        self.groupBox.setSizeIncrement(QtCore.QSize(0, 200))
        self.groupBox.setObjectName(_fromUtf8("groupBox"))
        self.gridLayout = QtGui.QGridLayout(self.groupBox)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.stdm_layers_combo = QtGui.QComboBox(self.groupBox)
        self.stdm_layers_combo.setSizeIncrement(QtCore.QSize(0, 0))
        self.stdm_layers_combo.setMinimumContentsLength(3)
        self.stdm_layers_combo.setIconSize(QtCore.QSize(16, 16))
        self.stdm_layers_combo.setObjectName(_fromUtf8("stdm_layers_combo"))
        self.gridLayout.addWidget(self.stdm_layers_combo, 0, 1, 1, 1)
        self.add_to_canvas_button = QtGui.QPushButton(self.groupBox)
        self.add_to_canvas_button.setObjectName(_fromUtf8("add_to_canvas_button"))
        self.gridLayout.addWidget(self.add_to_canvas_button, 1, 0, 1, 2)
        self.set_display_name_button = QtGui.QPushButton(self.groupBox)
        self.set_display_name_button.setObjectName(_fromUtf8("set_display_name_button"))
        self.gridLayout.addWidget(self.set_display_name_button, 2, 0, 1, 2)
        self.layerLebel = QtGui.QLabel(self.groupBox)
        self.layerLebel.setMaximumSize(QtCore.QSize(70, 16777215))
        self.layerLebel.setObjectName(_fromUtf8("layerLebel"))
        self.gridLayout.addWidget(self.layerLebel, 0, 0, 1, 1)
        self.gridLayout_2.addWidget(self.groupBox, 0, 0, 1, 1)
        SpatialUnitManagerWidget.setWidget(self.dockWidgetContents)

        self.retranslateUi(SpatialUnitManagerWidget)
        QtCore.QMetaObject.connectSlotsByName(SpatialUnitManagerWidget) 
Example #18
Source File: calculatorWinUI.py    From tutorials with MIT License 5 votes vote down vote up
def setupUi(self, CalculatorWindow):
        CalculatorWindow.setObjectName(_fromUtf8("CalculatorWindow"))
        CalculatorWindow.resize(450, 140)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(CalculatorWindow.sizePolicy().hasHeightForWidth())
        CalculatorWindow.setSizePolicy(sizePolicy)
        CalculatorWindow.setMinimumSize(QtCore.QSize(0, 140))
        CalculatorWindow.setMaximumSize(QtCore.QSize(16777215, 140))
        self.centralwidget = QtGui.QWidget(CalculatorWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        CalculatorWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(CalculatorWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 450, 22))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        self.menuFile = QtGui.QMenu(self.menubar)
        self.menuFile.setObjectName(_fromUtf8("menuFile"))
        CalculatorWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(CalculatorWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        CalculatorWindow.setStatusBar(self.statusbar)
        self.actionClear = QtGui.QAction(CalculatorWindow)
        self.actionClear.setObjectName(_fromUtf8("actionClear"))
        self.menuFile.addAction(self.actionClear)
        self.menubar.addAction(self.menuFile.menuAction())

        self.retranslateUi(CalculatorWindow)
        QtCore.QMetaObject.connectSlotsByName(CalculatorWindow) 
Example #19
Source File: calcWidgetUI.py    From tutorials with MIT License 4 votes vote down vote up
def setupUi(self, Calculator):
        Calculator.setObjectName(_fromUtf8("Calculator"))
        Calculator.resize(461, 104)
        self.verticalLayout = QtGui.QVBoxLayout(Calculator)
        self.verticalLayout.setSpacing(-1)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setSpacing(10)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.inputA = QtGui.QLineEdit(Calculator)
        self.inputA.setObjectName(_fromUtf8("inputA"))
        self.horizontalLayout.addWidget(self.inputA)
        self.operatorBox = QtGui.QComboBox(Calculator)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.operatorBox.sizePolicy().hasHeightForWidth())
        self.operatorBox.setSizePolicy(sizePolicy)
        self.operatorBox.setMaximumSize(QtCore.QSize(50, 16777215))
        self.operatorBox.setObjectName(_fromUtf8("operatorBox"))
        self.operatorBox.addItem(_fromUtf8(""))
        self.operatorBox.addItem(_fromUtf8(""))
        self.operatorBox.addItem(_fromUtf8(""))
        self.operatorBox.addItem(_fromUtf8(""))
        self.horizontalLayout.addWidget(self.operatorBox)
        self.inputB = QtGui.QLineEdit(Calculator)
        self.inputB.setObjectName(_fromUtf8("inputB"))
        self.horizontalLayout.addWidget(self.inputB)
        self.label = QtGui.QLabel(Calculator)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label.setFont(font)
        self.label.setObjectName(_fromUtf8("label"))
        self.horizontalLayout.addWidget(self.label)
        self.result = QtGui.QLineEdit(Calculator)
        self.result.setReadOnly(True)
        self.result.setObjectName(_fromUtf8("result"))
        self.horizontalLayout.addWidget(self.result)
        self.verticalLayout.addLayout(self.horizontalLayout)
        spacerItem = QtGui.QSpacerItem(20, 0, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setSpacing(-1)
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem1)
        self.clearButton = QtGui.QPushButton(Calculator)
        self.clearButton.setObjectName(_fromUtf8("clearButton"))
        self.horizontalLayout_2.addWidget(self.clearButton)
        self.verticalLayout.addLayout(self.horizontalLayout_2)

        self.retranslateUi(Calculator)
        QtCore.QMetaObject.connectSlotsByName(Calculator) 
Example #20
Source File: keystroke.py    From wacom-gui with GNU General Public License v3.0 4 votes vote down vote up
def setupUi(self, Dialog):
        Dialog.setObjectName(_fromUtf8("Dialog"))
        Dialog.resize(625, 139)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(Dialog.sizePolicy().hasHeightForWidth())
        Dialog.setSizePolicy(sizePolicy)
        self.formLayoutWidget = QtGui.QWidget(Dialog)
        self.formLayoutWidget.setGeometry(QtCore.QRect(10, 10, 601, 121))
        self.formLayoutWidget.setObjectName(_fromUtf8("formLayoutWidget"))
        self.formLayout = QtGui.QFormLayout(self.formLayoutWidget)
        self.formLayout.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow)
        self.formLayout.setMargin(0)
        self.formLayout.setObjectName(_fromUtf8("formLayout"))
        self.keystrokesLabel = QtGui.QLabel(self.formLayoutWidget)
        self.keystrokesLabel.setObjectName(_fromUtf8("keystrokesLabel"))
        self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.keystrokesLabel)
        self.keystrokeinput = QtGui.QLineEdit(self.formLayoutWidget)
        self.keystrokeinput.setReadOnly(True)
        self.keystrokeinput.setObjectName(_fromUtf8("keystrokeinput"))
        self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.keystrokeinput)
        self.shortcutLabel = QtGui.QLabel(self.formLayoutWidget)
        self.shortcutLabel.setObjectName(_fromUtf8("shortcutLabel"))
        self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.shortcutLabel)
        self.shortcutinput = QtGui.QLineEdit(self.formLayoutWidget)
        self.shortcutinput.setObjectName(_fromUtf8("shortcutinput"))
        self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.shortcutinput)
        self.runLabel = QtGui.QLabel(self.formLayoutWidget)
        self.runLabel.setObjectName(_fromUtf8("runLabel"))
        self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.runLabel)
        self.runinput = QtGui.QLineEdit(self.formLayoutWidget)
        self.runinput.setObjectName(_fromUtf8("runinput"))
        self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.runinput)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.keystroke = QtGui.QPushButton(self.formLayoutWidget)
        self.keystroke.setMaximumSize(QtCore.QSize(100, 16777215))
        self.keystroke.setObjectName(_fromUtf8("keystroke"))
        self.horizontalLayout_2.addWidget(self.keystroke)
        self.buttonBox = QtGui.QDialogButtonBox(self.formLayoutWidget)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.horizontalLayout_2.addWidget(self.buttonBox)
        self.formLayout.setLayout(3, QtGui.QFormLayout.FieldRole, self.horizontalLayout_2)

        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) 
Example #21
Source File: guiQQ.py    From PyLinuxQQ with GNU General Public License v2.0 4 votes vote down vote up
def setupUi(self, login):
        login.setObjectName(_fromUtf8("login"))
        login.setEnabled(True)
        login.resize(257, 235)
        login.setSizeIncrement(QtCore.QSize(0, 0))
        login.setWindowOpacity(1.0)
        self.text_user = QtGui.QLineEdit(login)
        self.text_user.setGeometry(QtCore.QRect(70, 20, 113, 28))
        self.text_user.setObjectName(_fromUtf8("text_user"))
        self.text_pwd = QtGui.QLineEdit(login)
        self.text_pwd.setGeometry(QtCore.QRect(70, 60, 113, 28))
        self.text_pwd.setObjectName(_fromUtf8("text_pwd"))
        self.text_code = QtGui.QLineEdit(login)
        self.text_code.setGeometry(QtCore.QRect(70, 100, 113, 28))
        self.text_code.setObjectName(_fromUtf8("text_code"))
        self.btn_login = QtGui.QPushButton(login)
        self.btn_login.setGeometry(QtCore.QRect(20, 190, 93, 27))
        self.btn_login.setObjectName(_fromUtf8("btn_login"))
        self.btn_cancel = QtGui.QPushButton(login)
        self.btn_cancel.setGeometry(QtCore.QRect(140, 190, 93, 27))
        self.btn_cancel.setObjectName(_fromUtf8("btn_cancel"))
        self.lbl_user = QtGui.QLabel(login)
        self.lbl_user.setGeometry(QtCore.QRect(30, 30, 51, 21))
        self.lbl_user.setObjectName(_fromUtf8("lbl_user"))
        self.lbl_pwd = QtGui.QLabel(login)
        self.lbl_pwd.setGeometry(QtCore.QRect(30, 70, 63, 18))
        self.lbl_pwd.setObjectName(_fromUtf8("lbl_pwd"))
        
        self.lbl_code = QtGui.QLabel(login)
        self.lbl_code.setGeometry(QtCore.QRect(20, 110, 63, 18))
        self.lbl_code.setObjectName(_fromUtf8("lbl_code"))
        
        self.img_code = QtGui.QGraphicsView(login)
        self.img_code.setEnabled(True)
        self.img_code.setGeometry(QtCore.QRect(60, 130, 120, 50))
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.img_code.sizePolicy().hasHeightForWidth())
        self.img_code.setSizePolicy(sizePolicy)
        self.img_code.setMaximumSize(QtCore.QSize(120, 50))
        self.img_code.setAutoFillBackground(True)
        self.img_code.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.img_code.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.img_code.setObjectName(_fromUtf8("img_code"))

        self.retranslateUi(login)
        QtCore.QObject.connect(self.text_user, QtCore.SIGNAL(_fromUtf8("editingFinished()")), login.loadCode)
        QtCore.QObject.connect(self.btn_login, QtCore.SIGNAL(_fromUtf8("clicked()")), login.checkLogin)
        QtCore.QObject.connect(self.btn_cancel, QtCore.SIGNAL(_fromUtf8("clicked()")), login.close)
        QtCore.QMetaObject.connectSlotsByName(login) 
Example #22
Source File: plot_view.py    From qkit with GNU General Public License v2.0 4 votes vote down vote up
def setupMatrix(self,Form):
        """Set up slots for value_matrix.
        
        The data can be plotted color coded as a 2d plot, as a 1d plot at a
        user selected value of the x_axis or the numerical values can be
        displayed in a table.

        Args:
            self: Object of the Ui_Form class.
            Form: PlotWindow object that inherits the used calls here from the
                underlying QWidget class.
        Returns:
            No return variable. The function operates on the given object.
        """
        self.PlotTypeSelector = QtGui.QComboBox(Form)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.PlotTypeSelector.sizePolicy().hasHeightForWidth())
        
        self.PlotTypeSelector.setSizePolicy(sizePolicy)
        self.PlotTypeSelector.setObjectName(_fromUtf8("PlotTypeSelector"))
        self.PlotTypeSelector.addItem(_fromUtf8(""))
        self.PlotTypeSelector.addItem(_fromUtf8(""))
        self.PlotTypeSelector.addItem(_fromUtf8(""))
        self.PlotTypeSelector.addItem(_fromUtf8(""))
        self.PlotTypeSelector.setItemText(0, _translate("Form", "Color Plot", None))
        self.PlotTypeSelector.setItemText(1, _translate("Form", "Line Plot X", None))
        self.PlotTypeSelector.setItemText(2, _translate("Form", "Line Plot Y", None))
        self.PlotTypeSelector.setItemText(3, _translate("Form", "Table", None))
        
        
        self.PlotTypeLayout = QtGui.QVBoxLayout()
        self.PlotTypeLayout.addWidget(self.PlotTypeSelector)
        # add a empty label to move the PlotTypeSelector to the top
        emptyL = QtGui.QLabel(Form)
        self.PlotTypeLayout.addWidget(emptyL)
        self.horizontalLayout.addLayout(self.PlotTypeLayout,stretch = -10)
        
        self._addTraceSelectorIndicator(Form,sizePolicy,TraceSelector = "TraceXSelector",
                                        TraceIndicator="TraceXValue", prefix = self.selector_labels[0]+': ')
        self._addTraceSelectorIndicator(Form,sizePolicy,TraceSelector = "TraceYSelector", 
                                        TraceIndicator="TraceYValue", prefix = self.selector_labels[1]+': ')
        
        #The indicators should be located at the most right side of the bar
        spacerItem = QtGui.QSpacerItem(40, 1, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)        
        self._addIndicatorLabels(Form,sizePolicy, indicators=["PointX","PointY","PointZ"]) 
Example #23
Source File: plot_view.py    From qkit with GNU General Public License v2.0 4 votes vote down vote up
def setupBox(self,Form):
        """Set up slots for value_box.
        
        The data can be plotted color coded as a 2d plot at a user selected
        value of either the x_, y_ or z_axis or as a 1d plot at a user selected 
        value of the x_ and y_axis.

        Args:
            self: Object of the Ui_Form class.
            Form: PlotWindow object that inherits the used calls here from the
                underlying QWidget class.
        Returns:
            No return variable. The function operates on the given object.
        """
        self.PlotTypeSelector = QtGui.QComboBox(Form)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.PlotTypeSelector.sizePolicy().hasHeightForWidth())
        
        self.PlotTypeSelector.setSizePolicy(sizePolicy)
        self.PlotTypeSelector.setObjectName(_fromUtf8("PlotTypeSelector"))
        self.PlotTypeSelector.addItem(_fromUtf8(""))
        self.PlotTypeSelector.addItem(_fromUtf8(""))
        self.PlotTypeSelector.addItem(_fromUtf8(""))
        self.PlotTypeSelector.addItem(_fromUtf8(""))
        #self.horizontalLayout.addWidget(self.PlotTypeSelector)
        self.PlotTypeSelector.setItemText(0, _translate("Form", "Select X", None))
        self.PlotTypeSelector.setItemText(1, _translate("Form", "Select Y", None))
        self.PlotTypeSelector.setItemText(2, _translate("Form", "Select Z", None))
        self.PlotTypeSelector.setItemText(3, _translate("Form", "Line Plot", None))
        
        self.PlotTypeLayout = QtGui.QVBoxLayout()
        self.PlotTypeLayout.addWidget(self.PlotTypeSelector)
        # add a empty label to move the PlotTypeSelector to the top
        emptyL = QtGui.QLabel(Form)
        self.PlotTypeLayout.addWidget(emptyL)
        self.horizontalLayout.addLayout(self.PlotTypeLayout,stretch = -10)
       
        self._addTraceSelectorIndicator(Form,sizePolicy,TraceSelector = "TraceXSelector", 
                                        TraceIndicator="TraceXValue", prefix = self.selector_labels[0]+': ')
        self._addTraceSelectorIndicator(Form,sizePolicy,TraceSelector = "TraceYSelector", 
                                        TraceIndicator="TraceYValue", prefix = self.selector_labels[1]+': ')
        self._addTraceSelectorIndicator(Form,sizePolicy,TraceSelector = "TraceZSelector",  
                                        TraceIndicator="TraceZValue",  prefix = self.selector_labels[2]+': ')        

        spacerItem = QtGui.QSpacerItem(40, 1, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        
        self._addIndicatorLabels(Form,sizePolicy,indicators=["PointX","PointY","PointZ"]) 
Example #24
Source File: ui_Project.py    From qgisSpaceSyntaxToolkit with GNU General Public License v3.0 4 votes vote down vote up
def setupUi(self, ProjectDialog):
        ProjectDialog.setObjectName(_fromUtf8("ProjectDialog"))
        ProjectDialog.setWindowModality(QtCore.Qt.ApplicationModal)
        ProjectDialog.resize(350, 220)
        ProjectDialog.setMinimumSize(QtCore.QSize(320, 220))
        self.verticalLayout = QtGui.QVBoxLayout(ProjectDialog)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.datastoreBox = QtGui.QGroupBox(ProjectDialog)
        font = QtGui.QFont()
        font.setPointSize(13)
        self.datastoreBox.setFont(font)
        self.datastoreBox.setObjectName(_fromUtf8("datastoreBox"))
        self.gridLayout = QtGui.QGridLayout(self.datastoreBox)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.dataTypeCombo = QtGui.QComboBox(self.datastoreBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.dataTypeCombo.sizePolicy().hasHeightForWidth())
        self.dataTypeCombo.setSizePolicy(sizePolicy)
        self.dataTypeCombo.setObjectName(_fromUtf8("dataTypeCombo"))
        self.dataTypeCombo.addItem(_fromUtf8(""))
        self.dataTypeCombo.addItem(_fromUtf8(""))
        self.gridLayout.addWidget(self.dataTypeCombo, 0, 1, 1, 2)
        self.dataNewButton = QtGui.QPushButton(self.datastoreBox)
        self.dataNewButton.setObjectName(_fromUtf8("dataNewButton"))
        self.gridLayout.addWidget(self.dataNewButton, 5, 1, 1, 1)
        self.dataOpenButton = QtGui.QPushButton(self.datastoreBox)
        self.dataOpenButton.setObjectName(_fromUtf8("dataOpenButton"))
        self.gridLayout.addWidget(self.dataOpenButton, 5, 2, 1, 1)
        self.dataTypeLabel = QtGui.QLabel(self.datastoreBox)
        self.dataTypeLabel.setObjectName(_fromUtf8("dataTypeLabel"))
        self.gridLayout.addWidget(self.dataTypeLabel, 0, 0, 1, 1)
        self.dataSelectLabel = QtGui.QLabel(self.datastoreBox)
        self.dataSelectLabel.setObjectName(_fromUtf8("dataSelectLabel"))
        self.gridLayout.addWidget(self.dataSelectLabel, 1, 0, 1, 1)
        self.dataSelectCombo = QtGui.QComboBox(self.datastoreBox)
        self.dataSelectCombo.setObjectName(_fromUtf8("dataSelectCombo"))
        self.gridLayout.addWidget(self.dataSelectCombo, 1, 1, 1, 2)
        self.schemaLabel = QtGui.QLabel(self.datastoreBox)
        self.schemaLabel.setObjectName(_fromUtf8("schemaLabel"))
        self.gridLayout.addWidget(self.schemaLabel, 3, 0, 1, 1)
        self.schemaCombo = QtGui.QComboBox(self.datastoreBox)
        self.schemaCombo.setObjectName(_fromUtf8("schemaCombo"))
        self.gridLayout.addWidget(self.schemaCombo, 3, 1, 1, 2)
        self.gridLayout.setColumnStretch(1, 3)
        self.gridLayout.setColumnStretch(2, 3)
        self.verticalLayout.addWidget(self.datastoreBox)
        self.closeButtonBox = QtGui.QDialogButtonBox(ProjectDialog)
        self.closeButtonBox.setOrientation(QtCore.Qt.Horizontal)
        self.closeButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.closeButtonBox.setObjectName(_fromUtf8("closeButtonBox"))
        self.verticalLayout.addWidget(self.closeButtonBox)

        self.retranslateUi(ProjectDialog)
        QtCore.QObject.connect(self.closeButtonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), ProjectDialog.accept)
        QtCore.QObject.connect(self.closeButtonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), ProjectDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(ProjectDialog) 
Example #25
Source File: ui_composer_data_source.py    From stdm with GNU General Public License v2.0 4 votes vote down vote up
def setupUi(self, frmComposerDataSource):
        frmComposerDataSource.setObjectName(_fromUtf8("frmComposerDataSource"))
        frmComposerDataSource.resize(380, 130)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(frmComposerDataSource.sizePolicy().hasHeightForWidth())
        frmComposerDataSource.setSizePolicy(sizePolicy)
        frmComposerDataSource.setMaximumSize(QtCore.QSize(16777215, 130))
        self.gridLayout = QtGui.QGridLayout(frmComposerDataSource)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.label = QtGui.QLabel(frmComposerDataSource)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
        self.label.setSizePolicy(sizePolicy)
        self.label.setStyleSheet(_fromUtf8("padding: 2px; font-weight: bold; background-color: rgb(200, 200, 200);"))
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout.addWidget(self.label, 0, 0, 1, 2)
        self.label_2 = QtGui.QLabel(frmComposerDataSource)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
        self.label_2.setSizePolicy(sizePolicy)
        self.label_2.setMaximumSize(QtCore.QSize(16777215, 100))
        self.label_2.setFrameShape(QtGui.QFrame.NoFrame)
        self.label_2.setWordWrap(True)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 2)
        self.cboDataSource = QtGui.QComboBox(frmComposerDataSource)
        self.cboDataSource.setMinimumSize(QtCore.QSize(0, 30))
        self.cboDataSource.setObjectName(_fromUtf8("cboDataSource"))
        self.gridLayout.addWidget(self.cboDataSource, 2, 0, 1, 2)
        self.rbTables = QtGui.QRadioButton(frmComposerDataSource)
        self.rbTables.setObjectName(_fromUtf8("rbTables"))
        self.gridLayout.addWidget(self.rbTables, 3, 0, 1, 1)
        self.rbViews = QtGui.QRadioButton(frmComposerDataSource)
        self.rbViews.setObjectName(_fromUtf8("rbViews"))
        self.gridLayout.addWidget(self.rbViews, 3, 1, 1, 1)

        self.retranslateUi(frmComposerDataSource)
        QtCore.QMetaObject.connectSlotsByName(frmComposerDataSource) 
Example #26
Source File: calcWidgetUI.py    From tutorials with MIT License 4 votes vote down vote up
def setupUi(self, Calculator):
        Calculator.setObjectName(_fromUtf8("Calculator"))
        Calculator.resize(461, 104)
        self.verticalLayout = QtGui.QVBoxLayout(Calculator)
        self.verticalLayout.setSpacing(-1)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setSpacing(10)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.inputA = QtGui.QLineEdit(Calculator)
        self.inputA.setObjectName(_fromUtf8("inputA"))
        self.horizontalLayout.addWidget(self.inputA)
        self.operatorBox = QtGui.QComboBox(Calculator)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.operatorBox.sizePolicy().hasHeightForWidth())
        self.operatorBox.setSizePolicy(sizePolicy)
        self.operatorBox.setMaximumSize(QtCore.QSize(50, 16777215))
        self.operatorBox.setObjectName(_fromUtf8("operatorBox"))
        self.operatorBox.addItem(_fromUtf8(""))
        self.operatorBox.addItem(_fromUtf8(""))
        self.operatorBox.addItem(_fromUtf8(""))
        self.operatorBox.addItem(_fromUtf8(""))
        self.horizontalLayout.addWidget(self.operatorBox)
        self.inputB = QtGui.QLineEdit(Calculator)
        self.inputB.setObjectName(_fromUtf8("inputB"))
        self.horizontalLayout.addWidget(self.inputB)
        self.label = QtGui.QLabel(Calculator)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label.setFont(font)
        self.label.setObjectName(_fromUtf8("label"))
        self.horizontalLayout.addWidget(self.label)
        self.result = QtGui.QLineEdit(Calculator)
        self.result.setReadOnly(True)
        self.result.setObjectName(_fromUtf8("result"))
        self.horizontalLayout.addWidget(self.result)
        self.verticalLayout.addLayout(self.horizontalLayout)
        spacerItem = QtGui.QSpacerItem(20, 0, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setSpacing(-1)
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem1)
        self.clearButton = QtGui.QPushButton(Calculator)
        self.clearButton.setObjectName(_fromUtf8("clearButton"))
        self.horizontalLayout_2.addWidget(self.clearButton)
        self.verticalLayout.addLayout(self.horizontalLayout_2)

        self.retranslateUi(Calculator)
        QtCore.QMetaObject.connectSlotsByName(Calculator) 
Example #27
Source File: ui_entity.py    From stdm with GNU General Public License v2.0 4 votes vote down vote up
def setupUi(self, dlgEntity):
        dlgEntity.setObjectName(_fromUtf8("dlgEntity"))
        dlgEntity.resize(307, 184)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(dlgEntity.sizePolicy().hasHeightForWidth())
        dlgEntity.setSizePolicy(sizePolicy)
        dlgEntity.setMaximumSize(QtCore.QSize(500, 16777215))
        self.verticalLayout = QtGui.QVBoxLayout(dlgEntity)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.notif_bar = QtGui.QVBoxLayout()
        self.notif_bar.setObjectName(_fromUtf8("notif_bar"))
        self.verticalLayout.addLayout(self.notif_bar)
        self.gridLayout_2 = QtGui.QGridLayout()
        self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
        self.verticalLayout.addLayout(self.gridLayout_2)
        self.gridLayout = QtGui.QGridLayout()
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.edtDesc = QtGui.QLineEdit(dlgEntity)
        self.edtDesc.setMinimumSize(QtCore.QSize(0, 0))
        self.edtDesc.setObjectName(_fromUtf8("edtDesc"))
        self.gridLayout.addWidget(self.edtDesc, 2, 1, 1, 1)
        self.label_2 = QtGui.QLabel(dlgEntity)
        self.label_2.setMinimumSize(QtCore.QSize(68, 0))
        self.label_2.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
        self.label = QtGui.QLabel(dlgEntity)
        self.label.setMinimumSize(QtCore.QSize(60, 0))
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.edtTable = QtGui.QLineEdit(dlgEntity)
        self.edtTable.setObjectName(_fromUtf8("edtTable"))
        self.gridLayout.addWidget(self.edtTable, 0, 1, 1, 1)
        self.label_3 = QtGui.QLabel(dlgEntity)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.gridLayout.addWidget(self.label_3, 1, 0, 1, 1)
        self.txt_display_name = QtGui.QLineEdit(dlgEntity)
        self.txt_display_name.setObjectName(_fromUtf8("txt_display_name"))
        self.gridLayout.addWidget(self.txt_display_name, 1, 1, 1, 1)
        self.verticalLayout.addLayout(self.gridLayout)
        self.cbSupportDoc = QtGui.QCheckBox(dlgEntity)
        self.cbSupportDoc.setObjectName(_fromUtf8("cbSupportDoc"))
        self.verticalLayout.addWidget(self.cbSupportDoc)
        self.buttonBox = QtGui.QDialogButtonBox(dlgEntity)
        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(dlgEntity)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), dlgEntity.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), dlgEntity.reject)
        QtCore.QMetaObject.connectSlotsByName(dlgEntity) 
Example #28
Source File: ui_lookup_entity.py    From stdm with GNU General Public License v2.0 4 votes vote down vote up
def setupUi(self, dlgLookup):
        dlgLookup.setObjectName(_fromUtf8("dlgLookup"))
        dlgLookup.resize(368, 139)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(dlgLookup.sizePolicy().hasHeightForWidth())
        dlgLookup.setSizePolicy(sizePolicy)
        dlgLookup.setMinimumSize(QtCore.QSize(0, 0))
        self.verticalLayout_2 = QtGui.QVBoxLayout(dlgLookup)
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.notif_bar = QtGui.QVBoxLayout()
        self.notif_bar.setSizeConstraint(QtGui.QLayout.SetNoConstraint)
        self.notif_bar.setObjectName(_fromUtf8("notif_bar"))
        self.verticalLayout_2.addLayout(self.notif_bar)
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.gridLayout = QtGui.QGridLayout()
        self.gridLayout.setVerticalSpacing(10)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.label = QtGui.QLabel(dlgLookup)
        self.label.setMinimumSize(QtCore.QSize(60, 0))
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
        self.edtName = QtGui.QLineEdit(dlgLookup)
        self.edtName.setMinimumSize(QtCore.QSize(0, 22))
        self.edtName.setObjectName(_fromUtf8("edtName"))
        self.gridLayout.addWidget(self.edtName, 1, 1, 1, 1)
        self.label_2 = QtGui.QLabel(dlgLookup)
        self.label_2.setMaximumSize(QtCore.QSize(777, 16777215))
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.gridLayout.addWidget(self.label_2, 0, 0, 1, 2)
        self.verticalLayout.addLayout(self.gridLayout)
        self.verticalLayout_2.addLayout(self.verticalLayout)
        self.buttonBox = QtGui.QDialogButtonBox(dlgLookup)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.verticalLayout_2.addWidget(self.buttonBox)

        self.retranslateUi(dlgLookup)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), dlgLookup.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), dlgLookup.reject)
        QtCore.QMetaObject.connectSlotsByName(dlgLookup) 
Example #29
Source File: mayaGauge.py    From tutorials with MIT License 4 votes vote down vote up
def __init__(self, maxValue=5, parent=None):
        super(SelectionGauge, self).__init__(parent=parent)
        self.setWindowFlags(QtCore.Qt.Tool)
        self.resize(400,400)

        # Don't allow anything less than 1 for the maxValue
        self.maxValue = max(maxValue, 1)

        self.layout = QtGui.QVBoxLayout(self)
        self.layout.setSpacing(20)

        self.text = QtGui.QLabel()
        self.text.setObjectName("statusText")
        self.text.setAlignment(QtCore.Qt.AlignCenter)
        self.layout.addWidget(self.text)

        self.gauge = GaugeWidget()

        sizePolicy = QtGui.QSizePolicy()
        sizePolicy.setHorizontalPolicy(QtGui.QSizePolicy.Expanding)
        sizePolicy.setVerticalPolicy(QtGui.QSizePolicy.Expanding)

        self.gauge.setSizePolicy(sizePolicy)
        self.layout.addWidget(self.gauge)

        # Qt Stylesheet Reference:
        #   http://qt-project.org/doc/qt-4.7/stylesheet-reference.html
        # Selector Syntax: 
        #   http://doc.qt.digia.com/4.7-snapshot/stylesheet-syntax.html
        self.setStyleSheet("""
            #statusText {
                font-size   : 18px;
                color       : rgb(200,200,220);
            }
        """)

        # Notify us when the scene selection changes
        self._sel_cbk_id = om.MEventMessage.addEventCallback(
                            'SelectionChanged',
                            self.updateGauge)

        # Safely delete the previous callback if this widget gets
        # deleted. Otherwise you will see a bunch of errors when it 
        # tries to fire the callback and the widget is gone.
        cbk = partial(om.MMessage.removeCallback, self._sel_cbk_id)
        self.destroyed.connect(cbk)

        # initialize the gauge to the current scene selection, if any
        self.updateGauge() 
Example #30
Source File: ui_composer_data_source.py    From stdm with GNU General Public License v2.0 4 votes vote down vote up
def setupUi(self, frmComposerDataSource):
        frmComposerDataSource.setObjectName(_fromUtf8("frmComposerDataSource"))
        frmComposerDataSource.resize(380, 168)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(frmComposerDataSource.sizePolicy().hasHeightForWidth())
        frmComposerDataSource.setSizePolicy(sizePolicy)
        frmComposerDataSource.setMaximumSize(QtCore.QSize(16777215, 170))
        self.gridLayout = QtGui.QGridLayout(frmComposerDataSource)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.label_3 = QtGui.QLabel(frmComposerDataSource)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.gridLayout.addWidget(self.label_3, 4, 0, 1, 2)
        self.label_2 = QtGui.QLabel(frmComposerDataSource)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
        self.label_2.setSizePolicy(sizePolicy)
        self.label_2.setMaximumSize(QtCore.QSize(16777215, 100))
        self.label_2.setFrameShape(QtGui.QFrame.NoFrame)
        self.label_2.setWordWrap(True)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 2)
        self.label = QtGui.QLabel(frmComposerDataSource)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
        self.label.setSizePolicy(sizePolicy)
        self.label.setStyleSheet(_fromUtf8("padding: 2px; font-weight: bold; background-color: rgb(200, 200, 200);"))
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout.addWidget(self.label, 0, 0, 1, 2)
        self.rbViews = QtGui.QRadioButton(frmComposerDataSource)
        self.rbViews.setObjectName(_fromUtf8("rbViews"))
        self.gridLayout.addWidget(self.rbViews, 3, 1, 1, 1)
        self.cboDataSource = QtGui.QComboBox(frmComposerDataSource)
        self.cboDataSource.setMinimumSize(QtCore.QSize(0, 30))
        self.cboDataSource.setObjectName(_fromUtf8("cboDataSource"))
        self.gridLayout.addWidget(self.cboDataSource, 2, 0, 1, 2)
        self.rbTables = QtGui.QRadioButton(frmComposerDataSource)
        self.rbTables.setObjectName(_fromUtf8("rbTables"))
        self.gridLayout.addWidget(self.rbTables, 3, 0, 1, 1)
        self.cboReferencedTable = QtGui.QComboBox(frmComposerDataSource)
        self.cboReferencedTable.setMinimumSize(QtCore.QSize(0, 30))
        self.cboReferencedTable.setObjectName(_fromUtf8("cboReferencedTable"))
        self.gridLayout.addWidget(self.cboReferencedTable, 5, 0, 1, 2)

        self.retranslateUi(frmComposerDataSource)
        QtCore.QMetaObject.connectSlotsByName(frmComposerDataSource)