コード例 #1
0
    def configure(self, profile, statsResults):
        self.configDlg = ConfigureDialog(Ui_PostHocPlotDialog)

        # set enabled state of controls
        self.configDlg.ui.chkShowStdDev.setChecked(self.bShowBarPlot)
        self.configDlg.ui.spinEndCapSize.setValue(self.bShowBarPlot)
        self.configDlg.ui.spinMinimumX.setEnabled(self.bCustomLimits)
        self.configDlg.ui.spinMaximumX.setEnabled(self.bCustomLimits)

        # set current value of controls
        self.configDlg.ui.cboSortingField.setCurrentIndex(
            self.configDlg.ui.cboSortingField.findText(self.sortingField))

        self.configDlg.ui.spinFigWidth.setValue(self.figWidth)
        self.configDlg.ui.spinFigRowHeight.setValue(self.figHeightPerRow)

        self.configDlg.ui.chkShowBarPlot.setChecked(self.bShowBarPlot)
        self.configDlg.ui.chkPValueLabels.setChecked(self.bShowPValueLabels)

        self.configDlg.ui.chkCustomLimits.setChecked(self.bCustomLimits)
        self.configDlg.ui.spinMinimumX.setValue(self.minX)
        self.configDlg.ui.spinMaximumX.setValue(self.maxX)

        self.configDlg.ui.spinMarkerSize.setValue(self.markerSize)

        self.configDlg.ui.chkShowStdDev.setChecked(self.bShowStdDev)
        self.configDlg.ui.spinEndCapSize.setValue(self.endCapSize)

        self.configDlg.ui.chkFilterPvalue.setChecked(self.bPvalueFilter)

        if self.configDlg.exec_() == QtGui.QDialog.Accepted:
            QtGui.QApplication.instance().setOverrideCursor(
                QtGui.QCursor(QtCore.Qt.WaitCursor))

            self.sortingField = str(
                self.configDlg.ui.cboSortingField.currentText())

            self.figWidth = self.configDlg.ui.spinFigWidth.value()
            self.figHeightPerRow = self.configDlg.ui.spinFigRowHeight.value()

            self.bShowBarPlot = self.configDlg.ui.chkShowBarPlot.isChecked()
            self.bShowPValueLabels = self.configDlg.ui.chkPValueLabels.isChecked(
            )

            self.bCustomLimits = self.configDlg.ui.chkCustomLimits.isChecked()
            self.minX = self.configDlg.ui.spinMinimumX.value()
            self.maxX = self.configDlg.ui.spinMaximumX.value()

            self.markerSize = self.configDlg.ui.spinMarkerSize.value()

            self.bShowStdDev = self.configDlg.ui.chkShowStdDev.isChecked()
            self.endCapSize = self.configDlg.ui.spinEndCapSize.value()

            self.bPvalueFilter = self.configDlg.ui.chkFilterPvalue.isChecked()

            self.settings.setValue('multiple group: ' + self.name + '/width',
                                   self.figWidth)
            self.settings.setValue(
                'multiple group: ' + self.name + '/row height',
                self.figHeightPerRow)
            self.settings.setValue('multiple group: ' + self.name + '/field',
                                   self.sortingField)
            self.settings.setValue(
                'multiple group: ' + self.name + '/sequences subplot',
                self.bShowBarPlot)
            self.settings.setValue(
                'multiple group: ' + self.name + '/p-value labels',
                self.bShowPValueLabels)
            self.settings.setValue(
                'multiple group: ' + self.name + '/use custom limits',
                self.bCustomLimits)
            self.settings.setValue('multiple group: ' + self.name + '/minimum',
                                   self.minX)
            self.settings.setValue('multiple group: ' + self.name + '/maximum',
                                   self.maxX)
            self.settings.setValue(
                'multiple group: ' + self.name + '/marker size',
                self.markerSize)
            self.settings.setValue(
                'multiple group: ' + self.name + '/show std. dev.',
                self.bShowStdDev)
            self.settings.setValue(
                'multiple group: ' + self.name + '/end cap size',
                self.endCapSize)
            self.settings.setValue(
                'multiple group: ' + self.name + '/p-value filter',
                self.bPvalueFilter)

            self.plot(profile, statsResults)

            QtGui.QApplication.instance().restoreOverrideCursor()
コード例 #2
0
ファイル: tapioca.py プロジェクト: y0d4a/tapioca
    def updateStatus(self, test):
        '''
        GUI module updateStatus
        '''
        failures = {}
        #print('--- gui object updateStatus. test: %s' % test)
        test = str(test)
        if test.endswith('COMPLETE') or test.endswith('ERROR'):
            testname, status = str(test).split()
            #print('testname: %s' % testname)
            if testname == 'report':
                #print('*** %s Report done ***' % self.appname)
                failures = allreports.getfailures(self.appname)
                self._reset_resultslinks()
                #print('=== failures: %s ===' % failures)
                for test in failures:
                    #print('- Checking %s' % test)
                    if test == 'ssltest':
                        self.lblsslresultsval.setToolTip(
                            'Open SSL test report')
                        self.lblsslresultsval.setCursor(
                            QtGui.QCursor(QtCore.Qt.PointingHandCursor))
                        if failures[test] is True:
                            #print('failed ssl!')
                            self.lblsslresultsval.setText(
                                '<font color="red">FAILED</font>')
                        elif failures[test] is False:
                            #print('passed ssl')
                            self.lblsslresultsval.setText(
                                '<font color="green">PASSED</font>')
                    elif test == 'crypto':
                        self.lblcryptoresultsval.setToolTip(
                            'Open SSL test report')
                        self.lblcryptoresultsval.setCursor(
                            QtGui.QCursor(QtCore.Qt.PointingHandCursor))
                        if failures[test] is True:
                            self.lblcryptoresultsval.setText(
                                '<font color="red">FAILED</font>')
                        elif failures[test] is False:
                            self.lblcryptoresultsval.setText(
                                '<font color="green">PASSED</font>')
                    elif test == 'net':
                        self.lblnetresultsval.setToolTip(
                            'Open SSL test report')
                        self.lblnetresultsval.setCursor(
                            QtGui.QCursor(QtCore.Qt.PointingHandCursor))
                        if test in failures:
                            self.lblnetresultsval.setText('VIEW')
                        else:
                            self.lblnetresultsval.setText('')

            elif testname == 'search':
                # Let main app object handle this to allow for value passing
                pass
                # self.lblsearchfound.setText(status)
                #print('*** Search complete! ***')
            elif testname == 'openssltest' or testname == 'openfulltest' \
                    or testname == 'opentcpdump' or testname == 'opensslreport' \
                    or testname == 'opencryptoreport' or testname == \
                    'opennetreport':
                # NO need to enable test buttons or so anything else
                pass
            else:
                # Test capture complete
                # Updating individual test status
                #print('gui.updatestatus() re-enabling test buttons')
                self.enabletests()
                #print('*** GUI updateStatus : %s' % test)

                if status == 'COMPLETE':
                    # A test has completed.  Add appname to combobox
                    #print('Finished a test... adding to combobox')
                    self.check_addapp(self.appname)

                if testname == 'tcpdump':
                    self.lbltcpdump.setText(status)
                    if status == 'COMPLETE':
                        self.lbltcpdump.setToolTip(
                            'Open tcpdump capture for %s' % self.appname)
                        self.lbltcpdump.setCursor(
                            QtGui.QCursor(QtCore.Qt.PointingHandCursor))
                    else:
                        self.lbltcpdump.setToolTip('')
                        self.lbltcpdump.setCursor(QtGui.QCursor())
                elif testname == 'ssltest':
                    self.lblssltest.setText(status)
                    if status == 'COMPLETE':
                        self.lblssltest.setToolTip(
                            'Open mitmproxy SSL test capture for %s' %
                            self.appname)
                        self.lblssltest.setCursor(
                            QtGui.QCursor(QtCore.Qt.PointingHandCursor))
                    else:
                        self.lblssltest.setToolTip('')
                        self.lblssltest.setCursor(QtGui.QCursor())
                elif testname == 'full':
                    self.lblfull.setText(status)
                    if status == 'COMPLETE':
                        self.lblfull.setToolTip(
                            'Open mitmproxy full inspection capture for %s' %
                            self.appname)
                        self.lblfull.setCursor(
                            QtGui.QCursor(QtCore.Qt.PointingHandCursor))
                    else:
                        self.lblfull.setToolTip('')
                        self.lblfull.setCursor(QtGui.QCursor())
コード例 #3
0
    def accept(self):
        """Handler for when OK is clicked."""
        input_path = self.input_path.text()
        input_title = self.line_edit_title.text()
        input_source = self.line_edit_source.text()
        output_path = self.output_path.text()
        if not output_path.endswith('.tif'):
            # noinspection PyArgumentList,PyCallByClass,PyTypeChecker
            QMessageBox.warning(self, tr('InaSAFE'),
                                tr('Output file name must be tif file'))
        if not os.path.exists(input_path):
            # noinspection PyArgumentList,PyCallByClass,PyTypeChecker
            QMessageBox.warning(self, tr('InaSAFE'),
                                tr('Input file does not exist'))
            return

        algorithm = 'nearest'
        if self.nearest_mode.isChecked():
            algorithm = 'nearest'
        elif self.inverse_distance_mode.isChecked():
            algorithm = 'invdist'
        elif self.use_ascii_mode.isChecked():
            algorithm = 'use_ascii'

        # Smoothing
        smoothing_method = NONE_SMOOTHING
        if self.numpy_smoothing.isChecked():
            smoothing_method = NUMPY_SMOOTHING
        if self.scipy_smoothing.isChecked():
            smoothing_method = SCIPY_SMOOTHING

        # noinspection PyUnresolvedReferences
        QtGui.qApp.setOverrideCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))

        extra_keywords = {}
        if self.check_box_custom_shakemap_id.isChecked():
            event_id = self.line_edit_shakemap_id.text()
            extra_keywords[extra_keyword_earthquake_event_id['key']] = event_id

        current_index = self.combo_box_source_type.currentIndex()
        source_type = self.combo_box_source_type.itemData(current_index)
        if source_type:
            extra_keywords[
                extra_keyword_earthquake_source['key']] = source_type

        file_name = convert_mmi_data(input_path,
                                     input_title,
                                     input_source,
                                     output_path,
                                     algorithm=algorithm,
                                     algorithm_filename_flag=True,
                                     smoothing_method=smoothing_method,
                                     extra_keywords=extra_keywords)

        file_info = QFileInfo(file_name)
        base_name = file_info.baseName()
        self.output_layer = QgsRasterLayer(file_name, base_name)

        # noinspection PyUnresolvedReferences
        QtGui.qApp.restoreOverrideCursor()

        if self.load_result.isChecked():
            # noinspection PyTypeChecker
            mmi_ramp_roman(self.output_layer)
            self.output_layer.saveDefaultStyle()
            if not self.output_layer.isValid():
                LOGGER.debug("Failed to load")
            else:
                # noinspection PyArgumentList
                QgsMapLayerRegistry.instance().addMapLayer(self.output_layer)
                iface.zoomToActiveLayer()

        if (self.keyword_wizard_checkbox.isChecked()
                and self.keyword_wizard_checkbox.isEnabled()):
            self.launch_keyword_wizard()

        self.done(self.Accepted)
コード例 #4
0
 def set_wait_cursor(self):
     """Sets the waiting cursor."""
     QtGui.QApplication.setOverrideCursor(
         QtGui.QCursor(QtCore.Qt.WaitCursor))
コード例 #5
0
 def enable_busy_cursor(self):
     """Set the hourglass enabled."""
     QtGui.qApp.setOverrideCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
