class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(800, 600) MainWindow.setMinimumSize(QtCore.QSize(800, 600)) MainWindow.setLocale( QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setMinimumSize(QtCore.QSize(800, 556)) self.centralwidget.setObjectName("centralwidget") self.gridLayout = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout.setObjectName("gridLayout") self.u_in_rms = QtWidgets.QLabel(self.centralwidget) self.u_in_rms.setObjectName("u_in_rms") self.gridLayout.addWidget(self.u_in_rms, 2, 0, 1, 1) self.label_6 = QtWidgets.QLabel(self.centralwidget) self.label_6.setMinimumSize(QtCore.QSize(160, 0)) self.label_6.setAlignment(QtCore.Qt.AlignCenter) self.label_6.setObjectName("label_6") self.gridLayout.addWidget(self.label_6, 0, 0, 1, 2) self.u_in_thd = QtWidgets.QLabel(self.centralwidget) self.u_in_thd.setObjectName("u_in_thd") self.gridLayout.addWidget(self.u_in_thd, 2, 1, 1, 1, QtCore.Qt.AlignLeft) self.tabWidget = QtWidgets.QTabWidget(self.centralwidget) self.tabWidget.setObjectName("tabWidget") self.tab_mcu = QtWidgets.QWidget() self.tab_mcu.setObjectName("tab_mcu") self.gridLayout_2 = QtWidgets.QGridLayout(self.tab_mcu) self.gridLayout_2.setContentsMargins(11, 11, 11, 11) self.gridLayout_2.setObjectName("gridLayout_2") self.ch1_chkbox = QtWidgets.QCheckBox(self.tab_mcu) self.ch1_chkbox.setObjectName("ch1_chkbox") self.gridLayout_2.addWidget(self.ch1_chkbox, 0, 0, 1, 1) self.ch2_chkbox = QtWidgets.QCheckBox(self.tab_mcu) self.ch2_chkbox.setObjectName("ch2_chkbox") self.gridLayout_2.addWidget(self.ch2_chkbox, 1, 0, 1, 1) self.ch3_chkbox = QtWidgets.QCheckBox(self.tab_mcu) self.ch3_chkbox.setObjectName("ch3_chkbox") self.gridLayout_2.addWidget(self.ch3_chkbox, 2, 0, 1, 1) self.ch4_chkbox = QtWidgets.QCheckBox(self.tab_mcu) self.ch4_chkbox.setObjectName("ch4_chkbox") self.gridLayout_2.addWidget(self.ch4_chkbox, 3, 0, 1, 1) self.ch5_chkbox = QtWidgets.QCheckBox(self.tab_mcu) self.ch5_chkbox.setObjectName("ch5_chkbox") self.gridLayout_2.addWidget(self.ch5_chkbox, 4, 0, 1, 1) self.ch6_chkbox = QtWidgets.QCheckBox(self.tab_mcu) self.ch6_chkbox.setObjectName("ch6_chkbox") self.gridLayout_2.addWidget(self.ch6_chkbox, 5, 0, 1, 1) self.ch7_chkbox = QtWidgets.QCheckBox(self.tab_mcu) self.ch7_chkbox.setObjectName("ch7_chkbox") self.gridLayout_2.addWidget(self.ch7_chkbox, 6, 0, 1, 1) self.ch8_chkbox = QtWidgets.QCheckBox(self.tab_mcu) self.ch8_chkbox.setObjectName("ch8_chkbox") self.gridLayout_2.addWidget(self.ch8_chkbox, 7, 0, 1, 1) self.prescalar_label = QtWidgets.QLabel(self.tab_mcu) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.prescalar_label.sizePolicy().hasHeightForWidth()) self.prescalar_label.setSizePolicy(sizePolicy) self.prescalar_label.setObjectName("prescalar_label") self.gridLayout_2.addWidget(self.prescalar_label, 8, 0, 1, 1) self.prescalar_spin = SpinBox(self.tab_mcu) self.prescalar_spin.setMaximumSize(QtCore.QSize(78, 22)) self.prescalar_spin.setMinimum(1) self.prescalar_spin.setMaximum(200) self.prescalar_spin.setProperty("value", 1) self.prescalar_spin.setObjectName("prescalar_spin") self.gridLayout_2.addWidget(self.prescalar_spin, 9, 0, 1, 1) spacerItem = QtWidgets.QSpacerItem(20, 191, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout_2.addItem(spacerItem, 10, 0, 4, 1) self.PlotWidget = PlotWidget(self.tab_mcu) self.PlotWidget.setObjectName("PlotWidget") self.gridLayout_2.addWidget(self.PlotWidget, 0, 2, 14, 1) self.tabWidget.addTab(self.tab_mcu, "") self.tab_pc = QtWidgets.QWidget() self.tab_pc.setObjectName("tab_pc") self.gridLayout_4 = QtWidgets.QGridLayout(self.tab_pc) self.gridLayout_4.setContentsMargins(0, 0, 0, 0) self.gridLayout_4.setObjectName("gridLayout_4") self.tabWidget.addTab(self.tab_pc, "") self.gridLayout.addWidget(self.tabWidget, 0, 2, 22, 1) self.label_9 = QtWidgets.QLabel(self.centralwidget) self.label_9.setObjectName("label_9") self.gridLayout.addWidget(self.label_9, 5, 1, 1, 1, QtCore.Qt.AlignLeft) self.label_11 = QtWidgets.QLabel(self.centralwidget) self.label_11.setObjectName("label_11") self.gridLayout.addWidget(self.label_11, 17, 0, 1, 2, QtCore.Qt.AlignHCenter) spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout.addItem(spacerItem1, 20, 1, 1, 1) self.label_2 = QtWidgets.QLabel(self.centralwidget) self.label_2.setObjectName("label_2") self.gridLayout.addWidget(self.label_2, 1, 1, 1, 1, QtCore.Qt.AlignLeft) self.label_8 = QtWidgets.QLabel(self.centralwidget) self.label_8.setObjectName("label_8") self.gridLayout.addWidget(self.label_8, 12, 0, 1, 1) self.sld_amplituda = QtWidgets.QSlider(self.centralwidget) self.sld_amplituda.setMinimumSize(QtCore.QSize(0, 100)) self.sld_amplituda.setMaximumSize(QtCore.QSize(16777215, 100)) self.sld_amplituda.setMinimum(-10) self.sld_amplituda.setMaximum(10) self.sld_amplituda.setOrientation(QtCore.Qt.Vertical) self.sld_amplituda.setObjectName("sld_amplituda") self.gridLayout.addWidget(self.sld_amplituda, 19, 0, 1, 2, QtCore.Qt.AlignHCenter) self.u_out_thd = QtWidgets.QLabel(self.centralwidget) self.u_out_thd.setObjectName("u_out_thd") self.gridLayout.addWidget(self.u_out_thd, 6, 1, 1, 1) self.label = QtWidgets.QLabel(self.centralwidget) self.label.setObjectName("label") self.gridLayout.addWidget(self.label, 1, 0, 1, 1) self.label_3 = QtWidgets.QLabel(self.centralwidget) self.label_3.setObjectName("label_3") self.gridLayout.addWidget(self.label_3, 4, 0, 1, 2, QtCore.Qt.AlignHCenter) self.label_5 = QtWidgets.QLabel(self.centralwidget) self.label_5.setObjectName("label_5") self.gridLayout.addWidget(self.label_5, 8, 0, 1, 2, QtCore.Qt.AlignHCenter) self.line_4 = QtWidgets.QFrame(self.centralwidget) self.line_4.setFrameShape(QtWidgets.QFrame.HLine) self.line_4.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_4.setObjectName("line_4") self.gridLayout.addWidget(self.line_4, 13, 0, 1, 2) self.line = QtWidgets.QFrame(self.centralwidget) self.line.setFrameShape(QtWidgets.QFrame.HLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.gridLayout.addWidget(self.line, 3, 0, 1, 2) self.label_7 = QtWidgets.QLabel(self.centralwidget) self.label_7.setObjectName("label_7") self.gridLayout.addWidget(self.label_7, 5, 0, 1, 1) self.label_10 = QtWidgets.QLabel(self.centralwidget) self.label_10.setObjectName("label_10") self.gridLayout.addWidget(self.label_10, 9, 1, 1, 1, QtCore.Qt.AlignLeft) self.label_4 = QtWidgets.QLabel(self.centralwidget) self.label_4.setObjectName("label_4") self.gridLayout.addWidget(self.label_4, 9, 0, 1, 1) self.line_2 = QtWidgets.QFrame(self.centralwidget) self.line_2.setFrameShape(QtWidgets.QFrame.HLine) self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_2.setObjectName("line_2") self.gridLayout.addWidget(self.line_2, 7, 0, 1, 2) self.amp_control = QtWidgets.QCheckBox(self.centralwidget) self.amp_control.setObjectName("amp_control") self.gridLayout.addWidget(self.amp_control, 16, 0, 1, 2) self.u_out_rms = QtWidgets.QLabel(self.centralwidget) self.u_out_rms.setObjectName("u_out_rms") self.gridLayout.addWidget(self.u_out_rms, 6, 0, 1, 1) self.ctrl_type = QtWidgets.QComboBox(self.centralwidget) self.ctrl_type.setObjectName("ctrl_type") self.ctrl_type.addItem("") self.ctrl_type.addItem("") self.ctrl_type.addItem("") self.ctrl_type.addItem("") self.gridLayout.addWidget(self.ctrl_type, 12, 1, 1, 1) self.i_out_rms = QtWidgets.QLabel(self.centralwidget) self.i_out_rms.setObjectName("i_out_rms") self.gridLayout.addWidget(self.i_out_rms, 10, 0, 1, 1) self.line_3 = QtWidgets.QFrame(self.centralwidget) self.line_3.setFrameShape(QtWidgets.QFrame.HLine) self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_3.setObjectName("line_3") self.gridLayout.addWidget(self.line_3, 11, 0, 1, 2) self.i_out_thd = QtWidgets.QLabel(self.centralwidget) self.i_out_thd.setObjectName("i_out_thd") self.gridLayout.addWidget(self.i_out_thd, 10, 1, 1, 1) self.lbl_amplituda = QtWidgets.QLabel(self.centralwidget) self.lbl_amplituda.setObjectName("lbl_amplituda") self.gridLayout.addWidget(self.lbl_amplituda, 18, 0, 1, 2, QtCore.Qt.AlignHCenter) self.label_12 = QtWidgets.QLabel(self.centralwidget) self.label_12.setObjectName("label_12") self.gridLayout.addWidget(self.label_12, 14, 0, 1, 1) self.ctrl_dc_mode = QtWidgets.QComboBox(self.centralwidget) self.ctrl_dc_mode.setObjectName("ctrl_dc_mode") self.ctrl_dc_mode.addItem("") self.ctrl_dc_mode.addItem("") self.ctrl_dc_mode.addItem("") self.gridLayout.addWidget(self.ctrl_dc_mode, 14, 1, 1, 1) self.line_5 = QtWidgets.QFrame(self.centralwidget) self.line_5.setFrameShape(QtWidgets.QFrame.HLine) self.line_5.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_5.setObjectName("line_5") self.gridLayout.addWidget(self.line_5, 15, 0, 1, 2) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 22)) self.menubar.setObjectName("menubar") self.menuFile = QtWidgets.QMenu(self.menubar) self.menuFile.setObjectName("menuFile") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.actionQuit = QtWidgets.QAction(MainWindow) self.actionQuit.setObjectName("actionQuit") self.actionConnect_Disconnect = QtWidgets.QAction(MainWindow) self.actionConnect_Disconnect.setObjectName("actionConnect_Disconnect") self.actionCom_statistics = QtWidgets.QAction(MainWindow) self.actionCom_statistics.setObjectName("actionCom_statistics") self.menuFile.addAction(self.actionConnect_Disconnect) self.menuFile.addAction(self.actionCom_statistics) self.menuFile.addSeparator() self.menuFile.addAction(self.actionQuit) self.menubar.addAction(self.menuFile.menuAction()) self.retranslateUi(MainWindow) self.tabWidget.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "DLOG_viewer")) self.u_in_rms.setText(_translate("MainWindow", "0.0")) self.label_6.setText(_translate("MainWindow", "U_in")) self.u_in_thd.setText(_translate("MainWindow", "0.0")) self.ch1_chkbox.setText(_translate("MainWindow", "U_in")) self.ch2_chkbox.setText(_translate("MainWindow", "U_out")) self.ch3_chkbox.setText(_translate("MainWindow", "Err")) self.ch4_chkbox.setText(_translate("MainWindow", "I_out")) self.ch5_chkbox.setText(_translate("MainWindow", "Ch5")) self.ch6_chkbox.setText(_translate("MainWindow", "Ch6")) self.ch7_chkbox.setText(_translate("MainWindow", "Ch7")) self.ch8_chkbox.setText(_translate("MainWindow", "Ch8")) self.prescalar_label.setText(_translate("MainWindow", "Prescalar")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_mcu), _translate("MainWindow", "Grafi")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_pc), _translate("MainWindow", "Parametri")) self.label_9.setText(_translate("MainWindow", "THD")) self.label_11.setText(_translate("MainWindow", "Amplituda")) self.label_2.setText(_translate("MainWindow", "THD")) self.label_8.setText(_translate("MainWindow", "Tip regulacije")) self.u_out_thd.setText(_translate("MainWindow", "0.0")) self.label.setText(_translate("MainWindow", "RMS")) self.label_3.setText(_translate("MainWindow", "U_out")) self.label_5.setText(_translate("MainWindow", "I_out")) self.label_7.setText(_translate("MainWindow", "RMS")) self.label_10.setText(_translate("MainWindow", "THD")) self.label_4.setText(_translate("MainWindow", "RMS")) self.amp_control.setText( _translate("MainWindow", "Regulacija amplitude")) self.u_out_rms.setText(_translate("MainWindow", "0.0")) self.ctrl_type.setItemText(0, _translate("MainWindow", "PI_ONLY")) self.ctrl_type.setItemText(1, _translate("MainWindow", "PI_REP")) self.ctrl_type.setItemText(2, _translate("MainWindow", "REP")) self.ctrl_type.setItemText(3, _translate("MainWindow", "PI_RES")) self.i_out_rms.setText(_translate("MainWindow", "0.0")) self.i_out_thd.setText(_translate("MainWindow", "0.0")) self.lbl_amplituda.setText(_translate("MainWindow", "230")) self.label_12.setText(_translate("MainWindow", "DC regulacija")) self.ctrl_dc_mode.setItemText(0, _translate("MainWindow", "None")) self.ctrl_dc_mode.setItemText(1, _translate("MainWindow", "Voltage")) self.ctrl_dc_mode.setItemText(2, _translate("MainWindow", "Current")) self.menuFile.setTitle(_translate("MainWindow", "File")) self.actionQuit.setText(_translate("MainWindow", "Quit")) self.actionConnect_Disconnect.setText( _translate("MainWindow", "Connect/Disconnect")) self.actionCom_statistics.setText( _translate("MainWindow", "Com statistics"))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(658, 656) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setMinimumSize(QtCore.QSize(600, 400)) self.centralwidget.setObjectName("centralwidget") self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget) self.verticalLayout.setObjectName("verticalLayout") self.splitter_2 = QtWidgets.QSplitter(self.centralwidget) self.splitter_2.setOrientation(QtCore.Qt.Horizontal) self.splitter_2.setObjectName("splitter_2") self.layoutWidget = QtWidgets.QWidget(self.splitter_2) self.layoutWidget.setObjectName("layoutWidget") self.horizontalLayout = QtWidgets.QHBoxLayout(self.layoutWidget) self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.horizontalLayout.setObjectName("horizontalLayout") self.image_path = QtWidgets.QLineEdit(self.layoutWidget) self.image_path.setText("") self.image_path.setObjectName("image_path") self.horizontalLayout.addWidget(self.image_path) self.find = QtWidgets.QPushButton(self.layoutWidget) self.find.setObjectName("find") self.horizontalLayout.addWidget(self.find) self.load = QtWidgets.QPushButton(self.splitter_2) self.load.setMaximumSize(QtCore.QSize(100, 50)) self.load.setObjectName("load") self.verticalLayout.addWidget(self.splitter_2) self.image = PlotWidget(self.centralwidget) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.NoBrush) self.image.setBackgroundBrush(brush) self.image.setObjectName("image") self.verticalLayout.addWidget(self.image) self.splitter = QtWidgets.QSplitter(self.centralwidget) self.splitter.setOrientation(QtCore.Qt.Horizontal) self.splitter.setObjectName("splitter") self.trash = SpinBox(self.splitter) self.trash.setMaximumSize(QtCore.QSize(100, 16777215)) self.trash.setAlignment(QtCore.Qt.AlignCenter) self.trash.setButtonSymbols(QtWidgets.QAbstractSpinBox.UpDownArrows) self.trash.setMinimum(0) self.trash.setMaximum(1) self.trash.setProperty("value", 0) self.trash.setObjectName("trash") self.go = QtWidgets.QPushButton(self.splitter) self.go.setLayoutDirection(QtCore.Qt.LeftToRight) self.go.setObjectName("go") self.verticalLayout.addWidget(self.splitter) self.formula = QtWidgets.QLineEdit(self.centralwidget) self.formula.setAlignment(QtCore.Qt.AlignCenter) self.formula.setReadOnly(True) self.formula.setObjectName("formula") self.verticalLayout.addWidget(self.formula) MainWindow.setCentralWidget(self.centralwidget) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "ImgToLatex")) self.find.setText(_translate("MainWindow", "Обзор")) self.load.setText(_translate("MainWindow", "Загрузить")) self.go.setToolTip(_translate("MainWindow", "Перевести формулу")) self.go.setText(_translate("MainWindow", "Перевести"))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(770, 590) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth()) MainWindow.setSizePolicy(sizePolicy) MainWindow.setMinimumSize(QtCore.QSize(500, 500)) self.centralwidget = QtGui.QWidget(MainWindow) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth()) self.centralwidget.setSizePolicy(sizePolicy) self.centralwidget.setMaximumSize(QtCore.QSize(3000, 3000)) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.gridLayout = QtGui.QGridLayout(self.centralwidget) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.graphicsView = PlotWidget(self.centralwidget) self.graphicsView.setObjectName(_fromUtf8("graphicsView")) self.gridLayout.addWidget(self.graphicsView, 0, 0, 1, 2) self.groupBox = QtGui.QGroupBox(self.centralwidget) self.groupBox.setMinimumSize(QtCore.QSize(0, 200)) self.groupBox.setFlat(False) self.groupBox.setCheckable(False) self.groupBox.setObjectName(_fromUtf8("groupBox")) self.horizontalLayout = QtGui.QHBoxLayout(self.groupBox) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.formLayout = QtGui.QFormLayout() self.formLayout.setSizeConstraint(QtGui.QLayout.SetMinAndMaxSize) self.formLayout.setFieldGrowthPolicy(QtGui.QFormLayout.FieldsStayAtSizeHint) self.formLayout.setLabelAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) self.formLayout.setSpacing(30) self.formLayout.setObjectName(_fromUtf8("formLayout")) self.label = QtGui.QLabel(self.groupBox) self.label.setScaledContents(False) self.label.setObjectName(_fromUtf8("label")) self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.label) self.spinBox = SpinBox(self.groupBox) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.spinBox.sizePolicy().hasHeightForWidth()) self.spinBox.setSizePolicy(sizePolicy) self.spinBox.setMinimumSize(QtCore.QSize(100, 0)) self.spinBox.setProperty("value", 10) self.spinBox.setObjectName(_fromUtf8("spinBox")) self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.spinBox) self.label_3 = QtGui.QLabel(self.groupBox) self.label_3.setObjectName(_fromUtf8("label_3")) self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.label_3) self.lcdNumber = QtGui.QLCDNumber(self.groupBox) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.lcdNumber.sizePolicy().hasHeightForWidth()) self.lcdNumber.setSizePolicy(sizePolicy) self.lcdNumber.setMinimumSize(QtCore.QSize(100, 0)) self.lcdNumber.setSmallDecimalPoint(True) self.lcdNumber.setNumDigits(4) self.lcdNumber.setDigitCount(4) self.lcdNumber.setSegmentStyle(QtGui.QLCDNumber.Flat) self.lcdNumber.setProperty("value", 25.0) self.lcdNumber.setObjectName(_fromUtf8("lcdNumber")) self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.lcdNumber) self.persistenceBox = QtGui.QSpinBox(self.groupBox) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.persistenceBox.sizePolicy().hasHeightForWidth()) self.persistenceBox.setSizePolicy(sizePolicy) self.persistenceBox.setMinimumSize(QtCore.QSize(100, 0)) self.persistenceBox.setMinimum(1) self.persistenceBox.setMaximum(10) self.persistenceBox.setObjectName(_fromUtf8("persistenceBox")) self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.persistenceBox) self.label_4 = QtGui.QLabel(self.groupBox) self.label_4.setObjectName(_fromUtf8("label_4")) self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.label_4) self.label_2 = QtGui.QLabel(self.groupBox) self.label_2.setObjectName(_fromUtf8("label_2")) self.formLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.label_2) self.wavelength_label = QtGui.QLabel(self.groupBox) self.wavelength_label.setObjectName(_fromUtf8("wavelength_label")) self.formLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.wavelength_label) self.horizontalLayout.addLayout(self.formLayout) self.gridLayout.addWidget(self.groupBox, 1, 0, 1, 1) self.frame = QtGui.QFrame(self.centralwidget) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.frame.sizePolicy().hasHeightForWidth()) self.frame.setSizePolicy(sizePolicy) self.frame.setFrameShape(QtGui.QFrame.NoFrame) self.frame.setFrameShadow(QtGui.QFrame.Plain) self.frame.setObjectName(_fromUtf8("frame")) self.gridLayout.addWidget(self.frame, 1, 1, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 770, 22)) self.menubar.setObjectName(_fromUtf8("menubar")) MainWindow.setMenuBar(self.menubar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(_translate("MainWindow", "USB4000 GUI", None)) self.groupBox.setTitle(_translate("MainWindow", "Settings", None)) self.label.setText(_translate("MainWindow", "Integration time", None)) self.label_3.setText(_translate("MainWindow", "Temperature", None)) self.label_4.setText(_translate("MainWindow", "Persistence", None)) self.label_2.setText(_translate("MainWindow", "Wavelength", None)) self.wavelength_label.setText(_translate("MainWindow", "0 nm", None))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(770, 590) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( MainWindow.sizePolicy().hasHeightForWidth()) MainWindow.setSizePolicy(sizePolicy) MainWindow.setMinimumSize(QtCore.QSize(500, 500)) self.centralwidget = QtGui.QWidget(MainWindow) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.centralwidget.sizePolicy().hasHeightForWidth()) self.centralwidget.setSizePolicy(sizePolicy) self.centralwidget.setMaximumSize(QtCore.QSize(3000, 3000)) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.gridLayout = QtGui.QGridLayout(self.centralwidget) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.graphicsView = PlotWidget(self.centralwidget) self.graphicsView.setObjectName(_fromUtf8("graphicsView")) self.gridLayout.addWidget(self.graphicsView, 0, 0, 1, 2) self.groupBox = QtGui.QGroupBox(self.centralwidget) self.groupBox.setMinimumSize(QtCore.QSize(0, 200)) self.groupBox.setFlat(False) self.groupBox.setCheckable(False) self.groupBox.setObjectName(_fromUtf8("groupBox")) self.horizontalLayout = QtGui.QHBoxLayout(self.groupBox) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.formLayout = QtGui.QFormLayout() self.formLayout.setSizeConstraint(QtGui.QLayout.SetMinAndMaxSize) self.formLayout.setFieldGrowthPolicy( QtGui.QFormLayout.FieldsStayAtSizeHint) self.formLayout.setLabelAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) self.formLayout.setSpacing(30) self.formLayout.setObjectName(_fromUtf8("formLayout")) self.label = QtGui.QLabel(self.groupBox) self.label.setScaledContents(False) self.label.setObjectName(_fromUtf8("label")) self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.label) self.spinBox = SpinBox(self.groupBox) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.spinBox.sizePolicy().hasHeightForWidth()) self.spinBox.setSizePolicy(sizePolicy) self.spinBox.setMinimumSize(QtCore.QSize(100, 0)) self.spinBox.setProperty("value", 10) self.spinBox.setObjectName(_fromUtf8("spinBox")) self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.spinBox) self.label_3 = QtGui.QLabel(self.groupBox) self.label_3.setObjectName(_fromUtf8("label_3")) self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.label_3) self.lcdNumber = QtGui.QLCDNumber(self.groupBox) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.lcdNumber.sizePolicy().hasHeightForWidth()) self.lcdNumber.setSizePolicy(sizePolicy) self.lcdNumber.setMinimumSize(QtCore.QSize(100, 0)) self.lcdNumber.setSmallDecimalPoint(True) self.lcdNumber.setNumDigits(4) self.lcdNumber.setDigitCount(4) self.lcdNumber.setSegmentStyle(QtGui.QLCDNumber.Flat) self.lcdNumber.setProperty("value", 25.0) self.lcdNumber.setObjectName(_fromUtf8("lcdNumber")) self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.lcdNumber) self.persistenceBox = QtGui.QSpinBox(self.groupBox) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.persistenceBox.sizePolicy().hasHeightForWidth()) self.persistenceBox.setSizePolicy(sizePolicy) self.persistenceBox.setMinimumSize(QtCore.QSize(100, 0)) self.persistenceBox.setMinimum(1) self.persistenceBox.setMaximum(10) self.persistenceBox.setObjectName(_fromUtf8("persistenceBox")) self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.persistenceBox) self.label_4 = QtGui.QLabel(self.groupBox) self.label_4.setObjectName(_fromUtf8("label_4")) self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.label_4) self.label_2 = QtGui.QLabel(self.groupBox) self.label_2.setObjectName(_fromUtf8("label_2")) self.formLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.label_2) self.wavelength_label = QtGui.QLabel(self.groupBox) self.wavelength_label.setObjectName(_fromUtf8("wavelength_label")) self.formLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.wavelength_label) self.horizontalLayout.addLayout(self.formLayout) self.gridLayout.addWidget(self.groupBox, 1, 0, 1, 1) self.frame = QtGui.QFrame(self.centralwidget) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.frame.sizePolicy().hasHeightForWidth()) self.frame.setSizePolicy(sizePolicy) self.frame.setFrameShape(QtGui.QFrame.NoFrame) self.frame.setFrameShadow(QtGui.QFrame.Plain) self.frame.setObjectName(_fromUtf8("frame")) self.gridLayout.addWidget(self.frame, 1, 1, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 770, 22)) self.menubar.setObjectName(_fromUtf8("menubar")) MainWindow.setMenuBar(self.menubar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(_translate("MainWindow", "USB4000 GUI", None)) self.groupBox.setTitle(_translate("MainWindow", "Settings", None)) self.label.setText(_translate("MainWindow", "Integration time", None)) self.label_3.setText(_translate("MainWindow", "Temperature", None)) self.label_4.setText(_translate("MainWindow", "Persistence", None)) self.label_2.setText(_translate("MainWindow", "Wavelength", None)) self.wavelength_label.setText(_translate("MainWindow", "0 nm", None))