コード例 #6
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(740, 479)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            MainWindow.sizePolicy().hasHeightForWidth())
        MainWindow.setSizePolicy(sizePolicy)
        MainWindow.setMinimumSize(QtCore.QSize(740, 0))
        MainWindow.setTabShape(QtGui.QTabWidget.Rounded)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.verticalLayout_3 = QtGui.QVBoxLayout(self.centralwidget)
        self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.titleGroupBox = QtGui.QGroupBox(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred,
                                       QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.titleGroupBox.sizePolicy().hasHeightForWidth())
        self.titleGroupBox.setSizePolicy(sizePolicy)
        self.titleGroupBox.setMinimumSize(QtCore.QSize(360, 140))
        self.titleGroupBox.setMaximumSize(QtCore.QSize(16777215, 140))
        self.titleGroupBox.setTitle(_fromUtf8(""))
        self.titleGroupBox.setObjectName(_fromUtf8("titleGroupBox"))
        self.verticalLayout_5 = QtGui.QVBoxLayout(self.titleGroupBox)
        self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5"))
        self.titleLabel = QtGui.QLabel(self.titleGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.titleLabel.sizePolicy().hasHeightForWidth())
        self.titleLabel.setSizePolicy(sizePolicy)
        self.titleLabel.setMinimumSize(QtCore.QSize(360, 0))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Arial Black"))
        font.setPointSize(14)
        font.setBold(True)
        font.setItalic(False)
        font.setUnderline(False)
        font.setWeight(75)
        font.setStrikeOut(False)
        font.setKerning(True)
        self.titleLabel.setFont(font)
        self.titleLabel.setFrameShadow(QtGui.QFrame.Sunken)
        self.titleLabel.setTextFormat(QtCore.Qt.AutoText)
        self.titleLabel.setIndent(6)
        self.titleLabel.setObjectName(_fromUtf8("titleLabel"))
        self.verticalLayout_5.addWidget(self.titleLabel)
        self.horizontalLayout.addWidget(self.titleGroupBox)
        self.buttonGroupBox = QtGui.QGroupBox(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
                                       QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.buttonGroupBox.sizePolicy().hasHeightForWidth())
        self.buttonGroupBox.setSizePolicy(sizePolicy)
        self.buttonGroupBox.setMinimumSize(QtCore.QSize(360, 140))
        self.buttonGroupBox.setMaximumSize(QtCore.QSize(360, 140))
        self.buttonGroupBox.setBaseSize(QtCore.QSize(360, 0))
        self.buttonGroupBox.setTitle(_fromUtf8(""))
        self.buttonGroupBox.setObjectName(_fromUtf8("buttonGroupBox"))
        self.horizontalLayout_3 = QtGui.QHBoxLayout(self.buttonGroupBox)
        self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
        self.mBtnZoomIn = QtGui.QPushButton(self.buttonGroupBox)
        self.mBtnZoomIn.setText(_fromUtf8(""))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8("./images/zoomIn.png")),
                       QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.mBtnZoomIn.setIcon(icon)
        self.mBtnZoomIn.setIconSize(QtCore.QSize(50, 50))
        self.mBtnZoomIn.setObjectName(_fromUtf8("mBtnZoomIn"))
        self.horizontalLayout_3.addWidget(self.mBtnZoomIn)
        self.mBtnZoomOut = QtGui.QPushButton(self.buttonGroupBox)
        self.mBtnZoomOut.setText(_fromUtf8(""))
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(_fromUtf8("./images/zomOut.png")),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.mBtnZoomOut.setIcon(icon1)
        self.mBtnZoomOut.setIconSize(QtCore.QSize(50, 50))
        self.mBtnZoomOut.setObjectName(_fromUtf8("mBtnZoomOut"))
        self.horizontalLayout_3.addWidget(self.mBtnZoomOut)
        self.mBtnAddRaster = QtGui.QPushButton(self.buttonGroupBox)
        self.mBtnAddRaster.setText(_fromUtf8(""))
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(_fromUtf8("./images/addRaster.png")),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.mBtnAddRaster.setIcon(icon2)
        self.mBtnAddRaster.setIconSize(QtCore.QSize(50, 50))
        self.mBtnAddRaster.setObjectName(_fromUtf8("mBtnAddRaster"))
        self.horizontalLayout_3.addWidget(self.mBtnAddRaster)
        self.mBtnAddVector = QtGui.QPushButton(self.buttonGroupBox)
        self.mBtnAddVector.setText(_fromUtf8(""))
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap(_fromUtf8("./images/addLayer.png")),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.mBtnAddVector.setIcon(icon3)
        self.mBtnAddVector.setIconSize(QtCore.QSize(50, 50))
        self.mBtnAddVector.setObjectName(_fromUtf8("mBtnAddVector"))
        self.horizontalLayout_3.addWidget(self.mBtnAddVector)
        self.mBtnSelection = QtGui.QPushButton(self.buttonGroupBox)
        self.mBtnSelection.setText(_fromUtf8(""))
        icon4 = QtGui.QIcon()
        icon4.addPixmap(QtGui.QPixmap(_fromUtf8("./images/select.png")),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.mBtnSelection.setIcon(icon4)
        self.mBtnSelection.setIconSize(QtCore.QSize(50, 50))
        self.mBtnSelection.setObjectName(_fromUtf8("mBtnSelection"))
        self.horizontalLayout_3.addWidget(self.mBtnSelection)
        self.mBtnZoomIn.raise_()
        self.mBtnZoomOut.raise_()
        self.mBtnAddRaster.raise_()
        self.mBtnAddVector.raise_()
        self.mBtnSelection.raise_()
        self.titleGroupBox.raise_()
        self.horizontalLayout.addWidget(self.buttonGroupBox)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.canvasGroupBox = QtGui.QGroupBox(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding,
                                       QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.canvasGroupBox.sizePolicy().hasHeightForWidth())
        self.canvasGroupBox.setSizePolicy(sizePolicy)
        self.canvasGroupBox.setMinimumSize(QtCore.QSize(0, 0))
        self.canvasGroupBox.setTitle(_fromUtf8(""))
        self.canvasGroupBox.setObjectName(_fromUtf8("canvasGroupBox"))
        self.verticalLayout_4 = QtGui.QVBoxLayout(self.canvasGroupBox)
        self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4"))
        self.canvasFrame = QtGui.QFrame(self.canvasGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.canvasFrame.sizePolicy().hasHeightForWidth())
        self.canvasFrame.setSizePolicy(sizePolicy)
        self.canvasFrame.setMinimumSize(QtCore.QSize(0, 0))
        self.canvasFrame.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
        self.canvasFrame.setFrameShape(QtGui.QFrame.StyledPanel)
        self.canvasFrame.setFrameShadow(QtGui.QFrame.Raised)
        self.canvasFrame.setObjectName(_fromUtf8("canvasFrame"))
        self.verticalLayout_4.addWidget(self.canvasFrame)
        self.horizontalLayout_2.addWidget(self.canvasGroupBox)
        self.verticalLayout_2 = QtGui.QVBoxLayout()
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.dropDownGroupBox = QtGui.QGroupBox(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.dropDownGroupBox.sizePolicy().hasHeightForWidth())
        self.dropDownGroupBox.setSizePolicy(sizePolicy)
        self.dropDownGroupBox.setMinimumSize(QtCore.QSize(100, 60))
        self.dropDownGroupBox.setObjectName(_fromUtf8("dropDownGroupBox"))
        self.verticalLayout_6 = QtGui.QVBoxLayout(self.dropDownGroupBox)
        self.verticalLayout_6.setObjectName(_fromUtf8("verticalLayout_6"))
        self.mFieldComboBox = QgsFieldComboBox(self.dropDownGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred,
                                       QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.mFieldComboBox.sizePolicy().hasHeightForWidth())
        self.mFieldComboBox.setSizePolicy(sizePolicy)
        self.mFieldComboBox.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.mFieldComboBox.setMaxVisibleItems(25)
        self.mFieldComboBox.setObjectName(_fromUtf8("mFieldComboBox"))
        self.verticalLayout_6.addWidget(self.mFieldComboBox)
        self.verticalLayout_6.setAlignment(QtCore.Qt.AlignTop)
        self.mFieldComboBox.raise_()
        self.verticalLayout_2.addWidget(self.dropDownGroupBox,
                                        QtCore.Qt.AlignTop)
        self.legendGroupBox = QtGui.QGroupBox(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.legendGroupBox.sizePolicy().hasHeightForWidth())
        self.legendGroupBox.setSizePolicy(sizePolicy)
        self.legendGroupBox.setMinimumSize(QtCore.QSize(100, 200))
        self.legendGroupBox.setAutoFillBackground(False)
        self.legendGroupBox.setFlat(False)
        self.legendGroupBox.setCheckable(False)
        self.legendGroupBox.setObjectName(_fromUtf8("legendGroupBox"))
        self.gridLayout = QtGui.QGridLayout(self.legendGroupBox)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.colorBox_1 = QtGui.QWidget(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
                                       QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.colorBox_1.sizePolicy().hasHeightForWidth())
        self.colorBox_1.setSizePolicy(sizePolicy)
        self.colorBox_1.setMinimumSize(QtCore.QSize(22, 22))
        self.colorBox_1.setMaximumSize(QtCore.QSize(22, 22))
        self.colorBox_1.setBaseSize(QtCore.QSize(22, 22))
        self.colorBox_1.setAutoFillBackground(False)
        self.colorBox_1.setStyleSheet(
            _fromUtf8("background-color: rgb(255, 0, 0);"))
        self.colorBox_1.setObjectName(_fromUtf8("colorBox_1"))
        self.gridLayout.addWidget(self.colorBox_1, 0, 0, 1, 1)
        self.legendHorizontalLayout_6 = QtGui.QHBoxLayout()
        self.legendHorizontalLayout_6.setSizeConstraint(
            QtGui.QLayout.SetFixedSize)
        self.legendHorizontalLayout_6.setContentsMargins(8, -1, 0, -1)
        self.legendHorizontalLayout_6.setSpacing(6)
        self.legendHorizontalLayout_6.setObjectName(
            _fromUtf8("legendHorizontalLayout_6"))
        self.label_11 = QtGui.QLabel(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_11.sizePolicy().hasHeightForWidth())
        self.label_11.setSizePolicy(sizePolicy)
        self.label_11.setObjectName(_fromUtf8("label_11"))
        self.legendHorizontalLayout_6.addWidget(self.label_11)
        self.dashLabel_6 = QtGui.QLabel(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.dashLabel_6.sizePolicy().hasHeightForWidth())
        self.dashLabel_6.setSizePolicy(sizePolicy)
        self.dashLabel_6.setObjectName(_fromUtf8("dashLabel_6"))
        self.legendHorizontalLayout_6.addWidget(self.dashLabel_6)
        self.label_13 = QtGui.QLabel(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_13.sizePolicy().hasHeightForWidth())
        self.label_13.setSizePolicy(sizePolicy)
        self.label_13.setObjectName(_fromUtf8("label_13"))
        self.legendHorizontalLayout_6.addWidget(self.label_13)
        self.gridLayout.addLayout(self.legendHorizontalLayout_6, 0, 1, 1, 1)
        self.colorBox_2 = QtGui.QWidget(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
                                       QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.colorBox_2.sizePolicy().hasHeightForWidth())
        self.colorBox_2.setSizePolicy(sizePolicy)
        self.colorBox_2.setMinimumSize(QtCore.QSize(22, 22))
        self.colorBox_2.setMaximumSize(QtCore.QSize(22, 22))
        self.colorBox_2.setBaseSize(QtCore.QSize(22, 22))
        self.colorBox_2.setAutoFillBackground(False)
        self.colorBox_2.setStyleSheet(
            _fromUtf8("background-color: rgb(255, 95, 0);"))
        self.colorBox_2.setObjectName(_fromUtf8("colorBox_2"))
        self.gridLayout.addWidget(self.colorBox_2, 1, 0, 1, 1)
        self.legendHorizontalLayout_5 = QtGui.QHBoxLayout()
        self.legendHorizontalLayout_5.setSizeConstraint(
            QtGui.QLayout.SetFixedSize)
        self.legendHorizontalLayout_5.setContentsMargins(8, -1, -1, -1)
        self.legendHorizontalLayout_5.setSpacing(6)
        self.legendHorizontalLayout_5.setObjectName(
            _fromUtf8("legendHorizontalLayout_5"))
        self.label_10 = QtGui.QLabel(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_10.sizePolicy().hasHeightForWidth())
        self.label_10.setSizePolicy(sizePolicy)
        self.label_10.setObjectName(_fromUtf8("label_10"))
        self.legendHorizontalLayout_5.addWidget(self.label_10)
        self.dashLabel_5 = QtGui.QLabel(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.dashLabel_5.sizePolicy().hasHeightForWidth())
        self.dashLabel_5.setSizePolicy(sizePolicy)
        self.dashLabel_5.setObjectName(_fromUtf8("dashLabel_5"))
        self.legendHorizontalLayout_5.addWidget(self.dashLabel_5)
        self.label_12 = QtGui.QLabel(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_12.sizePolicy().hasHeightForWidth())
        self.label_12.setSizePolicy(sizePolicy)
        self.label_12.setObjectName(_fromUtf8("label_12"))
        self.legendHorizontalLayout_5.addWidget(self.label_12)
        self.gridLayout.addLayout(self.legendHorizontalLayout_5, 1, 1, 1, 1)
        self.colorBox_3 = QtGui.QWidget(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
                                       QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.colorBox_3.sizePolicy().hasHeightForWidth())
        self.colorBox_3.setSizePolicy(sizePolicy)
        self.colorBox_3.setMinimumSize(QtCore.QSize(22, 22))
        self.colorBox_3.setMaximumSize(QtCore.QSize(22, 22))
        self.colorBox_3.setBaseSize(QtCore.QSize(22, 22))
        self.colorBox_3.setAutoFillBackground(False)
        self.colorBox_3.setStyleSheet(
            _fromUtf8("background-color: rgb(255, 135, 0);"))
        self.colorBox_3.setObjectName(_fromUtf8("colorBox_3"))
        self.gridLayout.addWidget(self.colorBox_3, 2, 0, 1, 1)
        self.legendHorizontalLayout_4 = QtGui.QHBoxLayout()
        self.legendHorizontalLayout_4.setSizeConstraint(
            QtGui.QLayout.SetFixedSize)
        self.legendHorizontalLayout_4.setContentsMargins(8, -1, -1, -1)
        self.legendHorizontalLayout_4.setSpacing(6)
        self.legendHorizontalLayout_4.setObjectName(
            _fromUtf8("legendHorizontalLayout_4"))
        self.label_7 = QtGui.QLabel(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_7.sizePolicy().hasHeightForWidth())
        self.label_7.setSizePolicy(sizePolicy)
        self.label_7.setObjectName(_fromUtf8("label_7"))
        self.legendHorizontalLayout_4.addWidget(self.label_7)
        self.dashLabel_4 = QtGui.QLabel(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.dashLabel_4.sizePolicy().hasHeightForWidth())
        self.dashLabel_4.setSizePolicy(sizePolicy)
        self.dashLabel_4.setObjectName(_fromUtf8("dashLabel_4"))
        self.legendHorizontalLayout_4.addWidget(self.dashLabel_4)
        self.label_8 = QtGui.QLabel(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_8.sizePolicy().hasHeightForWidth())
        self.label_8.setSizePolicy(sizePolicy)
        self.label_8.setObjectName(_fromUtf8("label_8"))
        self.legendHorizontalLayout_4.addWidget(self.label_8)
        self.gridLayout.addLayout(self.legendHorizontalLayout_4, 2, 1, 1, 1)
        self.colorBox_4 = QtGui.QWidget(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
                                       QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.colorBox_4.sizePolicy().hasHeightForWidth())
        self.colorBox_4.setSizePolicy(sizePolicy)
        self.colorBox_4.setMinimumSize(QtCore.QSize(22, 22))
        self.colorBox_4.setMaximumSize(QtCore.QSize(22, 22))
        self.colorBox_4.setBaseSize(QtCore.QSize(22, 22))
        self.colorBox_4.setAutoFillBackground(False)
        self.colorBox_4.setStyleSheet(
            _fromUtf8("background-color: rgb(255, 175, 0);"))
        self.colorBox_4.setObjectName(_fromUtf8("colorBox_4"))
        self.gridLayout.addWidget(self.colorBox_4, 3, 0, 1, 1)
        self.legendHorizontalLayout_3 = QtGui.QHBoxLayout()
        self.legendHorizontalLayout_3.setSizeConstraint(
            QtGui.QLayout.SetFixedSize)
        self.legendHorizontalLayout_3.setContentsMargins(8, -1, -1, -1)
        self.legendHorizontalLayout_3.setSpacing(6)
        self.legendHorizontalLayout_3.setObjectName(
            _fromUtf8("legendHorizontalLayout_3"))
        self.label_5 = QtGui.QLabel(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_5.sizePolicy().hasHeightForWidth())
        self.label_5.setSizePolicy(sizePolicy)
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.legendHorizontalLayout_3.addWidget(self.label_5)
        self.dashLabel_3 = QtGui.QLabel(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.dashLabel_3.sizePolicy().hasHeightForWidth())
        self.dashLabel_3.setSizePolicy(sizePolicy)
        self.dashLabel_3.setObjectName(_fromUtf8("dashLabel_3"))
        self.legendHorizontalLayout_3.addWidget(self.dashLabel_3)
        self.label_6 = QtGui.QLabel(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_6.sizePolicy().hasHeightForWidth())
        self.label_6.setSizePolicy(sizePolicy)
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self.legendHorizontalLayout_3.addWidget(self.label_6)
        self.gridLayout.addLayout(self.legendHorizontalLayout_3, 3, 1, 1, 1)
        self.colorBox_5 = QtGui.QWidget(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
                                       QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.colorBox_5.sizePolicy().hasHeightForWidth())
        self.colorBox_5.setSizePolicy(sizePolicy)
        self.colorBox_5.setMinimumSize(QtCore.QSize(22, 22))
        self.colorBox_5.setMaximumSize(QtCore.QSize(22, 22))
        self.colorBox_5.setBaseSize(QtCore.QSize(22, 22))
        self.colorBox_5.setAutoFillBackground(False)
        self.colorBox_5.setStyleSheet(
            _fromUtf8("background-color: rgb(255, 215, 0);"))
        self.colorBox_5.setObjectName(_fromUtf8("colorBox_5"))
        self.gridLayout.addWidget(self.colorBox_5, 4, 0, 1, 1)
        self.legendHorizontalLayout_2 = QtGui.QHBoxLayout()
        self.legendHorizontalLayout_2.setSizeConstraint(
            QtGui.QLayout.SetFixedSize)
        self.legendHorizontalLayout_2.setContentsMargins(8, -1, -1, -1)
        self.legendHorizontalLayout_2.setSpacing(6)
        self.legendHorizontalLayout_2.setObjectName(
            _fromUtf8("legendHorizontalLayout_2"))
        self.label_3 = QtGui.QLabel(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_3.sizePolicy().hasHeightForWidth())
        self.label_3.setSizePolicy(sizePolicy)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.legendHorizontalLayout_2.addWidget(self.label_3)
        self.dashLabel_2 = QtGui.QLabel(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.dashLabel_2.sizePolicy().hasHeightForWidth())
        self.dashLabel_2.setSizePolicy(sizePolicy)
        self.dashLabel_2.setObjectName(_fromUtf8("dashLabel_2"))
        self.legendHorizontalLayout_2.addWidget(self.dashLabel_2)
        self.label_4 = QtGui.QLabel(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_4.sizePolicy().hasHeightForWidth())
        self.label_4.setSizePolicy(sizePolicy)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.legendHorizontalLayout_2.addWidget(self.label_4)
        self.gridLayout.addLayout(self.legendHorizontalLayout_2, 4, 1, 1, 1)
        self.colorBox_6 = QtGui.QWidget(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
                                       QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.colorBox_6.sizePolicy().hasHeightForWidth())
        self.colorBox_6.setSizePolicy(sizePolicy)
        self.colorBox_6.setMinimumSize(QtCore.QSize(22, 22))
        self.colorBox_6.setMaximumSize(QtCore.QSize(22, 22))
        self.colorBox_6.setBaseSize(QtCore.QSize(22, 22))
        self.colorBox_6.setAutoFillBackground(False)
        self.colorBox_6.setStyleSheet(
            _fromUtf8("background-color: rgb(255, 255, 0);"))
        self.colorBox_6.setObjectName(_fromUtf8("colorBox_6"))
        self.gridLayout.addWidget(self.colorBox_6, 5, 0, 1, 1)
        self.legendHorizontalLayout_1 = QtGui.QHBoxLayout()
        self.legendHorizontalLayout_1.setSizeConstraint(
            QtGui.QLayout.SetFixedSize)
        self.legendHorizontalLayout_1.setContentsMargins(8, -1, -1, -1)
        self.legendHorizontalLayout_1.setSpacing(6)
        self.legendHorizontalLayout_1.setObjectName(
            _fromUtf8("legendHorizontalLayout_1"))
        self.label_1 = QtGui.QLabel(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_1.sizePolicy().hasHeightForWidth())
        self.label_1.setSizePolicy(sizePolicy)
        self.label_1.setObjectName(_fromUtf8("label_1"))
        self.legendHorizontalLayout_1.addWidget(self.label_1)
        self.dashLabel_1 = QtGui.QLabel(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.dashLabel_1.sizePolicy().hasHeightForWidth())
        self.dashLabel_1.setSizePolicy(sizePolicy)
        self.dashLabel_1.setObjectName(_fromUtf8("dashLabel_1"))
        self.legendHorizontalLayout_1.addWidget(self.dashLabel_1)
        self.label_2 = QtGui.QLabel(self.legendGroupBox)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_2.sizePolicy().hasHeightForWidth())
        self.label_2.setSizePolicy(sizePolicy)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.legendHorizontalLayout_1.addWidget(self.label_2)
        self.gridLayout.addLayout(self.legendHorizontalLayout_1, 5, 1, 1, 1)
        self.verticalLayout_2.addWidget(self.legendGroupBox)
        self.horizontalLayout_2.addLayout(self.verticalLayout_2)
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        self.verticalLayout_3.addLayout(self.verticalLayout)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 740, 21))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        self.menuFile = QtGui.QMenu(self.menubar)
        self.menuFile.setObjectName(_fromUtf8("menuFile"))
        self.menuMap_View = QtGui.QMenu(self.menubar)
        self.menuMap_View.setObjectName(_fromUtf8("menuMap_View"))
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        MainWindow.setStatusBar(self.statusbar)
        self.menubar.addAction(self.menuFile.menuAction())
        self.menubar.addAction(self.menuMap_View.menuAction())

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
コード例 #7
0
    def __init__(self):
        """ DefaultTheme() -> DefaultTheme
        This is for initializing all Qt objects
        
        """
        DefaultCoreTheme.__init__(self)
        ######################
        #### MEASUREMENTS ####

        # pipeline view bounding rect
        self.BOUNDING_RECT_MINIMUM = 512

        # Port shape
        self.PORT_RECT = QtCore.QRectF(0, 0, self.PORT_WIDTH, self.PORT_HEIGHT)

        # Configure button shape
        self.CONFIGURE_SHAPE = _create_configure_shape(self.CONFIGURE_WIDTH,
                                                       self.CONFIGURE_HEIGHT)

        #### BRUSH & PEN ####
        # Background brush of the pipeline view
        # self.PIPELINE_VIEW_BACKGROUND_BRUSH = QtGui.QBrush(
        #     QtGui.QImage(vistrails.core.system.vistrails_root_directory() +
        #                  '/gui/resources/images/pipeline_bg.png'))
        #     #QtGui.QColor("white"))
        # # Background brush of the version tree
        # self.VERSION_TREE_BACKGROUND_BRUSH = QtGui.QBrush(
        #     QtGui.QImage(vistrails.core.system.vistrails_root_directory() +
        #                  '/gui/resources/images/version_bg.png'))
        # Background brush of the query pipeline view
        # self.QUERY_BACKGROUND_BRUSH = QtGui.QBrush(
        #     QtGui.QImage(vistrails.core.system.vistrails_root_directory() +
        #                  '/gui/resources/images/query_bg.png'))
        self.PIPELINE_VIEW_BACKGROUND_BRUSH = QtGui.QBrush(
            QtGui.QColor(128, 128, 128))
        self.VERSION_TREE_BACKGROUND_BRUSH = QtGui.QBrush(
            QtGui.QColor(240, 240, 240))
        self.QUERY_BACKGROUND_BRUSH = QtGui.QBrush(QtGui.QColor(119, 143, 159))
        self.QUERY_RESULT_BACKGROUND_BRUSH = QtGui.QBrush(
            QtGui.QColor(208, 226, 239))

        # Pen to draw a module shape at regular state
        self.MODULE_PEN = QtGui.QPen(
            QtGui.QBrush(QtGui.QColor(*(ColorByName.get_int('black')))), 2)
        # Pen to draw a module shape when selected
        self.MODULE_SELECTED_PEN = QtGui.QPen(
            QtGui.QBrush(
                QtGui.QColor(*(ColorByName.get_int('goldenrod_medium')))), 3)
        # Brush and pen to draw a module label
        self.MODULE_LABEL_PEN = QtGui.QPen(
            QtGui.QBrush(QtGui.QColor(*(ColorByName.get_int('black')))), 2)
        self.MODULE_LABEL_SELECTED_PEN = QtGui.QPen(
            QtGui.QBrush(QtGui.QColor(*(ColorByName.get_int('black')))), 2)
        # Brush to draw a module shape at different states
        self.MODULE_BRUSH = QtGui.QBrush(
            QtGui.QColor(*(ColorByName.get_int('light_grey'))))
        self.ERROR_MODULE_BRUSH = QtGui.QBrush(
            QtGui.QColor(*(ColorByName.get_int('salmon'))))
        self.SUCCESS_MODULE_BRUSH = QtGui.QBrush(
            QtGui.QColor(*(ColorByName.get_int('mint'))))
        self.ACTIVE_MODULE_BRUSH = QtGui.QBrush(
            QtGui.QColor(*(ColorByName.get_int('navajo_white'))))
        self.COMPUTING_MODULE_BRUSH = QtGui.QBrush(
            QtGui.QColor(*(ColorByName.get_int('yellow'))))
        self.NOT_EXECUTED_MODULE_BRUSH = QtGui.QBrush(
            QtGui.QColor(*(ColorByName.get_int('light_goldenrod'))))
        self.PERSISTENT_MODULE_BRUSH = QtGui.QBrush(
            QtGui.QColor(*(ColorByName.get_int('slate_blue'))))
        self.SUSPENDED_MODULE_BRUSH = QtGui.QBrush(
            QtGui.QColor(*(ColorByName.get_int('aureoline_yellow'))))

        self.INVALID_MODULE_PEN = QtGui.QPen(
            QtGui.QBrush(QtGui.QColor(51, 51, 51, 255)), 2)
        self.INVALID_MODULE_LABEL_PEN = QtGui.QPen(
            QtGui.QBrush(QtGui.QColor(51, 51, 51, 255)), 2)
        self.INVALID_MODULE_BRUSH = QtGui.QBrush(QtGui.QColor(
            125, 92, 92, 255))

        # Pen and brush for un-matched queried modules
        self.GHOSTED_MODULE_PEN = QtGui.QPen(
            QtGui.QBrush(
                QtGui.QColor(*(ColorByName.get_int('dark_dim_grey')))), 2)
        # Pen to draw module label when it is unmatched due to a query
        self.GHOSTED_MODULE_LABEL_PEN = QtGui.QPen(
            QtGui.QBrush(
                QtGui.QColor(*(ColorByName.get_int('dark_dim_grey')))), 2)
        self.GHOSTED_MODULE_BRUSH = QtGui.QBrush(
            QtGui.QColor(*(ColorByName.get_int('light_dim_grey'))))

        # Pen and brush for breakpoint modules
        self.BREAKPOINT_MODULE_PEN = QtGui.QPen(
            QtGui.QBrush(
                QtGui.QColor(*(ColorByName.get_int('dark_dim_grey')))), 2)
        self.BREAKPOINT_MODULE_BRUSH = QtGui.QBrush(
            QtGui.QColor(*(ColorByName.get_int('light_dim_grey'))))
        self.BREAKPOINT_MODULE_LABEL_PEN = QtGui.QPen(
            QtGui.QBrush(
                QtGui.QColor(*(ColorByName.get_int('dark_dim_grey')))), 2)

        # Module pen styles
        self.ABSTRACTION_PEN = QtGui.QPen(
            QtGui.QBrush(QtGui.QColor(*(ColorByName.get_int('black')))), 2,
            QtCore.Qt.DotLine)
        self.GROUP_PEN = QtGui.QPen(
            QtGui.QBrush(QtGui.QColor(*(ColorByName.get_int('black')))), 2,
            QtCore.Qt.DashLine)

        # Brush and pen to draw a port shape at regular state
        self.PORT_PEN_WIDTH_MANDATORY = 'mandatory'
        self.PORT_PEN_WIDTH_NORMAL = 'normal'
        self.PORT_PEN_WIDTH_SELECTED = 'selected'
        self.PORT_PEN_WIDTHS = {
            self.PORT_PEN_WIDTH_MANDATORY: 1.5,
            self.PORT_PEN_WIDTH_NORMAL: 1.0,
            self.PORT_PEN_WIDTH_SELECTED: 3.0
        }
        self.PORT_PEN_COLOR_NORMAL = 'normal'
        self.PORT_PEN_COLOR_FULL = 'full'
        self.PORT_PEN_COLOR_INVALID = 'invalid'
        self.PORT_PEN_COLOR_GHOSTED = 'ghosted'
        self.PORT_PEN_COLOR_SELECTED = 'selected'
        self.PORT_PEN_COLORS = \
            {self.PORT_PEN_COLOR_NORMAL: \
                 QtGui.QColor(*(ColorByName.get_int('black'))),
             self.PORT_PEN_COLOR_FULL: \
                 QtGui.QColor(*(ColorByName.get_int('dark_dim_grey'))),
             self.PORT_PEN_COLOR_INVALID: QtGui.QColor(51, 51, 51, 255),
             self.PORT_PEN_COLOR_GHOSTED: \
                 QtGui.QColor(*(ColorByName.get_int('dark_dim_grey'))),
             self.PORT_PEN_COLOR_SELECTED: \
                 QtGui.QColor(*(ColorByName.get_int('goldenrod_medium')))
             }

        self.PORT_PENS = {}
        for (color_type, color) in self.PORT_PEN_COLORS.iteritems():
            for (width_type, width) in self.PORT_PEN_WIDTHS.iteritems():
                self.PORT_PENS[(color_type, width_type)] = \
                    QtGui.QPen(QtGui.QBrush(color), width)

        self.PORT_CONNECTED_BRUSH = QtGui.QBrush(QtGui.QColor(0, 0, 0, 60))
        self.PORT_BRUSH = QtGui.QBrush(QtCore.Qt.NoBrush)
        self.PORT_MANDATORY_BRUSH = QtGui.QBrush(
            QtGui.QColor(255, 255, 255, 180))
        self.GHOSTED_PORT_BRUSH = QtGui.QBrush(
            QtGui.QColor(*(ColorByName.get_int('light_dim_grey'))))
        self.INVALID_PORT_BRUSH = QtGui.QBrush(QtGui.QColor(125, 92, 92, 255))

        # Pen and brush for drawing the configure button
        self.CONFIGURE_PEN = QtGui.QPen(
            QtGui.QBrush(QtGui.QColor(*(ColorByName.get_int('black')))), 1)
        self.CONFIGURE_BRUSH = QtGui.QBrush(
            QtGui.QColor(*(ColorByName.get_int('black'))))

        # Pen and brush for drawing the ghosted configure button
        self.GHOSTED_CONFIGURE_PEN = QtGui.QPen(
            QtGui.QBrush(
                QtGui.QColor(*(ColorByName.get_int('dark_dim_grey')))), 2)
        self.GHOSTED_CONFIGURE_BRUSH = QtGui.QBrush(
            QtGui.QColor(*(ColorByName.get_int('dark_dim_grey'))))

        # Brush and pen to draw connections
        self.CONNECTION_PEN = QtGui.QPen(
            QtGui.QBrush(QtGui.QColor(*(ColorByName.get_int('black')))), 2)
        self.CONNECTION_SELECTED_PEN = QtGui.QPen(
            QtGui.QBrush(
                QtGui.QColor(*(ColorByName.get_int('goldenrod_medium')))), 3,
            QtCore.Qt.SolidLine)
        self.CONNECTION_SELECTED_CONVERTING_PEN = QtGui.QPen(
            QtGui.QBrush(
                QtGui.QColor(*(ColorByName.get_int('goldenrod_medium')))), 3,
            QtCore.Qt.DotLine)
        self.CONNECTION_BRUSH = QtGui.QBrush(
            QtGui.QColor(*(ColorByName.get_int('black'))))

        # Pen for drawing while connecting any ghosted modules
        self.GHOSTED_CONNECTION_PEN = QtGui.QPen(
            QtGui.QBrush(
                QtGui.QColor(*(ColorByName.get_int('dark_dim_grey')))), 2)

        # Pen to draw version tree node
        self.VERSION_PEN = QtGui.QPen(
            QtGui.QBrush(QtGui.QColor(*(ColorByName.get_int('black')))), 2)
        self.GHOSTED_VERSION_PEN = QtGui.QPen(
            QtGui.QBrush(QtGui.QColor(*(ColorByName.get_int('light_grey')))),
            2)
        self.VERSION_SELECTED_PEN = QtGui.QPen(
            QtGui.QBrush(
                QtGui.QColor(*(ColorByName.get_int('goldenrod_medium')))), 4)

        self.VERSION_LABEL_COLOR = \
            QtGui.QColor(*(ColorByName.get_int('black')))
        self.GHOSTED_VERSION_LABEL_COLOR = \
            QtGui.QColor(*(ColorByName.get_int('light_grey')))

        # Brush to draw version belongs to the current user
        self.VERSION_USER_BRUSH = QtGui.QBrush(
            QtGui.QColor(*(ColorByName.get_int('desatcornflower'))))
        self.GHOSTED_VERSION_USER_BRUSH = QtGui.QBrush(
            QtGui.QColor(*(ColorByName.get_int('very_light_grey'))))

        # Brush to draw version belongs to the other users
        self.VERSION_OTHER_BRUSH = QtGui.QBrush(
            QtGui.QColor(*(ColorByName.get_int('melon'))))

        # Brush and pen to draw a link between two versions
        self.LINK_PEN = QtGui.QPen(
            QtGui.QBrush(QtGui.QColor(*(ColorByName.get_int('black')))), 1.5)
        self.LINK_SELECTED_PEN = QtGui.QPen(
            QtGui.QBrush(
                QtGui.QColor(*(ColorByName.get_int('goldenrod_medium')))), 3)
        self.GHOSTED_LINK_PEN = QtGui.QPen(
            QtGui.QBrush(QtGui.QColor(*(ColorByName.get_int('light_grey')))),
            2)

        # Selection box color
        self.SELECTION_BOX_BRUSH = QtGui.QBrush(
            QtGui.QColor(*ColorByName.get_int('light_grey')))
        self.SELECTION_BOX_PEN = QtGui.QPen(
            QtGui.QBrush(QtGui.QColor(*ColorByName.get_int('lamp_black'))), 1)

        # Color of the version is being diff from in
        self.VISUAL_DIFF_FROM_VERSION_BRUSH = QtGui.QBrush(
            QtGui.QColor(*ColorByName.get_int('melon')))

        # Color of the version is being diff to in
        self.VISUAL_DIFF_TO_VERSION_BRUSH = QtGui.QBrush(
            QtGui.QColor(*ColorByName.get_int('steel_blue_light')))

        # Color of the paramter changed modules in Visual Diff
        self.VISUAL_DIFF_PARAMETER_CHANGED_BRUSH = QtGui.QBrush(
            QtGui.QColor(*ColorByName.get_int('light_grey')))

        # Color of the shared modules in Visual Diff
        self.VISUAL_DIFF_SHARED_BRUSH = QtGui.QBrush(
            QtGui.QColor(155, 155, 155, 255))

        # Color of shared modules in Visual Diff matched by heuristic
        self.VISUAL_DIFF_MATCH_BRUSH = QtGui.QBrush(
            QtGui.QColor(*ColorByName.get_int('white')))

        # Color of partially shared modules in Visual Diff
        self.VISUAL_DIFF_SUMMARY_BRUSH = QtGui.QBrush(
            QtGui.QColor(*ColorByName.get_int('spring_green')))

        # Pen & Brush of the circled id on the right corner of the
        # virtual cell label
        self.ANNOTATED_ID_PEN = QtGui.QPen(QtCore.Qt.white)
        self.ANNOTATED_ID_BRUSH = QtGui.QBrush(QtGui.QColor(157, 0, 0, 255))

        #### FONTS ####
        # Font for module text
        # Use fixed dpi to get same font size on all platforms
        def fixDPI(i):
            return i * 72 // QtGui.QApplication.desktop().logicalDpiY()

        GRAPHICS_FONT = "Arial"
        self.MODULE_FONT = QtGui.QFont(GRAPHICS_FONT, fixDPI(14),
                                       QtGui.QFont.Bold)
        self.MODULE_FONT_METRIC = QtGui.QFontMetrics(self.MODULE_FONT)
        self.MODULE_DESC_FONT = QtGui.QFont(GRAPHICS_FONT, fixDPI(12))
        self.MODULE_DESC_FONT_METRIC = QtGui.QFontMetrics(
            self.MODULE_DESC_FONT)
        self.MODULE_EDIT_FONT = QtGui.QFont(GRAPHICS_FONT, fixDPI(10))
        self.MODULE_EDIT_FONT_METRIC = QtGui.QFontMetrics(
            self.MODULE_EDIT_FONT)

        # Font for version text
        self.VERSION_FONT = QtGui.QFont(GRAPHICS_FONT, fixDPI(15),
                                        QtGui.QFont.Bold)
        self.VERSION_FONT_METRIC = QtGui.QFontMetrics(self.VERSION_FONT)
        self.VERSION_DESCRIPTION_FONT = QtGui.QFont(GRAPHICS_FONT, fixDPI(15),
                                                    QtGui.QFont.Normal, True)
        self.VERSION_DESCRIPTION_FONT_METRIC = \
            QtGui.QFontMetrics(self.VERSION_DESCRIPTION_FONT)

        self.VERSION_PROPERTIES_FONT = QtGui.QFont("Arial", 12)
        self.VERSION_PROPERTIES_FONT_METRIC = \
            QtGui.QFontMetrics(self.VERSION_PROPERTIES_FONT)
        self.VERSION_PROPERTIES_PEN = QtGui.QBrush(
            QtGui.QColor(20, 100, 20, 255))

        # Font showing on the Parameter Inspector window of Visual Diff
        self.VISUAL_DIFF_PARAMETER_FONT = QtGui.QFont('Arial', 10)

        # Font showing on the Legend window of Visual Diff
        self.VISUAL_DIFF_LEGEND_FONT = QtGui.QFont('Arial', 9)

        # Font for PythonSource
        self.PYTHON_SOURCE_EDITOR_FONT = QtGui.QFont('Courier', 10,
                                                     QtGui.QFont.Normal)
        # Font for Splash Screen messages
        self.SPLASH_SCREEN_FONT = QtGui.QFont('Arial', 10, QtGui.QFont.Normal)
        #### ICONS & IMAGES ####
        #The application disclaimer image
        self.DISCLAIMER_IMAGE = QtGui.QPixmap(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/disclaimer.png')
        #The application icon
        self.APPLICATION_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/vistrails_icon_small.png')

        #The application pixmap
        self.APPLICATION_PIXMAP = QtGui.QPixmap(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/vistrails_icon_small.png')

        # The execute icons in the first spot of vistrail view toolbar
        self.EXECUTE_PIPELINE_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/execute.png')
        self.EXECUTE_EXPLORE_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/execute_explore.png')

        # The undo icons for the vistrail view toolbar
        self.UNDO_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/undo.png')

        # The redo icons for the vistrail view toolbar
        self.REDO_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/redo.png')

        # Icon to select the tabbed view
        self.TABBED_VIEW_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/tabbed_view.png')

        # Icon to select the horizontal split view
        self.HORIZONTAL_VIEW_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/hor_view.png')

        # Icon to select the vertical split view
        self.VERTICAL_VIEW_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/ver_view.png')

        # Icon to select the docking-style view
        self.DOCK_VIEW_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/dock_view.png')

        # Toolbar icon for creating a new Vistrail
        self.NEW_VISTRAIL_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/new_vistrail.png')

        # Toolbar icon for opening a vistrail
        self.OPEN_VISTRAIL_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/open_vistrail.png')

        #Toolbar icon for opening a vistrail from a database
        self.OPEN_VISTRAIL_DB_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/openfromdb.png')

        #Icon for database connections
        self.DB_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/database.png')

        #Icon for vistrails files
        self.FILE_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/file.png')

        # Toolbar icon for save the current Vistrail
        self.SAVE_VISTRAIL_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/save_vistrail.png')

        # Toolbar icon for toggling console mode window
        self.CONSOLE_MODE_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/console.png')

        # Background image of the Visual Diff pipeline view
        self.VISUAL_DIFF_BACKGROUND_IMAGE = QtGui.QImage(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/pipeline_bg.png')

        # Toolbar icon for showing the Parameter Inspector window
        self.VISUAL_DIFF_SHOW_PARAM_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/show_params.png')

        # Toolbar icon for showing the Legend window
        self.VISUAL_DIFF_SHOW_LEGEND_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/show_legends.png')

        # Toolbar icon for creating an analogy
        self.VISUAL_DIFF_CREATE_ANALOGY_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/analogy.png')

        # Toolbar icon for close button on the vistrail tabbar
        self.VIEW_MANAGER_CLOSE_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/closeview.png')

        # Toolbar icon for the dock toolbutton on the splitted window
        self.DOCK_BACK_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/dockback.png')

        # Icon for adding string in the parameter exploration widget
        self.ADD_STRING_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/edit_add.png')

        # Icon for moving string up in the parameter exploration widget
        self.UP_STRING_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/up.png')

        # Icon for moving string up in the parameter exploration widget
        self.DOWN_STRING_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/down.png')

        # Icon for expand all/collapse all buttons in the Module Palette
        self.EXPAND_ALL_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/expand_all.png')

        self.COLLAPSE_ALL_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/collapse_all.png')

        # Icons for tree/list view buttons in the Workspace
        self.LIST_VIEW_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/list_view.png')

        self.TREE_VIEW_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/tree_view.png')

        # Toolbar icons for views
        self.PIPELINE_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/pipeline.png')
        self.HISTORY_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/history.png')
        self.QUERY_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/full_tree.png')
        self.EXPLORE_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/explore.png')
        self.PROVENANCE_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/search_database.png')

        # Toolbar icon for visual query on a vistrail
        self.VISUAL_QUERY_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/visual_query.png')

        # Toolbar icon for viewing the whole version tree
        self.VIEW_FULL_TREE_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/full_tree.png')

        # Toolbar icon for viewing the whole version tree
        self.PERFORM_PARAMETER_EXPLORATION_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/perform_pe.png')

        # Toolbar icon for dragging pixmap of VisDiff
        self.VERSION_DRAG_PIXMAP = QtGui.QPixmap(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/dragging.png')

        #Tabbar icon for detach a tab
        self.DETACH_TAB_ICON = QtGui.QIcon()
        self.DETACH_TAB_ICON.addFile(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/detach.png',
            mode=QtGui.QIcon.Normal)
        self.DETACH_TAB_ICON.addFile(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/detach_on.png',
            mode=QtGui.QIcon.Active)

        #toolbutton icon for pin/unpin palette
        self.PINNED_PALETTE_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/pinned.png')
        self.UNPINNED_PALETTE_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/unpinned.png')
        # Parameter Exploration Pixmaps
        self.EXPLORE_COLUMN_PIXMAP = QtGui.QPixmap(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/column.png')
        self.EXPLORE_ROW_PIXMAP = QtGui.QPixmap(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/row.png')
        self.EXPLORE_SHEET_PIXMAP = QtGui.QPixmap(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/sheet.png')
        self.EXPLORE_TIME_PIXMAP = QtGui.QPixmap(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/time.png')
        self.EXPLORE_SKIP_PIXMAP = QtGui.QPixmap(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/skip.png')
        self.REMOVE_PARAM_PIXMAP = QtGui.QPixmap(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/remove_param.png')
        self.RIGHT_ARROW_PIXMAP = QtGui.QPixmap(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/right.png')
        self.LEFT_ARROW_PIXMAP = QtGui.QPixmap(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/left.png')

        # Cursor for zoom in/out graphics views
        self.SELECT_CURSOR = QtGui.QCursor(QtCore.Qt.ArrowCursor)
        self.OPEN_HAND_CURSOR = QtGui.QCursor(
            QtGui.QPixmap(vistrails.core.system.vistrails_root_directory() +
                          '/gui/resources/images/open_hand.png'))
        self.CLOSE_HAND_CURSOR = QtGui.QCursor(
            QtGui.QPixmap(vistrails.core.system.vistrails_root_directory() +
                          '/gui/resources/images/close_hand.png'))
        self.ZOOM_CURSOR = QtGui.QCursor(
            QtGui.QPixmap(vistrails.core.system.vistrails_root_directory() +
                          '/gui/resources/images/zoom.png'))

        # Cursor icon for zoom in/out graphics views
        self.SELECT_ICON = QtGui.QIcon(
            QtGui.QPixmap(vistrails.core.system.vistrails_root_directory() +
                          '/gui/resources/images/select_icon.png'))
        self.PAN_ICON = QtGui.QIcon(
            QtGui.QPixmap(vistrails.core.system.vistrails_root_directory() +
                          '/gui/resources/images/pan_icon.png'))
        self.ZOOM_ICON = QtGui.QIcon(
            QtGui.QPixmap(vistrails.core.system.vistrails_root_directory() +
                          '/gui/resources/images/zoom_icon.png'))

        # Mashup Icons
        self.EXECUTE_MASHUP_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/mashup_execute.png')
        self.MASHUP_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/mashup_create.png')
        self.MASHUP_ALIAS_ICON = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/alias.png')

        # Job View Icons
        self.JOB_SCHEDULED = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/appointment-new.png')
        self.JOB_FINISHED = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/emblem-important.png')
        self.JOB_CHECKING = QtGui.QIcon(
            vistrails.core.system.vistrails_root_directory() +
            '/gui/resources/images/view-refresh.png')

        # Saved Queries icons
        self.QUERY_VIEW_ICON = self.ZOOM_ICON
        self.QUERY_ARROW_ICON = QtGui.QIcon(
            QtGui.QPixmap(vistrails.core.system.vistrails_root_directory() +
                          '/gui/resources/images/zoom_arrow_icon.png'))
        self.QUERY_EDIT_ICON = QtGui.QIcon(
            QtGui.QPixmap(vistrails.core.system.vistrails_root_directory() +
                          '/gui/resources/images/edit.png'))

        # Icon on the button to switch to single/multi line string edition
        self.MULTILINE_STRING_ICON = QtGui.QIcon(
            QtGui.QPixmap(vistrails.core.system.vistrails_root_directory() +
                          '/gui/resources/images/multiline_string_icon.png'))

        # icons for the port list combination modes
        self.DOT_PRODUCT_ICON = QtGui.QIcon(
            QtGui.QPixmap(vistrails.core.system.vistrails_root_directory() +
                          '/gui/resources/images/macro.png'))

        self.CROSS_PRODUCT_ICON = QtGui.QIcon(
            QtGui.QPixmap(vistrails.core.system.vistrails_root_directory() +
                          '/gui/resources/images/remove_param.png'))

        #### COLORS ####
        # Color for the PIP frame
        self.PIP_FRAME_COLOR = QtGui.QColor(
            *(ColorByName.get_int('yellow_light')))

        # Color for invalid parameter frames
        self.PARAM_INVALID_COLOR = QtGui.QColor('#efef00')

        # Color of selected methods in the modules method area
        self.METHOD_SELECT_COLOR = QtGui.QColor(
            *ColorByName.get_int('yellow_light'))

        # Color of the hover/unhover alias labels
        self.HOVER_DEFAULT_COLOR = QtGui.QColor(*ColorByName.get_int('black'))
        self.HOVER_SELECT_COLOR = QtGui.QColor(*ColorByName.get_int('blue'))

        # colors for debug messages
        self.DEBUG_COLORS = {
            'DEBUG': QtGui.QColor("#777777"),
            'INFO': QtGui.QColor(QtCore.Qt.black),
            'WARNING': QtGui.QColor("#707000"),
            'CRITICAL': QtGui.QColor(QtCore.Qt.red),
        }

        class QTransparentColor(QtGui.QColor):
            def name(self):
                return 'transparent'

        self.DEBUG_FILTER_BACKGROUND_COLOR = QTransparentColor("transparent")
コード例 #8
0
ファイル: filesample.py プロジェクト: 6091-BIT/gp
    def setupUi(self, Registration_2):
        Registration_2.setObjectName("Registration_2")
        Registration_2.resize(800, 600)
        Registration_2.setMinimumSize(QtCore.QSize(800, 600))
        Registration_2.setMaximumSize(QtCore.QSize(800, 600))
        self.databaseRadio = QtGui.QRadioButton(Registration_2)
        self.databaseRadio.setGeometry(QtCore.QRect(40, 80, 261, 17))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.databaseRadio.setFont(font)
        self.databaseRadio.setObjectName("databaseRadio")
        self.galleryRadio = QtGui.QRadioButton(Registration_2)
        self.galleryRadio.setGeometry(QtCore.QRect(430, 80, 261, 17))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.galleryRadio.setFont(font)
        self.galleryRadio.setObjectName("galleryRadio")
        self.shuffleButton = QtGui.QPushButton(Registration_2)
        self.shuffleButton.setGeometry(QtCore.QRect(630, 460, 151, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.shuffleButton.setFont(font)
        self.shuffleButton.setCursor(
            QtGui.QCursor(QtCore.Qt.PointingHandCursor))
        self.shuffleButton.setMouseTracking(False)
        self.shuffleButton.setObjectName("shuffleButton")
        self.numberOfImages = QtGui.QLabel(Registration_2)
        self.numberOfImages.setGeometry(QtCore.QRect(40, 30, 121, 21))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.numberOfImages.setFont(font)
        self.numberOfImages.setObjectName("numberOfImages")
        self.comboBox = QtGui.QComboBox(Registration_2)
        self.comboBox.setGeometry(QtCore.QRect(170, 30, 41, 21))
        self.comboBox.setObjectName("comboBox")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.regImage = QtGui.QLabel(Registration_2)
        self.regImage.setGeometry(QtCore.QRect(20, 170, 600, 400))
        self.regImage.setAutoFillBackground(False)
        self.regImage.setFrameShape(QtGui.QFrame.WinPanel)
        self.regImage.setFrameShadow(QtGui.QFrame.Sunken)
        self.regImage.setLineWidth(5)
        self.regImage.setText("")
        self.regImage.setPixmap(QtGui.QPixmap("new.png"))
        self.regImage.setScaledContents(True)
        self.regImage.setObjectName("regImage")
        self.selectImage = QtGui.QLabel(Registration_2)
        self.selectImage.setGeometry(QtCore.QRect(90, 110, 111, 21))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.selectImage.setFont(font)
        self.selectImage.setObjectName("selectImage")
        self.selectImage.setDisabled(True)
        self.selectButton = QtGui.QToolButton(Registration_2)
        self.selectButton.setGeometry(QtCore.QRect(190, 110, 25, 19))
        self.selectButton.setCursor(QtGui.QCursor(
            QtCore.Qt.PointingHandCursor))
        self.selectButton.setObjectName("selectButton")
        self.selectButton.setDisabled(True)
        self.groupBox = QtGui.QGroupBox(Registration_2)
        self.groupBox.setGeometry(QtCore.QRect(630, 180, 151, 51))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.groupBox.setFont(font)
        self.groupBox.setFlat(False)
        self.groupBox.setObjectName("groupBox")
        self.toleranceSlider = QtGui.QSlider(self.groupBox)
        self.toleranceSlider.setGeometry(QtCore.QRect(0, 20, 149, 22))
        self.toleranceSlider.setMinimum(20)
        self.toleranceSlider.setMaximum(60)
        self.toleranceSlider.setSliderPosition(40)
        self.toleranceSlider.setCursor(
            QtGui.QCursor(QtCore.Qt.PointingHandCursor))
        self.toleranceSlider.setOrientation(QtCore.Qt.Horizontal)
        self.toleranceSlider.setObjectName("toleranceSlider")
        self.browseImage = QtGui.QLabel(Registration_2)
        self.browseImage.setGeometry(QtCore.QRect(470, 110, 111, 21))
        self.browseImage.setDisabled(True)
        font = QtGui.QFont()
        font.setPointSize(10)
        self.browseImage.setFont(font)
        self.browseImage.setObjectName("browseImage")
        self.browseButton = QtGui.QToolButton(Registration_2)
        self.browseButton.setGeometry(QtCore.QRect(580, 110, 25, 19))
        self.browseButton.setCursor(QtGui.QCursor(
            QtCore.Qt.PointingHandCursor))
        self.browseButton.setObjectName("browseButton")
        self.browseButton.setDisabled(True)

        #click button 1
        self.clickpoint1 = QtGui.QPushButton(Registration_2)
        self.clickpoint1.setGeometry(
            QtCore.QRect(self.posax, self.posay, self.tvalue, self.tvalue))
        self.clickpoint1.setMinimumSize(QtCore.QSize(20, 20))
        self.clickpoint1.setMaximumSize(QtCore.QSize(60, 60))
        self.clickpoint1.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
        self.clickpoint1.setMouseTracking(True)
        self.clickpoint1.setText("")
        self.clickpoint1.setObjectName("clickpoint1")

        #click button 2
        self.clickpoint2 = QtGui.QPushButton(Registration_2)
        self.clickpoint2.setGeometry(
            QtCore.QRect(320 + self.bx, 170 + self.by, self.tvalue,
                         self.tvalue))
        self.clickpoint2.setMinimumSize(QtCore.QSize(20, 20))
        self.clickpoint2.setMaximumSize(QtCore.QSize(60, 60))
        self.clickpoint2.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
        self.clickpoint2.setMouseTracking(True)
        self.clickpoint2.setText("")
        self.clickpoint2.setObjectName("clickpoint2")

        #click button 3
        self.clickpoint3 = QtGui.QPushButton(Registration_2)
        self.clickpoint3.setGeometry(
            QtCore.QRect(20 + self.cx, 445 + self.cy, self.tvalue,
                         self.tvalue))
        self.clickpoint3.setMinimumSize(QtCore.QSize(20, 20))
        self.clickpoint3.setMaximumSize(QtCore.QSize(60, 60))
        self.clickpoint3.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
        self.clickpoint3.setMouseTracking(True)
        self.clickpoint3.setText("")
        self.clickpoint3.setObjectName("clickpoint3")
        self.finishButton = QtGui.QPushButton(Registration_2)
        self.finishButton.setGeometry(QtCore.QRect(630, 530, 151, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.finishButton.setFont(font)
        self.finishButton.setCursor(QtGui.QCursor(
            QtCore.Qt.PointingHandCursor))
        self.finishButton.setObjectName("finishButton")

        self.databaseRadio.raise_()
        self.galleryRadio.raise_()
        self.shuffleButton.raise_()
        self.numberOfImages.raise_()
        self.comboBox.raise_()
        self.regImage.raise_()
        self.selectImage.raise_()
        self.selectButton.raise_()
        self.finishButton.raise_()
        self.groupBox.raise_()
        self.browseImage.raise_()
        self.browseButton.raise_()
        self.clickpoint1.raise_()
        self.clickpoint2.raise_()
        self.clickpoint3.raise_()
        self.finishButton.raise_()

        self.retranslateUi(Registration_2)
        self.databaseRadio.clicked['bool'].connect(self.selectImage.setEnabled)
        self.databaseRadio.clicked['bool'].connect(
            self.selectButton.setEnabled)
        self.galleryRadio.clicked['bool'].connect(self.browseImage.setEnabled)
        self.galleryRadio.clicked['bool'].connect(self.browseButton.setEnabled)
        self.databaseRadio.clicked['bool'].connect(
            self.browseImage.setDisabled)
        self.databaseRadio.clicked['bool'].connect(
            self.browseButton.setDisabled)
        self.galleryRadio.clicked['bool'].connect(self.selectImage.setDisabled)
        self.galleryRadio.clicked['bool'].connect(
            self.selectButton.setDisabled)
        #self.clickpoint1.released.connect(self.clickpointsshuffle)
        QtCore.QObject.connect(self.clickpoint1,
                               QtCore.SIGNAL(_fromUtf8("clicked()")),
                               self.shutdown)

        self.shuffleButton.clicked['bool'].connect(self.clickpointsshuffle)
        QtCore.QObject.connect(self.finishButton,
                               QtCore.SIGNAL(_fromUtf8("clicked()")),
                               Registration_2.close)
        self.toleranceSlider.valueChanged['int'].connect(self.settolerance)

        self.clickpoint1.clicked['bool'].connect(self.saveclickpoint1)
        self.clickpoint2.clicked['bool'].connect(self.saveclickpoint2)
        self.clickpoint3.clicked['bool'].connect(self.saveclickpoint3)

        QtCore.QMetaObject.connectSlotsByName(Registration_2)
コード例 #9
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.setEnabled(True)
        MainWindow.resize(390, 315)
        MainWindow.setMinimumSize(QtCore.QSize(390, 315))
        MainWindow.setMaximumSize(QtCore.QSize(390, 315))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(False)
        font.setItalic(False)
        font.setWeight(50)
        MainWindow.setFont(font)
        self.centralWidget = QtGui.QWidget(MainWindow)
        self.centralWidget.setObjectName(_fromUtf8("centralWidget"))
        self.btnFileChoose = QtGui.QPushButton(self.centralWidget)
        self.btnFileChoose.setGeometry(QtCore.QRect(30, 20, 71, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setItalic(False)
        font.setKerning(True)
        self.btnFileChoose.setFont(font)
        self.btnFileChoose.setCursor(QtGui.QCursor(QtCore.Qt.OpenHandCursor))
        self.btnFileChoose.setObjectName(_fromUtf8("btnFileChoose"))
        self.lbFilePath = QtGui.QLabel(self.centralWidget)
        self.lbFilePath.setGeometry(QtCore.QRect(130, 20, 251, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(False)
        font.setItalic(False)
        font.setWeight(50)
        self.lbFilePath.setFont(font)
        self.lbFilePath.setObjectName(_fromUtf8("lbFilePath"))
        self.btnStart = QtGui.QPushButton(self.centralWidget)
        self.btnStart.setGeometry(QtCore.QRect(140, 250, 91, 41))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Ubuntu"))
        font.setPointSize(16)
        font.setItalic(False)
        self.btnStart.setFont(font)
        self.btnStart.setCursor(QtGui.QCursor(QtCore.Qt.OpenHandCursor))
        self.btnStart.setAutoFillBackground(True)
        self.btnStart.setObjectName(_fromUtf8("btnStart"))
        self.btnOutputPath = QtGui.QPushButton(self.centralWidget)
        self.btnOutputPath.setGeometry(QtCore.QRect(30, 70, 71, 31))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Ubuntu"))
        font.setPointSize(10)
        font.setItalic(False)
        self.btnOutputPath.setFont(font)
        self.btnOutputPath.setCursor(QtGui.QCursor(QtCore.Qt.OpenHandCursor))
        self.btnOutputPath.setAutoFillBackground(True)
        self.btnOutputPath.setObjectName(_fromUtf8("btnOutputPath"))
        self.lbOutputPath = QtGui.QLabel(self.centralWidget)
        self.lbOutputPath.setGeometry(QtCore.QRect(130, 70, 251, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(False)
        font.setItalic(False)
        font.setWeight(50)
        self.lbOutputPath.setFont(font)
        self.lbOutputPath.setObjectName(_fromUtf8("lbOutputPath"))
        self.cbWidth = QtGui.QCheckBox(self.centralWidget)
        self.cbWidth.setGeometry(QtCore.QRect(20, 120, 61, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.cbWidth.setFont(font)
        self.cbWidth.setFocusPolicy(QtCore.Qt.WheelFocus)
        self.cbWidth.setChecked(True)
        self.cbWidth.setObjectName(_fromUtf8("cbWidth"))
        self.cbHeight = QtGui.QCheckBox(self.centralWidget)
        self.cbHeight.setGeometry(QtCore.QRect(20, 160, 61, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(False)
        font.setItalic(False)
        font.setWeight(50)
        self.cbHeight.setFont(font)
        self.cbHeight.setChecked(True)
        self.cbHeight.setObjectName(_fromUtf8("cbHeight"))
        self.cbRate = QtGui.QCheckBox(self.centralWidget)
        self.cbRate.setGeometry(QtCore.QRect(20, 200, 61, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.cbRate.setFont(font)
        self.cbRate.setChecked(True)
        self.cbRate.setObjectName(_fromUtf8("cbRate"))
        self.grpWidth = QtGui.QGroupBox(self.centralWidget)
        self.grpWidth.setEnabled(True)
        self.grpWidth.setGeometry(QtCore.QRect(90, 110, 291, 41))
        self.grpWidth.setTitle(_fromUtf8(""))
        self.grpWidth.setFlat(True)
        self.grpWidth.setCheckable(False)
        self.grpWidth.setObjectName(_fromUtf8("grpWidth"))
        self.label = QtGui.QLabel(self.grpWidth)
        self.label.setGeometry(QtCore.QRect(70, 10, 31, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.label.setFont(font)
        self.label.setObjectName(_fromUtf8("label"))
        self.sbWidth = QtGui.QSpinBox(self.grpWidth)
        self.sbWidth.setGeometry(QtCore.QRect(0, 10, 61, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.sbWidth.setFont(font)
        self.sbWidth.setMaximum(20000)
        self.sbWidth.setProperty("value", 1440)
        self.sbWidth.setObjectName(_fromUtf8("sbWidth"))
        self.groupBox = QtGui.QGroupBox(self.grpWidth)
        self.groupBox.setEnabled(True)
        self.groupBox.setGeometry(QtCore.QRect(110, 0, 181, 31))
        font = QtGui.QFont()
        font.setPointSize(6)
        self.groupBox.setFont(font)
        self.groupBox.setTitle(_fromUtf8(""))
        self.groupBox.setFlat(True)
        self.groupBox.setCheckable(False)
        self.groupBox.setObjectName(_fromUtf8("groupBox"))
        self.rbWidthGt = QtGui.QRadioButton(self.groupBox)
        self.rbWidthGt.setGeometry(QtCore.QRect(0, 10, 51, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.rbWidthGt.setFont(font)
        self.rbWidthGt.setChecked(True)
        self.rbWidthGt.setObjectName(_fromUtf8("rbWidthGt"))
        self.rbWidthLt = QtGui.QRadioButton(self.groupBox)
        self.rbWidthLt.setGeometry(QtCore.QRect(60, 10, 51, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.rbWidthLt.setFont(font)
        self.rbWidthLt.setObjectName(_fromUtf8("rbWidthLt"))
        self.rbWidthEq = QtGui.QRadioButton(self.groupBox)
        self.rbWidthEq.setGeometry(QtCore.QRect(120, 10, 51, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.rbWidthEq.setFont(font)
        self.rbWidthEq.setObjectName(_fromUtf8("rbWidthEq"))
        self.grpHeight = QtGui.QGroupBox(self.centralWidget)
        self.grpHeight.setEnabled(True)
        self.grpHeight.setGeometry(QtCore.QRect(90, 150, 291, 41))
        self.grpHeight.setTitle(_fromUtf8(""))
        self.grpHeight.setFlat(True)
        self.grpHeight.setCheckable(False)
        self.grpHeight.setObjectName(_fromUtf8("grpHeight"))
        self.label_2 = QtGui.QLabel(self.grpHeight)
        self.label_2.setGeometry(QtCore.QRect(70, 10, 31, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.label_2.setFont(font)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.sbHeight = QtGui.QSpinBox(self.grpHeight)
        self.sbHeight.setGeometry(QtCore.QRect(0, 10, 61, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.sbHeight.setFont(font)
        self.sbHeight.setMaximum(20000)
        self.sbHeight.setProperty("value", 900)
        self.sbHeight.setObjectName(_fromUtf8("sbHeight"))
        self.groupBox_2 = QtGui.QGroupBox(self.grpHeight)
        self.groupBox_2.setEnabled(True)
        self.groupBox_2.setGeometry(QtCore.QRect(110, 0, 181, 31))
        font = QtGui.QFont()
        font.setPointSize(6)
        self.groupBox_2.setFont(font)
        self.groupBox_2.setTitle(_fromUtf8(""))
        self.groupBox_2.setFlat(True)
        self.groupBox_2.setCheckable(False)
        self.groupBox_2.setObjectName(_fromUtf8("groupBox_2"))
        self.rbHeightGt = QtGui.QRadioButton(self.groupBox_2)
        self.rbHeightGt.setGeometry(QtCore.QRect(0, 10, 51, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.rbHeightGt.setFont(font)
        self.rbHeightGt.setChecked(True)
        self.rbHeightGt.setObjectName(_fromUtf8("rbHeightGt"))
        self.rbHeightLt = QtGui.QRadioButton(self.groupBox_2)
        self.rbHeightLt.setGeometry(QtCore.QRect(60, 10, 51, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.rbHeightLt.setFont(font)
        self.rbHeightLt.setObjectName(_fromUtf8("rbHeightLt"))
        self.rbHeightEq = QtGui.QRadioButton(self.groupBox_2)
        self.rbHeightEq.setGeometry(QtCore.QRect(120, 10, 51, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.rbHeightEq.setFont(font)
        self.rbHeightEq.setObjectName(_fromUtf8("rbHeightEq"))
        self.grpRate = QtGui.QGroupBox(self.centralWidget)
        self.grpRate.setEnabled(True)
        self.grpRate.setGeometry(QtCore.QRect(90, 200, 291, 41))
        self.grpRate.setTitle(_fromUtf8(""))
        self.grpRate.setFlat(True)
        self.grpRate.setCheckable(False)
        self.grpRate.setObjectName(_fromUtf8("grpRate"))
        self.groupBox_6 = QtGui.QGroupBox(self.grpRate)
        self.groupBox_6.setEnabled(True)
        self.groupBox_6.setGeometry(QtCore.QRect(198, 0, 120, 31))
        font = QtGui.QFont()
        font.setPointSize(6)
        self.groupBox_6.setFont(font)
        self.groupBox_6.setTitle(_fromUtf8(""))
        self.groupBox_6.setFlat(True)
        self.groupBox_6.setCheckable(False)
        self.groupBox_6.setObjectName(_fromUtf8("groupBox_6"))
        self.sbRateValue = QtGui.QDoubleSpinBox(self.grpRate)
        self.sbRateValue.setGeometry(QtCore.QRect(170, 0, 62, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.sbRateValue.setFont(font)
        self.sbRateValue.setMaximum(1.0)
        self.sbRateValue.setSingleStep(0.01)
        self.sbRateValue.setProperty("value", 0.1)
        self.sbRateValue.setObjectName(_fromUtf8("sbRateValue"))
        self.sbRateWidth = QtGui.QSpinBox(self.grpRate)
        self.sbRateWidth.setGeometry(QtCore.QRect(0, 0, 61, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.sbRateWidth.setFont(font)
        self.sbRateWidth.setMaximum(20000)
        self.sbRateWidth.setProperty("value", 1440)
        self.sbRateWidth.setObjectName(_fromUtf8("sbRateWidth"))
        self.label_3 = QtGui.QLabel(self.grpRate)
        self.label_3.setEnabled(True)
        self.label_3.setGeometry(QtCore.QRect(70, 0, 21, 31))
        font = QtGui.QFont()
        font.setPointSize(13)
        self.label_3.setFont(font)
        self.label_3.setScaledContents(False)
        self.label_3.setOpenExternalLinks(False)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.label_7 = QtGui.QLabel(self.grpRate)
        self.label_7.setGeometry(QtCore.QRect(230, 0, 61, 31))
        font = QtGui.QFont()
        font.setPointSize(11)
        self.label_7.setFont(font)
        self.label_7.setWordWrap(False)
        self.label_7.setOpenExternalLinks(False)
        self.label_7.setObjectName(_fromUtf8("label_7"))
        self.sbRateHeight = QtGui.QSpinBox(self.grpRate)
        self.sbRateHeight.setGeometry(QtCore.QRect(100, 0, 61, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.sbRateHeight.setFont(font)
        self.sbRateHeight.setMaximum(20000)
        self.sbRateHeight.setProperty("value", 900)
        self.sbRateHeight.setObjectName(_fromUtf8("sbRateHeight"))
        MainWindow.setCentralWidget(self.centralWidget)
        self.statusBar = QtGui.QStatusBar(MainWindow)
        font = QtGui.QFont()
        font.setPointSize(10)
        self.statusBar.setFont(font)
        self.statusBar.setObjectName(_fromUtf8("statusBar"))
        MainWindow.setStatusBar(self.statusBar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
コード例 #10
0
 def set_cursor(self, cursor):
     if DEBUG: print 'Set cursor', cursor
     QtGui.QApplication.restoreOverrideCursor()
     QtGui.QApplication.setOverrideCursor(QtGui.QCursor(cursord[cursor]))
コード例 #11
0
    def setupUi(self, QuizWindow, MainMenuWindow, username):
        self.mw = MainMenuWindow
        self.form = QuizWindow
        self.username = username
        self.flag[:] = ['NA'] * 10  #reinitializing flag with NotAttemted
        self.s = 0
        self.m = 2

        QuizWindow.setObjectName(_fromUtf8("QuizWindow"))
        QuizWindow.resize(640, 480)
        QuizWindow.setGeometry(320, 100, 640, 480)
        QuizWindow.setMinimumSize(QtCore.QSize(640, 480))
        QuizWindow.setMaximumSize(QtCore.QSize(640, 480))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Ubuntu Condensed"))
        font.setPointSize(14)
        QuizWindow.setFont(font)
        QuizWindow.setStyleSheet(
            _fromUtf8("background-color: rgb(255, 255, 255);\n"
                      "color: rgb(0, 0, 0);"))

        self.labheader = QtGui.QLabel(QuizWindow)
        self.labheader.setGeometry(QtCore.QRect(20, 20, 601, 51))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Ubuntu Condensed"))
        font.setPointSize(14)
        font.setBold(True)
        font.setWeight(75)
        self.labheader.setFont(font)
        self.labheader.setStyleSheet(
            _fromUtf8("background-color: rgb(59, 89, 152);\n"
                      "color: rgb(255, 255, 255);"))
        self.labheader.setAlignment(QtCore.Qt.AlignCenter)
        self.labheader.setObjectName(_fromUtf8("labheader"))

        self.mainmenu_btn = QtGui.QPushButton(QuizWindow)
        self.mainmenu_btn.setGeometry(QtCore.QRect(20, 20, 51, 51))
        self.mainmenu_btn.setCursor(QtGui.QCursor(
            QtCore.Qt.PointingHandCursor))
        self.mainmenu_btn.setStyleSheet(
            _fromUtf8("background-color: rgba(255, 255, 255, 0);"))
        self.mainmenu_btn.setText(_fromUtf8(""))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8("menu.png")),
                       QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.mainmenu_btn.setIcon(icon)
        self.mainmenu_btn.setIconSize(QtCore.QSize(25, 25))
        self.mainmenu_btn.setFlat(False)
        self.mainmenu_btn.setObjectName(_fromUtf8("mainmenu_btn"))

        self.labword = QtGui.QLabel(QuizWindow)
        self.labword.setGeometry(QtCore.QRect(10, 120, 621, 51))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Ubuntu Condensed"))
        font.setPointSize(24)
        font.setBold(True)
        font.setWeight(75)
        self.labword.setFont(font)
        self.labword.setLineWidth(0)
        self.labword.setAlignment(QtCore.Qt.AlignCenter)
        self.labword.setWordWrap(True)
        self.labword.setObjectName(_fromUtf8("labword"))
        self.bookmark_cb = QtGui.QCheckBox(QuizWindow)
        self.bookmark_cb.setGeometry(QtCore.QRect(380, 405, 99, 22))
        self.bookmark_cb.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
        self.bookmark_cb.setStyleSheet(
            _fromUtf8("font: 14pt \"Ubuntu Condensed\";"))
        self.bookmark_cb.setObjectName(_fromUtf8("bookmark_cb"))
        self.bookmark_cb.hide()

        self.labnext = QtGui.QLabel(QuizWindow)
        self.labnext.setGeometry(QtCore.QRect(493, 401, 101, 31))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Ubuntu Condensed"))
        font.setPointSize(14)
        font.setBold(True)
        font.setWeight(75)

        self.labnext.setFont(font)
        self.labnext.setStyleSheet(
            _fromUtf8("background-color: rgb(59, 89, 152);\n"
                      "color: rgb(255, 255, 255);"))
        self.labnext.setText(_fromUtf8(""))
        self.labnext.setAlignment(QtCore.Qt.AlignCenter)
        self.labnext.setObjectName(_fromUtf8("labnext"))

        self.btn_next = QtGui.QPushButton(QuizWindow)
        self.btn_next.setGeometry(QtCore.QRect(493, 402, 99, 31))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Ubuntu Condensed"))
        font.setPointSize(14)
        self.btn_next.setFont(font)
        self.btn_next.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
        self.btn_next.setStyleSheet(
            _fromUtf8("background-color: rgba(255, 255, 255, 0);\n"
                      "color: rgb(255, 255, 255);"))
        self.btn_next.setObjectName(_fromUtf8("btn_next"))

        self.layoutWidget = QtGui.QWidget(QuizWindow)
        self.layoutWidget.setGeometry(QtCore.QRect(10, 208, 601, 128))
        self.layoutWidget.setObjectName(_fromUtf8("layoutWidget"))
        self.gridLayout = QtGui.QGridLayout(self.layoutWidget)
        self.gridLayout.setMargin(0)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.D_indicator = QtGui.QLabel(self.layoutWidget)
        self.D_indicator.setMaximumSize(QtCore.QSize(20, 20))
        self.D_indicator.setText(_fromUtf8(""))
        self.D_indicator.setObjectName(_fromUtf8("D_indicator"))
        self.gridLayout.addWidget(self.D_indicator, 3, 1, 1, 1)
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem, 0, 0, 1, 1)
        self.A_indicator = QtGui.QLabel(self.layoutWidget)
        self.A_indicator.setMaximumSize(QtCore.QSize(20, 20))
        self.A_indicator.setText(_fromUtf8(""))
        self.A_indicator.setObjectName(_fromUtf8("A_indicator"))
        self.gridLayout.addWidget(self.A_indicator, 0, 1, 1, 1)
        spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                        QtGui.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem1, 0, 3, 1, 1)
        spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                        QtGui.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem2, 1, 0, 1, 1)
        self.B_indicator = QtGui.QLabel(self.layoutWidget)
        self.B_indicator.setMaximumSize(QtCore.QSize(20, 20))
        self.B_indicator.setText(_fromUtf8(""))
        self.B_indicator.setObjectName(_fromUtf8("B_indicator"))
        self.gridLayout.addWidget(self.B_indicator, 1, 1, 1, 1)
        self.rbutopB = QtGui.QRadioButton(self.layoutWidget)
        self.rbutopB.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
        self.rbutopB.setStyleSheet(
            _fromUtf8("font: 14pt \"Ubuntu Condensed\";"))
        self.rbutopB.setObjectName(_fromUtf8("rbutopB"))
        self.rbutopB.setAutoExclusive(False)
        self.gridLayout.addWidget(self.rbutopB, 1, 2, 1, 1)
        spacerItem3 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                        QtGui.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem3, 1, 3, 1, 1)
        spacerItem4 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                        QtGui.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem4, 2, 0, 1, 1)
        self.C_indicator = QtGui.QLabel(self.layoutWidget)
        self.C_indicator.setMaximumSize(QtCore.QSize(20, 20))
        self.C_indicator.setText(_fromUtf8(""))
        self.C_indicator.setObjectName(_fromUtf8("C_indicator"))
        self.gridLayout.addWidget(self.C_indicator, 2, 1, 1, 1)
        self.rbutopC = QtGui.QRadioButton(self.layoutWidget)
        self.rbutopC.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
        self.rbutopC.setStyleSheet(
            _fromUtf8("font: 14pt \"Ubuntu Condensed\";"))
        self.rbutopC.setObjectName(_fromUtf8("rbutopC"))
        self.rbutopC.setAutoExclusive(False)
        self.gridLayout.addWidget(self.rbutopC, 2, 2, 1, 1)
        spacerItem5 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                        QtGui.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem5, 2, 3, 1, 1)
        spacerItem6 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                        QtGui.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem6, 3, 0, 1, 1)
        self.rbutopD = QtGui.QRadioButton(self.layoutWidget)
        self.rbutopD.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
        self.rbutopD.setStyleSheet(
            _fromUtf8("font: 14pt \"Ubuntu Condensed\";"))
        self.rbutopD.setObjectName(_fromUtf8("rbutopD"))
        self.rbutopD.setAutoExclusive(False)
        self.gridLayout.addWidget(self.rbutopD, 3, 2, 1, 1)
        spacerItem7 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                        QtGui.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem7, 3, 3, 1, 1)
        self.rbutopA = QtGui.QRadioButton(self.layoutWidget)
        self.rbutopA.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
        self.rbutopA.setStyleSheet(
            _fromUtf8("font: 14pt \"Ubuntu Condensed\";"))
        self.rbutopA.setCheckable(True)
        self.rbutopA.setChecked(False)
        self.rbutopA.setAutoExclusive(False)
        self.rbutopA.setObjectName(_fromUtf8("rbutopA"))
        self.gridLayout.addWidget(self.rbutopA, 0, 2, 1, 1)
        self.lblRemTime = QtGui.QLabel(QuizWindow)
        self.lblRemTime.setGeometry(QtCore.QRect(390, 90, 121, 17))
        self.lblRemTime.setObjectName(_fromUtf8("lblRemTime"))
        self.lcdNumber = QtGui.QLCDNumber(QuizWindow)
        self.lcdNumber.setGeometry(QtCore.QRect(520, 82, 91, 31))
        self.lcdNumber.setAutoFillBackground(False)
        self.lcdNumber.setObjectName(_fromUtf8("lcdNumber"))

        self.btn_next.clicked.connect(self.nextbtnckd)
        self.mainmenu_btn.clicked.connect(self.btnMMClicked)
        self.rbutopA.clicked.connect(self.rdbtnAChecked)
        self.rbutopB.clicked.connect(self.rdbtnBChecked)
        self.rbutopC.clicked.connect(self.rdbtnCChecked)
        self.rbutopD.clicked.connect(self.rdbtnDChecked)

        self.disp()

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

        time = "{0}:{1}".format(self.m, self.s)

        self.lcdNumber.setDigitCount(len(time))
        self.lcdNumber.display(time)

        self.timer = QtCore.QTimer()
        self.timer.timeout.connect(self.Time)
        self.Start()
コード例 #12
0
ファイル: Homepage.py プロジェクト: parth2411/hotel_booking
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(1200, 700)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        
        self.label = QtGui.QLabel(self.centralwidget)
        self.label.setGeometry(QtCore.QRect(0, 0, 1400, 131))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Arial Black"))
        font.setPointSize(16)
        font.setBold(True)
        font.setWeight(75)
        self.label.setFont(font)
        #self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.label.setObjectName(_fromUtf8("label"))
        #self.label.setStyleSheet("background:blue;color:white")
        self.label.setStyleSheet("background-image:url(images.jpg);color:white;text-align:left;padding-left:500px;;")
        self.checkin_cal = QtGui.QCalendarWidget(self.centralwidget)
        self.checkin_cal.setGeometry(QtCore.QRect(420, 210, 264, 155))
        self.checkin_cal.setObjectName(_fromUtf8("checkin_cal"))
        self.checkin_cal.setStyleSheet("background:none;color:black;")
        
        self.city_lineEdit = QtGui.QLineEdit(self.centralwidget)
        self.city_lineEdit.setGeometry(QtCore.QRect(35, 210, 175, 30))
        self.city_lineEdit.setObjectName(_fromUtf8("city_lineEdit"))
        self.city_lineEdit.setStyleSheet("border-radius:4px")
        self.city_lineEdit.setStyleSheet("background:none")

        self.nights_lineEdit = QtGui.QLineEdit(self.centralwidget)
        self.nights_lineEdit.setGeometry(QtCore.QRect(230, 210, 175, 30))
        self.nights_lineEdit.setObjectName(_fromUtf8("nights_lineEdit"))
        self.nights_lineEdit.setStyleSheet("border-radius:4px")
        self.nights_lineEdit.setStyleSheet("background:none")

        self.checkout_cal = QtGui.QCalendarWidget(self.centralwidget)
        self.checkout_cal.setGeometry(QtCore.QRect(700, 210, 264, 155))
        self.checkout_cal.setObjectName(_fromUtf8("checkout_cal"))
        self.checkout_cal.setStyleSheet("background:none") 
        self.rooms_lineEdit = QtGui.QLineEdit(self.centralwidget)
        self.rooms_lineEdit.setGeometry(QtCore.QRect(980, 210, 175, 30))
        self.rooms_lineEdit.setObjectName(_fromUtf8("rooms_lineEdit"))
        self.rooms_lineEdit.setStyleSheet("border-radius:4px")        
        self.rooms_lineEdit.setStyleSheet("background:none")
        self.search_btn = QtGui.QPushButton(self.centralwidget)
        self.search_btn.setGeometry(QtCore.QRect(1190, 210, 101, 30))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Arial"))
        font.setPointSize(12)
        font.setBold(True)
        font.setWeight(75)
        self.search_btn.setFont(font)
        self.search_btn.setStyleSheet("border-radius:3px;background-colr:#4CAF50")
        self.search_btn.setObjectName(_fromUtf8("search_btn"))

        ###############
        self.search_btn.clicked.connect(self.sarchHotels)
        self.label_2 = QtGui.QLabel(self.centralwidget)
        self.label_2.setGeometry(QtCore.QRect(35, 170, 175, 30))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Arial"))
        font.setPointSize(12)
        self.label_2.setFont(font)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.label_2.setStyleSheet("background:none")

        self.label_6 = QtGui.QLabel(self.centralwidget)
        self.label_6.setGeometry(QtCore.QRect(230, 170, 175, 30))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Arial"))
        font.setPointSize(12)
        self.label_6.setFont(font)
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self.label_6.setStyleSheet("background:none")


        self.label_3 = QtGui.QLabel(self.centralwidget)
        self.label_3.setGeometry(QtCore.QRect(420, 170, 175, 30))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Arial"))
        font.setPointSize(12)
        self.label_3.setFont(font)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.label_3.setStyleSheet("background:none")
        self.label_4 = QtGui.QLabel(self.centralwidget)
        self.label_4.setGeometry(QtCore.QRect(700, 170, 175, 30))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Arial"))
        font.setPointSize(12)
        self.label_4.setFont(font)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.label_4.setStyleSheet("background:none")
        self.label_5 = QtGui.QLabel(self.centralwidget)
        self.label_5.setGeometry(QtCore.QRect(980, 170, 175, 30))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Arial"))
        font.setPointSize(12)
        self.label_5.setFont(font)
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.label_5.setStyleSheet("background:none")

        self.tableWidget = QtGui.QTableWidget(self.centralwidget)
        self.tableWidget.setGeometry(QtCore.QRect(400, 380, 600, 250))
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.tableWidget.sizePolicy().hasHeightForWidth())
        self.tableWidget.setSizePolicy(sizePolicy)
        self.tableWidget.setMaximumSize(QtCore.QSize(705, 300))
        self.tableWidget.setBaseSize(QtCore.QSize(1100, 600))
        self.tableWidget.viewport().setProperty("cursor", QtGui.QCursor(QtCore.Qt.PointingHandCursor))
        self.tableWidget.setMouseTracking(True)
        self.tableWidget.setFocusPolicy(QtCore.Qt.ClickFocus)
        self.tableWidget.setContextMenuPolicy(QtCore.Qt.NoContextMenu)
        self.tableWidget.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
        self.tableWidget.setProperty("showDropIndicator", False)
        self.tableWidget.setDragDropOverwriteMode(False)
        self.tableWidget.setAlternatingRowColors(True)
        self.tableWidget.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
        self.tableWidget.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
        self.tableWidget.setRowCount(0)
        self.tableWidget.setColumnCount(6)
        self.tableWidget.setObjectName(_fromUtf8("tableWidget"))
#####################
        
        self.tableWidget.cellClicked.connect(self.cellClick)


        self.bookedlist_btn = QtGui.QPushButton(self.centralwidget)
        self.bookedlist_btn.setGeometry(QtCore.QRect(1190, 135, 101, 30))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Arial"))
        font.setPointSize(12)
        font.setBold(True)
        font.setWeight(75)
        self.bookedlist_btn.setFont(font)
        self.bookedlist_btn.setObjectName(_fromUtf8("bookedlist_btn"))
        self.bookedlist_btn.setStyleSheet("border-radius:3px;background:#4CAF50;color:white")
        self.bookedlist_btn.clicked.connect(self.welcomeWindowShow)
        ###############
        self.search_btn.clicked.connect(self.sarchHotels)
        
        MainWindow.setCentralWidget(self.centralwidget)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        self.book_btn = QtGui.QPushButton(self.centralwidget)
        self.book_btn.setGeometry(QtCore.QRect(620, 635, 100, 30))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Arial"))
        font.setPointSize(12)
        font.setBold(True)
        font.setWeight(75)
        self.book_btn.setFont(font)
        self.book_btn.setObjectName(_fromUtf8("book_btn"))
###############
        self.book_btn.clicked.connect(self.bookRoom)
        self.book_btn.setStyleSheet("color:white;border-radius:3px;background:#4CAF50")
        MainWindow.setCentralWidget(self.centralwidget)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        MainWindow.setStatusBar(self.statusbar)
##### DropDown
        self.rooms_type = QtGui.QComboBox(self.centralwidget)
        self.rooms_type.setGeometry(QtCore.QRect(980, 260, 181, 25))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Arial"))
        font.setPointSize(12)
        self.rooms_type.setFont(font)
        self.rooms_type.setObjectName(_fromUtf8("rooms_type"))
        self.rooms_type.addItem(_fromUtf8(""))
        self.rooms_type.addItem(_fromUtf8(""))
        self.rooms_type.addItem(_fromUtf8(""))


        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
コード例 #13
0
ファイル: owpaintdata.py プロジェクト: neo-nie/orange3
 def setCursor(self, cursor):
     if self._cursor != cursor:
         self._cursor = QtGui.QCursor(cursor)
         self.cursorChanged.emit()
コード例 #14
0
ファイル: owpaintdata.py プロジェクト: neo-nie/orange3
 def cursor(self):
     return QtGui.QCursor(self._cursor)
コード例 #15
0
    def setupUi(self, FavWindow, MainMenuWindow, username):

        self.mw = MainMenuWindow
        self.fw = FavWindow
        self.username = username
        FavWindow.setGeometry(320, 100, 640, 480)
        self.cur.execute("select count(*) from allwords where "+str(self.username)+"=3 or "+str(self.username)+"=1")
        self.rcount = self.cur.fetchone()[0]
        #print self.rcount

        FavWindow.setObjectName(_fromUtf8("FavWindow"))
        FavWindow.resize(640, 463)
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Ubuntu Condensed"))
        font.setPointSize(14)
        FavWindow.setFont(font)
        FavWindow.setStyleSheet(_fromUtf8("background-color: rgb(255, 255, 255);\n"
"color: rgb(0, 0, 0);"))
        
        self.labheader = QtGui.QLabel(FavWindow)
        self.labheader.setGeometry(QtCore.QRect(20, 22, 601, 51))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Ubuntu Condensed"))
        font.setPointSize(14)
        font.setBold(True)
        font.setWeight(75)
        self.labheader.setFont(font)
        self.labheader.setStyleSheet(_fromUtf8("background-color: rgb(59, 89, 152);\n"
"color: rgb(255, 255, 255);"))
        self.labheader.setAlignment(QtCore.Qt.AlignCenter)
        self.labheader.setObjectName(_fromUtf8("labheader"))
        self.tableWidget = QtGui.QTableWidget(FavWindow)
        self.tableWidget.setGeometry(QtCore.QRect(20, 100, 600, 300))
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.tableWidget.sizePolicy().hasHeightForWidth())
        self.tableWidget.setSizePolicy(sizePolicy)

        self.mainmenu_btn = QtGui.QPushButton(FavWindow)
        self.mainmenu_btn.setGeometry(QtCore.QRect(20, 22, 51, 51))
        self.mainmenu_btn.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
        self.mainmenu_btn.setStyleSheet(_fromUtf8("background-color: rgba(255, 255, 255, 0);"))
        self.mainmenu_btn.setText(_fromUtf8(""))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8("menu.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.mainmenu_btn.setIcon(icon)
        self.mainmenu_btn.setIconSize(QtCore.QSize(25, 25))
        self.mainmenu_btn.setFlat(False)
        self.mainmenu_btn.setObjectName(_fromUtf8("mainmenu_btn"))

        self.tableWidget.setMinimumSize(QtCore.QSize(600, 300))
        self.tableWidget.setMaximumSize(QtCore.QSize(600, 300))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Ubuntu Condensed"))
        font.setPointSize(14)
        self.tableWidget.setFont(font)
        self.tableWidget.setFrameShadow(QtGui.QFrame.Plain)
        self.tableWidget.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
        self.tableWidget.setAlternatingRowColors(False)
        self.tableWidget.setShowGrid(True)
        self.tableWidget.setGridStyle(QtCore.Qt.SolidLine)

        self.tableWidget.setRowCount(self.rcount)
        
        self.tableWidget.setColumnCount(2)
        self.tableWidget.setObjectName(_fromUtf8("tableWidget"))
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setItem(0, 0, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setItem(0, 1, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setItem(1, 0, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setItem(1, 1, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setItem(2, 0, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setItem(2, 1, item)
        self.tableWidget.horizontalHeader().setVisible(False)
        self.tableWidget.horizontalHeader().setStretchLastSection(True)
        self.tableWidget.verticalHeader().setVisible(True)

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

        self.mainmenu_btn.clicked.connect(self.btnMMClicked)

        fetch = self.cur.execute("select bwords, bmeanings from allwords where "+str(self.username)+"=3 or "+str(self.username)+"=1 order by bwords asc")
        fetch = list(fetch)

        for i in range(self.rcount):
            self.newitem1 = QtGui.QTableWidgetItem(fetch[i][0])
            self.newitem2 = QtGui.QTableWidgetItem(fetch[i][1])
            self.tableWidget.setItem(i,0,self.newitem1)
            self.tableWidget.setItem(i,1,self.newitem2)
コード例 #16
0
    def setupUi(self, enterinfowindow):
        enterinfowindow.setObjectName(_fromUtf8("enterinfowindow"))
        enterinfowindow.resize(677, 292)
        enterinfowindow.setMinimumSize(QtCore.QSize(677, 292))
        enterinfowindow.setMaximumSize(QtCore.QSize(677, 292))
        enterinfowindow.setStyleSheet(_fromUtf8(""))
        self.f_namelabl = QtGui.QLabel(enterinfowindow)
        self.f_namelabl.setGeometry(QtCore.QRect(260, 10, 120, 30))
        font = QtGui.QFont()
        font.setUnderline(False)
        self.f_namelabl.setFont(font)
        self.f_namelabl.setObjectName(_fromUtf8("f_namelabl"))
        self.l_namelabl = QtGui.QLabel(enterinfowindow)
        self.l_namelabl.setGeometry(QtCore.QRect(260, 50, 120, 30))
        self.l_namelabl.setObjectName(_fromUtf8("l_namelabl"))
        self.idlabl = QtGui.QLabel(enterinfowindow)
        self.idlabl.setGeometry(QtCore.QRect(260, 90, 120, 30))
        self.idlabl.setObjectName(_fromUtf8("idlabl"))
        self.codelabl = QtGui.QLabel(enterinfowindow)
        self.codelabl.setGeometry(QtCore.QRect(260, 130, 120, 30))
        self.codelabl.setObjectName(_fromUtf8("codelabl"))
        self.label_5 = QtGui.QLabel(enterinfowindow)
        self.label_5.setGeometry(QtCore.QRect(260, 170, 120, 30))
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.statuslabl = QtGui.QLabel(enterinfowindow)
        self.statuslabl.setGeometry(QtCore.QRect(260, 210, 120, 30))
        self.statuslabl.setObjectName(_fromUtf8("statuslabl"))
        self.maleradio = QtGui.QRadioButton(enterinfowindow)
        self.maleradio.setGeometry(QtCore.QRect(370, 170, 120, 30))
        self.maleradio.setObjectName(_fromUtf8("maleradio"))
        self.femaleradio = QtGui.QRadioButton(enterinfowindow)
        self.femaleradio.setGeometry(QtCore.QRect(480, 170, 120, 30))
        self.femaleradio.setObjectName(_fromUtf8("femaleradio"))
        self.otherradio = QtGui.QRadioButton(enterinfowindow)
        self.otherradio.setGeometry(QtCore.QRect(580, 170, 120, 30))
        self.otherradio.setObjectName(_fromUtf8("otherradio"))
        self.enterfname = QtGui.QLineEdit(enterinfowindow)
        self.enterfname.setGeometry(QtCore.QRect(370, 10, 281, 20))
        palette = QtGui.QPalette()
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush)
        brush = QtGui.QBrush(QtGui.QColor(191, 200, 185))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush)
        brush = QtGui.QBrush(QtGui.QColor(223, 227, 220))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush)
        brush = QtGui.QBrush(QtGui.QColor(95, 100, 92))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush)
        brush = QtGui.QBrush(QtGui.QColor(127, 133, 123))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Mid, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.BrightText, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(191, 200, 185))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Shadow, brush)
        brush = QtGui.QBrush(QtGui.QColor(140, 180, 177))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.HighlightedText, brush)
        brush = QtGui.QBrush(QtGui.QColor(223, 227, 220))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.AlternateBase, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipBase, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipText, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush)
        brush = QtGui.QBrush(QtGui.QColor(191, 200, 185))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush)
        brush = QtGui.QBrush(QtGui.QColor(223, 227, 220))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush)
        brush = QtGui.QBrush(QtGui.QColor(95, 100, 92))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush)
        brush = QtGui.QBrush(QtGui.QColor(127, 133, 123))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Mid, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.BrightText, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(191, 200, 185))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Shadow, brush)
        brush = QtGui.QBrush(QtGui.QColor(140, 180, 177))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.HighlightedText, brush)
        brush = QtGui.QBrush(QtGui.QColor(223, 227, 220))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.AlternateBase, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipBase, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipText, brush)
        brush = QtGui.QBrush(QtGui.QColor(95, 100, 92))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush)
        brush = QtGui.QBrush(QtGui.QColor(191, 200, 185))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush)
        brush = QtGui.QBrush(QtGui.QColor(223, 227, 220))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush)
        brush = QtGui.QBrush(QtGui.QColor(95, 100, 92))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush)
        brush = QtGui.QBrush(QtGui.QColor(127, 133, 123))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush)
        brush = QtGui.QBrush(QtGui.QColor(95, 100, 92))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.BrightText, brush)
        brush = QtGui.QBrush(QtGui.QColor(95, 100, 92))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush)
        brush = QtGui.QBrush(QtGui.QColor(191, 200, 185))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(191, 200, 185))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Shadow, brush)
        brush = QtGui.QBrush(QtGui.QColor(140, 180, 177))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.HighlightedText, brush)
        brush = QtGui.QBrush(QtGui.QColor(191, 200, 185))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.AlternateBase, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipBase, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipText, brush)
        self.enterfname.setPalette(palette)
        self.enterfname.setObjectName(_fromUtf8("enterfname"))
        self.enterlnam = QtGui.QLineEdit(enterinfowindow)
        self.enterlnam.setGeometry(QtCore.QRect(370, 50, 281, 20))
        self.enterlnam.setObjectName(_fromUtf8("enterlnam"))
        self.enterid = QtGui.QLineEdit(enterinfowindow)
        self.enterid.setGeometry(QtCore.QRect(370, 90, 281, 20))
        self.enterid.setObjectName(_fromUtf8("enterid"))
        self.entercode = QtGui.QLineEdit(enterinfowindow)
        self.entercode.setGeometry(QtCore.QRect(370, 130, 281, 20))
        self.entercode.setObjectName(_fromUtf8("entercode"))
        self.enterstatus = QtGui.QLineEdit(enterinfowindow)
        self.enterstatus.setGeometry(QtCore.QRect(370, 210, 281, 20))
        self.enterstatus.setObjectName(_fromUtf8("enterstatus"))
        self.okbutton = QtGui.QPushButton(enterinfowindow)
        self.okbutton.setGeometry(QtCore.QRect(420, 255, 100, 25))
        self.okbutton.setBaseSize(QtCore.QSize(0, 0))
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.okbutton.setFont(font)
        self.okbutton.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
        self.okbutton.setFocusPolicy(QtCore.Qt.NoFocus)
        self.okbutton.setContextMenuPolicy(QtCore.Qt.NoContextMenu)
        self.okbutton.setStyleSheet(_fromUtf8("background-color: rgb(113, 184, 185);"))
        self.okbutton.setObjectName(_fromUtf8("okbutton"))
        self.cancelbutton = QtGui.QPushButton(enterinfowindow)
        self.cancelbutton.setGeometry(QtCore.QRect(550, 255, 100, 25))
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.cancelbutton.setFont(font)
        self.cancelbutton.setStyleSheet(_fromUtf8("background-color: rgb(113, 184, 185);"))
        self.cancelbutton.setObjectName(_fromUtf8("cancelbutton"))
        self.line = QtGui.QFrame(enterinfowindow)
        self.line.setGeometry(QtCore.QRect(240, 5, 20, 280))
        self.line.setFrameShape(QtGui.QFrame.VLine)
        self.line.setFrameShadow(QtGui.QFrame.Sunken)
        self.line.setObjectName(_fromUtf8("line"))
        self.line_2 = QtGui.QFrame(enterinfowindow)
        self.line_2.setGeometry(QtCore.QRect(660, 5, 10, 280))
        self.line_2.setFrameShape(QtGui.QFrame.VLine)
        self.line_2.setFrameShadow(QtGui.QFrame.Sunken)
        self.line_2.setObjectName(_fromUtf8("line_2"))
        self.line_3 = QtGui.QFrame(enterinfowindow)
        self.line_3.setGeometry(QtCore.QRect(250, 230, 411, 20))
        self.line_3.setFrameShape(QtGui.QFrame.HLine)
        self.line_3.setFrameShadow(QtGui.QFrame.Sunken)
        self.line_3.setObjectName(_fromUtf8("line_3"))
        self.nofname = QtGui.QLabel(enterinfowindow)
        self.nofname.setGeometry(QtCore.QRect(540, 10, 100, 20))
        self.nofname.setText(_fromUtf8(""))
        self.nofname.setObjectName(_fromUtf8("nofname"))
        self.nolname = QtGui.QLabel(enterinfowindow)
        self.nolname.setGeometry(QtCore.QRect(540, 50, 100, 20))
        self.nolname.setText(_fromUtf8(""))
        self.nolname.setObjectName(_fromUtf8("nolname"))
        self.noid = QtGui.QLabel(enterinfowindow)
        self.noid.setGeometry(QtCore.QRect(540, 90, 100, 20))
        self.noid.setText(_fromUtf8(""))
        self.noid.setObjectName(_fromUtf8("noid"))
        self.nocode = QtGui.QLabel(enterinfowindow)
        self.nocode.setGeometry(QtCore.QRect(540, 130, 100, 20))
        self.nocode.setText(_fromUtf8(""))
        self.nocode.setObjectName(_fromUtf8("nocode"))
        self.nostatus = QtGui.QLabel(enterinfowindow)
        self.nostatus.setGeometry(QtCore.QRect(540, 210, 100, 20))
        self.nostatus.setText(_fromUtf8(""))
        self.nostatus.setObjectName(_fromUtf8("nostatus"))
        self.imagedisplay = QtGui.QLabel(enterinfowindow)
        self.imagedisplay.setGeometry(QtCore.QRect(20, 22, 211, 211))
        self.imagedisplay.setText(_fromUtf8(""))
        self.imagedisplay.setObjectName(_fromUtf8("imagedisplay"))

        self.retranslateUi(enterinfowindow)
        QtCore.QMetaObject.connectSlotsByName(enterinfowindow)
コード例 #17
0
 def callWithWaitCursor(self, widget, func, *params, **kwparams):
     self.setOverrideCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
     try:
         return func(*params, **kwparams)
     finally:
         self.restoreOverrideCursor()
コード例 #18
0
 def mousePressEvent(self, QMouseEvent):
     cursor = QtGui.QCursor()
コード例 #19
0
    def setupUi(self, mainWindow):
        mainWindow.setObjectName(_fromUtf8("mainWindow"))
        mainWindow.resize(1280, 751)
        mainWindow.setWindowOpacity(1.0)
        self.centralwidget = QtGui.QWidget(mainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.gridLayout = QtGui.QGridLayout(self.centralwidget)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.results = QtGui.QTableWidget(self.centralwidget)
        self.results.setMaximumSize(QtCore.QSize(1256, 16777215))
        self.results.viewport().setProperty("cursor", QtGui.QCursor(QtCore.Qt.ArrowCursor))
        self.results.setObjectName(_fromUtf8("results"))
        self.results.setColumnCount(6)
        self.results.setRowCount(0)
        item = QtGui.QTableWidgetItem()
        self.results.setHorizontalHeaderItem(0, item)
        item = QtGui.QTableWidgetItem()
        self.results.setHorizontalHeaderItem(1, item)
        item = QtGui.QTableWidgetItem()
        self.results.setHorizontalHeaderItem(2, item)
        item = QtGui.QTableWidgetItem()
        self.results.setHorizontalHeaderItem(3, item)
        item = QtGui.QTableWidgetItem()
        self.results.setHorizontalHeaderItem(4, item)
        item = QtGui.QTableWidgetItem()
        self.results.setHorizontalHeaderItem(5, item)
        self.results.horizontalHeader().setDefaultSectionSize(100)
        self.results.horizontalHeader().setSortIndicatorShown(True)
        self.results.verticalHeader().setMinimumSectionSize(15)
        self.results.verticalHeader().setSortIndicatorShown(False)
        self.gridLayout.addWidget(self.results, 1, 0, 1, 1)
        self.horizontalLayout_3 = QtGui.QHBoxLayout()
        self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
        self.label_3 = QtGui.QLabel(self.centralwidget)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.horizontalLayout_3.addWidget(self.label_3)
        self.overall_progress = QtGui.QProgressBar(self.centralwidget)
        self.overall_progress.setProperty("value", 0)
        self.overall_progress.setObjectName(_fromUtf8("overall_progress"))
        self.horizontalLayout_3.addWidget(self.overall_progress)
        self.gridLayout.addLayout(self.horizontalLayout_3, 9, 0, 1, 1)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.search_options = QtGui.QComboBox(self.centralwidget)
        self.search_options.setObjectName(_fromUtf8("search_options"))
        self.search_options.addItem(_fromUtf8(""))
        self.search_options.addItem(_fromUtf8(""))
        self.search_options.addItem(_fromUtf8(""))
        self.search_options.addItem(_fromUtf8(""))
        self.search_options.addItem(_fromUtf8(""))
        self.horizontalLayout.addWidget(self.search_options)
        self.search_bar = QtGui.QLineEdit(self.centralwidget)
        self.search_bar.setObjectName(_fromUtf8("search_bar"))
        self.horizontalLayout.addWidget(self.search_bar)
        self.search_button = QtGui.QPushButton(self.centralwidget)
        self.search_button.setObjectName(_fromUtf8("search_button"))
        self.horizontalLayout.addWidget(self.search_button)
        self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 1)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.label_2 = QtGui.QLabel(self.centralwidget)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.horizontalLayout_2.addWidget(self.label_2)
        self.track_progress = QtGui.QProgressBar(self.centralwidget)
        self.track_progress.setProperty("value", 0)
        self.track_progress.setObjectName(_fromUtf8("track_progress"))
        self.horizontalLayout_2.addWidget(self.track_progress)
        self.gridLayout.addLayout(self.horizontalLayout_2, 7, 0, 1, 1)
        self.download_all_songs_button = QtGui.QPushButton(self.centralwidget)
        self.download_all_songs_button.setObjectName(_fromUtf8("download_all_songs_button"))
        self.gridLayout.addWidget(self.download_all_songs_button, 2, 0, 1, 1)
        self.groupBox = QtGui.QGroupBox(self.centralwidget)
        self.groupBox.setObjectName(_fromUtf8("groupBox"))
        self.gridLayout.addWidget(self.groupBox, 3, 0, 1, 1)
        self.current_download = QtGui.QLabel(self.centralwidget)
        self.current_download.setObjectName(_fromUtf8("current_download"))
        self.gridLayout.addWidget(self.current_download, 4, 0, 2, 1)
        mainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(mainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1280, 22))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        self.menuSpotify_Ripper = QtGui.QMenu(self.menubar)
        self.menuSpotify_Ripper.setObjectName(_fromUtf8("menuSpotify_Ripper"))
        mainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(mainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        mainWindow.setStatusBar(self.statusbar)
        self.actionSpotify_Login_Details = QtGui.QAction(mainWindow)
        self.actionSpotify_Login_Details.setObjectName(_fromUtf8("actionSpotify_Login_Details"))
        self.actionDownload_Preferences = QtGui.QAction(mainWindow)
        self.actionDownload_Preferences.setObjectName(_fromUtf8("actionDownload_Preferences"))
        self.menuSpotify_Ripper.addAction(self.actionSpotify_Login_Details)
        self.menuSpotify_Ripper.addAction(self.actionDownload_Preferences)
        self.menubar.addAction(self.menuSpotify_Ripper.menuAction())

        self.retranslateUi(mainWindow)
        QtCore.QMetaObject.connectSlotsByName(mainWindow)
コード例 #20
0
 def mouseReleaseEvent(self, QMouseEvent):
     cursor = QtGui.QCursor()
コード例 #21
0
    def setupUi(self, PinWindow):
        PinWindow.setObjectName(_fromUtf8("PinWindow"))
        PinWindow.setEnabled(True)
        PinWindow.resize(790, 619)
        palette = QtGui.QPalette()
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 85, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Mid, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(198, 19, 60))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 85, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Mid, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(198, 19, 60))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
        brush = QtGui.QBrush(QtGui.QColor(159, 158, 158))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 85, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush)
        brush = QtGui.QBrush(QtGui.QColor(198, 19, 60))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(198, 19, 60))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
        PinWindow.setPalette(palette)
        PinWindow.setCursor(QtGui.QCursor(QtCore.Qt.ClosedHandCursor))
        PinWindow.setLayoutDirection(QtCore.Qt.LeftToRight)
        PinWindow.setAutoFillBackground(True)
        PinWindow.setIconSize(QtCore.QSize(35, 35))
        PinWindow.setDocumentMode(False)
        self.centralwidget = QtGui.QWidget(PinWindow)
        self.centralwidget.setCursor(QtGui.QCursor(QtCore.Qt.OpenHandCursor))
        self.centralwidget.setAutoFillBackground(True)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.push1 = QtGui.QPushButton(self.centralwidget)
        self.push1.setGeometry(QtCore.QRect(202, 240, 61, 51))
        font = QtGui.QFont()
        font.setPointSize(17)
        self.push1.setFont(font)
        self.push1.setObjectName(_fromUtf8("push1"))
        self.push2 = QtGui.QPushButton(self.centralwidget)
        self.push2.setGeometry(QtCore.QRect(320, 240, 61, 51))
        font = QtGui.QFont()
        font.setPointSize(17)
        self.push2.setFont(font)
        self.push2.setObjectName(_fromUtf8("push2"))
        self.push3 = QtGui.QPushButton(self.centralwidget)
        self.push3.setGeometry(QtCore.QRect(430, 240, 61, 51))
        font = QtGui.QFont()
        font.setPointSize(17)
        self.push3.setFont(font)
        self.push3.setObjectName(_fromUtf8("push3"))
        self.push4 = QtGui.QPushButton(self.centralwidget)
        self.push4.setGeometry(QtCore.QRect(202, 310, 61, 51))
        font = QtGui.QFont()
        font.setPointSize(17)
        self.push4.setFont(font)
        self.push4.setObjectName(_fromUtf8("push4"))
        self.push5 = QtGui.QPushButton(self.centralwidget)
        self.push5.setGeometry(QtCore.QRect(320, 310, 61, 51))
        font = QtGui.QFont()
        font.setPointSize(17)
        self.push5.setFont(font)
        self.push5.setObjectName(_fromUtf8("push5"))
        self.push6 = QtGui.QPushButton(self.centralwidget)
        self.push6.setGeometry(QtCore.QRect(430, 310, 61, 51))
        font = QtGui.QFont()
        font.setPointSize(17)
        self.push6.setFont(font)
        self.push6.setObjectName(_fromUtf8("push6"))
        self.push7 = QtGui.QPushButton(self.centralwidget)
        self.push7.setGeometry(QtCore.QRect(200, 380, 61, 51))
        font = QtGui.QFont()
        font.setPointSize(17)
        self.push7.setFont(font)
        self.push7.setObjectName(_fromUtf8("push7"))
        self.push8 = QtGui.QPushButton(self.centralwidget)
        self.push8.setGeometry(QtCore.QRect(320, 380, 61, 51))
        font = QtGui.QFont()
        font.setPointSize(17)
        self.push8.setFont(font)
        self.push8.setObjectName(_fromUtf8("push8"))
        self.push9 = QtGui.QPushButton(self.centralwidget)
        self.push9.setGeometry(QtCore.QRect(430, 380, 61, 51))
        font = QtGui.QFont()
        font.setPointSize(17)
        self.push9.setFont(font)
        self.push9.setObjectName(_fromUtf8("push9"))
        self.push0 = QtGui.QPushButton(self.centralwidget)
        self.push0.setGeometry(QtCore.QRect(320, 450, 61, 51))
        font = QtGui.QFont()
        font.setPointSize(17)
        self.push0.setFont(font)
        self.push0.setObjectName(_fromUtf8("push0"))
        self.pushclear = QtGui.QPushButton(self.centralwidget)
        self.pushclear.setGeometry(QtCore.QRect(540, 270, 111, 81))
        self.pushclear.setText(_fromUtf8(""))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8("../image/larow.jpg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushclear.setIcon(icon)
        self.pushclear.setIconSize(QtCore.QSize(150, 90))
        self.pushclear.setObjectName(_fromUtf8("pushclear"))
        self.pushcancel = QtGui.QPushButton(self.centralwidget)
        self.pushcancel.setGeometry(QtCore.QRect(540, 370, 111, 71))
        palette = QtGui.QPalette()
        brush = QtGui.QBrush(QtGui.QColor(90, 90, 90))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush)
        brush = QtGui.QBrush(QtGui.QColor(111, 111, 111))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Mid, brush)
        brush = QtGui.QBrush(QtGui.QColor(163, 163, 163))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Highlight, brush)
        brush = QtGui.QBrush(QtGui.QColor(90, 90, 90))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush)
        brush = QtGui.QBrush(QtGui.QColor(111, 111, 111))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Mid, brush)
        brush = QtGui.QBrush(QtGui.QColor(163, 163, 163))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Highlight, brush)
        brush = QtGui.QBrush(QtGui.QColor(90, 90, 90))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush)
        brush = QtGui.QBrush(QtGui.QColor(111, 111, 111))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush)
        brush = QtGui.QBrush(QtGui.QColor(240, 240, 240))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Highlight, brush)
        self.pushcancel.setPalette(palette)
        self.pushcancel.setText(_fromUtf8(""))
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(_fromUtf8("../image/cancl.jpg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushcancel.setIcon(icon1)
        self.pushcancel.setIconSize(QtCore.QSize(150, 80))
        self.pushcancel.setObjectName(_fromUtf8("pushcancel"))
        self.pushaccs = QtGui.QPushButton(self.centralwidget)
        self.pushaccs.setGeometry(QtCore.QRect(540, 160, 111, 81))
        self.pushaccs.setText(_fromUtf8(""))
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(_fromUtf8("../image/rarorw.jpg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushaccs.setIcon(icon2)
        self.pushaccs.setIconSize(QtCore.QSize(150, 90))
        self.pushaccs.setObjectName(_fromUtf8("pushaccs"))
        self.label = QtGui.QLabel(self.centralwidget)
        self.label.setGeometry(QtCore.QRect(90, 40, 581, 91))
        palette = QtGui.QPalette()
        brush = QtGui.QBrush(QtGui.QColor(255, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(170, 170, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Link, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(170, 170, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Link, brush)
        brush = QtGui.QBrush(QtGui.QColor(159, 158, 158))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush)
        brush = QtGui.QBrush(QtGui.QColor(159, 158, 158))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush)
        brush = QtGui.QBrush(QtGui.QColor(170, 170, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(170, 170, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Link, brush)
        self.label.setPalette(palette)
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Latin Modern Roman Demi"))
        font.setPointSize(36)
        font.setBold(True)
        font.setWeight(75)
        self.label.setFont(font)
        self.label.setAutoFillBackground(False)
        self.label.setObjectName(_fromUtf8("label"))
        self.textEdit = QtGui.QTextEdit(self.centralwidget)
        self.textEdit.setGeometry(QtCore.QRect(200, 170, 281, 51))
        font = QtGui.QFont()
        font.setPointSize(26)
        font.setBold(True)
        font.setItalic(True)
        font.setWeight(75)
        self.textEdit.setFont(font)
        self.textEdit.setObjectName(_fromUtf8("textEdit"))
        self.label_2 = QtGui.QLabel(self.centralwidget)
        self.label_2.setGeometry(QtCore.QRect(660, 180, 68, 41))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("TeX Gyre Termes Math"))
        self.label_2.setFont(font)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.label_3 = QtGui.QLabel(self.centralwidget)
        self.label_3.setGeometry(QtCore.QRect(660, 290, 81, 41))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("TeX Gyre Termes Math"))
        self.label_3.setFont(font)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.label_4 = QtGui.QLabel(self.centralwidget)
        self.label_4.setGeometry(QtCore.QRect(660, 380, 121, 41))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Tibetan Machine Uni"))
        self.label_4.setFont(font)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.label_5 = QtGui.QLabel(self.centralwidget)
        self.label_5.setGeometry(QtCore.QRect(50, 10, 511, 41))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("TeX Gyre Termes Math"))
        self.label_5.setFont(font)
        self.label_5.setObjectName(_fromUtf8("label_5"))
        PinWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(PinWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 790, 25))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        PinWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(PinWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        PinWindow.setStatusBar(self.statusbar)

        self.retranslateUi(PinWindow)
        QtCore.QMetaObject.connectSlotsByName(PinWindow)
コード例 #22
0
    def setupUi(self, ElectionDetailsDialog):
        ElectionDetailsDialog.setObjectName(_fromUtf8("ElectionDetailsDialog"))
        ElectionDetailsDialog.resize(462, 534)
        self.gridLayout = QtGui.QGridLayout(ElectionDetailsDialog)
        self.gridLayout.setHorizontalSpacing(16)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.label_14 = QtGui.QLabel(ElectionDetailsDialog)
        self.label_14.setObjectName(_fromUtf8("label_14"))
        self.gridLayout.addWidget(self.label_14, 2, 0, 1, 1)
        self.labelAmountVotes = QtGui.QLabel(ElectionDetailsDialog)
        self.labelAmountVotes.setObjectName(_fromUtf8("labelAmountVotes"))
        self.gridLayout.addWidget(self.labelAmountVotes, 12, 1, 1, 1)
        self.labelHash = QtGui.QLabel(ElectionDetailsDialog)
        self.labelHash.setCursor(QtGui.QCursor(QtCore.Qt.IBeamCursor))
        self.labelHash.setTextInteractionFlags(
            QtCore.Qt.LinksAccessibleByMouse
            | QtCore.Qt.TextSelectableByKeyboard
            | QtCore.Qt.TextSelectableByMouse)
        self.labelHash.setObjectName(_fromUtf8("labelHash"))
        self.gridLayout.addWidget(self.labelHash, 2, 1, 1, 3)
        self.labelAmountVotesTooLate = QtGui.QLabel(ElectionDetailsDialog)
        self.labelAmountVotesTooLate.setObjectName(
            _fromUtf8("labelAmountVotesTooLate"))
        self.gridLayout.addWidget(self.labelAmountVotesTooLate, 12, 3, 1, 1)
        self.label_17 = QtGui.QLabel(ElectionDetailsDialog)
        self.label_17.setObjectName(_fromUtf8("label_17"))
        self.gridLayout.addWidget(self.label_17, 16, 0, 1, 1)
        self.label_4 = QtGui.QLabel(ElectionDetailsDialog)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_4.setFont(font)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.gridLayout.addWidget(self.label_4, 0, 2, 1, 1)
        self.label_12 = QtGui.QLabel(ElectionDetailsDialog)
        self.label_12.setObjectName(_fromUtf8("label_12"))
        self.gridLayout.addWidget(self.label_12, 14, 0, 1, 1)
        self.labelAmountCommitments = QtGui.QLabel(ElectionDetailsDialog)
        self.labelAmountCommitments.setObjectName(
            _fromUtf8("labelAmountCommitments"))
        self.gridLayout.addWidget(self.labelAmountCommitments, 14, 1, 1, 1)
        self.label_19 = QtGui.QLabel(ElectionDetailsDialog)
        self.label_19.setWordWrap(True)
        self.label_19.setObjectName(_fromUtf8("label_19"))
        self.gridLayout.addWidget(self.label_19, 22, 0, 1, 4)
        self.listWidgetAddresses = QtGui.QListWidget(ElectionDetailsDialog)
        self.listWidgetAddresses.setObjectName(
            _fromUtf8("listWidgetAddresses"))
        self.gridLayout.addWidget(self.listWidgetAddresses, 21, 0, 1, 4)
        self.label_3 = QtGui.QLabel(ElectionDetailsDialog)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.gridLayout.addWidget(self.label_3, 9, 0, 1, 1)
        self.label_5 = QtGui.QLabel(ElectionDetailsDialog)
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.gridLayout.addWidget(self.label_5, 10, 0, 1, 1)
        self.label_7 = QtGui.QLabel(ElectionDetailsDialog)
        self.label_7.setObjectName(_fromUtf8("label_7"))
        self.gridLayout.addWidget(self.label_7, 5, 0, 1, 1)
        self.label_15 = QtGui.QLabel(ElectionDetailsDialog)
        self.label_15.setObjectName(_fromUtf8("label_15"))
        self.gridLayout.addWidget(self.label_15, 12, 2, 1, 1)
        self.label_8 = QtGui.QLabel(ElectionDetailsDialog)
        self.label_8.setObjectName(_fromUtf8("label_8"))
        self.gridLayout.addWidget(self.label_8, 6, 0, 1, 1)
        self.labelChanAddress = QtGui.QLabel(ElectionDetailsDialog)
        self.labelChanAddress.setCursor(QtGui.QCursor(QtCore.Qt.IBeamCursor))
        self.labelChanAddress.setTextInteractionFlags(
            QtCore.Qt.LinksAccessibleByMouse
            | QtCore.Qt.TextSelectableByKeyboard
            | QtCore.Qt.TextSelectableByMouse)
        self.labelChanAddress.setObjectName(_fromUtf8("labelChanAddress"))
        self.gridLayout.addWidget(self.labelChanAddress, 3, 1, 1, 3)
        self.labelAmountPublicKeys = QtGui.QLabel(ElectionDetailsDialog)
        self.labelAmountPublicKeys.setObjectName(
            _fromUtf8("labelAmountPublicKeys"))
        self.gridLayout.addWidget(self.labelAmountPublicKeys, 10, 1, 1, 1)
        self.label_6 = QtGui.QLabel(ElectionDetailsDialog)
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self.gridLayout.addWidget(self.label_6, 3, 0, 1, 1)
        self.label_9 = QtGui.QLabel(ElectionDetailsDialog)
        self.label_9.setObjectName(_fromUtf8("label_9"))
        self.gridLayout.addWidget(self.label_9, 12, 0, 1, 1)
        self.labelBlockchain = QtGui.QLabel(ElectionDetailsDialog)
        self.labelBlockchain.setObjectName(_fromUtf8("labelBlockchain"))
        self.gridLayout.addWidget(self.labelBlockchain, 9, 3, 1, 1)
        self.labelStartTime = QtGui.QLabel(ElectionDetailsDialog)
        self.labelStartTime.setObjectName(_fromUtf8("labelStartTime"))
        self.gridLayout.addWidget(self.labelStartTime, 5, 1, 1, 1)
        self.labelQuestion = QtGui.QLabel(ElectionDetailsDialog)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.labelQuestion.setFont(font)
        self.labelQuestion.setObjectName(_fromUtf8("labelQuestion"))
        self.gridLayout.addWidget(self.labelQuestion, 0, 1, 1, 1)
        self.label_2 = QtGui.QLabel(ElectionDetailsDialog)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.gridLayout.addWidget(self.label_2, 20, 0, 1, 4)
        self.label_16 = QtGui.QLabel(ElectionDetailsDialog)
        self.label_16.setObjectName(_fromUtf8("label_16"))
        self.gridLayout.addWidget(self.label_16, 7, 0, 1, 1)
        self.buttonBox = QtGui.QDialogButtonBox(ElectionDetailsDialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Close)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.gridLayout.addWidget(self.buttonBox, 23, 0, 1, 4)
        self.labelDeadline = QtGui.QLabel(ElectionDetailsDialog)
        self.labelDeadline.setObjectName(_fromUtf8("labelDeadline"))
        self.gridLayout.addWidget(self.labelDeadline, 6, 1, 1, 1)
        self.labelAmountAddresses = QtGui.QLabel(ElectionDetailsDialog)
        self.labelAmountAddresses.setObjectName(
            _fromUtf8("labelAmountAddresses"))
        self.gridLayout.addWidget(self.labelAmountAddresses, 9, 1, 1, 1)
        self.labelCommitmentPhaseDeadline = QtGui.QLabel(ElectionDetailsDialog)
        self.labelCommitmentPhaseDeadline.setObjectName(
            _fromUtf8("labelCommitmentPhaseDeadline"))
        self.gridLayout.addWidget(self.labelCommitmentPhaseDeadline, 7, 1, 1,
                                  1)
        self.label_10 = QtGui.QLabel(ElectionDetailsDialog)
        self.label_10.setObjectName(_fromUtf8("label_10"))
        self.gridLayout.addWidget(self.label_10, 9, 2, 1, 1)
        self.label = QtGui.QLabel(ElectionDetailsDialog)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label.setFont(font)
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.labelStatus = QtGui.QLabel(ElectionDetailsDialog)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.labelStatus.setFont(font)
        self.labelStatus.setObjectName(_fromUtf8("labelStatus"))
        self.gridLayout.addWidget(self.labelStatus, 0, 3, 1, 1)
        self.labelAmountMissingValidVotes = QtGui.QLabel(ElectionDetailsDialog)
        self.labelAmountMissingValidVotes.setObjectName(
            _fromUtf8("labelAmountMissingValidVotes"))
        self.gridLayout.addWidget(self.labelAmountMissingValidVotes, 14, 3, 1,
                                  1)
        self.label_18 = QtGui.QLabel(ElectionDetailsDialog)
        self.label_18.setObjectName(_fromUtf8("label_18"))
        self.gridLayout.addWidget(self.label_18, 14, 2, 1, 1)
        self.labelAmountResults = QtGui.QLabel(ElectionDetailsDialog)
        self.labelAmountResults.setObjectName(_fromUtf8("labelAmountResults"))
        self.gridLayout.addWidget(self.labelAmountResults, 16, 1, 1, 1)
        self.frame_6 = QtGui.QFrame(ElectionDetailsDialog)
        self.frame_6.setFrameShape(QtGui.QFrame.HLine)
        self.frame_6.setFrameShadow(QtGui.QFrame.Raised)
        self.frame_6.setObjectName(_fromUtf8("frame_6"))
        self.gridLayout.addWidget(self.frame_6, 13, 0, 1, 4)
        self.frame_3 = QtGui.QFrame(ElectionDetailsDialog)
        self.frame_3.setFrameShape(QtGui.QFrame.HLine)
        self.frame_3.setFrameShadow(QtGui.QFrame.Raised)
        self.frame_3.setObjectName(_fromUtf8("frame_3"))
        self.gridLayout.addWidget(self.frame_3, 11, 0, 1, 4)
        self.frame_5 = QtGui.QFrame(ElectionDetailsDialog)
        self.frame_5.setFrameShape(QtGui.QFrame.HLine)
        self.frame_5.setFrameShadow(QtGui.QFrame.Raised)
        self.frame_5.setObjectName(_fromUtf8("frame_5"))
        self.gridLayout.addWidget(self.frame_5, 8, 0, 1, 4)
        self.frame_4 = QtGui.QFrame(ElectionDetailsDialog)
        self.frame_4.setFrameShape(QtGui.QFrame.HLine)
        self.frame_4.setFrameShadow(QtGui.QFrame.Raised)
        self.frame_4.setObjectName(_fromUtf8("frame_4"))
        self.gridLayout.addWidget(self.frame_4, 4, 0, 1, 4)
        self.frame_2 = QtGui.QFrame(ElectionDetailsDialog)
        self.frame_2.setFrameShape(QtGui.QFrame.HLine)
        self.frame_2.setFrameShadow(QtGui.QFrame.Raised)
        self.frame_2.setObjectName(_fromUtf8("frame_2"))
        self.gridLayout.addWidget(self.frame_2, 19, 0, 1, 4)
        self.frame = QtGui.QFrame(ElectionDetailsDialog)
        self.frame.setFrameShape(QtGui.QFrame.HLine)
        self.frame.setFrameShadow(QtGui.QFrame.Raised)
        self.frame.setObjectName(_fromUtf8("frame"))
        self.gridLayout.addWidget(self.frame, 1, 0, 1, 4)
        self.label_13 = QtGui.QLabel(ElectionDetailsDialog)
        self.label_13.setObjectName(_fromUtf8("label_13"))
        self.gridLayout.addWidget(self.label_13, 15, 0, 1, 1)
        self.label_11 = QtGui.QLabel(ElectionDetailsDialog)
        self.label_11.setObjectName(_fromUtf8("label_11"))
        self.gridLayout.addWidget(self.label_11, 15, 2, 1, 1)
        self.labelAmountVotesValidatedFromCommitments = QtGui.QLabel(
            ElectionDetailsDialog)
        self.labelAmountVotesValidatedFromCommitments.setObjectName(
            _fromUtf8("labelAmountVotesValidatedFromCommitments"))
        self.gridLayout.addWidget(
            self.labelAmountVotesValidatedFromCommitments, 15, 3, 1, 1)
        self.labelAmountInvalidCommitments = QtGui.QLabel(
            ElectionDetailsDialog)
        self.labelAmountInvalidCommitments.setObjectName(
            _fromUtf8("labelAmountInvalidCommitments"))
        self.gridLayout.addWidget(self.labelAmountInvalidCommitments, 15, 1, 1,
                                  1)

        self.retranslateUi(ElectionDetailsDialog)
        QtCore.QObject.connect(self.buttonBox,
                               QtCore.SIGNAL(_fromUtf8("accepted()")),
                               ElectionDetailsDialog.accept)
        QtCore.QObject.connect(self.buttonBox,
                               QtCore.SIGNAL(_fromUtf8("rejected()")),
                               ElectionDetailsDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(ElectionDetailsDialog)
コード例 #23
0
def spinning_cursor():
    QtGui.QApplication.setOverrideCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
    yield
    QtGui.QApplication.restoreOverrideCursor()
コード例 #24
0
 def start_measure(self):
     QtGui.QApplication.setOverrideCursor(QtGui.QCursor(QtCore.Qt.SizeAllCursor))
     self.measure_state = True
     self.graphics_measure_line_item.set_start_coord(self.mouse_position)
     self.graphics_measure_line_item.show()
     self.graphics_view.graphics_scene.update()
コード例 #25
0
ファイル: MainWindow.py プロジェクト: dtyu/xrayanalysisgui
    def setupUi(self, Dialog):
        Dialog.setObjectName(_fromUtf8("Dialog"))
        Dialog.resize(1339, 612)
        Dialog.setLayoutDirection(QtCore.Qt.LeftToRight)
        # IMPORTANT: show max, min, close button on the dialog
        Dialog.setWindowFlags(QtCore.Qt.Window)

        self.ModifyElement = QtGui.QPushButton(Dialog)
        self.ModifyElement.setGeometry(QtCore.QRect(230, 320, 110, 23))
        self.ModifyElement.setObjectName(_fromUtf8("ModifyElement"))
        self.TopLeftX = QtGui.QLineEdit(Dialog)
        self.TopLeftX.setGeometry(QtCore.QRect(70, 300, 41, 20))
        self.TopLeftX.setObjectName(_fromUtf8("TopLeftX"))
        self.TopLeftY = QtGui.QLineEdit(Dialog)
        self.TopLeftY.setGeometry(QtCore.QRect(160, 300, 41, 20))
        self.TopLeftY.setObjectName(_fromUtf8("TopLeftY"))
        self.label_3 = QtGui.QLabel(Dialog)
        self.label_3.setGeometry(QtCore.QRect(53, 270, 171, 21))
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.label_4 = QtGui.QLabel(Dialog)
        self.label_4.setGeometry(QtCore.QRect(50, 350, 171, 21))
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.label_5 = QtGui.QLabel(Dialog)
        self.label_5.setGeometry(QtCore.QRect(50, 30, 201, 21))
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.label_6 = QtGui.QLabel(Dialog)
        self.label_6.setGeometry(QtCore.QRect(50, 50, 21, 21))
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self.label_7 = QtGui.QLabel(Dialog)
        self.label_7.setGeometry(QtCore.QRect(130, 50, 21, 21))
        self.label_7.setObjectName(_fromUtf8("label_7"))
        self.label_8 = QtGui.QLabel(Dialog)
        self.label_8.setGeometry(QtCore.QRect(210, 50, 21, 21))
        self.label_8.setObjectName(_fromUtf8("label_8"))
        self.MotorPositionX = QtGui.QLineEdit(Dialog)
        self.MotorPositionX.setEnabled(False)
        self.MotorPositionX.setGeometry(QtCore.QRect(70, 50, 50, 20))
        self.MotorPositionX.setCursor(QtGui.QCursor(QtCore.Qt.ForbiddenCursor))
        self.MotorPositionX.setObjectName(_fromUtf8("MotorPositionX"))
        self.MotorPositionY = QtGui.QLineEdit(Dialog)
        self.MotorPositionY.setEnabled(False)
        self.MotorPositionY.setGeometry(QtCore.QRect(150, 50, 50, 21))
        self.MotorPositionY.setCursor(QtGui.QCursor(QtCore.Qt.ForbiddenCursor))
        self.MotorPositionY.setObjectName(_fromUtf8("MotorPositionY"))
        self.MotorPositionZ = QtGui.QLineEdit(Dialog)
        self.MotorPositionZ.setEnabled(False)
        self.MotorPositionZ.setGeometry(QtCore.QRect(230, 50, 50, 21))
        self.MotorPositionZ.setCursor(QtGui.QCursor(QtCore.Qt.ForbiddenCursor))
        self.MotorPositionZ.setObjectName(_fromUtf8("MotorPositionZ"))
        self.toMotorPositionY = QtGui.QLineEdit(Dialog)
        self.toMotorPositionY.setGeometry(QtCore.QRect(150, 90, 50, 21))
        self.toMotorPositionY.setObjectName(_fromUtf8("toMotorPositionY"))
        self.label_9 = QtGui.QLabel(Dialog)
        self.label_9.setGeometry(QtCore.QRect(50, 90, 21, 21))
        self.label_9.setObjectName(_fromUtf8("label_9"))
        self.toMotorPositionZ = QtGui.QLineEdit(Dialog)
        self.toMotorPositionZ.setGeometry(QtCore.QRect(230, 90, 50, 21))
        self.toMotorPositionZ.setObjectName(_fromUtf8("toMotorPositionZ"))
        self.label_10 = QtGui.QLabel(Dialog)
        self.label_10.setGeometry(QtCore.QRect(210, 90, 21, 21))
        self.label_10.setObjectName(_fromUtf8("label_10"))
        self.label_11 = QtGui.QLabel(Dialog)
        self.label_11.setGeometry(QtCore.QRect(130, 90, 21, 21))
        self.label_11.setObjectName(_fromUtf8("label_11"))
        self.toMotorPositionX = QtGui.QLineEdit(Dialog)
        self.toMotorPositionX.setGeometry(QtCore.QRect(70, 90, 50, 20))
        self.toMotorPositionX.setObjectName(_fromUtf8("toMotorPositionX"))
        self.label_12 = QtGui.QLabel(Dialog)
        self.label_12.setGeometry(QtCore.QRect(50, 300, 21, 21))
        self.label_12.setObjectName(_fromUtf8("label_12"))
        self.label_13 = QtGui.QLabel(Dialog)
        self.label_13.setGeometry(QtCore.QRect(140, 300, 21, 21))
        self.label_13.setObjectName(_fromUtf8("label_13"))
        self.label_14 = QtGui.QLabel(Dialog)
        self.label_14.setGeometry(QtCore.QRect(140, 370, 21, 21))
        self.label_14.setObjectName(_fromUtf8("label_14"))
        self.label_15 = QtGui.QLabel(Dialog)
        self.label_15.setGeometry(QtCore.QRect(50, 370, 21, 21))
        self.label_15.setObjectName(_fromUtf8("label_15"))
        self.ScanAreaWidth = QtGui.QLineEdit(Dialog)
        self.ScanAreaWidth.setGeometry(QtCore.QRect(70, 370, 41, 20))
        self.ScanAreaWidth.setObjectName(_fromUtf8("ScanAreaWidth"))
        self.ScanAreaHeight = QtGui.QLineEdit(Dialog)
        self.ScanAreaHeight.setGeometry(QtCore.QRect(160, 370, 41, 20))
        self.ScanAreaHeight.setObjectName(_fromUtf8("ScanAreaHeight"))
        self.shiftMotorPositionX = QtGui.QLineEdit(Dialog)
        self.shiftMotorPositionX.setGeometry(QtCore.QRect(70, 160, 41, 20))
        self.shiftMotorPositionX.setObjectName(
            _fromUtf8("shiftMotorPositionX"))
        self.shiftMotorPositionY = QtGui.QLineEdit(Dialog)
        self.shiftMotorPositionY.setGeometry(QtCore.QRect(150, 160, 41, 20))
        self.shiftMotorPositionY.setObjectName(
            _fromUtf8("shiftMotorPositionY"))
        self.shiftMotorPositionZ = QtGui.QLineEdit(Dialog)
        self.shiftMotorPositionZ.setGeometry(QtCore.QRect(230, 160, 41, 20))
        self.shiftMotorPositionZ.setObjectName(
            _fromUtf8("shiftMotorPositionZ"))
        self.changeMotorPositionX = QtGui.QPushButton(Dialog)
        self.changeMotorPositionX.setGeometry(QtCore.QRect(70, 120, 41, 23))
        self.changeMotorPositionX.setObjectName(
            _fromUtf8("changeMotorPositionX"))
        self.changeMotorPositionY = QtGui.QPushButton(Dialog)
        self.changeMotorPositionY.setGeometry(QtCore.QRect(150, 120, 41, 23))
        self.changeMotorPositionY.setObjectName(
            _fromUtf8("changeMotorPositionY"))
        self.changeMotorPositionZ = QtGui.QPushButton(Dialog)
        self.changeMotorPositionZ.setGeometry(QtCore.QRect(230, 120, 41, 23))
        self.changeMotorPositionZ.setObjectName(
            _fromUtf8("changeMotorPositionZ"))
        self.minusMotorPositionX = QtGui.QPushButton(Dialog)
        self.minusMotorPositionX.setGeometry(QtCore.QRect(50, 180, 41, 23))
        self.minusMotorPositionX.setObjectName(
            _fromUtf8("minusMotorPositionX"))
        self.plusMotorPositionX = QtGui.QPushButton(Dialog)
        self.plusMotorPositionX.setGeometry(QtCore.QRect(90, 180, 41, 23))
        self.plusMotorPositionX.setObjectName(_fromUtf8("plusMotorPositionX"))
        self.plusMotorPositionY = QtGui.QPushButton(Dialog)
        self.plusMotorPositionY.setGeometry(QtCore.QRect(170, 180, 41, 23))
        self.plusMotorPositionY.setObjectName(_fromUtf8("plusMotorPositionY"))
        self.minusMotorPositionY = QtGui.QPushButton(Dialog)
        self.minusMotorPositionY.setGeometry(QtCore.QRect(130, 180, 41, 23))
        self.minusMotorPositionY.setObjectName(
            _fromUtf8("minusMotorPositionY"))
        self.plusMotorPositionZ = QtGui.QPushButton(Dialog)
        self.plusMotorPositionZ.setGeometry(QtCore.QRect(250, 180, 41, 23))
        self.plusMotorPositionZ.setObjectName(_fromUtf8("plusMotorPositionZ"))
        self.minusMotorPositionZ = QtGui.QPushButton(Dialog)
        self.minusMotorPositionZ.setGeometry(QtCore.QRect(210, 180, 41, 23))
        self.minusMotorPositionZ.setObjectName(
            _fromUtf8("minusMotorPositionZ"))
        self.label_17 = QtGui.QLabel(Dialog)
        self.label_17.setGeometry(QtCore.QRect(50, 420, 171, 21))
        self.label_17.setObjectName(_fromUtf8("label_17"))
        self.label_18 = QtGui.QLabel(Dialog)
        self.label_18.setGeometry(QtCore.QRect(50, 450, 21, 21))
        self.label_18.setObjectName(_fromUtf8("label_18"))
        self.ScanStepSizeX = QtGui.QLineEdit(Dialog)
        self.ScanStepSizeX.setGeometry(QtCore.QRect(70, 450, 41, 20))
        self.ScanStepSizeX.setObjectName(_fromUtf8("ScanStepSizeX"))
        self.ScanStepSizeY = QtGui.QLineEdit(Dialog)
        self.ScanStepSizeY.setGeometry(QtCore.QRect(160, 450, 41, 20))
        self.ScanStepSizeY.setObjectName(_fromUtf8("ScanStepSizeY"))
        self.label_19 = QtGui.QLabel(Dialog)
        self.label_19.setGeometry(QtCore.QRect(140, 450, 21, 21))
        self.label_19.setObjectName(_fromUtf8("label_19"))
        self.DwellTime = QtGui.QLineEdit(Dialog)
        self.DwellTime.setGeometry(QtCore.QRect(130, 500, 41, 20))
        self.DwellTime.setObjectName(_fromUtf8("DwellTime"))
        self.label_20 = QtGui.QLabel(Dialog)
        self.label_20.setGeometry(QtCore.QRect(40, 500, 100, 21))
        self.label_20.setObjectName(_fromUtf8("label_20"))
        self.label_21 = QtGui.QLabel(Dialog)
        self.label_21.setGeometry(QtCore.QRect(180, 500, 31, 21))
        self.label_21.setObjectName(_fromUtf8("label_21"))
        self.label_22 = QtGui.QLabel(Dialog)
        self.label_22.setGeometry(QtCore.QRect(380, 280, 71, 21))
        self.label_22.setObjectName(_fromUtf8("label_22"))
        self.TimeLeft = QtGui.QLineEdit(Dialog)
        self.TimeLeft.setEnabled(False)
        self.TimeLeft.setGeometry(QtCore.QRect(450, 280, 111, 20))
        self.TimeLeft.setCursor(QtGui.QCursor(QtCore.Qt.ForbiddenCursor))
        self.TimeLeft.setObjectName(_fromUtf8("TimeLeft"))
        self.ExecuteScan = QtGui.QPushButton(Dialog)
        self.ExecuteScan.setGeometry(QtCore.QRect(1100, 210, 101, 23))
        self.ExecuteScan.setObjectName(_fromUtf8("ExecuteScan"))
        self.label_23 = QtGui.QLabel(Dialog)
        self.label_23.setGeometry(QtCore.QRect(360, 10, 201, 21))
        self.label_23.setObjectName(_fromUtf8("label_23"))
        self.label_24 = QtGui.QLabel(Dialog)
        self.label_24.setGeometry(QtCore.QRect(660, 10, 201, 21))
        self.label_24.setObjectName(_fromUtf8("label_24"))
        self.MoveToStartPoint = QtGui.QPushButton(Dialog)
        self.MoveToStartPoint.setGeometry(QtCore.QRect(50, 240, 140, 23))
        self.MoveToStartPoint.setObjectName(_fromUtf8("MoveToStartPoint"))
        self.graphicsView_VL = QtGui.QGraphicsView(Dialog)
        self.graphicsView_VL.setGeometry(QtCore.QRect(310, 30, 301, 241))
        self.graphicsView_VL.viewport().setProperty(
            "cursor", QtGui.QCursor(QtCore.Qt.CrossCursor))
        self.graphicsView_VL.setMouseTracking(False)
        self.graphicsView_VL.setFocusPolicy(QtCore.Qt.StrongFocus)
        self.graphicsView_VL.setViewportUpdateMode(
            QtGui.QGraphicsView.MinimalViewportUpdate)
        self.graphicsView_VL.setObjectName(_fromUtf8("graphicsView_VL"))
        self.graphicsView_XR = QtGui.QGraphicsView(Dialog)
        self.graphicsView_XR.setGeometry(QtCore.QRect(630, 30, 250, 250))
        self.graphicsView_XR.viewport().setProperty(
            "cursor", QtGui.QCursor(QtCore.Qt.CrossCursor))
        self.graphicsView_XR.setViewportUpdateMode(
            QtGui.QGraphicsView.FullViewportUpdate)
        self.graphicsView_XR.setRubberBandSelectionMode(
            QtCore.Qt.IntersectsItemShape)
        self.graphicsView_XR.setObjectName(_fromUtf8("graphicsView_XR"))
        self.tableWidget = QtGui.QTableWidget(Dialog)
        self.tableWidget.setGeometry(QtCore.QRect(230, 360, 472, 231))
        self.tableWidget.setEditTriggers(
            QtGui.QAbstractItemView.NoEditTriggers)
        self.tableWidget.setRowCount(1)
        self.tableWidget.setColumnCount(4)
        self.tableWidget.setObjectName(_fromUtf8("tableWidget"))
        self.graphicsView_Plot = QtGui.QGraphicsView(Dialog)
        self.graphicsView_Plot.setGeometry(QtCore.QRect(720, 310, 600, 250))
        self.graphicsView_Plot.setObjectName(_fromUtf8("graphicsView_Plot"))
        self.Energy = QtGui.QRadioButton(Dialog)
        self.Energy.setGeometry(QtCore.QRect(900, 570, 89, 21))
        self.Energy.setChecked(False)
        self.Energy.setObjectName(_fromUtf8("Energy"))
        self.Channel = QtGui.QRadioButton(Dialog)
        self.Channel.setGeometry(QtCore.QRect(1080, 570, 89, 21))
        self.Channel.setChecked(True)
        self.Channel.setObjectName(_fromUtf8("Channel"))
        self.maxPixelValue = QtGui.QLineEdit(Dialog)
        self.maxPixelValue.setGeometry(QtCore.QRect(920, 80, 60, 20))
        self.maxPixelValue.setObjectName(_fromUtf8("maxPixelValue"))
        self.label_16 = QtGui.QLabel(Dialog)
        self.label_16.setGeometry(QtCore.QRect(890, 60, 120, 21))
        self.label_16.setObjectName(_fromUtf8("label_16"))
        self.minPixelValue = QtGui.QLineEdit(Dialog)
        self.minPixelValue.setGeometry(QtCore.QRect(920, 220, 60, 20))
        self.minPixelValue.setObjectName(_fromUtf8("minPixelValue"))
        self.label_25 = QtGui.QLabel(Dialog)
        self.label_25.setGeometry(QtCore.QRect(890, 200, 120, 21))
        self.label_25.setObjectName(_fromUtf8("label_25"))
        self.MinPhotonEnergy = QtGui.QLineEdit(Dialog)
        self.MinPhotonEnergy.setGeometry(QtCore.QRect(410, 330, 71, 20))
        self.MinPhotonEnergy.setObjectName(_fromUtf8("MinPhotonEnergy"))
        self.label_27 = QtGui.QLabel(Dialog)
        self.label_27.setGeometry(QtCore.QRect(370, 310, 160, 21))
        self.label_27.setObjectName(_fromUtf8("label_27"))
        self.label_28 = QtGui.QLabel(Dialog)
        self.label_28.setGeometry(QtCore.QRect(540, 310, 160, 21))
        self.label_28.setObjectName(_fromUtf8("label_28"))
        self.MaxPhotonEnergy = QtGui.QLineEdit(Dialog)
        self.MaxPhotonEnergy.setGeometry(QtCore.QRect(580, 330, 71, 20))
        self.MaxPhotonEnergy.setObjectName(_fromUtf8("MaxPhotonEnergy"))
        self.Directory = QtGui.QLineEdit(Dialog)
        self.Directory.setEnabled(False)
        self.Directory.setGeometry(QtCore.QRect(1020, 80, 281, 21))
        self.Directory.setObjectName(_fromUtf8("Directory"))
        self.label = QtGui.QLabel(Dialog)
        self.label.setGeometry(QtCore.QRect(1020, 60, 80, 20))
        self.label.setObjectName(_fromUtf8("label"))
        self.label_2 = QtGui.QLabel(Dialog)
        self.label_2.setGeometry(QtCore.QRect(1020, 140, 80, 20))
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.FileName = QtGui.QLineEdit(Dialog)
        self.FileName.setGeometry(QtCore.QRect(1020, 160, 281, 21))
        self.FileName.setObjectName(_fromUtf8("FileName"))
        self.ChangeDirectory = QtGui.QPushButton(Dialog)
        self.ChangeDirectory.setGeometry(QtCore.QRect(1100, 110, 121, 23))
        self.ChangeDirectory.setObjectName(_fromUtf8("ChangeDirectory"))
        self.AbortScan = QtGui.QPushButton(Dialog)
        self.AbortScan.setGeometry(QtCore.QRect(1100, 250, 101, 23))
        self.AbortScan.setObjectName(_fromUtf8("AbortScan"))

        self.retranslateUi(Dialog)
        QtCore.QMetaObject.connectSlotsByName(Dialog)
コード例 #26
0
ファイル: add.py プロジェクト: geosohh/AnimeTorr
    def setupUi(self, Dialog):
        Dialog.setObjectName(_fromUtf8("Dialog"))
        Dialog.resize(1033, 540)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/images/images/icon.png")),
                       QtGui.QIcon.Normal, QtGui.QIcon.Off)
        Dialog.setWindowIcon(icon)
        self.gridLayout = QtGui.QGridLayout(Dialog)
        self.gridLayout.setMargin(10)
        self.gridLayout.setHorizontalSpacing(6)
        self.gridLayout.setVerticalSpacing(4)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.groupbox_anime_folder = QtGui.QGroupBox(Dialog)
        self.groupbox_anime_folder.setEnabled(False)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.groupbox_anime_folder.sizePolicy().hasHeightForWidth())
        self.groupbox_anime_folder.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.groupbox_anime_folder.setFont(font)
        self.groupbox_anime_folder.setMouseTracking(True)
        self.groupbox_anime_folder.setStyleSheet(
            _fromUtf8("color: rgb(120, 120, 120);"))
        self.groupbox_anime_folder.setObjectName(
            _fromUtf8("groupbox_anime_folder"))
        self.verticalLayout_2 = QtGui.QVBoxLayout(self.groupbox_anime_folder)
        self.verticalLayout_2.setContentsMargins(-1, 0, -1, 4)
        self.verticalLayout_2.setSpacing(5)
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.radio_use_default_anime_folder = QtGui.QRadioButton(
            self.groupbox_anime_folder)
        self.radio_use_default_anime_folder.setEnabled(False)
        self.radio_use_default_anime_folder.setMaximumSize(
            QtCore.QSize(552, 16777215))
        self.radio_use_default_anime_folder.setChecked(True)
        self.radio_use_default_anime_folder.setObjectName(
            _fromUtf8("radio_use_default_anime_folder"))
        self.verticalLayout_2.addWidget(self.radio_use_default_anime_folder)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setSpacing(7)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.radio_use_another_anime_folder = QtGui.QRadioButton(
            self.groupbox_anime_folder)
        self.radio_use_another_anime_folder.setEnabled(False)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
                                       QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.radio_use_another_anime_folder.
                                     sizePolicy().hasHeightForWidth())
        self.radio_use_another_anime_folder.setSizePolicy(sizePolicy)
        self.radio_use_another_anime_folder.setText(_fromUtf8(""))
        self.radio_use_another_anime_folder.setObjectName(
            _fromUtf8("radio_use_another_anime_folder"))
        self.horizontalLayout.addWidget(self.radio_use_another_anime_folder)
        self.text_anime_folder = QtGui.QLineEdit(self.groupbox_anime_folder)
        self.text_anime_folder.setEnabled(False)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.text_anime_folder.sizePolicy().hasHeightForWidth())
        self.text_anime_folder.setSizePolicy(sizePolicy)
        self.text_anime_folder.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
        self.text_anime_folder.setText(_fromUtf8(""))
        self.text_anime_folder.setReadOnly(False)
        self.text_anime_folder.setObjectName(_fromUtf8("text_anime_folder"))
        self.horizontalLayout.addWidget(self.text_anime_folder)
        self.button_anime_folder = QtGui.QPushButton(
            self.groupbox_anime_folder)
        self.button_anime_folder.setEnabled(False)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
                                       QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.button_anime_folder.sizePolicy().hasHeightForWidth())
        self.button_anime_folder.setSizePolicy(sizePolicy)
        self.button_anime_folder.setMinimumSize(QtCore.QSize(45, 0))
        self.button_anime_folder.setMaximumSize(QtCore.QSize(45, 16777215))
        self.button_anime_folder.setMouseTracking(True)
        self.button_anime_folder.setStyleSheet(
            _fromUtf8(
                "QPushButton {\n"
                "     border: 1px solid #8f8f91;\n"
                "     border-radius: 4px;\n"
                "     background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,\n"
                "                                       stop: 0 #f6f7fa, stop: 1 #dadbde);\n"
                "     padding-left: 4px;\n"
                "     padding-right: 4px;\n"
                " }\n"
                "\n"
                " QPushButton:pressed {\n"
                "     background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,\n"
                "                                       stop: 0 #dadbde, stop: 1 #f6f7fa);\n"
                " }\n"
                "\n"
                " QPushButton:flat {\n"
                "     border: none;\n"
                " }"))
        self.button_anime_folder.setObjectName(
            _fromUtf8("button_anime_folder"))
        self.horizontalLayout.addWidget(self.button_anime_folder)
        self.verticalLayout_2.addLayout(self.horizontalLayout)
        self.gridLayout.addWidget(self.groupbox_anime_folder, 3, 0, 1, 1)
        self.groupbox_search = QtGui.QGroupBox(Dialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred,
                                       QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(2)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.groupbox_search.sizePolicy().hasHeightForWidth())
        self.groupbox_search.setSizePolicy(sizePolicy)
        self.groupbox_search.setMaximumSize(QtCore.QSize(16777215, 16777215))
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.groupbox_search.setFont(font)
        self.groupbox_search.setObjectName(_fromUtf8("groupbox_search"))
        self.horizontalLayout_3 = QtGui.QHBoxLayout(self.groupbox_search)
        self.horizontalLayout_3.setSizeConstraint(QtGui.QLayout.SetMinimumSize)
        self.horizontalLayout_3.setContentsMargins(8, 3, 8, 8)
        self.horizontalLayout_3.setSpacing(6)
        self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
        self.formLayout = QtGui.QFormLayout()
        self.formLayout.setFieldGrowthPolicy(
            QtGui.QFormLayout.AllNonFixedFieldsGrow)
        self.formLayout.setFormAlignment(QtCore.Qt.AlignLeading
                                         | QtCore.Qt.AlignLeft
                                         | QtCore.Qt.AlignTop)
        self.formLayout.setHorizontalSpacing(2)
        self.formLayout.setVerticalSpacing(5)
        self.formLayout.setObjectName(_fromUtf8("formLayout"))
        self.label_name = QtGui.QLabel(self.groupbox_search)
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.label_name.setFont(font)
        self.label_name.setMouseTracking(True)
        self.label_name.setObjectName(_fromUtf8("label_name"))
        self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
                                  self.label_name)
        self.label_search = QtGui.QLabel(self.groupbox_search)
        self.label_search.setEnabled(False)
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.label_search.setFont(font)
        self.label_search.setMouseTracking(True)
        self.label_search.setObjectName(_fromUtf8("label_search"))
        self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
                                  self.label_search)
        self.label_episode = QtGui.QLabel(self.groupbox_search)
        self.label_episode.setEnabled(False)
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.label_episode.setFont(font)
        self.label_episode.setMouseTracking(True)
        self.label_episode.setObjectName(_fromUtf8("label_episode"))
        self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
                                  self.label_episode)
        self.text_name = QtGui.QLineEdit(self.groupbox_search)
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.text_name.setFont(font)
        self.text_name.setObjectName(_fromUtf8("text_name"))
        self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
                                  self.text_name)
        self.text_search = QtGui.QTextEdit(self.groupbox_search)
        self.text_search.setEnabled(False)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.text_search.sizePolicy().hasHeightForWidth())
        self.text_search.setSizePolicy(sizePolicy)
        self.text_search.setMinimumSize(QtCore.QSize(300, 70))
        self.text_search.setMaximumSize(QtCore.QSize(16777215, 70))
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.text_search.setFont(font)
        self.text_search.viewport().setProperty(
            "cursor", QtGui.QCursor(QtCore.Qt.IBeamCursor))
        self.text_search.setMouseTracking(True)
        self.text_search.setHorizontalScrollBarPolicy(
            QtCore.Qt.ScrollBarAlwaysOff)
        self.text_search.setTabChangesFocus(True)
        self.text_search.setAcceptRichText(False)
        self.text_search.setObjectName(_fromUtf8("text_search"))
        self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
                                  self.text_search)
        self.text_episode = QtGui.QLineEdit(self.groupbox_search)
        self.text_episode.setEnabled(False)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
                                       QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.text_episode.sizePolicy().hasHeightForWidth())
        self.text_episode.setSizePolicy(sizePolicy)
        self.text_episode.setMinimumSize(QtCore.QSize(35, 0))
        self.text_episode.setMaximumSize(QtCore.QSize(30, 16777215))
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.text_episode.setFont(font)
        self.text_episode.setMaxLength(3)
        self.text_episode.setObjectName(_fromUtf8("text_episode"))
        self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
                                  self.text_episode)
        self.horizontalLayout_3.addLayout(self.formLayout)
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setContentsMargins(-1, 0, -1, 0)
        self.verticalLayout.setSpacing(0)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.checkbox_anime_tosho = QtGui.QCheckBox(self.groupbox_search)
        self.checkbox_anime_tosho.setEnabled(True)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.checkbox_anime_tosho.sizePolicy().hasHeightForWidth())
        self.checkbox_anime_tosho.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.checkbox_anime_tosho.setFont(font)
        self.checkbox_anime_tosho.setChecked(True)
        self.checkbox_anime_tosho.setObjectName(
            _fromUtf8("checkbox_anime_tosho"))
        self.verticalLayout.addWidget(self.checkbox_anime_tosho)
        self.checkbox_anirena = QtGui.QCheckBox(self.groupbox_search)
        self.checkbox_anirena.setEnabled(True)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.checkbox_anirena.sizePolicy().hasHeightForWidth())
        self.checkbox_anirena.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.checkbox_anirena.setFont(font)
        self.checkbox_anirena.setChecked(True)
        self.checkbox_anirena.setObjectName(_fromUtf8("checkbox_anirena"))
        self.verticalLayout.addWidget(self.checkbox_anirena)
        self.checkbox_nyaa = QtGui.QCheckBox(self.groupbox_search)
        self.checkbox_nyaa.setEnabled(True)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.checkbox_nyaa.sizePolicy().hasHeightForWidth())
        self.checkbox_nyaa.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.checkbox_nyaa.setFont(font)
        self.checkbox_nyaa.setChecked(True)
        self.checkbox_nyaa.setObjectName(_fromUtf8("checkbox_nyaa"))
        self.verticalLayout.addWidget(self.checkbox_nyaa)
        self.checkbox_tokyotosho = QtGui.QCheckBox(self.groupbox_search)
        self.checkbox_tokyotosho.setEnabled(True)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.checkbox_tokyotosho.sizePolicy().hasHeightForWidth())
        self.checkbox_tokyotosho.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.checkbox_tokyotosho.setFont(font)
        self.checkbox_tokyotosho.setChecked(True)
        self.checkbox_tokyotosho.setObjectName(
            _fromUtf8("checkbox_tokyotosho"))
        self.verticalLayout.addWidget(self.checkbox_tokyotosho)
        self.horizontalLayout_3.addLayout(self.verticalLayout)
        self.button_search = QtGui.QPushButton(self.groupbox_search)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.button_search.sizePolicy().hasHeightForWidth())
        self.button_search.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.button_search.setFont(font)
        self.button_search.setStyleSheet(
            _fromUtf8(
                "QPushButton {\n"
                "     border: 1px solid #8f8f91;\n"
                "     border-radius: 4px;\n"
                "     background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,\n"
                "                                       stop: 0 #f6f7fa, stop: 1 #dadbde);\n"
                "     padding-left: 4px;\n"
                "     padding-right: 4px;\n"
                " }\n"
                "\n"
                " QPushButton:pressed {\n"
                "     background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,\n"
                "                                       stop: 0 #dadbde, stop: 1 #f6f7fa);\n"
                " }\n"
                "\n"
                " QPushButton:flat {\n"
                "     border: none;\n"
                " }"))
        self.button_search.setObjectName(_fromUtf8("button_search"))
        self.horizontalLayout_3.addWidget(self.button_search)
        self.gridLayout.addWidget(self.groupbox_search, 0, 0, 1, 1)
        self.button_add = QtGui.QPushButton(Dialog)
        self.button_add.setEnabled(False)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.button_add.sizePolicy().hasHeightForWidth())
        self.button_add.setSizePolicy(sizePolicy)
        self.button_add.setStyleSheet(
            _fromUtf8(
                "QPushButton {\n"
                "     border: 1px solid #8f8f91;\n"
                "     border-radius: 4px;\n"
                "     background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,\n"
                "                                       stop: 0 #f6f7fa, stop: 1 #dadbde);\n"
                " }\n"
                "\n"
                " QPushButton:pressed {\n"
                "     background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,\n"
                "                                       stop: 0 #dadbde, stop: 1 #f6f7fa);\n"
                " }\n"
                "\n"
                " QPushButton:flat {\n"
                "     border: none;\n"
                " }"))
        self.button_add.setObjectName(_fromUtf8("button_add"))
        self.gridLayout.addWidget(self.button_add, 3, 1, 1, 1)
        self.groupbox_information = QtGui.QGroupBox(Dialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred,
                                       QtGui.QSizePolicy.Ignored)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.groupbox_information.sizePolicy().hasHeightForWidth())
        self.groupbox_information.setSizePolicy(sizePolicy)
        self.groupbox_information.setMaximumSize(
            QtCore.QSize(16777215, 16777215))
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.groupbox_information.setFont(font)
        self.groupbox_information.setStyleSheet(
            _fromUtf8("color: rgb(0, 0, 255);"))
        self.groupbox_information.setObjectName(
            _fromUtf8("groupbox_information"))
        self.verticalLayout_3 = QtGui.QVBoxLayout(self.groupbox_information)
        self.verticalLayout_3.setContentsMargins(8, 0, 8, 8)
        self.verticalLayout_3.setSpacing(6)
        self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
        self.scrollArea = QtGui.QScrollArea(self.groupbox_information)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.scrollArea.sizePolicy().hasHeightForWidth())
        self.scrollArea.setSizePolicy(sizePolicy)
        self.scrollArea.setMinimumSize(QtCore.QSize(390, 129))
        self.scrollArea.setFrameShape(QtGui.QFrame.NoFrame)
        self.scrollArea.setHorizontalScrollBarPolicy(
            QtCore.Qt.ScrollBarAlwaysOff)
        self.scrollArea.setWidgetResizable(True)
        self.scrollArea.setAlignment(QtCore.Qt.AlignJustify
                                     | QtCore.Qt.AlignTop)
        self.scrollArea.setObjectName(_fromUtf8("scrollArea"))
        self.scrollAreaWidgetContents = QtGui.QWidget()
        self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 390, 129))
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Ignored,
                                       QtGui.QSizePolicy.Ignored)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.scrollAreaWidgetContents.sizePolicy().hasHeightForWidth())
        self.scrollAreaWidgetContents.setSizePolicy(sizePolicy)
        self.scrollAreaWidgetContents.setObjectName(
            _fromUtf8("scrollAreaWidgetContents"))
        self.verticalLayout_11 = QtGui.QVBoxLayout(
            self.scrollAreaWidgetContents)
        self.verticalLayout_11.setMargin(3)
        self.verticalLayout_11.setSpacing(0)
        self.verticalLayout_11.setObjectName(_fromUtf8("verticalLayout_11"))
        self.label_information = QtGui.QLabel(self.scrollAreaWidgetContents)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Ignored,
                                       QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_information.sizePolicy().hasHeightForWidth())
        self.label_information.setSizePolicy(sizePolicy)
        self.label_information.setMinimumSize(QtCore.QSize(0, 0))
        self.label_information.setMaximumSize(QtCore.QSize(16777215, 16777215))
        font = QtGui.QFont()
        font.setPointSize(8)
        self.label_information.setFont(font)
        self.label_information.setStyleSheet(
            _fromUtf8("color: rgb(0, 0, 127);"))
        self.label_information.setAlignment(QtCore.Qt.AlignJustify
                                            | QtCore.Qt.AlignTop)
        self.label_information.setWordWrap(True)
        self.label_information.setIndent(0)
        self.label_information.setOpenExternalLinks(True)
        self.label_information.setObjectName(_fromUtf8("label_information"))
        self.verticalLayout_11.addWidget(self.label_information)
        self.scrollArea.setWidget(self.scrollAreaWidgetContents)
        self.verticalLayout_3.addWidget(self.scrollArea)
        self.gridLayout.addWidget(self.groupbox_information, 0, 1, 1, 1)
        self.tabWidget = QtGui.QTabWidget(Dialog)
        self.tabWidget.setEnabled(False)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding,
                                       QtGui.QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.tabWidget.sizePolicy().hasHeightForWidth())
        self.tabWidget.setSizePolicy(sizePolicy)
        self.tabWidget.setMouseTracking(True)
        self.tabWidget.setTabPosition(QtGui.QTabWidget.North)
        self.tabWidget.setTabShape(QtGui.QTabWidget.Rounded)
        self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
        self.tab_all = QtGui.QWidget()
        self.tab_all.setMouseTracking(True)
        self.tab_all.setObjectName(_fromUtf8("tab_all"))
        self.verticalLayout_5 = QtGui.QVBoxLayout(self.tab_all)
        self.verticalLayout_5.setMargin(0)
        self.verticalLayout_5.setSpacing(0)
        self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5"))
        self.text_results_all = QtGui.QTextBrowser(self.tab_all)
        self.text_results_all.setEnabled(False)
        self.text_results_all.setMouseTracking(True)
        self.text_results_all.setAcceptDrops(False)
        self.text_results_all.setObjectName(_fromUtf8("text_results_all"))
        self.verticalLayout_5.addWidget(self.text_results_all)
        self.tabWidget.addTab(self.tab_all, _fromUtf8(""))
        self.tab_anime_tosho = QtGui.QWidget()
        self.tab_anime_tosho.setMouseTracking(True)
        self.tab_anime_tosho.setObjectName(_fromUtf8("tab_anime_tosho"))
        self.verticalLayout_7 = QtGui.QVBoxLayout(self.tab_anime_tosho)
        self.verticalLayout_7.setMargin(0)
        self.verticalLayout_7.setSpacing(0)
        self.verticalLayout_7.setObjectName(_fromUtf8("verticalLayout_7"))
        self.text_results_anime_tosho = QtGui.QTextBrowser(
            self.tab_anime_tosho)
        self.text_results_anime_tosho.setMouseTracking(True)
        self.text_results_anime_tosho.setAcceptDrops(False)
        self.text_results_anime_tosho.setObjectName(
            _fromUtf8("text_results_anime_tosho"))
        self.verticalLayout_7.addWidget(self.text_results_anime_tosho)
        self.tabWidget.addTab(self.tab_anime_tosho, _fromUtf8(""))
        self.tab_anirena = QtGui.QWidget()
        self.tab_anirena.setMouseTracking(True)
        self.tab_anirena.setObjectName(_fromUtf8("tab_anirena"))
        self.verticalLayout_8 = QtGui.QVBoxLayout(self.tab_anirena)
        self.verticalLayout_8.setMargin(0)
        self.verticalLayout_8.setSpacing(0)
        self.verticalLayout_8.setObjectName(_fromUtf8("verticalLayout_8"))
        self.text_results_anirena = QtGui.QTextBrowser(self.tab_anirena)
        self.text_results_anirena.setMouseTracking(True)
        self.text_results_anirena.setAcceptDrops(False)
        self.text_results_anirena.setObjectName(
            _fromUtf8("text_results_anirena"))
        self.verticalLayout_8.addWidget(self.text_results_anirena)
        self.tabWidget.addTab(self.tab_anirena, _fromUtf8(""))
        self.tab_nyaa = QtGui.QWidget()
        self.tab_nyaa.setMouseTracking(True)
        self.tab_nyaa.setObjectName(_fromUtf8("tab_nyaa"))
        self.verticalLayout_9 = QtGui.QVBoxLayout(self.tab_nyaa)
        self.verticalLayout_9.setMargin(0)
        self.verticalLayout_9.setSpacing(0)
        self.verticalLayout_9.setObjectName(_fromUtf8("verticalLayout_9"))
        self.text_results_nyaa = QtGui.QTextBrowser(self.tab_nyaa)
        self.text_results_nyaa.setMouseTracking(True)
        self.text_results_nyaa.setAcceptDrops(False)
        self.text_results_nyaa.setObjectName(_fromUtf8("text_results_nyaa"))
        self.verticalLayout_9.addWidget(self.text_results_nyaa)
        self.tabWidget.addTab(self.tab_nyaa, _fromUtf8(""))
        self.tab_tokyotosho = QtGui.QWidget()
        self.tab_tokyotosho.setMouseTracking(True)
        self.tab_tokyotosho.setObjectName(_fromUtf8("tab_tokyotosho"))
        self.verticalLayout_10 = QtGui.QVBoxLayout(self.tab_tokyotosho)
        self.verticalLayout_10.setMargin(0)
        self.verticalLayout_10.setSpacing(0)
        self.verticalLayout_10.setObjectName(_fromUtf8("verticalLayout_10"))
        self.text_results_tokyotosho = QtGui.QTextBrowser(self.tab_tokyotosho)
        self.text_results_tokyotosho.setMouseTracking(True)
        self.text_results_tokyotosho.setAcceptDrops(False)
        self.text_results_tokyotosho.setObjectName(
            _fromUtf8("text_results_tokyotosho"))
        self.verticalLayout_10.addWidget(self.text_results_tokyotosho)
        self.tabWidget.addTab(self.tab_tokyotosho, _fromUtf8(""))
        self.gridLayout.addWidget(self.tabWidget, 1, 0, 1, 2)

        self.retranslateUi(Dialog)
        self.tabWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(Dialog)
コード例 #27
0
        dialog = QtGui.QFileDialog()
        try:
            outFileNames = dialog.getOpenFileNames(
                self.window, "Open Image",
                self.window.settings.value("last_dir").toString(),
                "Image Files (*.png *.jpg *.bmp)")
            if not outFileNames:
                raise NoImagesException()
        except NoImagesException, exc:
            logging.error(exc.message, exc_info=True)
            QtGui.QMessageBox.warning(self.window, "Warning", exc.message)
        else:
            self.window.settings.setValue("last_dir",
                                          os.path.split(outFileNames[0]))
            QtGui.QApplication.setOverrideCursor(
                QtGui.QCursor(QtCore.Qt.WaitCursor))
            self.draw_little_people(outFileNames)
            QtGui.QApplication.restoreOverrideCursor()
            self.window.ui.pushButton_2.setEnabled(True)

    def onExit(self, event):
        """Create the finder variable."""

        self.window.myfinder = None
        self.window.items = self.window.ui.scene.items()

    def draw_little_people(self, fileNames):
        """Show in the scene the photos."""

        # TODO fix this
        posx = posy = 0
コード例 #28
0
	def setMouseCursor(self):
		if self.__action == self.ACTION_COORDINATE_SYSTEM:
			self.setCursor(QtGui.QCursor(QtCore.Qt.OpenHandCursor))
		else:
			self.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
コード例 #29
0
ファイル: message.py プロジェクト: Aadit-Bhojgi/PyPher
    def setupUi(self, message):
        message.setObjectName(_fromUtf8("message"))
        message.resize(442, 150)
        message.setMinimumSize(QtCore.QSize(442, 150))
        message.setMaximumSize(QtCore.QSize(442, 150))
        icon = QtGui.QIcon()
        icon.addPixmap(
            QtGui.QPixmap(_fromUtf8(":/newPrefix/Graphics/Logo/PyPher.png")),
            QtGui.QIcon.Normal, QtGui.QIcon.Off)
        message.setWindowIcon(icon)
        message.setStyleSheet(
            _fromUtf8("background-color: rgb(255, 255, 255);"))
        self.label_4 = QtGui.QLabel(message)
        self.label_4.setGeometry(QtCore.QRect(60, 0, 311, 51))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Yu Gothic UI Semilight"))
        font.setPointSize(6)
        font.setBold(True)
        font.setWeight(75)
        self.label_4.setFont(font)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.label_5 = QtGui.QLabel(message)
        self.label_5.setGeometry(QtCore.QRect(40, 60, 151, 51))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Yu Gothic UI Semilight"))
        font.setPointSize(6)
        font.setBold(True)
        font.setWeight(75)
        self.label_5.setFont(font)
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.password = QtGui.QLineEdit(message)
        self.password.setGeometry(QtCore.QRect(190, 70, 181, 31))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Yu Gothic UI Semibold"))
        font.setPointSize(9)
        font.setBold(False)
        font.setItalic(False)
        font.setWeight(9)
        self.password.setFont(font)
        self.password.setStyleSheet(
            _fromUtf8("font: 75 9pt \"Yu Gothic UI Semibold\";"))
        self.password.setObjectName(_fromUtf8("password"))
        self.password_send = QtGui.QCommandLinkButton(message)
        self.password_send.setGeometry(QtCore.QRect(380, 70, 31, 31))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Segoe UI"))
        font.setPointSize(6)
        self.password_send.setFont(font)
        self.password_send.setCursor(
            QtGui.QCursor(QtCore.Qt.PointingHandCursor))
        self.password_send.setFocusPolicy(QtCore.Qt.TabFocus)
        self.password_send.setAcceptDrops(False)
        self.password_send.setStyleSheet(_fromUtf8("border: white;\n" ""))
        self.password_send.setText(_fromUtf8(""))
        self.password_send.setIconSize(QtCore.QSize(15, 15))
        self.password_send.setObjectName(_fromUtf8("password_send"))
        self.label_6 = QtGui.QLabel(message)
        self.label_6.setEnabled(False)
        self.label_6.setGeometry(QtCore.QRect(60, 110, 321, 31))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Yu Gothic UI Semilight"))
        font.setPointSize(6)
        font.setBold(True)
        font.setWeight(75)
        self.label_6.setFont(font)
        self.label_6.setObjectName(_fromUtf8("label_6"))

        self.retranslateUi(message)
        QtCore.QMetaObject.connectSlotsByName(message)
        message.setTabOrder(self.password, self.password_send)
コード例 #30
0
    def plot(self, profile, statsResults):
        # *** Check if there is sufficient data to generate the plot
        if len(statsResults.postHocResults.pValues) <= 0:
            self.emptyAxis('No post-hoc test results')
            return

        if len(statsResults.postHocResults.pValues) > 200:
            QtGui.QApplication.instance().setOverrideCursor(
                QtGui.QCursor(QtCore.Qt.ArrowCursor))
            reply = QtGui.QMessageBox.question(
                self, 'Continue?', 'Plots contains ' +
                str(len(statsResults.postHocResults.pValues)) + ' rows. ' +
                'It may take several seconds to generate this plot. We recommend filtering the results first.'
                + 'Do you wish to continue?', QtGui.QMessageBox.Yes,
                QtGui.QMessageBox.No)
            QtGui.QApplication.instance().restoreOverrideCursor()
            if reply == QtGui.QMessageBox.No:
                self.emptyAxis('Too many rows.')
                return

        # *** Set plot properties
        axesColour = str(self.preferences['Axes colour'].name())
        highlightColor = (0.9, 0.9, 0.9)

        # Apply p-value filter
        labels = []
        pValues = []
        effectSizes = []
        lowerCIs = []
        upperCIs = []
        if self.bPvalueFilter:
            for i in xrange(0, len(statsResults.postHocResults.labels)):
                # get numeric p-value
                if isinstance(statsResults.postHocResults.pValues[i], str):
                    pValueSplit = statsResults.postHocResults.pValues[i].split(
                        ' ')
                    if pValueSplit[0][0] == '<':
                        pValue = float(pValueSplit[1]) - 1e-6
                    else:
                        pValue = 1.0
                else:
                    pValue = statsResults.postHocResults.pValues[i]

                # check if p-value should be filtered
                if pValue <= statsResults.postHocResults.alpha:
                    labels.append(statsResults.postHocResults.labels[i])
                    pValues.append(statsResults.postHocResults.pValues[i])
                    effectSizes.append(
                        statsResults.postHocResults.effectSizes[i])
                    lowerCIs.append(statsResults.postHocResults.lowerCIs[i])
                    upperCIs.append(statsResults.postHocResults.upperCIs[i])
        else:
            labels = list(statsResults.postHocResults.labels)
            pValues = list(statsResults.postHocResults.pValues)
            effectSizes = list(statsResults.postHocResults.effectSizes)
            lowerCIs = list(statsResults.postHocResults.lowerCIs)
            upperCIs = list(statsResults.postHocResults.upperCIs)

        if len(labels) == 0:
            self.emptyAxis('No rows above nominal level.')
            return

        # *** Determine dominant group for each contrast (i.e., row).
        #  Adjust labels and effect sizes to reflect the dominant group.
        for i in xrange(0, len(effectSizes)):
            labelSplit = labels[i].split(':')
            if effectSizes[i] > 0.0:
                lowerCIs[i] = effectSizes[i] - lowerCIs[i]
                upperCIs[i] = upperCIs[i] - effectSizes[i]
            else:
                labels[i] = labelSplit[1].strip(
                ) + ' : ' + labelSplit[0].strip()
                lowerCIs[i] = effectSizes[i] - lowerCIs[i]
                upperCIs[i] = upperCIs[i] - effectSizes[i]
                effectSizes[i] = -effectSizes[i]

        # *** Sort data
        data = zip(labels, pValues, effectSizes, lowerCIs, upperCIs)

        if self.sortingField == 'p-values':
            data = sorted(data, key=operator.itemgetter(1), reverse=True)
        elif self.sortingField == 'Effect sizes':
            data = sorted(data, key=operator.itemgetter(2))
        elif self.sortingField == 'Group labels':
            data = sorted(data, key=lambda row: row[0].lower(), reverse=True)

        labels, pValues, effectSizes, lowerCIs, upperCIs = zip(*data)
        labels = list(labels)
        pValues = list(pValues)
        effectSizes = list(effectSizes)
        lowerCIs = list(lowerCIs)
        upperCIs = list(upperCIs)

        # *** Make list of which group is dominant in each contrast.
        dominantGroup = {}
        for i in xrange(0, len(effectSizes)):
            labelSplit = labels[i].split(':')
            groupName = labelSplit[0].strip()

            if groupName in dominantGroup:
                dominantGroup[groupName][0].append(effectSizes[i])
                dominantGroup[groupName][1].append(i)
            else:
                dominantGroup[groupName] = [[effectSizes[i]], [i]]

        # *** Create p-value labels
        pValueTitle = 'p-value'
        pValueLabels = []
        for pValue in pValues:
            if isinstance(pValue, str):
                pValueSplit = pValue.split(' ')
                if pValue[0] == '<':
                    pValueLabels.append(r'$<$' + pValueSplit[1])
                else:
                    pValueLabels.append(r'$\geq$' + pValueSplit[1])
            else:
                pValueLabels.append(statsResults.getPValueStr(pValue))

        # *** Truncate labels
        adjustedLabels = list(labels)
        if self.preferences['Truncate feature names']:
            length = self.preferences['Length of truncated feature names']

            for i in xrange(0, len(labels)):
                if len(labels[i]) > length + 3:
                    adjustedLabels[i] = labels[i][0:length] + '...'

        # *** Set figure size
        plotHeight = self.figHeightPerRow * len(adjustedLabels)
        self.imageWidth = self.figWidth
        self.imageHeight = plotHeight + 0.65  # 0.65 inches for bottom and top labels
        if self.imageWidth > 256 or self.imageHeight > 256:
            QtGui.QApplication.instance().setOverrideCursor(
                QtGui.QCursor(QtCore.Qt.ArrowCursor))
            self.emptyAxis()
            reply = QtGui.QMessageBox.question(
                self, 'Excessively large plot',
                'The resulting plot is too large to display.')
            QtGui.QApplication.instance().restoreOverrideCursor()
            return

        self.fig.set_size_inches(self.imageWidth, self.imageHeight)

        # *** Determine width of y-axis labels
        yLabelBounds = self.yLabelExtents(adjustedLabels, 8)

        # *** Size plots which comprise the extended errorbar plot
        self.fig.clear()

        heightBottomLabels = 0.4  # inches

        spacingBetweenPlots = 0.25  # inches
        widthNumSeqPlot = 1.25  # inches
        if self.bShowBarPlot == False:
            widthNumSeqPlot = 0.0
            spacingBetweenPlots = 0.0

        widthPvalueLabels = 0.75  # inches
        if self.bShowPValueLabels == False:
            widthPvalueLabels = 0.1

        yPlotOffsetFigSpace = heightBottomLabels / self.imageHeight
        heightPlotFigSpace = plotHeight / self.imageHeight

        xPlotOffsetFigSpace = yLabelBounds.width + 0.1 / self.imageWidth
        pValueLabelWidthFigSpace = widthPvalueLabels / self.imageWidth
        widthPlotFigSpace = 1.0 - pValueLabelWidthFigSpace - xPlotOffsetFigSpace

        widthErrorBarPlot = widthPlotFigSpace * self.imageWidth - widthNumSeqPlot - spacingBetweenPlots

        axInitAxis = self.fig.add_axes([
            xPlotOffsetFigSpace, yPlotOffsetFigSpace, widthPlotFigSpace,
            heightPlotFigSpace
        ])
        divider = make_axes_locatable(axInitAxis)
        divider.get_vertical()[0] = Size.Fixed(
            len(labels) * self.figHeightPerRow)

        self.fig.text(0.0,
                      1.0,
                      self.preferences['Selected multiple group feature'],
                      va='top',
                      ha='left')

        if self.bShowBarPlot == True:
            divider.get_horizontal()[0] = Size.Fixed(widthNumSeqPlot)
            axErrorbar = divider.new_horizontal(widthErrorBarPlot,
                                                pad=spacingBetweenPlots,
                                                sharey=axInitAxis)
            self.fig.add_axes(axErrorbar)
        else:
            divider.get_horizontal()[0] = Size.Fixed(widthErrorBarPlot)
            axErrorbar = axInitAxis

        # *** Plot of sequences for each subsystem
        if self.bShowBarPlot == True:
            axNumSeq = axInitAxis

            # get relative frequency and standard deviation of each contrast
            maxPercentage = 0
            for i in xrange(0, len(labels)):
                splitLabel = labels[i].split(':')
                groupName1 = splitLabel[0].strip()
                groupName2 = splitLabel[1].strip()

                colour1 = str(
                    self.preferences['Group colours'][groupName1].name())
                colour2 = str(
                    self.preferences['Group colours'][groupName2].name())

                meanRelFreq1 = statsResults.getDataFromTable(
                    statsResults.postHocResults.feature,
                    groupName1 + ': mean rel. freq. (%)')
                meanRelFreq2 = statsResults.getDataFromTable(
                    statsResults.postHocResults.feature,
                    groupName2 + ': mean rel. freq. (%)')

                if self.bShowStdDev:
                    stdDev1 = statsResults.getDataFromTable(
                        statsResults.postHocResults.feature,
                        groupName1 + ': std. dev. (%)')
                    stdDev2 = statsResults.getDataFromTable(
                        statsResults.postHocResults.feature,
                        groupName2 + ': std. dev. (%)')
                    endCapSize = self.endCapSize
                else:
                    stdDev1 = 0
                    stdDev2 = 0
                    endCapSize = 0

                if meanRelFreq1 + stdDev1 > maxPercentage:
                    maxPercentage = meanRelFreq1 + stdDev1

                if meanRelFreq2 + stdDev2 > maxPercentage:
                    maxPercentage = meanRelFreq2 + stdDev2

                axNumSeq.barh(i + 0.0,
                              meanRelFreq1,
                              height=0.3,
                              xerr=stdDev1,
                              color=colour1,
                              ecolor='black',
                              capsize=endCapSize)
                axNumSeq.barh(i - 0.3,
                              meanRelFreq2,
                              height=0.3,
                              xerr=stdDev2,
                              color=colour2,
                              ecolor='black',
                              capsize=endCapSize)

            for value in np.arange(-0.5, len(labels) - 1, 2):
                axNumSeq.axhspan(value,
                                 value + 1,
                                 facecolor=highlightColor,
                                 edgecolor='none',
                                 zorder=-1)

            axNumSeq.set_xlabel('Mean proportion (%)')
            axNumSeq.set_xticks([0, maxPercentage])
            axNumSeq.set_xlim([0, maxPercentage * 1.05])
            maxPercentageStr = '%.1f' % maxPercentage
            axNumSeq.set_xticklabels(['0.0', maxPercentageStr])

            axNumSeq.set_yticks(np.arange(len(labels)))
            axNumSeq.set_yticklabels(adjustedLabels)
            axNumSeq.set_ylim([-1, len(labels)])

            for a in axNumSeq.yaxis.majorTicks:
                a.tick1On = False
                a.tick2On = False

            for a in axNumSeq.xaxis.majorTicks:
                a.tick1On = True
                a.tick2On = False

            for line in axNumSeq.yaxis.get_ticklines():
                line.set_color(axesColour)

            for line in axNumSeq.xaxis.get_ticklines():
                line.set_color(axesColour)

            for loc, spine in axNumSeq.spines.iteritems():
                if loc in ['left', 'right', 'top']:
                    spine.set_color('none')
                else:
                    spine.set_color(axesColour)

        # *** Plot confidence intervals for each subsystem
        lastAxes = axErrorbar
        markerSize = math.sqrt(float(self.markerSize))
        axErrorbar.errorbar(effectSizes,
                            np.arange(len(labels)),
                            xerr=[lowerCIs, upperCIs],
                            fmt='o',
                            ms=markerSize,
                            mfc='black',
                            mec='black',
                            ecolor='black',
                            zorder=10)
        for groupName in dominantGroup:
            colour = str(self.preferences['Group colours'][groupName].name())
            effectSizes = dominantGroup[groupName][0]
            indices = dominantGroup[groupName][1]
            axErrorbar.plot(effectSizes,
                            indices,
                            ls='',
                            marker='o',
                            ms=markerSize,
                            mfc=colour,
                            mec='black',
                            zorder=100)

        axErrorbar.vlines(0,
                          -1,
                          len(labels),
                          linestyle='dashed',
                          color=axesColour)

        for value in np.arange(-0.5, len(labels) - 1, 2):
            axErrorbar.axhspan(value,
                               value + 1,
                               facecolor=highlightColor,
                               edgecolor='none',
                               zorder=1)

        ciTitle = ('%.3g' % ((1.0 - statsResults.postHocResults.alpha) * 100)
                   ) + '% confidence intervals'
        axErrorbar.set_title(ciTitle)
        axErrorbar.set_xlabel('Difference in mean proportions (%)')

        if self.bCustomLimits:
            axErrorbar.set_xlim([self.minX, self.maxX])
        else:
            self.minX, self.maxX = axErrorbar.get_xlim()

        if self.bShowBarPlot == False:
            axErrorbar.set_yticks(np.arange(len(labels)))
            axErrorbar.set_yticklabels(labels)
            axErrorbar.set_ylim([-1, len(labels)])
        else:
            for label in axErrorbar.get_yticklabels():
                label.set_visible(False)

            for a in axErrorbar.yaxis.majorTicks:
                a.set_visible(False)

        for a in axErrorbar.xaxis.majorTicks:
            a.tick1On = True
            a.tick2On = False

        for a in axErrorbar.yaxis.majorTicks:
            a.tick1On = False
            a.tick2On = False

        for line in axErrorbar.yaxis.get_ticklines():
            line.set_visible(False)

        for line in axErrorbar.xaxis.get_ticklines():
            line.set_color(axesColour)

        for loc, spine in axErrorbar.spines.iteritems():
            if loc in ['left', 'right', 'top']:
                spine.set_color('none')
            else:
                spine.set_color(axesColour)

        # *** Show p-values on right of last plot
        if self.bShowPValueLabels == True:
            axRight = lastAxes.twinx()
            axRight.set_yticks(np.arange(len(pValueLabels)))
            axRight.set_yticklabels(pValueLabels)
            axRight.set_ylim([-1, len(pValueLabels)])
            axRight.set_ylabel(pValueTitle)

            for a in axRight.yaxis.majorTicks:
                a.tick1On = False
                a.tick2On = False

        self.updateGeometry()
        self.draw()