class Ui_plotWindow(object): def setupUi(self, plotWindow): plotWindow.setObjectName(_fromUtf8("plotWindow")) plotWindow.resize(540, 350) plotWindow.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.gridLayout = QtGui.QGridLayout(plotWindow) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.graphicsView = PlotWidget(plotWindow) self.graphicsView.hideButtons() self.graphicsView.showGrid(True, True) self.graphicsView.setMenuEnabled(False) self.graphicsView.setMouseEnabled(False, False) self.graphicsView.setFrameShadow(QtGui.QFrame.Plain) self.graphicsView.setFrameShape(QtGui.QFrame.StyledPanel) self.graphicsView.setObjectName(_fromUtf8("graphicsView")) self.gridLayout.addWidget(self.graphicsView, 0, 1, 1, 1) self.treeWidget = QtGui.QTreeWidget(plotWindow) self.treeWidget.setMaximumSize(QtCore.QSize(200, 16777215)) self.treeWidget.setHorizontalScrollBarPolicy( QtCore.Qt.ScrollBarAlwaysOff) self.treeWidget.setRootIsDecorated(False) self.treeWidget.setItemsExpandable(False) self.treeWidget.setExpandsOnDoubleClick(False) self.treeWidget.setColumnCount(3) self.treeWidget.setObjectName(_fromUtf8("treeWidget")) self.treeWidget.header().setVisible(True) self.treeWidget.header().setDefaultSectionSize(80) self.gridLayout.addWidget(self.treeWidget, 0, 0, 1, 1) self.retranslateUi(plotWindow) QtCore.QMetaObject.connectSlotsByName(plotWindow) def retranslateUi(self, plotWindow): plotWindow.setWindowTitle( QtGui.QApplication.translate("plotWindow", "Form", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget.headerItem().setText( 0, QtGui.QApplication.translate("plotWindow", "Legend", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget.headerItem().setText( 1, QtGui.QApplication.translate("plotWindow", "Name", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget.headerItem().setText( 2, QtGui.QApplication.translate("plotWindow", "Value", None, QtGui.QApplication.UnicodeUTF8))
class GraphUi(QWidget): uiUpdateDelegate = pyqtSignal() def __init__(self): super().__init__() self.resize(600, 600) self.uiUpdateDelegate.connect(self.uiUpdater) pg.setConfigOption('background', 'w') self.Graph = PlotWidget(self) self.Graph.setGeometry(QRect(0, 0, 600, 500)) self.Graph.setFrameShape(QFrame.NoFrame) self.Graph.setObjectName("Graph") self.Graph.showGrid(x=True, y=True) def uiUpdater(self): self.Graph.clear() self.Graph.plot(temperature, pen=pg.mkPen('r', width=2)) self.Graph.plot(humidity, pen=pg.mkPen('b', width=2))
class Ui_DataPlotPanel(object): def setupUi(self, DataPlotPanel): DataPlotPanel.setObjectName(_fromUtf8("DataPlotPanel")) DataPlotPanel.resize(540, 350) DataPlotPanel.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.gridLayout = QtGui.QGridLayout(DataPlotPanel) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.plot_view = PlotWidget(DataPlotPanel) self.plot_view.setFrameShape(QtGui.QFrame.StyledPanel) self.plot_view.setFrameShadow(QtGui.QFrame.Plain) self.plot_view.setObjectName(_fromUtf8("plot_view")) self.gridLayout.addWidget(self.plot_view, 0, 1, 1, 1) self.tree_widget = QtGui.QTreeWidget(DataPlotPanel) self.tree_widget.setMaximumSize(QtCore.QSize(200, 16777215)) self.tree_widget.setHorizontalScrollBarPolicy( QtCore.Qt.ScrollBarAlwaysOff) self.tree_widget.setRootIsDecorated(True) self.tree_widget.setItemsExpandable(True) self.tree_widget.setExpandsOnDoubleClick(False) self.tree_widget.setColumnCount(3) self.tree_widget.setObjectName(_fromUtf8("tree_widget")) self.tree_widget.header().setVisible(True) self.tree_widget.header().setDefaultSectionSize(80) self.gridLayout.addWidget(self.tree_widget, 0, 0, 1, 1) self.retranslateUi(DataPlotPanel) QtCore.QMetaObject.connectSlotsByName(DataPlotPanel) def retranslateUi(self, DataPlotPanel): DataPlotPanel.setWindowTitle(_translate("DataPlotPanel", "Form", None)) self.tree_widget.headerItem().setText( 0, _translate("DataPlotPanel", "Legend", None)) self.tree_widget.headerItem().setText( 1, _translate("DataPlotPanel", "Name", None)) self.tree_widget.headerItem().setText( 2, _translate("DataPlotPanel", "Value", None))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(1416, 576) MainWindow.setTabShape(QtGui.QTabWidget.Rounded) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.figure1 = GraphicsView(self.centralwidget) self.figure1.setGeometry(QtCore.QRect(20, 10, 1141, 196)) self.figure1.setObjectName(_fromUtf8("figure1")) self.figure2 = PlotWidget(self.centralwidget) self.figure2.setGeometry(QtCore.QRect(20, 230, 1141, 196)) self.figure2.setFrameShape(QtGui.QFrame.StyledPanel) self.figure2.setFrameShadow(QtGui.QFrame.Sunken) self.figure2.setObjectName(_fromUtf8("figure2")) self.buttonStart = QtGui.QPushButton(self.centralwidget) self.buttonStart.setGeometry(QtCore.QRect(50, 450, 75, 41)) self.buttonStart.setStyleSheet( _fromUtf8( "background-color: rgb(170, 170, 255);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255, 0, 0, 255), stop:0.166 rgba(255, 255, 0, 255), stop:0.333 rgba(0, 255, 0, 255), stop:0.5 rgba(0, 255, 255, 255), stop:0.666 rgba(0, 0, 255, 255), stop:0.833 rgba(255, 0, 255, 255), stop:1 rgba(255, 0, 0, 255));\n" "font: 10pt \"Calibri\";")) self.buttonStart.setObjectName(_fromUtf8("buttonStart")) self.buttonStop = QtGui.QPushButton(self.centralwidget) self.buttonStop.setGeometry(QtCore.QRect(160, 450, 75, 41)) self.buttonStop.setStyleSheet( _fromUtf8("background-color: rgb(170, 170, 255);\n" "border-color: rgb(255, 0, 0);\n" "border-color: rgb(0, 0, 0);\n" "font: 10pt \"Calibri\";")) self.buttonStop.setObjectName(_fromUtf8("buttonStop")) self.gridLayoutWidget = QtGui.QWidget(self.centralwidget) self.gridLayoutWidget.setGeometry(QtCore.QRect(1200, 110, 191, 411)) self.gridLayoutWidget.setObjectName(_fromUtf8("gridLayoutWidget")) self.gridLayout = QtGui.QGridLayout(self.gridLayoutWidget) self.gridLayout.setMargin(0) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.sliderBright = QtGui.QSlider(self.gridLayoutWidget) self.sliderBright.setMaximum(255) self.sliderBright.setOrientation(QtCore.Qt.Horizontal) self.sliderBright.setInvertedAppearance(False) self.sliderBright.setTickPosition(QtGui.QSlider.TicksBothSides) self.sliderBright.setTickInterval(50) self.sliderBright.setObjectName(_fromUtf8("sliderBright")) self.gridLayout.addWidget(self.sliderBright, 2, 0, 1, 1) self.sliderCont = QtGui.QSlider(self.gridLayoutWidget) self.sliderCont.setMaximum(255) self.sliderCont.setOrientation(QtCore.Qt.Horizontal) self.sliderCont.setTickPosition(QtGui.QSlider.TicksBothSides) self.sliderCont.setTickInterval(50) self.sliderCont.setObjectName(_fromUtf8("sliderCont")) self.gridLayout.addWidget(self.sliderCont, 5, 0, 1, 1) self.sliderGain = QtGui.QSlider(self.gridLayoutWidget) self.sliderGain.setMaximum(255) self.sliderGain.setOrientation(QtCore.Qt.Horizontal) self.sliderGain.setTickPosition(QtGui.QSlider.TicksBothSides) self.sliderGain.setTickInterval(50) self.sliderGain.setObjectName(_fromUtf8("sliderGain")) self.gridLayout.addWidget(self.sliderGain, 9, 0, 1, 1) self.sliderSat = QtGui.QSlider(self.gridLayoutWidget) self.sliderSat.setMaximum(255) self.sliderSat.setOrientation(QtCore.Qt.Horizontal) self.sliderSat.setTickPosition(QtGui.QSlider.TicksBothSides) self.sliderSat.setTickInterval(50) self.sliderSat.setObjectName(_fromUtf8("sliderSat")) self.gridLayout.addWidget(self.sliderSat, 7, 0, 1, 1) self.label_6 = QtGui.QLabel(self.gridLayoutWidget) self.label_6.setObjectName(_fromUtf8("label_6")) self.gridLayout.addWidget(self.label_6, 13, 0, 1, 1) self.sliderWB = QtGui.QSlider(self.gridLayoutWidget) self.sliderWB.setMaximum(10000) self.sliderWB.setSingleStep(500) self.sliderWB.setPageStep(1000) self.sliderWB.setOrientation(QtCore.Qt.Horizontal) self.sliderWB.setTickPosition(QtGui.QSlider.TicksBothSides) self.sliderWB.setTickInterval(1000) self.sliderWB.setObjectName(_fromUtf8("sliderWB")) self.gridLayout.addWidget(self.sliderWB, 14, 0, 1, 1) self.sliderExpo = QtGui.QSlider(self.gridLayoutWidget) self.sliderExpo.setMinimum(1) self.sliderExpo.setMaximum(7) self.sliderExpo.setOrientation(QtCore.Qt.Horizontal) self.sliderExpo.setTickPosition(QtGui.QSlider.TicksBothSides) self.sliderExpo.setTickInterval(1) self.sliderExpo.setObjectName(_fromUtf8("sliderExpo")) self.gridLayout.addWidget(self.sliderExpo, 12, 0, 1, 1) self.label_5 = QtGui.QLabel(self.gridLayoutWidget) self.label_5.setObjectName(_fromUtf8("label_5")) self.gridLayout.addWidget(self.label_5, 10, 0, 1, 1) self.label = QtGui.QLabel(self.gridLayoutWidget) self.label.setObjectName(_fromUtf8("label")) self.gridLayout.addWidget(self.label, 0, 0, 1, 1) self.label_4 = QtGui.QLabel(self.gridLayoutWidget) self.label_4.setObjectName(_fromUtf8("label_4")) self.gridLayout.addWidget(self.label_4, 8, 0, 1, 1) self.label_2 = QtGui.QLabel(self.gridLayoutWidget) self.label_2.setObjectName(_fromUtf8("label_2")) self.gridLayout.addWidget(self.label_2, 6, 0, 1, 1) self.label_3 = QtGui.QLabel(self.gridLayoutWidget) self.label_3.setObjectName(_fromUtf8("label_3")) self.gridLayout.addWidget(self.label_3, 3, 0, 1, 1) self.buttonGrab = QtGui.QPushButton(self.centralwidget) self.buttonGrab.setGeometry(QtCore.QRect(1230, 60, 111, 31)) self.buttonGrab.setObjectName(_fromUtf8("buttonGrab")) self.lineFilename = QtGui.QLineEdit(self.centralwidget) self.lineFilename.setGeometry(QtCore.QRect(1230, 20, 113, 20)) self.lineFilename.setObjectName(_fromUtf8("lineFilename")) self.label_7 = QtGui.QLabel(self.centralwidget) self.label_7.setGeometry(QtCore.QRect(1180, 20, 46, 13)) self.label_7.setObjectName(_fromUtf8("label_7")) self.buttonCalibrate = QtGui.QPushButton(self.centralwidget) self.buttonCalibrate.setGeometry(QtCore.QRect(50, 500, 75, 23)) self.buttonCalibrate.setObjectName(_fromUtf8("buttonCalibrate")) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1416, 21)) self.menubar.setObjectName(_fromUtf8("menubar")) MainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(MainWindow) self.statusbar.setObjectName(_fromUtf8("statusbar")) MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) MainWindow.setTabOrder(self.figure1, self.sliderGain) MainWindow.setTabOrder(self.sliderGain, self.buttonStart) MainWindow.setTabOrder(self.buttonStart, self.sliderExpo) MainWindow.setTabOrder(self.sliderExpo, self.figure2) MainWindow.setTabOrder(self.figure2, self.sliderSat) MainWindow.setTabOrder(self.sliderSat, self.sliderCont) MainWindow.setTabOrder(self.sliderCont, self.sliderBright) MainWindow.setTabOrder(self.sliderBright, self.buttonStop) MainWindow.setTabOrder(self.buttonStop, self.sliderWB) def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None)) self.buttonStart.setText(_translate("MainWindow", "Start ", None)) self.buttonStop.setText(_translate("MainWindow", "Stop ", None)) self.label_6.setText(_translate("MainWindow", "White Balance", None)) self.label_5.setText(_translate("MainWindow", "Exposure", None)) self.label.setText(_translate("MainWindow", "Brightness", None)) self.label_4.setText(_translate("MainWindow", "Gain", None)) self.label_2.setText(_translate("MainWindow", "Saturation", None)) self.label_3.setText(_translate("MainWindow", "Contrast", None)) self.buttonGrab.setText( _translate("MainWindow", "Save Spectrum Data", None)) self.label_7.setText(_translate("MainWindow", "Filename:", None)) self.buttonCalibrate.setText( _translate("MainWindow", "Calibrate", None))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(968, 527) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( MainWindow.sizePolicy().hasHeightForWidth()) MainWindow.setSizePolicy(sizePolicy) MainWindow.setMaximumSize(QtCore.QSize(1000, 700)) MainWindow.setTabShape(QtGui.QTabWidget.Rounded) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setMaximumSize(QtCore.QSize(1000, 480)) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.horizontalLayout_2 = QtGui.QHBoxLayout(self.centralwidget) self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) self.tabWidget = QtGui.QTabWidget(self.centralwidget) self.tabWidget.setObjectName(_fromUtf8("tabWidget")) self.tab_2 = QtGui.QWidget() sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.tab_2.sizePolicy().hasHeightForWidth()) self.tab_2.setSizePolicy(sizePolicy) self.tab_2.setObjectName(_fromUtf8("tab_2")) self.horizontalLayout_3 = QtGui.QHBoxLayout(self.tab_2) self.horizontalLayout_3.setMargin(0) self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3")) self.frame_6 = QtGui.QFrame(self.tab_2) self.frame_6.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_6.setFrameShadow(QtGui.QFrame.Raised) self.frame_6.setObjectName(_fromUtf8("frame_6")) self.verticalLayout_5 = QtGui.QVBoxLayout(self.frame_6) self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5")) self.f_ROI = GraphicsView(self.frame_6) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.f_ROI.sizePolicy().hasHeightForWidth()) self.f_ROI.setSizePolicy(sizePolicy) self.f_ROI.setMinimumSize(QtCore.QSize(320, 240)) self.f_ROI.setMaximumSize(QtCore.QSize(320, 240)) self.f_ROI.setObjectName(_fromUtf8("f_ROI")) self.verticalLayout_5.addWidget(self.f_ROI) spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.verticalLayout_5.addItem(spacerItem) self.horizontalLayout_3.addWidget(self.frame_6) self.frame_4 = QtGui.QFrame(self.tab_2) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.frame_4.sizePolicy().hasHeightForWidth()) self.frame_4.setSizePolicy(sizePolicy) self.frame_4.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_4.setFrameShadow(QtGui.QFrame.Raised) self.frame_4.setObjectName(_fromUtf8("frame_4")) self.verticalLayout_3 = QtGui.QVBoxLayout(self.frame_4) self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3")) self.groupBox_3 = QtGui.QGroupBox(self.frame_4) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.groupBox_3.sizePolicy().hasHeightForWidth()) self.groupBox_3.setSizePolicy(sizePolicy) self.groupBox_3.setObjectName(_fromUtf8("groupBox_3")) self.verticalLayout_6 = QtGui.QVBoxLayout(self.groupBox_3) self.verticalLayout_6.setObjectName(_fromUtf8("verticalLayout_6")) self.gridLayout_3 = QtGui.QGridLayout() self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3")) self.label_14 = QtGui.QLabel(self.groupBox_3) self.label_14.setObjectName(_fromUtf8("label_14")) self.gridLayout_3.addWidget(self.label_14, 4, 0, 1, 1) self.label_13 = QtGui.QLabel(self.groupBox_3) self.label_13.setObjectName(_fromUtf8("label_13")) self.gridLayout_3.addWidget(self.label_13, 0, 0, 1, 1) self.laserHigh = QtGui.QLineEdit(self.groupBox_3) self.laserHigh.setObjectName(_fromUtf8("laserHigh")) self.gridLayout_3.addWidget(self.laserHigh, 1, 0, 1, 1) self.label_15 = QtGui.QLabel(self.groupBox_3) self.label_15.setObjectName(_fromUtf8("label_15")) self.gridLayout_3.addWidget(self.label_15, 2, 0, 1, 1) self.projHigh = QtGui.QLineEdit(self.groupBox_3) self.projHigh.setObjectName(_fromUtf8("projHigh")) self.gridLayout_3.addWidget(self.projHigh, 3, 0, 1, 1) self.label_16 = QtGui.QLabel(self.groupBox_3) self.label_16.setObjectName(_fromUtf8("label_16")) self.gridLayout_3.addWidget(self.label_16, 6, 0, 1, 1) self.laserLow = QtGui.QLineEdit(self.groupBox_3) self.laserLow.setObjectName(_fromUtf8("laserLow")) self.gridLayout_3.addWidget(self.laserLow, 5, 0, 1, 1) self.projLow = QtGui.QLineEdit(self.groupBox_3) self.projLow.setObjectName(_fromUtf8("projLow")) self.gridLayout_3.addWidget(self.projLow, 7, 0, 1, 1) self.verticalLayout_6.addLayout(self.gridLayout_3) self.buttonUpdateProjection = QtGui.QPushButton(self.groupBox_3) self.buttonUpdateProjection.setObjectName( _fromUtf8("buttonUpdateProjection")) self.verticalLayout_6.addWidget(self.buttonUpdateProjection) self.verticalLayout_3.addWidget(self.groupBox_3) self.horizontalLayout_3.addWidget(self.frame_4) self.frame_3 = QtGui.QFrame(self.tab_2) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.frame_3.sizePolicy().hasHeightForWidth()) self.frame_3.setSizePolicy(sizePolicy) self.frame_3.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_3.setFrameShadow(QtGui.QFrame.Raised) self.frame_3.setObjectName(_fromUtf8("frame_3")) self.verticalLayout_2 = QtGui.QVBoxLayout(self.frame_3) self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) self.label_12 = QtGui.QLabel(self.frame_3) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Maximum) 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.verticalLayout_2.addWidget(self.label_12) self.coor = QtGui.QLabel(self.frame_3) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.coor.sizePolicy().hasHeightForWidth()) self.coor.setSizePolicy(sizePolicy) self.coor.setObjectName(_fromUtf8("coor")) self.verticalLayout_2.addWidget(self.coor) self.groupBox = QtGui.QGroupBox(self.frame_3) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.groupBox.sizePolicy().hasHeightForWidth()) self.groupBox.setSizePolicy(sizePolicy) self.groupBox.setObjectName(_fromUtf8("groupBox")) self.verticalLayoutWidget = QtGui.QWidget(self.groupBox) self.verticalLayoutWidget.setGeometry(QtCore.QRect(10, 20, 131, 141)) self.verticalLayoutWidget.setObjectName( _fromUtf8("verticalLayoutWidget")) self.gridLayout_2 = QtGui.QGridLayout(self.verticalLayoutWidget) self.gridLayout_2.setMargin(0) self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) self.label_9 = QtGui.QLabel(self.verticalLayoutWidget) self.label_9.setObjectName(_fromUtf8("label_9")) self.gridLayout_2.addWidget(self.label_9, 1, 0, 1, 1) self.label_10 = QtGui.QLabel(self.verticalLayoutWidget) self.label_10.setObjectName(_fromUtf8("label_10")) self.gridLayout_2.addWidget(self.label_10, 2, 0, 1, 1) self.label_8 = QtGui.QLabel(self.verticalLayoutWidget) self.label_8.setObjectName(_fromUtf8("label_8")) self.gridLayout_2.addWidget(self.label_8, 0, 0, 1, 1) self.label_11 = QtGui.QLabel(self.verticalLayoutWidget) self.label_11.setObjectName(_fromUtf8("label_11")) self.gridLayout_2.addWidget(self.label_11, 3, 0, 1, 1) self.line_mincol = QtGui.QLineEdit(self.verticalLayoutWidget) self.line_mincol.setObjectName(_fromUtf8("line_mincol")) self.gridLayout_2.addWidget(self.line_mincol, 0, 1, 1, 1) self.line_maxcol = QtGui.QLineEdit(self.verticalLayoutWidget) self.line_maxcol.setObjectName(_fromUtf8("line_maxcol")) self.gridLayout_2.addWidget(self.line_maxcol, 1, 1, 1, 1) self.line_minrow = QtGui.QLineEdit(self.verticalLayoutWidget) self.line_minrow.setObjectName(_fromUtf8("line_minrow")) self.gridLayout_2.addWidget(self.line_minrow, 2, 1, 1, 1) self.line_maxrow = QtGui.QLineEdit(self.verticalLayoutWidget) self.line_maxrow.setObjectName(_fromUtf8("line_maxrow")) self.gridLayout_2.addWidget(self.line_maxrow, 3, 1, 1, 1) self.buttonUpdateROI = QtGui.QPushButton(self.groupBox) self.buttonUpdateROI.setGeometry(QtCore.QRect(30, 170, 75, 23)) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.buttonUpdateROI.sizePolicy().hasHeightForWidth()) self.buttonUpdateROI.setSizePolicy(sizePolicy) self.buttonUpdateROI.setObjectName(_fromUtf8("buttonUpdateROI")) self.verticalLayout_2.addWidget(self.groupBox) self.horizontalLayout_3.addWidget(self.frame_3) self.tabWidget.addTab(self.tab_2, _fromUtf8("")) self.tab = QtGui.QWidget() self.tab.setObjectName(_fromUtf8("tab")) self.verticalLayout_4 = QtGui.QVBoxLayout(self.tab) self.verticalLayout_4.setMargin(0) self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4")) self.figure1 = GraphicsView(self.tab) self.figure1.setAutoFillBackground(False) self.figure1.setObjectName(_fromUtf8("figure1")) self.verticalLayout_4.addWidget(self.figure1) self.figure2 = PlotWidget(self.tab) self.figure2.setFrameShape(QtGui.QFrame.StyledPanel) self.figure2.setFrameShadow(QtGui.QFrame.Sunken) self.figure2.setObjectName(_fromUtf8("figure2")) self.verticalLayout_4.addWidget(self.figure2) self.frame_5 = QtGui.QFrame(self.tab) self.frame_5.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_5.setFrameShadow(QtGui.QFrame.Raised) self.frame_5.setObjectName(_fromUtf8("frame_5")) self.horizontalLayout_4 = QtGui.QHBoxLayout(self.frame_5) self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4")) self.label_7 = QtGui.QLabel(self.frame_5) self.label_7.setObjectName(_fromUtf8("label_7")) self.horizontalLayout_4.addWidget(self.label_7) self.lineFilename = QtGui.QLineEdit(self.frame_5) self.lineFilename.setObjectName(_fromUtf8("lineFilename")) self.horizontalLayout_4.addWidget(self.lineFilename) self.buttonGrab = QtGui.QPushButton(self.frame_5) self.buttonGrab.setObjectName(_fromUtf8("buttonGrab")) self.horizontalLayout_4.addWidget(self.buttonGrab) self.verticalLayout_4.addWidget(self.frame_5) self.tabWidget.addTab(self.tab, _fromUtf8("")) self.horizontalLayout_2.addWidget(self.tabWidget) self.frame = QtGui.QFrame(self.centralwidget) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.frame.sizePolicy().hasHeightForWidth()) self.frame.setSizePolicy(sizePolicy) self.frame.setMaximumSize(QtCore.QSize(1000, 480)) self.frame.setFrameShape(QtGui.QFrame.StyledPanel) self.frame.setFrameShadow(QtGui.QFrame.Raised) self.frame.setObjectName(_fromUtf8("frame")) self.verticalLayout = QtGui.QVBoxLayout(self.frame) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.frame_2 = QtGui.QFrame(self.frame) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.frame_2.sizePolicy().hasHeightForWidth()) self.frame_2.setSizePolicy(sizePolicy) self.frame_2.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_2.setFrameShadow(QtGui.QFrame.Raised) self.frame_2.setObjectName(_fromUtf8("frame_2")) self.horizontalLayout = QtGui.QHBoxLayout(self.frame_2) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.buttonStart = QtGui.QPushButton(self.frame_2) self.buttonStart.setStyleSheet(_fromUtf8("")) self.buttonStart.setObjectName(_fromUtf8("buttonStart")) self.horizontalLayout.addWidget(self.buttonStart) self.buttonStop = QtGui.QPushButton(self.frame_2) self.buttonStop.setStyleSheet(_fromUtf8("")) self.buttonStop.setObjectName(_fromUtf8("buttonStop")) self.horizontalLayout.addWidget(self.buttonStop) self.verticalLayout.addWidget(self.frame_2) self.gridLayout = QtGui.QGridLayout() self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.label = QtGui.QLabel(self.frame) self.label.setObjectName(_fromUtf8("label")) self.gridLayout.addWidget(self.label, 0, 0, 1, 1) self.sliderCont = QtGui.QSlider(self.frame) self.sliderCont.setMaximum(255) self.sliderCont.setOrientation(QtCore.Qt.Horizontal) self.sliderCont.setTickPosition(QtGui.QSlider.TicksBothSides) self.sliderCont.setTickInterval(50) self.sliderCont.setObjectName(_fromUtf8("sliderCont")) self.gridLayout.addWidget(self.sliderCont, 5, 0, 1, 1) self.sliderSat = QtGui.QSlider(self.frame) self.sliderSat.setMaximum(255) self.sliderSat.setOrientation(QtCore.Qt.Horizontal) self.sliderSat.setTickPosition(QtGui.QSlider.TicksBothSides) self.sliderSat.setTickInterval(50) self.sliderSat.setObjectName(_fromUtf8("sliderSat")) self.gridLayout.addWidget(self.sliderSat, 7, 0, 1, 1) self.label_6 = QtGui.QLabel(self.frame) self.label_6.setObjectName(_fromUtf8("label_6")) self.gridLayout.addWidget(self.label_6, 13, 0, 1, 1) self.sliderWB = QtGui.QSlider(self.frame) self.sliderWB.setMaximum(10000) self.sliderWB.setSingleStep(500) self.sliderWB.setPageStep(1000) self.sliderWB.setOrientation(QtCore.Qt.Horizontal) self.sliderWB.setTickPosition(QtGui.QSlider.TicksBothSides) self.sliderWB.setTickInterval(1000) self.sliderWB.setObjectName(_fromUtf8("sliderWB")) self.gridLayout.addWidget(self.sliderWB, 14, 0, 1, 1) self.sliderBright = QtGui.QSlider(self.frame) self.sliderBright.setMaximum(255) self.sliderBright.setOrientation(QtCore.Qt.Horizontal) self.sliderBright.setInvertedAppearance(False) self.sliderBright.setTickPosition(QtGui.QSlider.TicksBothSides) self.sliderBright.setTickInterval(50) self.sliderBright.setObjectName(_fromUtf8("sliderBright")) self.gridLayout.addWidget(self.sliderBright, 2, 0, 1, 1) self.sliderGain = QtGui.QSlider(self.frame) self.sliderGain.setMaximum(255) self.sliderGain.setOrientation(QtCore.Qt.Horizontal) self.sliderGain.setTickPosition(QtGui.QSlider.TicksBothSides) self.sliderGain.setTickInterval(50) self.sliderGain.setObjectName(_fromUtf8("sliderGain")) self.gridLayout.addWidget(self.sliderGain, 9, 0, 1, 1) self.label_2 = QtGui.QLabel(self.frame) self.label_2.setObjectName(_fromUtf8("label_2")) self.gridLayout.addWidget(self.label_2, 6, 0, 1, 1) self.sliderExpo = QtGui.QSlider(self.frame) self.sliderExpo.setMinimum(1) self.sliderExpo.setMaximum(7) self.sliderExpo.setOrientation(QtCore.Qt.Horizontal) self.sliderExpo.setTickPosition(QtGui.QSlider.TicksBothSides) self.sliderExpo.setTickInterval(1) self.sliderExpo.setObjectName(_fromUtf8("sliderExpo")) self.gridLayout.addWidget(self.sliderExpo, 12, 0, 1, 1) self.label_4 = QtGui.QLabel(self.frame) self.label_4.setObjectName(_fromUtf8("label_4")) self.gridLayout.addWidget(self.label_4, 8, 0, 1, 1) self.label_3 = QtGui.QLabel(self.frame) self.label_3.setObjectName(_fromUtf8("label_3")) self.gridLayout.addWidget(self.label_3, 3, 0, 1, 1) self.label_5 = QtGui.QLabel(self.frame) self.label_5.setObjectName(_fromUtf8("label_5")) self.gridLayout.addWidget(self.label_5, 10, 0, 1, 1) self.verticalLayout.addLayout(self.gridLayout) self.buttonCalibrate = QtGui.QPushButton(self.frame) self.buttonCalibrate.setObjectName(_fromUtf8("buttonCalibrate")) self.verticalLayout.addWidget(self.buttonCalibrate) self.horizontalLayout_2.addWidget(self.frame) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 968, 25)) self.menubar.setObjectName(_fromUtf8("menubar")) MainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(MainWindow) self.statusbar.setObjectName(_fromUtf8("statusbar")) MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) self.tabWidget.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainWindow) MainWindow.setTabOrder(self.figure1, self.sliderGain) MainWindow.setTabOrder(self.sliderGain, self.buttonStart) MainWindow.setTabOrder(self.buttonStart, self.sliderExpo) MainWindow.setTabOrder(self.sliderExpo, self.figure2) MainWindow.setTabOrder(self.figure2, self.sliderSat) MainWindow.setTabOrder(self.sliderSat, self.sliderCont) MainWindow.setTabOrder(self.sliderCont, self.sliderBright) MainWindow.setTabOrder(self.sliderBright, self.buttonStop) MainWindow.setTabOrder(self.buttonStop, self.sliderWB) def retranslateUi(self, MainWindow): MainWindow.setWindowTitle( _translate("MainWindow", "Spectrometer v2.0", None)) self.groupBox_3.setTitle( _translate("MainWindow", "Projection Settings:", None)) self.label_14.setText( _translate("MainWindow", "Low Wavelength (nm):", None)) self.label_13.setText( _translate("MainWindow", "High Wavelength (nm):", None)) self.label_15.setText( _translate("MainWindow", "Projection Column:", None)) self.label_16.setText( _translate("MainWindow", "Projection Column:", None)) self.buttonUpdateProjection.setText( _translate("MainWindow", "Update Proj.", None)) self.label_12.setText(_translate("MainWindow", "Clicked at:", None)) self.coor.setText(_translate("MainWindow", "(0,0)", None)) self.groupBox.setTitle(_translate("MainWindow", "ROI Settings:", None)) self.label_9.setText(_translate("MainWindow", "Max. Col:", None)) self.label_10.setText(_translate("MainWindow", "Min. Row:", None)) self.label_8.setText(_translate("MainWindow", "Min. Col:", None)) self.label_11.setText(_translate("MainWindow", "Max.Row:", None)) self.buttonUpdateROI.setText( _translate("MainWindow", "Update ROI", None)) self.tabWidget.setTabText( self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "Calibration", None)) self.label_7.setText(_translate("MainWindow", "Filename:", None)) self.buttonGrab.setText( _translate("MainWindow", "Save Spectrum Data", None)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Analysis", None)) self.buttonStart.setText(_translate("MainWindow", "Start ", None)) self.buttonStop.setText(_translate("MainWindow", "Stop ", None)) self.label.setText(_translate("MainWindow", "Brightness", None)) self.label_6.setText(_translate("MainWindow", "White Balance", None)) self.label_2.setText(_translate("MainWindow", "Saturation", None)) self.label_4.setText(_translate("MainWindow", "Gain", None)) self.label_3.setText(_translate("MainWindow", "Contrast", None)) self.label_5.setText(_translate("MainWindow", "Exposure", None)) self.buttonCalibrate.setText( _translate("MainWindow", "Normalize", None))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1200, 900) MainWindow.setMinimumSize(QtCore.QSize(1200, 900)) MainWindow.setMaximumSize(QtCore.QSize(1200, 900)) MainWindow.setDockOptions(QtWidgets.QMainWindow.AllowTabbedDocks | QtWidgets.QMainWindow.AnimatedDocks) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.btn_startstop = QtWidgets.QPushButton(self.centralwidget) self.btn_startstop.setGeometry(QtCore.QRect(20, 20, 301, 101)) font = QtGui.QFont() font.setPointSize(30) font.setBold(False) font.setWeight(50) font.setKerning(True) font.setStyleStrategy(QtGui.QFont.PreferDefault) self.btn_startstop.setFont(font) self.btn_startstop.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor)) self.btn_startstop.setMouseTracking(False) self.btn_startstop.setCheckable(False) self.btn_startstop.setAutoDefault(False) self.btn_startstop.setDefault(False) self.btn_startstop.setFlat(False) self.btn_startstop.setObjectName("btn_startstop") self.btn_browse = QtWidgets.QPushButton(self.centralwidget) self.btn_browse.setGeometry(QtCore.QRect(240, 130, 81, 31)) self.btn_browse.setObjectName("btn_browse") self.ed_saveloc = QtWidgets.QLineEdit(self.centralwidget) self.ed_saveloc.setEnabled(False) self.ed_saveloc.setGeometry(QtCore.QRect(20, 130, 211, 31)) self.ed_saveloc.setObjectName("ed_saveloc") self.groupe_timeseries = QtWidgets.QGroupBox(self.centralwidget) self.groupe_timeseries.setGeometry(QtCore.QRect(20, 170, 521, 701)) self.groupe_timeseries.setObjectName("groupe_timeseries") self.verticalLayoutWidget = QtWidgets.QWidget(self.groupe_timeseries) self.verticalLayoutWidget.setGeometry(QtCore.QRect(9, 19, 501, 671)) self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget) self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.verticalLayout.setObjectName("verticalLayout") self.tsgraph_el1 = PlotWidget(self.verticalLayoutWidget) self.tsgraph_el1.setFrameShape(QtWidgets.QFrame.StyledPanel) self.tsgraph_el1.setFrameShadow(QtWidgets.QFrame.Sunken) self.tsgraph_el1.setObjectName("tsgraph_el1") self.verticalLayout.addWidget(self.tsgraph_el1) self.tsgraph_el2 = PlotWidget(self.verticalLayoutWidget) self.tsgraph_el2.setFrameShape(QtWidgets.QFrame.StyledPanel) self.tsgraph_el2.setObjectName("tsgraph_el2") self.verticalLayout.addWidget(self.tsgraph_el2) self.tsgraph_el3 = PlotWidget(self.verticalLayoutWidget) self.tsgraph_el3.setObjectName("tsgraph_el3") self.verticalLayout.addWidget(self.tsgraph_el3) self.tsgraph_el4 = PlotWidget(self.verticalLayoutWidget) self.tsgraph_el4.setObjectName("tsgraph_el4") self.verticalLayout.addWidget(self.tsgraph_el4) self.group_frequencyspectrums = QtWidgets.QGroupBox(self.centralwidget) self.group_frequencyspectrums.setGeometry( QtCore.QRect(660, 170, 521, 701)) self.group_frequencyspectrums.setObjectName("group_frequencyspectrums") self.verticalLayoutWidget_2 = QtWidgets.QWidget( self.group_frequencyspectrums) self.verticalLayoutWidget_2.setGeometry(QtCore.QRect(9, 19, 501, 671)) self.verticalLayoutWidget_2.setObjectName("verticalLayoutWidget_2") self.verticalLayout_2 = QtWidgets.QVBoxLayout( self.verticalLayoutWidget_2) self.verticalLayout_2.setContentsMargins(0, 0, 0, 0) self.verticalLayout_2.setObjectName("verticalLayout_2") self.fsgraph_el1 = PlotWidget(self.verticalLayoutWidget_2) self.fsgraph_el1.setObjectName("fsgraph_el1") self.verticalLayout_2.addWidget(self.fsgraph_el1) self.fsgraph_el2 = PlotWidget(self.verticalLayoutWidget_2) self.fsgraph_el2.setObjectName("fsgraph_el2") self.verticalLayout_2.addWidget(self.fsgraph_el2) self.fsgraph_el3 = PlotWidget(self.verticalLayoutWidget_2) self.fsgraph_el3.setObjectName("fsgraph_el3") self.verticalLayout_2.addWidget(self.fsgraph_el3) self.fsgraph_el4 = PlotWidget(self.verticalLayoutWidget_2) self.fsgraph_el4.setObjectName("fsgraph_el4") self.verticalLayout_2.addWidget(self.fsgraph_el4) self.group_el1 = QtWidgets.QGroupBox(self.centralwidget) self.group_el1.setGeometry(QtCore.QRect(550, 200, 101, 131)) font = QtGui.QFont() font.setBold(True) font.setItalic(False) font.setWeight(75) self.group_el1.setFont(font) self.group_el1.setMouseTracking(False) self.group_el1.setAlignment(QtCore.Qt.AlignCenter) self.group_el1.setFlat(False) self.group_el1.setCheckable(True) self.group_el1.setChecked(True) self.group_el1.setObjectName("group_el1") self.verticalLayoutWidget_3 = QtWidgets.QWidget(self.group_el1) self.verticalLayoutWidget_3.setGeometry(QtCore.QRect(10, 19, 91, 101)) self.verticalLayoutWidget_3.setObjectName("verticalLayoutWidget_3") self.vlay_el1 = QtWidgets.QVBoxLayout(self.verticalLayoutWidget_3) self.vlay_el1.setContentsMargins(0, 0, 0, 0) self.vlay_el1.setObjectName("vlay_el1") self.rbnormal_el1 = QtWidgets.QRadioButton(self.verticalLayoutWidget_3) font = QtGui.QFont() font.setBold(False) font.setWeight(50) font.setStrikeOut(False) self.rbnormal_el1.setFont(font) self.rbnormal_el1.setChecked(True) self.rbnormal_el1.setObjectName("rbnormal_el1") self.vlay_el1.addWidget(self.rbnormal_el1) self.rbalpha_el1 = QtWidgets.QRadioButton(self.verticalLayoutWidget_3) font = QtGui.QFont() font.setBold(False) font.setWeight(50) font.setStrikeOut(False) self.rbalpha_el1.setFont(font) self.rbalpha_el1.setObjectName("rbalpha_el1") self.vlay_el1.addWidget(self.rbalpha_el1) self.rbcustom_el1 = QtWidgets.QRadioButton(self.verticalLayoutWidget_3) font = QtGui.QFont() font.setBold(False) font.setWeight(50) font.setStrikeOut(False) self.rbcustom_el1.setFont(font) self.rbcustom_el1.setObjectName("rbcustom_el1") self.vlay_el1.addWidget(self.rbcustom_el1) self.group_el2 = QtWidgets.QGroupBox(self.centralwidget) self.group_el2.setGeometry(QtCore.QRect(550, 370, 101, 131)) font = QtGui.QFont() font.setBold(True) font.setItalic(False) font.setWeight(75) self.group_el2.setFont(font) self.group_el2.setMouseTracking(False) self.group_el2.setAlignment(QtCore.Qt.AlignCenter) self.group_el2.setFlat(False) self.group_el2.setCheckable(True) self.group_el2.setChecked(True) self.group_el2.setObjectName("group_el2") self.verticalLayoutWidget_4 = QtWidgets.QWidget(self.group_el2) self.verticalLayoutWidget_4.setGeometry(QtCore.QRect(10, 20, 91, 101)) self.verticalLayoutWidget_4.setObjectName("verticalLayoutWidget_4") self.vlay_el2 = QtWidgets.QVBoxLayout(self.verticalLayoutWidget_4) self.vlay_el2.setContentsMargins(0, 0, 0, 0) self.vlay_el2.setObjectName("vlay_el2") self.rbnormal_el2 = QtWidgets.QRadioButton(self.verticalLayoutWidget_4) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.rbnormal_el2.setFont(font) self.rbnormal_el2.setChecked(True) self.rbnormal_el2.setObjectName("rbnormal_el2") self.vlay_el2.addWidget(self.rbnormal_el2) self.rbalpha_el2 = QtWidgets.QRadioButton(self.verticalLayoutWidget_4) font = QtGui.QFont() font.setBold(False) font.setWeight(50) font.setStrikeOut(False) self.rbalpha_el2.setFont(font) self.rbalpha_el2.setObjectName("rbalpha_el2") self.vlay_el2.addWidget(self.rbalpha_el2) self.rbcustom_el2 = QtWidgets.QRadioButton(self.verticalLayoutWidget_4) font = QtGui.QFont() font.setBold(False) font.setWeight(50) font.setStrikeOut(False) self.rbcustom_el2.setFont(font) self.rbcustom_el2.setObjectName("rbcustom_el2") self.vlay_el2.addWidget(self.rbcustom_el2) self.group_el3 = QtWidgets.QGroupBox(self.centralwidget) self.group_el3.setGeometry(QtCore.QRect(550, 540, 101, 131)) font = QtGui.QFont() font.setBold(True) font.setItalic(False) font.setWeight(75) self.group_el3.setFont(font) self.group_el3.setMouseTracking(False) self.group_el3.setAlignment(QtCore.Qt.AlignCenter) self.group_el3.setFlat(False) self.group_el3.setCheckable(True) self.group_el3.setChecked(True) self.group_el3.setObjectName("group_el3") self.verticalLayoutWidget_5 = QtWidgets.QWidget(self.group_el3) self.verticalLayoutWidget_5.setGeometry(QtCore.QRect(10, 20, 91, 101)) self.verticalLayoutWidget_5.setObjectName("verticalLayoutWidget_5") self.vlay_el3 = QtWidgets.QVBoxLayout(self.verticalLayoutWidget_5) self.vlay_el3.setContentsMargins(0, 0, 0, 0) self.vlay_el3.setObjectName("vlay_el3") self.rbnormal_el3 = QtWidgets.QRadioButton(self.verticalLayoutWidget_5) font = QtGui.QFont() font.setBold(False) font.setWeight(50) font.setStrikeOut(False) self.rbnormal_el3.setFont(font) self.rbnormal_el3.setChecked(True) self.rbnormal_el3.setObjectName("rbnormal_el3") self.vlay_el3.addWidget(self.rbnormal_el3) self.rbalpha_el3 = QtWidgets.QRadioButton(self.verticalLayoutWidget_5) font = QtGui.QFont() font.setBold(False) font.setWeight(50) font.setStrikeOut(False) self.rbalpha_el3.setFont(font) self.rbalpha_el3.setObjectName("rbalpha_el3") self.vlay_el3.addWidget(self.rbalpha_el3) self.rbcustom_el3 = QtWidgets.QRadioButton(self.verticalLayoutWidget_5) font = QtGui.QFont() font.setBold(False) font.setWeight(50) font.setStrikeOut(False) self.rbcustom_el3.setFont(font) self.rbcustom_el3.setObjectName("rbcustom_el3") self.vlay_el3.addWidget(self.rbcustom_el3) self.group_el4 = QtWidgets.QGroupBox(self.centralwidget) self.group_el4.setGeometry(QtCore.QRect(550, 710, 101, 131)) font = QtGui.QFont() font.setBold(True) font.setItalic(False) font.setWeight(75) self.group_el4.setFont(font) self.group_el4.setMouseTracking(False) self.group_el4.setAlignment(QtCore.Qt.AlignCenter) self.group_el4.setFlat(False) self.group_el4.setCheckable(True) self.group_el4.setChecked(True) self.group_el4.setObjectName("group_el4") self.verticalLayoutWidget_6 = QtWidgets.QWidget(self.group_el4) self.verticalLayoutWidget_6.setGeometry(QtCore.QRect(10, 20, 91, 101)) self.verticalLayoutWidget_6.setObjectName("verticalLayoutWidget_6") self.vlay_el4 = QtWidgets.QVBoxLayout(self.verticalLayoutWidget_6) self.vlay_el4.setContentsMargins(0, 0, 0, 0) self.vlay_el4.setObjectName("vlay_el4") self.rbnormal_el4 = QtWidgets.QRadioButton(self.verticalLayoutWidget_6) font = QtGui.QFont() font.setBold(False) font.setWeight(50) font.setStrikeOut(False) self.rbnormal_el4.setFont(font) self.rbnormal_el4.setChecked(True) self.rbnormal_el4.setObjectName("rbnormal_el4") self.vlay_el4.addWidget(self.rbnormal_el4) self.rbalpha_el4 = QtWidgets.QRadioButton(self.verticalLayoutWidget_6) font = QtGui.QFont() font.setBold(False) font.setWeight(50) font.setStrikeOut(False) self.rbalpha_el4.setFont(font) self.rbalpha_el4.setObjectName("rbalpha_el4") self.vlay_el4.addWidget(self.rbalpha_el4) self.rbcustom_el4 = QtWidgets.QRadioButton(self.verticalLayoutWidget_6) font = QtGui.QFont() font.setBold(False) font.setWeight(50) font.setStrikeOut(False) self.rbcustom_el4.setFont(font) self.rbcustom_el4.setObjectName("rbcustom_el4") self.vlay_el4.addWidget(self.rbcustom_el4) self.lab_logo = QtWidgets.QLabel(self.centralwidget) self.lab_logo.setGeometry(QtCore.QRect(1020, 0, 161, 171)) self.lab_logo.setObjectName("lab_logo") self.group_tab = QtWidgets.QTabWidget(self.centralwidget) self.group_tab.setGeometry(QtCore.QRect(330, 10, 691, 151)) self.group_tab.setObjectName("group_tab") self.tab_set = QtWidgets.QWidget() self.tab_set.setObjectName("tab_set") self.group_tab.addTab(self.tab_set, "") self.tab_cmode = QtWidgets.QWidget() self.tab_cmode.setObjectName("tab_cmode") self.group_tab.addTab(self.tab_cmode, "") self.tab_acq = QtWidgets.QWidget() self.tab_acq.setObjectName("tab_acq") self.group_tab.addTab(self.tab_acq, "") self.tab_sp = QtWidgets.QWidget() self.tab_sp.setObjectName("tab_sp") self.group_tab.addTab(self.tab_sp, "") self.tab_info = QtWidgets.QWidget() self.tab_info.setObjectName("tab_info") self.group_tab.addTab(self.tab_info, "") MainWindow.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) self.group_tab.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainWindow) MainWindow.setTabOrder(self.btn_startstop, self.btn_browse) MainWindow.setTabOrder(self.btn_browse, self.ed_saveloc) MainWindow.setTabOrder(self.ed_saveloc, self.tsgraph_el1) MainWindow.setTabOrder(self.tsgraph_el1, self.tsgraph_el2) MainWindow.setTabOrder(self.tsgraph_el2, self.tsgraph_el4) MainWindow.setTabOrder(self.tsgraph_el4, self.fsgraph_el1) MainWindow.setTabOrder(self.fsgraph_el1, self.fsgraph_el2) MainWindow.setTabOrder(self.fsgraph_el2, self.fsgraph_el3) MainWindow.setTabOrder(self.fsgraph_el3, self.fsgraph_el4) MainWindow.setTabOrder(self.fsgraph_el4, self.group_el1) MainWindow.setTabOrder(self.group_el1, self.rbnormal_el1) MainWindow.setTabOrder(self.rbnormal_el1, self.rbalpha_el1) MainWindow.setTabOrder(self.rbalpha_el1, self.rbcustom_el1) MainWindow.setTabOrder(self.rbcustom_el1, self.group_el2) MainWindow.setTabOrder(self.group_el2, self.group_el3) MainWindow.setTabOrder(self.group_el3, self.rbnormal_el2) MainWindow.setTabOrder(self.rbnormal_el2, self.rbalpha_el2) MainWindow.setTabOrder(self.rbalpha_el2, self.rbcustom_el2) MainWindow.setTabOrder(self.rbcustom_el2, self.group_el4) MainWindow.setTabOrder(self.group_el4, self.rbnormal_el3) MainWindow.setTabOrder(self.rbnormal_el3, self.rbalpha_el3) MainWindow.setTabOrder(self.rbalpha_el3, self.rbcustom_el3) MainWindow.setTabOrder(self.rbcustom_el3, self.rbnormal_el4) MainWindow.setTabOrder(self.rbnormal_el4, self.rbalpha_el4) MainWindow.setTabOrder(self.rbalpha_el4, self.rbcustom_el4) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.btn_startstop.setText(_translate("MainWindow", "START")) self.btn_browse.setText(_translate("MainWindow", "Browse")) self.ed_saveloc.setText(_translate("MainWindow", "Save location")) self.groupe_timeseries.setTitle( _translate("MainWindow", "Time Series Graph")) self.group_frequencyspectrums.setTitle( _translate("MainWindow", "Frequency Spectrums")) self.group_el1.setTitle(_translate("MainWindow", "Electrode 1")) self.rbnormal_el1.setText(_translate("MainWindow", "Normal Mode")) self.rbalpha_el1.setText(_translate("MainWindow", "Alpha Mode")) self.rbcustom_el1.setText(_translate("MainWindow", "Custom Mode")) self.group_el2.setTitle(_translate("MainWindow", "Electrode 2")) self.rbnormal_el2.setText(_translate("MainWindow", "Normal Mode")) self.rbalpha_el2.setText(_translate("MainWindow", "Alpha Mode")) self.rbcustom_el2.setText(_translate("MainWindow", "Custom Mode")) self.group_el3.setTitle(_translate("MainWindow", "Electrode 3")) self.rbnormal_el3.setText(_translate("MainWindow", "Normal Mode")) self.rbalpha_el3.setText(_translate("MainWindow", "Alpha Mode")) self.rbcustom_el3.setText(_translate("MainWindow", "Custom Mode")) self.group_el4.setTitle(_translate("MainWindow", "Electrode 4")) self.rbnormal_el4.setText(_translate("MainWindow", "Normal Mode")) self.rbalpha_el4.setText(_translate("MainWindow", "Alpha Mode")) self.rbcustom_el4.setText(_translate("MainWindow", "Custom Mode")) self.lab_logo.setText( _translate( "MainWindow", "<html><head/><body><p><img src=\"logo_plein.png\"/></p></body></html>" )) self.group_tab.setTabText(self.group_tab.indexOf(self.tab_set), _translate("MainWindow", "Display settings")) self.group_tab.setTabText( self.group_tab.indexOf(self.tab_cmode), _translate("MainWindow", "Custom Mode settings")) self.group_tab.setTabText( self.group_tab.indexOf(self.tab_acq), _translate("MainWindow", "Acquisition settings")) self.group_tab.setTabText( self.group_tab.indexOf(self.tab_sp), _translate("MainWindow", "Signal Processing settings")) self.group_tab.setTabText( self.group_tab.indexOf(self.tab_info), _translate("MainWindow", "Acquisition Information"))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(838, 611) MainWindow.setStyleSheet("background-color: rgb(255, 255, 255);") MainWindow.setTabShape(QtWidgets.QTabWidget.Triangular) MainWindow.setDockNestingEnabled(False) MainWindow.setUnifiedTitleAndToolBarOnMac(False) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.gridLayout_3 = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout_3.setObjectName("gridLayout_3") self.tabWidget = QtWidgets.QTabWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth()) self.tabWidget.setSizePolicy(sizePolicy) self.tabWidget.setContextMenuPolicy(QtCore.Qt.NoContextMenu) self.tabWidget.setTabShape(QtWidgets.QTabWidget.Rounded) self.tabWidget.setMovable(True) self.tabWidget.setObjectName("tabWidget") self.tab1 = QtWidgets.QWidget() self.tab1.setObjectName("tab1") self.gridLayout = QtWidgets.QGridLayout(self.tab1) self.gridLayout.setObjectName("gridLayout") self.horizontalLayout_6 = QtWidgets.QHBoxLayout() self.horizontalLayout_6.setObjectName("horizontalLayout_6") self.Upload_2 = QtWidgets.QPushButton(self.tab1) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.Upload_2.sizePolicy().hasHeightForWidth()) self.Upload_2.setSizePolicy(sizePolicy) self.Upload_2.setMinimumSize(QtCore.QSize(0, 30)) self.Upload_2.setStyleSheet("background-color: rgb(207, 207, 207);\n" "font: 75 9pt \"MS Shell Dlg 2\";\n" "border-style: outset;\n" "border-radius: 10px;\n" "padding: 4px;") self.Upload_2.setObjectName("Upload_2") self.horizontalLayout_6.addWidget(self.Upload_2) self.inputComponents1_2 = QtWidgets.QToolButton(self.tab1) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.inputComponents1_2.sizePolicy().hasHeightForWidth()) self.inputComponents1_2.setSizePolicy(sizePolicy) self.inputComponents1_2.setMinimumSize(QtCore.QSize(0, 30)) self.inputComponents1_2.setStyleSheet("selection-background-color: rgb(0, 73, 220);\n" "selection-color: rgb(255, 255, 255);\n" "background-color: rgb(207, 207, 207);\n" "font: 75 9pt \"MS Shell Dlg 2\";\n" "border-style: outset;\n" "border-radius: 10px;\n" "padding: 4px;") self.inputComponents1_2.setPopupMode(QtWidgets.QToolButton.MenuButtonPopup) self.inputComponents1_2.setObjectName("inputComponents1_2") self.horizontalLayout_6.addWidget(self.inputComponents1_2) self.gridLayout.addLayout(self.horizontalLayout_6, 0, 0, 1, 1) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.inputImage1_2 = QtWidgets.QLabel(self.tab1) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.inputImage1_2.sizePolicy().hasHeightForWidth()) self.inputImage1_2.setSizePolicy(sizePolicy) self.inputImage1_2.setMinimumSize(QtCore.QSize(300, 200)) self.inputImage1_2.setStyleSheet("background-color: rgb(255, 255, 255);") self.inputImage1_2.setFrameShape(QtWidgets.QFrame.Box) self.inputImage1_2.setText("") self.inputImage1_2.setObjectName("inputImage1_2") self.horizontalLayout_2.addWidget(self.inputImage1_2) self.inputImage1Component_2 = PlotWidget(self.tab1) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.inputImage1Component_2.sizePolicy().hasHeightForWidth()) self.inputImage1Component_2.setSizePolicy(sizePolicy) self.inputImage1Component_2.setMinimumSize(QtCore.QSize(300, 200)) self.inputImage1Component_2.setObjectName("inputImage1Component_2") self.horizontalLayout_2.addWidget(self.inputImage1Component_2) self.gridLayout.addLayout(self.horizontalLayout_2, 1, 0, 1, 1) self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.Upload2 = QtWidgets.QPushButton(self.tab1) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.Upload2.sizePolicy().hasHeightForWidth()) self.Upload2.setSizePolicy(sizePolicy) self.Upload2.setMinimumSize(QtCore.QSize(0, 30)) self.Upload2.setStyleSheet("background-color: rgb(207, 207, 207);\n" "font: 75 9pt \"MS Shell Dlg 2\";\n" "border-style: outset;\n" "border-radius: 10px;\n" "padding: 4px;") self.Upload2.setObjectName("Upload2") self.horizontalLayout_4.addWidget(self.Upload2) self.inputComponents2 = QtWidgets.QToolButton(self.tab1) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.inputComponents2.sizePolicy().hasHeightForWidth()) self.inputComponents2.setSizePolicy(sizePolicy) self.inputComponents2.setMinimumSize(QtCore.QSize(0, 30)) self.inputComponents2.setStyleSheet("selection-background-color: rgb(0, 73, 220);\n" "selection-color: rgb(255, 255, 255);\n" "background-color: rgb(207, 207, 207);\n" "font: 75 9pt \"MS Shell Dlg 2\";\n" "border-style: outset;\n" "border-radius: 10px;\n" "padding: 4px;") self.inputComponents2.setPopupMode(QtWidgets.QToolButton.MenuButtonPopup) self.inputComponents2.setObjectName("inputComponents2") self.horizontalLayout_4.addWidget(self.inputComponents2) self.gridLayout.addLayout(self.horizontalLayout_4, 2, 0, 1, 1) self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.inputImage2 = QtWidgets.QLabel(self.tab1) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.inputImage2.sizePolicy().hasHeightForWidth()) self.inputImage2.setSizePolicy(sizePolicy) self.inputImage2.setMinimumSize(QtCore.QSize(300, 200)) self.inputImage2.setStyleSheet("background-color: rgb(255, 255, 255);") self.inputImage2.setFrameShape(QtWidgets.QFrame.Box) self.inputImage2.setText("") self.inputImage2.setObjectName("inputImage2") self.horizontalLayout_5.addWidget(self.inputImage2) self.inputImage2Component = PlotWidget(self.tab1) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.inputImage2Component.sizePolicy().hasHeightForWidth()) self.inputImage2Component.setSizePolicy(sizePolicy) self.inputImage2Component.setMinimumSize(QtCore.QSize(300, 200)) self.inputImage2Component.setObjectName("inputImage2Component") self.horizontalLayout_5.addWidget(self.inputImage2Component) self.gridLayout.addLayout(self.horizontalLayout_5, 3, 0, 1, 1) self.tabWidget.addTab(self.tab1, "") self.tab2 = QtWidgets.QWidget() self.tab2.setObjectName("tab2") self.gridLayout_2 = QtWidgets.QGridLayout(self.tab2) self.gridLayout_2.setObjectName("gridLayout_2") self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.output1 = PlotWidget(self.tab2) self.output1.setStyleSheet("border-color: rgb(0, 0, 0);") self.output1.setFrameShape(QtWidgets.QFrame.Box) self.output1.setObjectName("output1") self.horizontalLayout.addWidget(self.output1) self.output2 = PlotWidget(self.tab2) self.output2.setStyleSheet("border-color: rgb(0, 0, 0);") self.output2.setFrameShape(QtWidgets.QFrame.Box) self.output2.setObjectName("output2") self.horizontalLayout.addWidget(self.output2) self.gridLayout_2.addLayout(self.horizontalLayout, 6, 0, 1, 3) self.s2Value = QtWidgets.QLabel(self.tab2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.s2Value.sizePolicy().hasHeightForWidth()) self.s2Value.setSizePolicy(sizePolicy) self.s2Value.setMinimumSize(QtCore.QSize(45, 40)) font = QtGui.QFont() font.setPointSize(11) self.s2Value.setFont(font) self.s2Value.setStyleSheet("\n" "") self.s2Value.setFrameShape(QtWidgets.QFrame.NoFrame) self.s2Value.setText("") self.s2Value.setAlignment(QtCore.Qt.AlignCenter) self.s2Value.setObjectName("s2Value") self.gridLayout_2.addWidget(self.s2Value, 5, 2, 1, 1) self.s1Value = QtWidgets.QLabel(self.tab2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.s1Value.sizePolicy().hasHeightForWidth()) self.s1Value.setSizePolicy(sizePolicy) self.s1Value.setMinimumSize(QtCore.QSize(45, 40)) font = QtGui.QFont() font.setPointSize(11) self.s1Value.setFont(font) self.s1Value.setStyleSheet("border-color: rgb(0, 0, 0);") self.s1Value.setFrameShape(QtWidgets.QFrame.NoFrame) self.s1Value.setText("") self.s1Value.setAlignment(QtCore.Qt.AlignCenter) self.s1Value.setObjectName("s1Value") self.gridLayout_2.addWidget(self.s1Value, 2, 2, 1, 1) self.component2Label = QtWidgets.QLabel(self.tab2) font = QtGui.QFont() font.setPointSize(12) font.setBold(True) font.setWeight(75) self.component2Label.setFont(font) self.component2Label.setObjectName("component2Label") self.gridLayout_2.addWidget(self.component2Label, 3, 0, 1, 1) self.component1Label = QtWidgets.QLabel(self.tab2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.component1Label.sizePolicy().hasHeightForWidth()) self.component1Label.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(12) font.setBold(True) font.setWeight(75) self.component1Label.setFont(font) self.component1Label.setObjectName("component1Label") self.gridLayout_2.addWidget(self.component1Label, 1, 0, 1, 1) self.mixerLabel = QtWidgets.QLabel(self.tab2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.mixerLabel.sizePolicy().hasHeightForWidth()) self.mixerLabel.setSizePolicy(sizePolicy) self.mixerLabel.setMinimumSize(QtCore.QSize(300, 80)) font = QtGui.QFont() font.setPointSize(24) font.setBold(True) font.setWeight(75) self.mixerLabel.setFont(font) self.mixerLabel.setToolTipDuration(3) self.mixerLabel.setIndent(-2) self.mixerLabel.setObjectName("mixerLabel") self.gridLayout_2.addWidget(self.mixerLabel, 0, 0, 1, 1) self.imgChoice1 = QtWidgets.QToolButton(self.tab2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.imgChoice1.sizePolicy().hasHeightForWidth()) self.imgChoice1.setSizePolicy(sizePolicy) self.imgChoice1.setMinimumSize(QtCore.QSize(300, 28)) self.imgChoice1.setStyleSheet("selection-background-color: rgb(0, 73, 220);\n" "selection-color: rgb(255, 255, 255);\n" "background-color: rgb(207, 207, 207);\n" "font: 75 9pt \"MS Shell Dlg 2\";\n" "border-style: outset;\n" "border-radius: 10px;\n" "padding: 4px;") self.imgChoice1.setPopupMode(QtWidgets.QToolButton.MenuButtonPopup) self.imgChoice1.setObjectName("imgChoice1") self.gridLayout_2.addWidget(self.imgChoice1, 2, 0, 1, 1) self.imgChoice2 = QtWidgets.QToolButton(self.tab2) self.imgChoice2.setMinimumSize(QtCore.QSize(300, 28)) self.imgChoice2.setStyleSheet("selection-background-color: rgb(0, 73, 220);\n" "selection-color: rgb(255, 255, 255);\n" "background-color: rgb(207, 207, 207);\n" "font: 75 9pt \"MS Shell Dlg 2\";\n" "border-style: outset;\n" "border-radius: 10px;\n" "padding: 4px;") self.imgChoice2.setPopupMode(QtWidgets.QToolButton.MenuButtonPopup) self.imgChoice2.setObjectName("imgChoice2") self.gridLayout_2.addWidget(self.imgChoice2, 4, 0, 2, 1) self.outputChoice = QtWidgets.QToolButton(self.tab2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.outputChoice.sizePolicy().hasHeightForWidth()) self.outputChoice.setSizePolicy(sizePolicy) self.outputChoice.setMinimumSize(QtCore.QSize(300, 0)) self.outputChoice.setStyleSheet("selection-background-color: rgb(0, 73, 220);\n" "selection-color: rgb(255, 255, 255);\n" "background-color: rgb(207, 207, 207);\n" "font: 75 9pt \"MS Shell Dlg 2\";\n" "border-style: outset;\n" "border-radius: 10px;\n" "padding: 4px;") self.outputChoice.setPopupMode(QtWidgets.QToolButton.MenuButtonPopup) self.outputChoice.setObjectName("outputChoice") self.gridLayout_2.addWidget(self.outputChoice, 0, 1, 1, 2) self.slider1 = QtWidgets.QSlider(self.tab2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.slider1.sizePolicy().hasHeightForWidth()) self.slider1.setSizePolicy(sizePolicy) self.slider1.setMinimumSize(QtCore.QSize(280, 0)) self.slider1.setMaximumSize(QtCore.QSize(194, 16777215)) self.slider1.setOrientation(QtCore.Qt.Horizontal) self.slider1.setObjectName("slider1") self.gridLayout_2.addWidget(self.slider1, 2, 1, 1, 1) self.componentsChoice1 = QtWidgets.QToolButton(self.tab2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.componentsChoice1.sizePolicy().hasHeightForWidth()) self.componentsChoice1.setSizePolicy(sizePolicy) self.componentsChoice1.setMinimumSize(QtCore.QSize(300, 22)) self.componentsChoice1.setStyleSheet("selection-background-color: rgb(0, 73, 220);\n" "selection-color: rgb(255, 255, 255);\n" "background-color: rgb(207, 207, 207);\n" "font: 75 9pt \"MS Shell Dlg 2\";\n" "border-style: outset;\n" "border-radius: 10px;\n" "padding: 4px;") self.componentsChoice1.setPopupMode(QtWidgets.QToolButton.MenuButtonPopup) self.componentsChoice1.setObjectName("componentsChoice1") self.gridLayout_2.addWidget(self.componentsChoice1, 1, 1, 1, 2) self.componentsChoice2 = QtWidgets.QToolButton(self.tab2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.componentsChoice2.sizePolicy().hasHeightForWidth()) self.componentsChoice2.setSizePolicy(sizePolicy) self.componentsChoice2.setMinimumSize(QtCore.QSize(300, 22)) self.componentsChoice2.setStyleSheet("selection-background-color: rgb(0, 73, 220);\n" "selection-color: rgb(255, 255, 255);\n" "background-color: rgb(207, 207, 207);\n" "font: 75 9pt \"MS Shell Dlg 2\";\n" "border-style: outset;\n" "border-radius: 10px;\n" "padding: 4px;") self.componentsChoice2.setPopupMode(QtWidgets.QToolButton.MenuButtonPopup) self.componentsChoice2.setObjectName("componentsChoice2") self.gridLayout_2.addWidget(self.componentsChoice2, 3, 1, 2, 2) self.slider2 = QtWidgets.QSlider(self.tab2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.slider2.sizePolicy().hasHeightForWidth()) self.slider2.setSizePolicy(sizePolicy) self.slider2.setMinimumSize(QtCore.QSize(280, 0)) self.slider2.setOrientation(QtCore.Qt.Horizontal) self.slider2.setObjectName("slider2") self.gridLayout_2.addWidget(self.slider2, 5, 1, 1, 1) self.tabWidget.addTab(self.tab2, "") self.gridLayout_3.addWidget(self.tabWidget, 0, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.actionMagnitude = QtWidgets.QAction(MainWindow) self.actionMagnitude.setObjectName("actionMagnitude") self.actionPhase = QtWidgets.QAction(MainWindow) self.actionPhase.setObjectName("actionPhase") self.actionMagnitude_2 = QtWidgets.QAction(MainWindow) self.actionMagnitude_2.setObjectName("actionMagnitude_2") self.actionPhase_2 = QtWidgets.QAction(MainWindow) self.actionPhase_2.setObjectName("actionPhase_2") self.actionReal = QtWidgets.QAction(MainWindow) self.actionReal.setObjectName("actionReal") self.actionImaginary = QtWidgets.QAction(MainWindow) self.actionImaginary.setObjectName("actionImaginary") self.actionReal_2 = QtWidgets.QAction(MainWindow) self.actionReal_2.setObjectName("actionReal_2") self.actionImaginary_2 = QtWidgets.QAction(MainWindow) self.actionImaginary_2.setObjectName("actionImaginary_2") self.actionImage1 = QtWidgets.QAction(MainWindow) self.actionImage1.setObjectName("actionImage1") self.actionImage2 = QtWidgets.QAction(MainWindow) self.actionImage2.setObjectName("actionImage2") self.actionImage11 = QtWidgets.QAction(MainWindow) self.actionImage11.setObjectName("actionImage11") self.actionImage22 = QtWidgets.QAction(MainWindow) self.actionImage22.setObjectName("actionImage22") self.actionOutput_1 = QtWidgets.QAction(MainWindow) self.actionOutput_1.setObjectName("actionOutput_1") self.actionOutput_2 = QtWidgets.QAction(MainWindow) self.actionOutput_2.setObjectName("actionOutput_2") self.actionMagnitude_3 = QtWidgets.QAction(MainWindow) self.actionMagnitude_3.setObjectName("actionMagnitude_3") self.actionPhase_3 = QtWidgets.QAction(MainWindow) self.actionPhase_3.setObjectName("actionPhase_3") self.actionReal_3 = QtWidgets.QAction(MainWindow) self.actionReal_3.setObjectName("actionReal_3") self.actionImaginary_3 = QtWidgets.QAction(MainWindow) self.actionImaginary_3.setObjectName("actionImaginary_3") self.actionUniform_Magnitude = QtWidgets.QAction(MainWindow) self.actionUniform_Magnitude.setObjectName("actionUniform_Magnitude") self.actionUniform_Phase = QtWidgets.QAction(MainWindow) self.actionUniform_Phase.setObjectName("actionUniform_Phase") self.actionMagnitude_4 = QtWidgets.QAction(MainWindow) self.actionMagnitude_4.setObjectName("actionMagnitude_4") self.actionPhase_4 = QtWidgets.QAction(MainWindow) self.actionPhase_4.setObjectName("actionPhase_4") self.actionReal_4 = QtWidgets.QAction(MainWindow) self.actionReal_4.setObjectName("actionReal_4") self.actionImaginary_4 = QtWidgets.QAction(MainWindow) self.actionImaginary_4.setObjectName("actionImaginary_4") self.actionUniform_Magnitude_2 = QtWidgets.QAction(MainWindow) self.actionUniform_Magnitude_2.setObjectName("actionUniform_Magnitude_2") self.actionUniform_Phase_2 = QtWidgets.QAction(MainWindow) self.actionUniform_Phase_2.setObjectName("actionUniform_Phase_2") self.retranslateUi(MainWindow) self.tabWidget.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.Upload_2.setText(_translate("MainWindow", "Upload 1st Image")) self.inputComponents1_2.setText(_translate("MainWindow", "Components")) self.Upload2.setText(_translate("MainWindow", "Upload 2nd Image")) self.inputComponents2.setText(_translate("MainWindow", "Components")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab1), _translate("MainWindow", "Sliders")) self.component2Label.setText(_translate("MainWindow", "Component 2:")) self.component1Label.setText(_translate("MainWindow", "Component 1:")) self.mixerLabel.setText(_translate("MainWindow", "Mixer Output To:")) self.imgChoice1.setText(_translate("MainWindow", "Img 1, Img 2")) self.imgChoice2.setText(_translate("MainWindow", "Img 1, Img 2")) self.outputChoice.setText(_translate("MainWindow", "Output 1, Output 2")) self.componentsChoice1.setText(_translate("MainWindow", "Components")) self.componentsChoice2.setText(_translate("MainWindow", "Components")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab2), _translate("MainWindow", "Mixer")) self.actionMagnitude.setText(_translate("MainWindow", "Magnitude")) self.actionPhase.setText(_translate("MainWindow", "Phase")) self.actionMagnitude_2.setText(_translate("MainWindow", "Magnitude")) self.actionPhase_2.setText(_translate("MainWindow", "Phase")) self.actionReal.setText(_translate("MainWindow", "Real")) self.actionImaginary.setText(_translate("MainWindow", "Imaginary")) self.actionReal_2.setText(_translate("MainWindow", "Real")) self.actionImaginary_2.setText(_translate("MainWindow", "Imaginary")) self.actionImage1.setText(_translate("MainWindow", "Image 1")) self.actionImage2.setText(_translate("MainWindow", "Image 2")) self.actionImage11.setText(_translate("MainWindow", "Image 1")) self.actionImage22.setText(_translate("MainWindow", "Image 2")) self.actionOutput_1.setText(_translate("MainWindow", "Output 1")) self.actionOutput_2.setText(_translate("MainWindow", "Output 2")) self.actionMagnitude_3.setText(_translate("MainWindow", "Magnitude ")) self.actionPhase_3.setText(_translate("MainWindow", "Phase")) self.actionReal_3.setText(_translate("MainWindow", "Real")) self.actionImaginary_3.setText(_translate("MainWindow", "Imaginary")) self.actionUniform_Magnitude.setText(_translate("MainWindow", "Uniform Magnitude")) self.actionUniform_Phase.setText(_translate("MainWindow", "Uniform Phase")) self.actionMagnitude_4.setText(_translate("MainWindow", "Magnitude")) self.actionPhase_4.setText(_translate("MainWindow", "Phase")) self.actionReal_4.setText(_translate("MainWindow", "Real")) self.actionImaginary_4.setText(_translate("MainWindow", "Imaginary")) self.actionUniform_Magnitude_2.setText(_translate("MainWindow", "Uniform Magnitude")) self.actionUniform_Phase_2.setText(_translate("MainWindow", "Uniform Phase"))
class Ui_MainWidget(object): def setupUi(self, MainWidget): MainWidget.setObjectName(_fromUtf8("MainWidget")) MainWidget.resize(791, 688) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(MainWidget.sizePolicy().hasHeightForWidth()) MainWidget.setSizePolicy(sizePolicy) MainWidget.setMinimumSize(QtCore.QSize(170, 0)) MainWidget.setMaximumSize(QtCore.QSize(16777215, 16777215)) MainWidget.setStyleSheet(_fromUtf8("background-color: rgb(0, 0, 0);\n" "color: rgb(255, 255, 255);\n" "font: 10pt \"Droid Sans Mono\";")) self.horizontalLayout_2 = QtGui.QHBoxLayout(MainWidget) self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) self.horizontalLayout_8 = QtGui.QHBoxLayout() self.horizontalLayout_8.setObjectName(_fromUtf8("horizontalLayout_8")) self.plotVertLayout = QtGui.QVBoxLayout() self.plotVertLayout.setObjectName(_fromUtf8("plotVertLayout")) self.vitalsPlot = PlotWidget(MainWidget) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.vitalsPlot.sizePolicy().hasHeightForWidth()) self.vitalsPlot.setSizePolicy(sizePolicy) self.vitalsPlot.setMinimumSize(QtCore.QSize(150, 8)) self.vitalsPlot.setStyleSheet(_fromUtf8("background-color: rgb(170, 0, 0);")) self.vitalsPlot.setFrameShape(QtGui.QFrame.NoFrame) self.vitalsPlot.setFrameShadow(QtGui.QFrame.Plain) self.vitalsPlot.setLineWidth(0) self.vitalsPlot.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.vitalsPlot.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.vitalsPlot.setObjectName(_fromUtf8("vitalsPlot")) self.plotVertLayout.addWidget(self.vitalsPlot) self.slowPlotHorizLayout = QtGui.QHBoxLayout() self.slowPlotHorizLayout.setObjectName(_fromUtf8("slowPlotHorizLayout")) self.textBrowser = QtGui.QTextBrowser(MainWidget) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.textBrowser.sizePolicy().hasHeightForWidth()) self.textBrowser.setSizePolicy(sizePolicy) self.textBrowser.setMinimumSize(QtCore.QSize(136, 30)) self.textBrowser.setMaximumSize(QtCore.QSize(136, 30)) self.textBrowser.setStyleSheet(_fromUtf8("font: 9pt \"Droid Sans\";")) self.textBrowser.setFrameShape(QtGui.QFrame.NoFrame) self.textBrowser.setFrameShadow(QtGui.QFrame.Plain) self.textBrowser.setLineWidth(0) self.textBrowser.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.textBrowser.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.textBrowser.setObjectName(_fromUtf8("textBrowser")) self.slowPlotHorizLayout.addWidget(self.textBrowser) self.slowUpdatePeriod = QtGui.QDoubleSpinBox(MainWidget) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.slowUpdatePeriod.sizePolicy().hasHeightForWidth()) self.slowUpdatePeriod.setSizePolicy(sizePolicy) self.slowUpdatePeriod.setMinimumSize(QtCore.QSize(150, 0)) self.slowUpdatePeriod.setMaximumSize(QtCore.QSize(150, 16777215)) self.slowUpdatePeriod.setStyleSheet(_fromUtf8("background-color: rgb(255,255,255);\n" "font: 9pt \"Droid Sans\";\n" "color: rgb(0, 0, 0);")) self.slowUpdatePeriod.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.slowUpdatePeriod.setDecimals(1) self.slowUpdatePeriod.setMinimum(0.1) self.slowUpdatePeriod.setMaximum(1000000000.0) self.slowUpdatePeriod.setProperty("value", 1.0) self.slowUpdatePeriod.setObjectName(_fromUtf8("slowUpdatePeriod")) self.slowPlotHorizLayout.addWidget(self.slowUpdatePeriod) spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.slowPlotHorizLayout.addItem(spacerItem) self.plotVertLayout.addLayout(self.slowPlotHorizLayout) self.pressurePlot = PlotWidget(MainWidget) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pressurePlot.sizePolicy().hasHeightForWidth()) self.pressurePlot.setSizePolicy(sizePolicy) self.pressurePlot.setMinimumSize(QtCore.QSize(150, 10)) self.pressurePlot.setStyleSheet(_fromUtf8("background-color: rgb(255, 0, 255);")) self.pressurePlot.setFrameShape(QtGui.QFrame.NoFrame) self.pressurePlot.setFrameShadow(QtGui.QFrame.Plain) self.pressurePlot.setLineWidth(0) self.pressurePlot.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.pressurePlot.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.pressurePlot.setObjectName(_fromUtf8("pressurePlot")) self.plotVertLayout.addWidget(self.pressurePlot) self.fastPlotHorizLayout = QtGui.QHBoxLayout() self.fastPlotHorizLayout.setObjectName(_fromUtf8("fastPlotHorizLayout")) self.textEdit = QtGui.QTextEdit(MainWidget) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.textEdit.sizePolicy().hasHeightForWidth()) self.textEdit.setSizePolicy(sizePolicy) self.textEdit.setMinimumSize(QtCore.QSize(136, 30)) self.textEdit.setMaximumSize(QtCore.QSize(136, 30)) self.textEdit.setLayoutDirection(QtCore.Qt.RightToLeft) self.textEdit.setStyleSheet(_fromUtf8("font: 9pt \"Droid Sans\";")) self.textEdit.setFrameShape(QtGui.QFrame.NoFrame) self.textEdit.setFrameShadow(QtGui.QFrame.Plain) self.textEdit.setLineWidth(0) self.textEdit.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.textEdit.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.textEdit.setObjectName(_fromUtf8("textEdit")) self.fastPlotHorizLayout.addWidget(self.textEdit) self.fastUpdatePeriod = QtGui.QDoubleSpinBox(MainWidget) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.fastUpdatePeriod.sizePolicy().hasHeightForWidth()) self.fastUpdatePeriod.setSizePolicy(sizePolicy) self.fastUpdatePeriod.setMinimumSize(QtCore.QSize(100, 0)) self.fastUpdatePeriod.setMaximumSize(QtCore.QSize(100, 16777215)) self.fastUpdatePeriod.setLayoutDirection(QtCore.Qt.LeftToRight) self.fastUpdatePeriod.setStyleSheet(_fromUtf8("background-color: rgb(255,255,255);\n" "font: 9pt \"Droid Sans\";\n" "color: rgb(0, 0, 0);")) self.fastUpdatePeriod.setFrame(True) self.fastUpdatePeriod.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.fastUpdatePeriod.setButtonSymbols(QtGui.QAbstractSpinBox.UpDownArrows) self.fastUpdatePeriod.setAccelerated(False) self.fastUpdatePeriod.setDecimals(1) self.fastUpdatePeriod.setMinimum(0.5) self.fastUpdatePeriod.setMaximum(6.0) self.fastUpdatePeriod.setProperty("value", 4.0) self.fastUpdatePeriod.setObjectName(_fromUtf8("fastUpdatePeriod")) self.fastPlotHorizLayout.addWidget(self.fastUpdatePeriod) spacerItem1 = QtGui.QSpacerItem(170, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.fastPlotHorizLayout.addItem(spacerItem1) self.plotVertLayout.addLayout(self.fastPlotHorizLayout) self.horizontalLayout_8.addLayout(self.plotVertLayout) self.testVertLayout = QtGui.QVBoxLayout() self.testVertLayout.setSpacing(0) self.testVertLayout.setObjectName(_fromUtf8("testVertLayout")) spacerItem2 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.testVertLayout.addItem(spacerItem2) self.horizontalLayout_8.addLayout(self.testVertLayout) self.horizontalLayout_2.addLayout(self.horizontalLayout_8) self.retranslateUi(MainWidget) QtCore.QMetaObject.connectSlotsByName(MainWidget) def retranslateUi(self, MainWidget): MainWidget.setWindowTitle(_translate("MainWidget", "Animal Monitor v1.0", None)) self.textBrowser.setHtml(_translate("MainWidget", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n" "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" "p, li { white-space: pre-wrap; }\n" "</style></head><body style=\" font-family:\'Droid Sans\'; font-size:9pt; font-weight:400; font-style:normal;\">\n" "<p align=\"right\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt;\">Sampling Frequency:</span></p></body></html>", None)) self.slowUpdatePeriod.setPrefix(_translate("MainWidget", "1 sample / ", None)) self.slowUpdatePeriod.setSuffix(_translate("MainWidget", " sec", None)) self.textEdit.setHtml(_translate("MainWidget", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n" "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" "p, li { white-space: pre-wrap; }\n" "</style></head><body style=\" font-family:\'Droid Sans\'; font-size:9pt; font-weight:400; font-style:normal;\">\n" "<p align=\"right\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt;\">Plot Refresh Period:</span></p></body></html>", None)) self.fastUpdatePeriod.setSuffix(_translate("MainWidget", " sec", None))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(1419, 950) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 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.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(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 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(0, 0, 0)) 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(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 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.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(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 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(0, 0, 0)) 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(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 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(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 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(0, 0, 0)) 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) MainWindow.setPalette(palette) MainWindow.setAcceptDrops(False) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8("openbci_logo.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) MainWindow.setWindowIcon(icon) MainWindow.setIconSize(QtCore.QSize(24, 24)) MainWindow.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly) MainWindow.setAnimated(True) MainWindow.setTabShape(QtGui.QTabWidget.Rounded) self.centralwidget = QtGui.QWidget(MainWindow) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 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.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(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 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(0, 0, 0)) 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(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 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.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(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 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(0, 0, 0)) 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(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 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(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 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(0, 0, 0)) 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.centralwidget.setPalette(palette) self.centralwidget.setLayoutDirection(QtCore.Qt.LeftToRight) self.centralwidget.setAutoFillBackground(True) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.gridLayout = QtGui.QGridLayout(self.centralwidget) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.gridLayout.addItem(spacerItem, 3, 2, 1, 1) spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem1, 2, 2, 1, 1) self.scroll_plot = PlotWidget(self.centralwidget) self.scroll_plot.setObjectName(_fromUtf8("scroll_plot")) self.gridLayout.addWidget(self.scroll_plot, 1, 1, 4, 1) self.fft = PlotWidget(self.centralwidget) self.fft.setFrameShape(QtGui.QFrame.NoFrame) self.fft.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.fft.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.fft.setObjectName(_fromUtf8("fft")) self.gridLayout.addWidget(self.fft, 4, 2, 1, 1) spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem2, 0, 1, 1, 2) self.pushButton = QtGui.QPushButton(self.centralwidget) self.pushButton.setObjectName(_fromUtf8("pushButton")) self.gridLayout.addWidget(self.pushButton, 5, 1, 1, 2) MainWindow.setCentralWidget(self.centralwidget) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(_translate("MainWindow", "OpenBCI GUI", None)) self.pushButton.setText(_translate("MainWindow", "Stream", None))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1224, 862) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( MainWindow.sizePolicy().hasHeightForWidth()) MainWindow.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) MainWindow.setFont(font) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.centralwidget) self.verticalLayout_2.setObjectName("verticalLayout_2") self.groupBox = QtWidgets.QGroupBox(self.centralwidget) self.groupBox.setTitle("") self.groupBox.setObjectName("groupBox") self.horizontalLayout_7 = QtWidgets.QHBoxLayout(self.groupBox) self.horizontalLayout_7.setObjectName("horizontalLayout_7") self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setContentsMargins(1, -1, -1, -1) self.horizontalLayout.setObjectName("horizontalLayout") self.cmb_port_name = QtWidgets.QComboBox(self.groupBox) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.cmb_port_name.sizePolicy().hasHeightForWidth()) self.cmb_port_name.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.cmb_port_name.setFont(font) self.cmb_port_name.setObjectName("cmb_port_name") self.horizontalLayout.addWidget(self.cmb_port_name) self.btn_open = QtWidgets.QPushButton(self.groupBox) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.btn_open.sizePolicy().hasHeightForWidth()) self.btn_open.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.btn_open.setFont(font) self.btn_open.setObjectName("btn_open") self.horizontalLayout.addWidget(self.btn_open) self.pushButton_flash = QtWidgets.QPushButton(self.groupBox) font = QtGui.QFont() font.setPointSize(10) self.pushButton_flash.setFont(font) self.pushButton_flash.setObjectName("pushButton_flash") self.horizontalLayout.addWidget(self.pushButton_flash) self.btn_close = QtWidgets.QPushButton(self.groupBox) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.btn_close.sizePolicy().hasHeightForWidth()) self.btn_close.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.btn_close.setFont(font) self.btn_close.setObjectName("btn_close") self.horizontalLayout.addWidget(self.btn_close) self.pushButton_on = QtWidgets.QPushButton(self.groupBox) font = QtGui.QFont() font.setPointSize(10) self.pushButton_on.setFont(font) self.pushButton_on.setObjectName("pushButton_on") self.horizontalLayout.addWidget(self.pushButton_on) self.pushButton_off = QtWidgets.QPushButton(self.groupBox) font = QtGui.QFont() font.setPointSize(10) self.pushButton_off.setFont(font) self.pushButton_off.setObjectName("pushButton_off") self.horizontalLayout.addWidget(self.pushButton_off) self.pushButton_lock = QtWidgets.QPushButton(self.groupBox) font = QtGui.QFont() font.setPointSize(10) self.pushButton_lock.setFont(font) self.pushButton_lock.setObjectName("pushButton_lock") self.horizontalLayout.addWidget(self.pushButton_lock) self.horizontalLayout_7.addLayout(self.horizontalLayout) self.verticalLayout_2.addWidget(self.groupBox) self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setObjectName("horizontalLayout_5") spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) self.horizontalLayout_5.addItem(spacerItem) self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setContentsMargins(18, -1, 17, -1) self.verticalLayout.setObjectName("verticalLayout") self.radioButton1 = QtWidgets.QRadioButton(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.radioButton1.sizePolicy().hasHeightForWidth()) self.radioButton1.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.radioButton1.setFont(font) self.radioButton1.setObjectName("radioButton1") self.verticalLayout.addWidget(self.radioButton1) self.radioButton2 = QtWidgets.QRadioButton(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.radioButton2.sizePolicy().hasHeightForWidth()) self.radioButton2.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.radioButton2.setFont(font) self.radioButton2.setObjectName("radioButton2") self.verticalLayout.addWidget(self.radioButton2) self.radioButton_w = QtWidgets.QRadioButton(self.centralwidget) font = QtGui.QFont() font.setPointSize(10) self.radioButton_w.setFont(font) self.radioButton_w.setObjectName("radioButton_w") self.verticalLayout.addWidget(self.radioButton_w) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.label = QtWidgets.QLabel(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label.sizePolicy().hasHeightForWidth()) self.label.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.label.setFont(font) self.label.setObjectName("label") self.horizontalLayout_2.addWidget(self.label) self.data_edit1 = QtWidgets.QLineEdit(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.data_edit1.sizePolicy().hasHeightForWidth()) self.data_edit1.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(12) self.data_edit1.setFont(font) self.data_edit1.setObjectName("data_edit1") self.horizontalLayout_2.addWidget(self.data_edit1) self.verticalLayout.addLayout(self.horizontalLayout_2) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.label_2 = QtWidgets.QLabel(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_2.sizePolicy().hasHeightForWidth()) self.label_2.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.label_2.setFont(font) self.label_2.setObjectName("label_2") self.horizontalLayout_3.addWidget(self.label_2) self.data_edit2 = QtWidgets.QLineEdit(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.data_edit2.sizePolicy().hasHeightForWidth()) self.data_edit2.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(12) self.data_edit2.setFont(font) self.data_edit2.setObjectName("data_edit2") self.horizontalLayout_3.addWidget(self.data_edit2) self.verticalLayout.addLayout(self.horizontalLayout_3) self.btn_send = QtWidgets.QPushButton(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.btn_send.sizePolicy().hasHeightForWidth()) self.btn_send.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.btn_send.setFont(font) self.btn_send.setObjectName("btn_send") self.verticalLayout.addWidget(self.btn_send) self.horizontalLayout_5.addLayout(self.verticalLayout) spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_5.addItem(spacerItem1) self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setSizeConstraint( QtWidgets.QLayout.SetFixedSize) self.horizontalLayout_4.setContentsMargins(0, 13, 84, 13) self.horizontalLayout_4.setSpacing(9) self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.dial = QtWidgets.QDial(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(200) sizePolicy.setVerticalStretch(4) sizePolicy.setHeightForWidth( self.dial.sizePolicy().hasHeightForWidth()) self.dial.setSizePolicy(sizePolicy) self.dial.setMinimumSize(QtCore.QSize(100, 0)) self.dial.setLayoutDirection(QtCore.Qt.LeftToRight) self.dial.setOrientation(QtCore.Qt.Horizontal) self.dial.setObjectName("dial") self.horizontalLayout_4.addWidget(self.dial) self.verticalSlider = QtWidgets.QSlider(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.verticalSlider.sizePolicy().hasHeightForWidth()) self.verticalSlider.setSizePolicy(sizePolicy) self.verticalSlider.setOrientation(QtCore.Qt.Vertical) self.verticalSlider.setObjectName("verticalSlider") self.horizontalLayout_4.addWidget(self.verticalSlider) self.horizontalLayout_5.addLayout(self.horizontalLayout_4) spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_5.addItem(spacerItem2) self.verticalLayout_4 = QtWidgets.QVBoxLayout() self.verticalLayout_4.setObjectName("verticalLayout_4") self.ready_send = QtWidgets.QLabel(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.ready_send.sizePolicy().hasHeightForWidth()) self.ready_send.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.ready_send.setFont(font) self.ready_send.setLayoutDirection(QtCore.Qt.LeftToRight) self.ready_send.setObjectName("ready_send") self.verticalLayout_4.addWidget(self.ready_send) self.line = QtWidgets.QFrame(self.centralwidget) self.line.setFrameShape(QtWidgets.QFrame.VLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.verticalLayout_4.addWidget(self.line) self.gridLayout_2 = QtWidgets.QGridLayout() self.gridLayout_2.setContentsMargins(-1, -1, 19, -1) self.gridLayout_2.setObjectName("gridLayout_2") self.show_send = QtWidgets.QTextEdit(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.show_send.sizePolicy().hasHeightForWidth()) self.show_send.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(11) self.show_send.setFont(font) self.show_send.setObjectName("show_send") self.gridLayout_2.addWidget(self.show_send, 0, 1, 1, 1) self.pushButton = QtWidgets.QPushButton(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.pushButton.sizePolicy().hasHeightForWidth()) self.pushButton.setSizePolicy(sizePolicy) self.pushButton.setObjectName("pushButton") self.gridLayout_2.addWidget(self.pushButton, 0, 2, 1, 1) self.verticalLayout_4.addLayout(self.gridLayout_2) self.horizontalLayout_5.addLayout(self.verticalLayout_4) spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) self.horizontalLayout_5.addItem(spacerItem3) self.verticalLayout_2.addLayout(self.horizontalLayout_5) spacerItem4 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) self.verticalLayout_2.addItem(spacerItem4) self.horizontalLayout_6 = QtWidgets.QHBoxLayout() self.horizontalLayout_6.setObjectName("horizontalLayout_6") self.gridLayout = QtWidgets.QGridLayout() self.gridLayout.setObjectName("gridLayout") spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem5, 1, 3, 1, 1) spacerItem6 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout.addItem(spacerItem6, 1, 0, 4, 1) self.label_9 = QtWidgets.QLabel(self.centralwidget) self.label_9.setObjectName("label_9") self.gridLayout.addWidget(self.label_9, 0, 1, 1, 1) self.plotWidget_ted_3 = PlotWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.plotWidget_ted_3.sizePolicy().hasHeightForWidth()) self.plotWidget_ted_3.setSizePolicy(sizePolicy) self.plotWidget_ted_3.setObjectName("plotWidget_ted_3") self.gridLayout.addWidget(self.plotWidget_ted_3, 4, 1, 1, 1) self.plotWidget_ted_4 = PlotWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.plotWidget_ted_4.sizePolicy().hasHeightForWidth()) self.plotWidget_ted_4.setSizePolicy(sizePolicy) self.plotWidget_ted_4.setObjectName("plotWidget_ted_4") self.gridLayout.addWidget(self.plotWidget_ted_4, 4, 2, 1, 1) self.label_10 = QtWidgets.QLabel(self.centralwidget) self.label_10.setObjectName("label_10") self.gridLayout.addWidget(self.label_10, 0, 2, 1, 1) self.plotWidget_ted_2 = PlotWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.plotWidget_ted_2.sizePolicy().hasHeightForWidth()) self.plotWidget_ted_2.setSizePolicy(sizePolicy) self.plotWidget_ted_2.setFrameShape(QtWidgets.QFrame.StyledPanel) self.plotWidget_ted_2.setFrameShadow(QtWidgets.QFrame.Sunken) self.plotWidget_ted_2.setLineWidth(0) self.plotWidget_ted_2.setSizeAdjustPolicy( QtWidgets.QAbstractScrollArea.AdjustToContents) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.NoBrush) self.plotWidget_ted_2.setForegroundBrush(brush) self.plotWidget_ted_2.setObjectName("plotWidget_ted_2") self.gridLayout.addWidget(self.plotWidget_ted_2, 1, 2, 1, 1) self.plotWidget_ted_1 = PlotWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.plotWidget_ted_1.sizePolicy().hasHeightForWidth()) self.plotWidget_ted_1.setSizePolicy(sizePolicy) self.plotWidget_ted_1.setFrameShape(QtWidgets.QFrame.StyledPanel) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.NoBrush) self.plotWidget_ted_1.setForegroundBrush(brush) self.plotWidget_ted_1.setObjectName("plotWidget_ted_1") self.gridLayout.addWidget(self.plotWidget_ted_1, 1, 1, 1, 1) self.label_11 = QtWidgets.QLabel(self.centralwidget) self.label_11.setObjectName("label_11") self.gridLayout.addWidget(self.label_11, 3, 1, 1, 1) self.label_12 = QtWidgets.QLabel(self.centralwidget) self.label_12.setObjectName("label_12") self.gridLayout.addWidget(self.label_12, 3, 2, 1, 1) self.horizontalLayout_6.addLayout(self.gridLayout) self.gridLayout_3 = QtWidgets.QGridLayout() self.gridLayout_3.setObjectName("gridLayout_3") self.ready_received = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setPointSize(10) self.ready_received.setFont(font) self.ready_received.setObjectName("ready_received") self.gridLayout_3.addWidget(self.ready_received, 0, 0, 1, 1) self.label_3 = QtWidgets.QLabel(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_3.sizePolicy().hasHeightForWidth()) self.label_3.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.label_3.setFont(font) self.label_3.setObjectName("label_3") self.gridLayout_3.addWidget(self.label_3, 1, 0, 1, 1) self.lineEdit_1 = QtWidgets.QLineEdit(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.lineEdit_1.sizePolicy().hasHeightForWidth()) self.lineEdit_1.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.lineEdit_1.setFont(font) self.lineEdit_1.setText("") self.lineEdit_1.setObjectName("lineEdit_1") self.gridLayout_3.addWidget(self.lineEdit_1, 1, 1, 1, 1) self.label_4 = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setPointSize(10) self.label_4.setFont(font) self.label_4.setObjectName("label_4") self.gridLayout_3.addWidget(self.label_4, 2, 0, 1, 1) self.lineEdit_2 = QtWidgets.QLineEdit(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.lineEdit_2.sizePolicy().hasHeightForWidth()) self.lineEdit_2.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.lineEdit_2.setFont(font) self.lineEdit_2.setText("") self.lineEdit_2.setObjectName("lineEdit_2") self.gridLayout_3.addWidget(self.lineEdit_2, 2, 1, 1, 1) self.label_5 = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setPointSize(10) self.label_5.setFont(font) self.label_5.setObjectName("label_5") self.gridLayout_3.addWidget(self.label_5, 3, 0, 1, 1) self.lineEdit_3 = QtWidgets.QLineEdit(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.lineEdit_3.sizePolicy().hasHeightForWidth()) self.lineEdit_3.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.lineEdit_3.setFont(font) self.lineEdit_3.setText("") self.lineEdit_3.setObjectName("lineEdit_3") self.gridLayout_3.addWidget(self.lineEdit_3, 3, 1, 1, 1) self.clear_receive = QtWidgets.QPushButton(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.clear_receive.sizePolicy().hasHeightForWidth()) self.clear_receive.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.clear_receive.setFont(font) self.clear_receive.setObjectName("clear_receive") self.gridLayout_3.addWidget(self.clear_receive, 3, 2, 2, 1) spacerItem7 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum) self.gridLayout_3.addItem(spacerItem7, 3, 3, 1, 1) self.label_6 = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setPointSize(10) self.label_6.setFont(font) self.label_6.setObjectName("label_6") self.gridLayout_3.addWidget(self.label_6, 4, 0, 1, 1) self.lineEdit_4 = QtWidgets.QLineEdit(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.lineEdit_4.sizePolicy().hasHeightForWidth()) self.lineEdit_4.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.lineEdit_4.setFont(font) self.lineEdit_4.setText("") self.lineEdit_4.setObjectName("lineEdit_4") self.gridLayout_3.addWidget(self.lineEdit_4, 4, 1, 1, 1) self.label_7 = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setPointSize(10) self.label_7.setFont(font) self.label_7.setObjectName("label_7") self.gridLayout_3.addWidget(self.label_7, 5, 0, 1, 1) self.lineEdit_5 = QtWidgets.QLineEdit(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.lineEdit_5.sizePolicy().hasHeightForWidth()) self.lineEdit_5.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.lineEdit_5.setFont(font) self.lineEdit_5.setText("") self.lineEdit_5.setObjectName("lineEdit_5") self.gridLayout_3.addWidget(self.lineEdit_5, 5, 1, 1, 1) self.label_8 = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setPointSize(10) self.label_8.setFont(font) self.label_8.setObjectName("label_8") self.gridLayout_3.addWidget(self.label_8, 6, 0, 1, 1) self.lineEdit_6 = QtWidgets.QLineEdit(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.lineEdit_6.sizePolicy().hasHeightForWidth()) self.lineEdit_6.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.lineEdit_6.setFont(font) self.lineEdit_6.setText("") self.lineEdit_6.setObjectName("lineEdit_6") self.gridLayout_3.addWidget(self.lineEdit_6, 6, 1, 1, 1) self.horizontalLayout_6.addLayout(self.gridLayout_3) self.verticalLayout_2.addLayout(self.horizontalLayout_6) MainWindow.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) self.pushButton.clicked.connect(self.show_send.clear) self.clear_receive.clicked.connect(self.lineEdit_1.clear) self.clear_receive.clicked.connect(self.lineEdit_2.clear) self.clear_receive.clicked.connect(self.lineEdit_3.clear) self.clear_receive.clicked.connect(self.lineEdit_4.clear) self.clear_receive.clicked.connect(self.lineEdit_5.clear) self.clear_receive.clicked.connect(self.lineEdit_6.clear) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.btn_open.setText(_translate("MainWindow", "打开")) self.pushButton_flash.setText(_translate("MainWindow", "刷新串口")) self.btn_close.setText(_translate("MainWindow", "关闭")) self.pushButton_on.setText(_translate("MainWindow", "功放上电")) self.pushButton_off.setText(_translate("MainWindow", "功放断电")) self.pushButton_lock.setText(_translate("MainWindow", "锁定")) self.radioButton1.setText(_translate("MainWindow", "速度运行模式")) self.radioButton2.setText(_translate("MainWindow", "位置运行模式")) self.radioButton_w.setText(_translate("MainWindow", "稳定运行模式")) self.label.setText(_translate("MainWindow", "方位")) self.label_2.setText(_translate("MainWindow", "俯仰")) self.btn_send.setText(_translate("MainWindow", "发送")) self.ready_send.setText(_translate("MainWindow", "已发送:")) self.pushButton.setText(_translate("MainWindow", "清空发送区")) self.label_9.setText(_translate("MainWindow", "方位角速度")) self.label_10.setText(_translate("MainWindow", "俯仰角速度")) self.label_11.setText(_translate("MainWindow", "方位角度")) self.label_12.setText(_translate("MainWindow", "俯仰角度")) self.ready_received.setText(_translate("MainWindow", "已接收:")) self.label_3.setText(_translate("MainWindow", "当前运行模式:")) self.label_4.setText(_translate("MainWindow", "转台到位状态:")) self.label_5.setText(_translate("MainWindow", "方位角速度:")) self.clear_receive.setText(_translate("MainWindow", "清空接收区")) self.label_6.setText(_translate("MainWindow", "俯仰角速度:")) self.label_7.setText(_translate("MainWindow", "方位角度:")) self.label_8.setText(_translate("MainWindow", "俯仰角度:"))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(1430, 861) MainWindow.setTabShape(QtGui.QTabWidget.Rounded) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.buttonStart = QtGui.QPushButton(self.centralwidget) self.buttonStart.setGeometry(QtCore.QRect(1220, 50, 75, 21)) self.buttonStart.setStyleSheet(_fromUtf8("")) self.buttonStart.setObjectName(_fromUtf8("buttonStart")) self.buttonStop = QtGui.QPushButton(self.centralwidget) self.buttonStop.setGeometry(QtCore.QRect(1300, 50, 75, 21)) self.buttonStop.setStyleSheet(_fromUtf8("")) self.buttonStop.setObjectName(_fromUtf8("buttonStop")) self.gridLayoutWidget = QtGui.QWidget(self.centralwidget) self.gridLayoutWidget.setGeometry(QtCore.QRect(1220, 80, 191, 411)) self.gridLayoutWidget.setObjectName(_fromUtf8("gridLayoutWidget")) self.gridLayout = QtGui.QGridLayout(self.gridLayoutWidget) self.gridLayout.setMargin(0) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.label = QtGui.QLabel(self.gridLayoutWidget) self.label.setObjectName(_fromUtf8("label")) self.gridLayout.addWidget(self.label, 0, 0, 1, 1) self.sliderCont = QtGui.QSlider(self.gridLayoutWidget) self.sliderCont.setMaximum(255) self.sliderCont.setOrientation(QtCore.Qt.Horizontal) self.sliderCont.setTickPosition(QtGui.QSlider.TicksBothSides) self.sliderCont.setTickInterval(50) self.sliderCont.setObjectName(_fromUtf8("sliderCont")) self.gridLayout.addWidget(self.sliderCont, 5, 0, 1, 1) self.sliderSat = QtGui.QSlider(self.gridLayoutWidget) self.sliderSat.setMaximum(255) self.sliderSat.setOrientation(QtCore.Qt.Horizontal) self.sliderSat.setTickPosition(QtGui.QSlider.TicksBothSides) self.sliderSat.setTickInterval(50) self.sliderSat.setObjectName(_fromUtf8("sliderSat")) self.gridLayout.addWidget(self.sliderSat, 7, 0, 1, 1) self.label_6 = QtGui.QLabel(self.gridLayoutWidget) self.label_6.setObjectName(_fromUtf8("label_6")) self.gridLayout.addWidget(self.label_6, 13, 0, 1, 1) self.sliderWB = QtGui.QSlider(self.gridLayoutWidget) self.sliderWB.setMaximum(10000) self.sliderWB.setSingleStep(500) self.sliderWB.setPageStep(1000) self.sliderWB.setOrientation(QtCore.Qt.Horizontal) self.sliderWB.setTickPosition(QtGui.QSlider.TicksBothSides) self.sliderWB.setTickInterval(1000) self.sliderWB.setObjectName(_fromUtf8("sliderWB")) self.gridLayout.addWidget(self.sliderWB, 14, 0, 1, 1) self.sliderBright = QtGui.QSlider(self.gridLayoutWidget) self.sliderBright.setMaximum(255) self.sliderBright.setOrientation(QtCore.Qt.Horizontal) self.sliderBright.setInvertedAppearance(False) self.sliderBright.setTickPosition(QtGui.QSlider.TicksBothSides) self.sliderBright.setTickInterval(50) self.sliderBright.setObjectName(_fromUtf8("sliderBright")) self.gridLayout.addWidget(self.sliderBright, 2, 0, 1, 1) self.sliderGain = QtGui.QSlider(self.gridLayoutWidget) self.sliderGain.setMaximum(255) self.sliderGain.setOrientation(QtCore.Qt.Horizontal) self.sliderGain.setTickPosition(QtGui.QSlider.TicksBothSides) self.sliderGain.setTickInterval(50) self.sliderGain.setObjectName(_fromUtf8("sliderGain")) self.gridLayout.addWidget(self.sliderGain, 9, 0, 1, 1) self.label_2 = QtGui.QLabel(self.gridLayoutWidget) self.label_2.setObjectName(_fromUtf8("label_2")) self.gridLayout.addWidget(self.label_2, 6, 0, 1, 1) self.sliderExpo = QtGui.QSlider(self.gridLayoutWidget) self.sliderExpo.setMinimum(1) self.sliderExpo.setMaximum(7) self.sliderExpo.setOrientation(QtCore.Qt.Horizontal) self.sliderExpo.setTickPosition(QtGui.QSlider.TicksBothSides) self.sliderExpo.setTickInterval(1) self.sliderExpo.setObjectName(_fromUtf8("sliderExpo")) self.gridLayout.addWidget(self.sliderExpo, 12, 0, 1, 1) self.label_4 = QtGui.QLabel(self.gridLayoutWidget) self.label_4.setObjectName(_fromUtf8("label_4")) self.gridLayout.addWidget(self.label_4, 8, 0, 1, 1) self.label_3 = QtGui.QLabel(self.gridLayoutWidget) self.label_3.setObjectName(_fromUtf8("label_3")) self.gridLayout.addWidget(self.label_3, 3, 0, 1, 1) self.label_5 = QtGui.QLabel(self.gridLayoutWidget) self.label_5.setObjectName(_fromUtf8("label_5")) self.gridLayout.addWidget(self.label_5, 10, 0, 1, 1) self.buttonCalibrate = QtGui.QPushButton(self.centralwidget) self.buttonCalibrate.setGeometry(QtCore.QRect(1280, 490, 71, 23)) self.buttonCalibrate.setObjectName(_fromUtf8("buttonCalibrate")) self.tabWidget = QtGui.QTabWidget(self.centralwidget) self.tabWidget.setGeometry(QtCore.QRect(10, 10, 1191, 801)) self.tabWidget.setObjectName(_fromUtf8("tabWidget")) self.tab_2 = QtGui.QWidget() self.tab_2.setObjectName(_fromUtf8("tab_2")) self.figure3 = GraphicsView(self.tab_2) self.figure3.setGeometry(QtCore.QRect(10, 4, 1024, 768)) self.figure3.setObjectName(_fromUtf8("figure3")) self.groupBox = QtGui.QGroupBox(self.tab_2) self.groupBox.setGeometry(QtCore.QRect(1040, 120, 141, 201)) self.groupBox.setObjectName(_fromUtf8("groupBox")) self.verticalLayoutWidget = QtGui.QWidget(self.groupBox) self.verticalLayoutWidget.setGeometry(QtCore.QRect(10, 20, 121, 141)) self.verticalLayoutWidget.setObjectName( _fromUtf8("verticalLayoutWidget")) self.gridLayout_2 = QtGui.QGridLayout(self.verticalLayoutWidget) self.gridLayout_2.setMargin(0) self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) self.label_9 = QtGui.QLabel(self.verticalLayoutWidget) self.label_9.setObjectName(_fromUtf8("label_9")) self.gridLayout_2.addWidget(self.label_9, 1, 0, 1, 1) self.label_10 = QtGui.QLabel(self.verticalLayoutWidget) self.label_10.setObjectName(_fromUtf8("label_10")) self.gridLayout_2.addWidget(self.label_10, 2, 0, 1, 1) self.label_8 = QtGui.QLabel(self.verticalLayoutWidget) self.label_8.setObjectName(_fromUtf8("label_8")) self.gridLayout_2.addWidget(self.label_8, 0, 0, 1, 1) self.label_11 = QtGui.QLabel(self.verticalLayoutWidget) self.label_11.setObjectName(_fromUtf8("label_11")) self.gridLayout_2.addWidget(self.label_11, 3, 0, 1, 1) self.line_mincol = QtGui.QLineEdit(self.verticalLayoutWidget) self.line_mincol.setObjectName(_fromUtf8("line_mincol")) self.gridLayout_2.addWidget(self.line_mincol, 0, 1, 1, 1) self.line_maxcol = QtGui.QLineEdit(self.verticalLayoutWidget) self.line_maxcol.setObjectName(_fromUtf8("line_maxcol")) self.gridLayout_2.addWidget(self.line_maxcol, 1, 1, 1, 1) self.line_minrow = QtGui.QLineEdit(self.verticalLayoutWidget) self.line_minrow.setObjectName(_fromUtf8("line_minrow")) self.gridLayout_2.addWidget(self.line_minrow, 2, 1, 1, 1) self.line_maxrow = QtGui.QLineEdit(self.verticalLayoutWidget) self.line_maxrow.setObjectName(_fromUtf8("line_maxrow")) self.gridLayout_2.addWidget(self.line_maxrow, 3, 1, 1, 1) self.buttonUpdateROI = QtGui.QPushButton(self.groupBox) self.buttonUpdateROI.setGeometry(QtCore.QRect(30, 170, 75, 23)) self.buttonUpdateROI.setObjectName(_fromUtf8("buttonUpdateROI")) self.label_12 = QtGui.QLabel(self.tab_2) self.label_12.setGeometry(QtCore.QRect(1040, 70, 51, 16)) self.label_12.setObjectName(_fromUtf8("label_12")) self.coor = QtGui.QLabel(self.tab_2) self.coor.setGeometry(QtCore.QRect(1040, 90, 131, 16)) self.coor.setObjectName(_fromUtf8("coor")) self.groupBox_3 = QtGui.QGroupBox(self.tab_2) self.groupBox_3.setGeometry(QtCore.QRect(1040, 340, 141, 241)) self.groupBox_3.setObjectName(_fromUtf8("groupBox_3")) self.gridLayoutWidget_2 = QtGui.QWidget(self.groupBox_3) self.gridLayoutWidget_2.setGeometry(QtCore.QRect(0, 20, 131, 176)) self.gridLayoutWidget_2.setObjectName(_fromUtf8("gridLayoutWidget_2")) self.gridLayout_3 = QtGui.QGridLayout(self.gridLayoutWidget_2) self.gridLayout_3.setMargin(0) self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3")) self.label_14 = QtGui.QLabel(self.gridLayoutWidget_2) self.label_14.setObjectName(_fromUtf8("label_14")) self.gridLayout_3.addWidget(self.label_14, 4, 0, 1, 1) self.label_13 = QtGui.QLabel(self.gridLayoutWidget_2) self.label_13.setObjectName(_fromUtf8("label_13")) self.gridLayout_3.addWidget(self.label_13, 0, 0, 1, 1) self.laserHigh = QtGui.QLineEdit(self.gridLayoutWidget_2) self.laserHigh.setObjectName(_fromUtf8("laserHigh")) self.gridLayout_3.addWidget(self.laserHigh, 1, 0, 1, 1) self.label_15 = QtGui.QLabel(self.gridLayoutWidget_2) self.label_15.setObjectName(_fromUtf8("label_15")) self.gridLayout_3.addWidget(self.label_15, 2, 0, 1, 1) self.projHigh = QtGui.QLineEdit(self.gridLayoutWidget_2) self.projHigh.setObjectName(_fromUtf8("projHigh")) self.gridLayout_3.addWidget(self.projHigh, 3, 0, 1, 1) self.label_16 = QtGui.QLabel(self.gridLayoutWidget_2) self.label_16.setObjectName(_fromUtf8("label_16")) self.gridLayout_3.addWidget(self.label_16, 6, 0, 1, 1) self.laserLow = QtGui.QLineEdit(self.gridLayoutWidget_2) self.laserLow.setObjectName(_fromUtf8("laserLow")) self.gridLayout_3.addWidget(self.laserLow, 5, 0, 1, 1) self.projLow = QtGui.QLineEdit(self.gridLayoutWidget_2) self.projLow.setObjectName(_fromUtf8("projLow")) self.gridLayout_3.addWidget(self.projLow, 7, 0, 1, 1) self.buttonUpdateProjection = QtGui.QPushButton(self.groupBox_3) self.buttonUpdateProjection.setGeometry(QtCore.QRect(30, 200, 75, 23)) self.buttonUpdateProjection.setObjectName( _fromUtf8("buttonUpdateProjection")) self.tabWidget.addTab(self.tab_2, _fromUtf8("")) self.tab = QtGui.QWidget() self.tab.setObjectName(_fromUtf8("tab")) self.label_7 = QtGui.QLabel(self.tab) self.label_7.setGeometry(QtCore.QRect(178, 607, 46, 13)) self.label_7.setObjectName(_fromUtf8("label_7")) self.lineFilename = QtGui.QLineEdit(self.tab) self.lineFilename.setGeometry(QtCore.QRect(228, 600, 113, 20)) self.lineFilename.setObjectName(_fromUtf8("lineFilename")) self.buttonGrab = QtGui.QPushButton(self.tab) self.buttonGrab.setGeometry(QtCore.QRect(350, 600, 111, 21)) self.buttonGrab.setObjectName(_fromUtf8("buttonGrab")) self.groupBox_2 = QtGui.QGroupBox(self.tab) self.groupBox_2.setGeometry(QtCore.QRect(170, 60, 800, 531)) self.groupBox_2.setTitle(_fromUtf8("")) self.groupBox_2.setObjectName(_fromUtf8("groupBox_2")) self.figure1 = GraphicsView(self.groupBox_2) self.figure1.setGeometry(QtCore.QRect(50, 30, 600, 200)) self.figure1.setAutoFillBackground(False) self.figure1.setObjectName(_fromUtf8("figure1")) self.figure2 = PlotWidget(self.groupBox_2) self.figure2.setGeometry(QtCore.QRect(0, 240, 660, 196)) self.figure2.setFrameShape(QtGui.QFrame.StyledPanel) self.figure2.setFrameShadow(QtGui.QFrame.Sunken) self.figure2.setObjectName(_fromUtf8("figure2")) self.tabWidget.addTab(self.tab, _fromUtf8("")) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1430, 21)) self.menubar.setObjectName(_fromUtf8("menubar")) MainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(MainWindow) self.statusbar.setObjectName(_fromUtf8("statusbar")) MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) self.tabWidget.setCurrentIndex(1) QtCore.QMetaObject.connectSlotsByName(MainWindow) MainWindow.setTabOrder(self.figure1, self.sliderGain) MainWindow.setTabOrder(self.sliderGain, self.buttonStart) MainWindow.setTabOrder(self.buttonStart, self.sliderExpo) MainWindow.setTabOrder(self.sliderExpo, self.figure2) MainWindow.setTabOrder(self.figure2, self.sliderSat) MainWindow.setTabOrder(self.sliderSat, self.sliderCont) MainWindow.setTabOrder(self.sliderCont, self.sliderBright) MainWindow.setTabOrder(self.sliderBright, self.buttonStop) MainWindow.setTabOrder(self.buttonStop, self.sliderWB) def retranslateUi(self, MainWindow): MainWindow.setWindowTitle( _translate("MainWindow", "Spectrometer v2.0", None)) self.buttonStart.setText(_translate("MainWindow", "Start ", None)) self.buttonStop.setText(_translate("MainWindow", "Stop ", None)) self.label.setText(_translate("MainWindow", "Brightness", None)) self.label_6.setText(_translate("MainWindow", "White Balance", None)) self.label_2.setText(_translate("MainWindow", "Saturation", None)) self.label_4.setText(_translate("MainWindow", "Gain", None)) self.label_3.setText(_translate("MainWindow", "Contrast", None)) self.label_5.setText(_translate("MainWindow", "Exposure", None)) self.buttonCalibrate.setText( _translate("MainWindow", "Normalize", None)) self.groupBox.setTitle(_translate("MainWindow", "ROI Settings:", None)) self.label_9.setText(_translate("MainWindow", "Max. Col:", None)) self.label_10.setText(_translate("MainWindow", "Min. Row:", None)) self.label_8.setText(_translate("MainWindow", "Min. Col:", None)) self.label_11.setText(_translate("MainWindow", "Max.Row:", None)) self.buttonUpdateROI.setText( _translate("MainWindow", "Update ROI", None)) self.label_12.setText(_translate("MainWindow", "Clicked at:", None)) self.coor.setText(_translate("MainWindow", "(0,0)", None)) self.groupBox_3.setTitle( _translate("MainWindow", "Projection Settings:", None)) self.label_14.setText( _translate("MainWindow", "Low Wavelength (nm):", None)) self.label_13.setText( _translate("MainWindow", "High Wavelength (nm):", None)) self.label_15.setText( _translate("MainWindow", "Projection Column:", None)) self.label_16.setText( _translate("MainWindow", "Projection Column:", None)) self.buttonUpdateProjection.setText( _translate("MainWindow", "Update Proj.", None)) self.tabWidget.setTabText( self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "Calibration", None)) self.label_7.setText(_translate("MainWindow", "Filename:", None)) self.buttonGrab.setText( _translate("MainWindow", "Save Spectrum Data", None)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Analysis", None))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.setEnabled(True) MainWindow.resize(700, 400) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( MainWindow.sizePolicy().hasHeightForWidth()) MainWindow.setSizePolicy(sizePolicy) MainWindow.setMinimumSize(QtCore.QSize(500, 300)) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) MainWindow.setWindowIcon(icon) self.centralwidget = QtWidgets.QWidget(MainWindow) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.centralwidget.sizePolicy().hasHeightForWidth()) self.centralwidget.setSizePolicy(sizePolicy) self.centralwidget.setObjectName("centralwidget") self.gridLayout_2 = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout_2.setObjectName("gridLayout_2") self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.pushButton_Start = QtWidgets.QPushButton(self.centralwidget) self.pushButton_Start.setObjectName("pushButton_Start") self.verticalLayout.addWidget(self.pushButton_Start) self.pushButton_Stop = QtWidgets.QPushButton(self.centralwidget) self.pushButton_Stop.setObjectName("pushButton_Stop") self.verticalLayout.addWidget(self.pushButton_Stop) self.pushButton_Get = QtWidgets.QPushButton(self.centralwidget) self.pushButton_Get.setObjectName("pushButton_Get") self.verticalLayout.addWidget(self.pushButton_Get) self.radioButton_interpolate = QtWidgets.QRadioButton( self.centralwidget) self.radioButton_interpolate.setObjectName("radioButton_interpolate") self.verticalLayout.addWidget(self.radioButton_interpolate) self.gridLayout_2.addLayout(self.verticalLayout, 0, 0, 1, 1) self.graphicsView = PlotWidget(self.centralwidget) self.graphicsView.setEnabled(True) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(100) sizePolicy.setVerticalStretch(100) sizePolicy.setHeightForWidth( self.graphicsView.sizePolicy().hasHeightForWidth()) self.graphicsView.setSizePolicy(sizePolicy) self.graphicsView.setMinimumSize(QtCore.QSize(500, 300)) self.graphicsView.setSizeIncrement(QtCore.QSize(5, 7)) self.graphicsView.setFrameShape(QtWidgets.QFrame.Box) self.graphicsView.setObjectName("graphicsView") self.gridLayout_2.addWidget(self.graphicsView, 0, 1, 2, 1) self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setSizeConstraint( QtWidgets.QLayout.SetDefaultConstraint) self.verticalLayout_2.setObjectName("verticalLayout_2") spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_2.addItem(spacerItem) self.label = QtWidgets.QLabel(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label.sizePolicy().hasHeightForWidth()) self.label.setSizePolicy(sizePolicy) self.label.setMaximumSize(QtCore.QSize(80, 20)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label.setFont(font) self.label.setAlignment(QtCore.Qt.AlignCenter) self.label.setObjectName("label") self.verticalLayout_2.addWidget(self.label) self.lcd_pos = QtWidgets.QLCDNumber(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.lcd_pos.sizePolicy().hasHeightForWidth()) self.lcd_pos.setSizePolicy(sizePolicy) self.lcd_pos.setMaximumSize(QtCore.QSize(100, 35)) font = QtGui.QFont() font.setPointSize(13) font.setBold(True) font.setItalic(False) font.setWeight(75) self.lcd_pos.setFont(font) self.lcd_pos.setAutoFillBackground(False) self.lcd_pos.setStyleSheet("font-weight:bold;\n" "border-size: 2px;\n" "color: Black;\n" "") self.lcd_pos.setFrameShape(QtWidgets.QFrame.Box) self.lcd_pos.setFrameShadow(QtWidgets.QFrame.Plain) self.lcd_pos.setLineWidth(1) self.lcd_pos.setSmallDecimalPoint(False) self.lcd_pos.setObjectName("lcd_pos") self.verticalLayout_2.addWidget(self.lcd_pos) self.gridLayout_2.addLayout(self.verticalLayout_2, 1, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 700, 22)) self.menubar.setObjectName("menubar") self.menufile = QtWidgets.QMenu(self.menubar) self.menufile.setObjectName("menufile") self.menusettings = QtWidgets.QMenu(self.menubar) self.menusettings.setObjectName("menusettings") self.menuPort_3 = QtWidgets.QMenu(self.menusettings) 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, 255)) 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(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(127, 127, 127)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(170, 170, 170)) 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(255, 255, 255)) 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(255, 255, 255)) 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, 128)) brush.setStyle(QtCore.Qt.NoBrush) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.PlaceholderText, 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, 255)) 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(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(127, 127, 127)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(170, 170, 170)) 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(255, 255, 255)) 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(255, 255, 255)) 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(0, 0, 0, 128)) brush.setStyle(QtCore.Qt.NoBrush) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.PlaceholderText, brush) brush = QtGui.QBrush(QtGui.QColor(127, 127, 127)) 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.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(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(127, 127, 127)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(170, 170, 170)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush) brush = QtGui.QBrush(QtGui.QColor(127, 127, 127)) 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(127, 127, 127)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 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(255, 255, 255)) 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) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0, 128)) brush.setStyle(QtCore.Qt.NoBrush) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.PlaceholderText, brush) self.menuPort_3.setPalette(palette) self.menuPort_3.setObjectName("menuPort_3") self.menuAverage = QtWidgets.QMenu(self.menusettings) self.menuAverage.setObjectName("menuAverage") MainWindow.setMenuBar(self.menubar) self.toolBar = QtWidgets.QToolBar(MainWindow) self.toolBar.setObjectName("toolBar") MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar) self.statusbar = QtWidgets.QStatusBar(MainWindow) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(0, 255, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(0, 255, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(0, 255, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush) self.statusbar.setPalette(palette) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.actionConnect = QtWidgets.QAction(MainWindow) self.actionConnect.setObjectName("actionConnect") self.actionCOM0 = QtWidgets.QAction(MainWindow) self.actionCOM0.setObjectName("actionCOM0") self.actionPort_2 = QtWidgets.QAction(MainWindow) self.actionPort_2.setObjectName("actionPort_2") self.action2 = QtWidgets.QAction(MainWindow) self.action2.setObjectName("action2") self.action3 = QtWidgets.QAction(MainWindow) self.action3.setObjectName("action3") self.action4 = QtWidgets.QAction(MainWindow) self.action4.setObjectName("action4") self.action5 = QtWidgets.QAction(MainWindow) self.action5.setObjectName("action5") self.action6 = QtWidgets.QAction(MainWindow) self.action6.setObjectName("action6") self.action7 = QtWidgets.QAction(MainWindow) self.action7.setObjectName("action7") self.action8 = QtWidgets.QAction(MainWindow) self.action8.setObjectName("action8") self.action9 = QtWidgets.QAction(MainWindow) self.action9.setObjectName("action9") self.action10 = QtWidgets.QAction(MainWindow) self.action10.setObjectName("action10") self.action1 = QtWidgets.QAction(MainWindow) self.action1.setObjectName("action1") self.menuPort_3.addSeparator() self.menusettings.addAction(self.menuPort_3.menuAction()) self.menusettings.addAction(self.menuAverage.menuAction()) self.menubar.addAction(self.menufile.menuAction()) self.menubar.addAction(self.menusettings.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle( _translate("MainWindow", "Крутильный Маятник")) self.pushButton_Start.setText(_translate("MainWindow", "Start")) self.pushButton_Stop.setText(_translate("MainWindow", "Stop")) self.pushButton_Get.setText(_translate("MainWindow", "Get once")) self.radioButton_interpolate.setText( _translate("MainWindow", "Interpolate")) self.label.setText(_translate("MainWindow", "Position")) self.menufile.setTitle(_translate("MainWindow", "file")) self.menusettings.setTitle(_translate("MainWindow", "settings")) self.menuPort_3.setTitle(_translate("MainWindow", "Port")) self.menuAverage.setTitle(_translate("MainWindow", "Average")) self.toolBar.setWindowTitle(_translate("MainWindow", "toolBar")) self.actionConnect.setText(_translate("MainWindow", "Connect")) self.actionCOM0.setText(_translate("MainWindow", "COM0")) self.actionPort_2.setText(_translate("MainWindow", "Port")) self.action2.setText(_translate("MainWindow", "2")) self.action3.setText(_translate("MainWindow", "3")) self.action4.setText(_translate("MainWindow", "4")) self.action5.setText(_translate("MainWindow", "5")) self.action6.setText(_translate("MainWindow", "6")) self.action7.setText(_translate("MainWindow", "7")) self.action8.setText(_translate("MainWindow", "8")) self.action9.setText(_translate("MainWindow", "9")) self.action10.setText(_translate("MainWindow", "10")) self.action1.setText(_translate("MainWindow", "1"))
class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(689, 176) self.gridLayout = QtWidgets.QGridLayout(Dialog) self.gridLayout.setObjectName("gridLayout") self.stateButton = QtWidgets.QPushButton(Dialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.stateButton.sizePolicy().hasHeightForWidth()) self.stateButton.setSizePolicy(sizePolicy) self.stateButton.setLayoutDirection(QtCore.Qt.LeftToRight) self.stateButton.setAutoDefault(False) self.stateButton.setObjectName("stateButton") self.gridLayout.addWidget(self.stateButton, 3, 5, 3, 1) self.lcdNumber = QtWidgets.QLCDNumber(Dialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.lcdNumber.sizePolicy().hasHeightForWidth()) self.lcdNumber.setSizePolicy(sizePolicy) self.lcdNumber.setInputMethodHints(QtCore.Qt.ImhNone) self.lcdNumber.setSmallDecimalPoint(False) self.lcdNumber.setDigitCount(3) self.lcdNumber.setProperty("value", 0.0) self.lcdNumber.setProperty("intValue", 0) self.lcdNumber.setObjectName("lcdNumber") self.gridLayout.addWidget(self.lcdNumber, 1, 1, 1, 1) self.graphicsView = PlotWidget(Dialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.graphicsView.sizePolicy().hasHeightForWidth()) self.graphicsView.setSizePolicy(sizePolicy) self.graphicsView.setMaximumSize(QtCore.QSize(16777215, 73)) self.graphicsView.setAutoFillBackground(True) self.graphicsView.setInputMethodHints(QtCore.Qt.ImhNone) self.graphicsView.setFrameShape(QtWidgets.QFrame.NoFrame) self.graphicsView.setFrameShadow(QtWidgets.QFrame.Plain) self.graphicsView.setInteractive(False) self.graphicsView.setObjectName("graphicsView") self.gridLayout.addWidget(self.graphicsView, 1, 2, 1, 3) self.horizontalSlider = QtWidgets.QSlider(Dialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.horizontalSlider.sizePolicy().hasHeightForWidth()) self.horizontalSlider.setSizePolicy(sizePolicy) self.horizontalSlider.setPageStep(15) self.horizontalSlider.setOrientation(QtCore.Qt.Horizontal) self.horizontalSlider.setObjectName("horizontalSlider") self.gridLayout.addWidget(self.horizontalSlider, 0, 2, 1, 3) self.tableWidget = QtWidgets.QTableWidget(Dialog) self.tableWidget.setMinimumSize(QtCore.QSize(203, 0)) self.tableWidget.setMaximumSize(QtCore.QSize(16777215, 71)) self.tableWidget.setRowCount(1) self.tableWidget.setColumnCount(2) self.tableWidget.setObjectName("tableWidget") item = QtWidgets.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(0, item) item = QtWidgets.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(1, item) self.tableWidget.horizontalHeader().setVisible(True) self.tableWidget.horizontalHeader().setDefaultSectionSize(100) self.tableWidget.horizontalHeader().setHighlightSections(False) self.tableWidget.horizontalHeader().setMinimumSectionSize(60) self.tableWidget.verticalHeader().setVisible(False) self.tableWidget.verticalHeader().setDefaultSectionSize(20) self.tableWidget.verticalHeader().setHighlightSections(False) self.tableWidget.verticalHeader().setMinimumSectionSize(20) self.gridLayout.addWidget(self.tableWidget, 1, 5, 1, 1) self.label_2 = QtWidgets.QLabel(Dialog) self.label_2.setObjectName("label_2") self.gridLayout.addWidget(self.label_2, 3, 2, 1, 1) self.lineEdit = QtWidgets.QLineEdit(Dialog) self.lineEdit.setObjectName("lineEdit") self.gridLayout.addWidget(self.lineEdit, 3, 4, 1, 1) self.lineEditMouse = QtWidgets.QLineEdit(Dialog) self.lineEditMouse.setObjectName("lineEditMouse") self.gridLayout.addWidget(self.lineEditMouse, 3, 3, 1, 1) self.loadButton = QtWidgets.QPushButton(Dialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.loadButton.sizePolicy().hasHeightForWidth()) self.loadButton.setSizePolicy(sizePolicy) self.loadButton.setAutoDefault(False) self.loadButton.setDefault(False) self.loadButton.setObjectName("loadButton") self.gridLayout.addWidget(self.loadButton, 3, 1, 1, 1) self.saveButton = QtWidgets.QPushButton(Dialog) self.saveButton.setDefault(True) self.saveButton.setObjectName("saveButton") self.gridLayout.addWidget(self.saveButton, 5, 3, 1, 1) self.startExperBut = QtWidgets.QPushButton(Dialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.startExperBut.sizePolicy().hasHeightForWidth()) self.startExperBut.setSizePolicy(sizePolicy) self.startExperBut.setAutoDefault(False) self.startExperBut.setObjectName("startExperBut") self.gridLayout.addWidget(self.startExperBut, 5, 1, 1, 1) self.timeButton = QtWidgets.QPushButton(Dialog) self.timeButton.setObjectName("timeButton") self.gridLayout.addWidget(self.timeButton, 5, 4, 1, 1) self.stateLabel = QtWidgets.QLabel(Dialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.stateLabel.sizePolicy().hasHeightForWidth()) self.stateLabel.setSizePolicy(sizePolicy) self.stateLabel.setText("") self.stateLabel.setScaledContents(True) self.stateLabel.setAlignment(QtCore.Qt.AlignCenter) self.stateLabel.setObjectName("stateLabel") self.gridLayout.addWidget(self.stateLabel, 0, 5, 1, 1) self.pauseButton = QtWidgets.QPushButton(Dialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pauseButton.sizePolicy().hasHeightForWidth()) self.pauseButton.setSizePolicy(sizePolicy) self.pauseButton.setMaximumSize(QtCore.QSize(16777215, 23)) self.pauseButton.setAutoDefault(False) self.pauseButton.setObjectName("pauseButton") self.gridLayout.addWidget(self.pauseButton, 0, 1, 1, 1) self.retranslateUi(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog) def retranslateUi(self, Dialog): _translate = QtCore.QCoreApplication.translate Dialog.setWindowTitle(_translate("Dialog", "Dialog")) self.stateButton.setText(_translate("Dialog", "Imobile/Mobile (HotKey \'M\')")) self.stateButton.setShortcut(_translate("Dialog", "M", "m")) item = self.tableWidget.horizontalHeaderItem(0) item.setText(_translate("Dialog", "Latency")) item = self.tableWidget.horizontalHeaderItem(1) item.setText(_translate("Dialog", "Time Immobile")) self.label_2.setText(_translate("Dialog", "Mouse ID")) self.lineEdit.setToolTip(_translate("Dialog", "Enter custom experiemtn length")) self.loadButton.setText(_translate("Dialog", "Load Video")) self.saveButton.setText(_translate("Dialog", "Save to Excel")) self.saveButton.setShortcut(_translate("Dialog", "Return")) self.startExperBut.setText(_translate("Dialog", "Start Experiment")) self.startExperBut.setShortcut(_translate("Dialog", "S")) self.timeButton.setText(_translate("Dialog", "Custom Time")) self.stateLabel.setProperty("mobilityState", _translate("Dialog", "Mobile")) self.pauseButton.setText(_translate("Dialog", "Pause/Play")) self.pauseButton.setShortcut(_translate("Dialog", "Space"))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(764, 525) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget) self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.verticalLayout.setSpacing(0) self.verticalLayout.setObjectName("verticalLayout") self.top_frame = QtWidgets.QFrame(self.centralwidget) self.top_frame.setMaximumSize(QtCore.QSize(16777215, 40)) self.top_frame.setStyleSheet("background-color: rgb(20, 33, 61);") self.top_frame.setFrameShape(QtWidgets.QFrame.StyledPanel) self.top_frame.setFrameShadow(QtWidgets.QFrame.Raised) self.top_frame.setObjectName("top_frame") self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.top_frame) self.horizontalLayout_2.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint) self.horizontalLayout_2.setContentsMargins(5, 5, 5, 0) self.horizontalLayout_2.setSpacing(6) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.frame = QtWidgets.QFrame(self.top_frame) self.frame.setStyleSheet("border-color: rgb(0, 0, 0);") self.frame.setFrameShape(QtWidgets.QFrame.Box) self.frame.setFrameShadow(QtWidgets.QFrame.Plain) self.frame.setLineWidth(1) self.frame.setObjectName("frame") self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.frame) self.horizontalLayout_3.setContentsMargins(9, 0, 0, 0) self.horizontalLayout_3.setSpacing(0) self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.label = QtWidgets.QLabel(self.frame) self.label.setMaximumSize(QtCore.QSize(150, 16777215)) self.label.setStyleSheet("font: 25 12pt \"Segoe UI Light\" bold;\n" "background-color: rgb(20, 33, 61);\n" "color: rgb(255, 255, 255);") self.label.setLineWidth(1) self.label.setScaledContents(False) self.label.setWordWrap(False) self.label.setObjectName("label") self.horizontalLayout_3.addWidget(self.label) self.lbl_patient_id = QtWidgets.QLabel(self.frame) self.lbl_patient_id.setStyleSheet("font: 25 12pt \"Segoe UI Light\" bold;\n" "background-color: rgb(20, 33, 61);\n" "color: rgb(255, 255, 255);") self.lbl_patient_id.setObjectName("lbl_patient_id") self.horizontalLayout_3.addWidget(self.lbl_patient_id) self.horizontalLayout_2.addWidget(self.frame) self.frame_2 = QtWidgets.QFrame(self.top_frame) self.frame_2.setStyleSheet("background-color: rgb(20, 33, 61);") self.frame_2.setFrameShape(QtWidgets.QFrame.Box) self.frame_2.setFrameShadow(QtWidgets.QFrame.Plain) self.frame_2.setObjectName("frame_2") self.horizontalLayout_4 = QtWidgets.QHBoxLayout(self.frame_2) self.horizontalLayout_4.setContentsMargins(9, 0, 0, 0) self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.label_2 = QtWidgets.QLabel(self.frame_2) self.label_2.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.label_2.setStyleSheet("font: 25 12pt \"Segoe UI Light\" bold;\n" "color: rgb(255, 255, 255);") self.label_2.setObjectName("label_2") self.horizontalLayout_4.addWidget(self.label_2) self.lbl_runtime = QtWidgets.QLabel(self.frame_2) self.lbl_runtime.setStyleSheet("font: 25 12pt \"Segoe UI Light\" bold;\n" "color: rgb(255, 255, 255);") self.lbl_runtime.setObjectName("lbl_runtime") self.horizontalLayout_4.addWidget(self.lbl_runtime) self.horizontalLayout_2.addWidget(self.frame_2) self.frame_3 = QtWidgets.QFrame(self.top_frame) self.frame_3.setMaximumSize(QtCore.QSize(120, 16777215)) self.frame_3.setStyleSheet("background-color: rgb(20, 33, 61);") self.frame_3.setFrameShape(QtWidgets.QFrame.NoFrame) self.frame_3.setFrameShadow(QtWidgets.QFrame.Plain) self.frame_3.setObjectName("frame_3") self.horizontalLayout_5 = QtWidgets.QHBoxLayout(self.frame_3) self.horizontalLayout_5.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_5.setSpacing(0) self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.btn_run = QtWidgets.QPushButton(self.frame_3) self.btn_run.setMaximumSize(QtCore.QSize(35, 35)) self.btn_run.setStyleSheet("font: 25 11.5pt \"Segoe UI Light\";\n" "color: rgb(255, 255, 255);\n" "border-radius: 15px;\n" "background-color: rgb(0, 170, 127);") self.btn_run.setText("") icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/buttons/img/btn_play.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.btn_run.setIcon(icon) self.btn_run.setIconSize(QtCore.QSize(32, 32)) self.btn_run.setCheckable(False) self.btn_run.setChecked(False) self.btn_run.setFlat(True) self.btn_run.setObjectName("btn_run") self.horizontalLayout_5.addWidget(self.btn_run) self.btn_settings = QtWidgets.QPushButton(self.frame_3) self.btn_settings.setMaximumSize(QtCore.QSize(35, 35)) self.btn_settings.setStyleSheet("font: 25 11.5pt \"Segoe UI Light\";\n" "color: rgb(255, 255, 255);\n" "border-radius: 15px;\n" "background-color: rgb(255, 255, 255);") self.btn_settings.setText("") icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(":/buttons/img/iconfinder_Configuration-01_1976051.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.btn_settings.setIcon(icon1) self.btn_settings.setIconSize(QtCore.QSize(32, 32)) self.btn_settings.setFlat(True) self.btn_settings.setObjectName("btn_settings") self.horizontalLayout_5.addWidget(self.btn_settings) self.horizontalLayout_2.addWidget(self.frame_3) self.verticalLayout.addWidget(self.top_frame) self.middle_frame = QtWidgets.QFrame(self.centralwidget) self.middle_frame.setStyleSheet("background-color: rgb(20, 33, 61);") self.middle_frame.setFrameShape(QtWidgets.QFrame.StyledPanel) self.middle_frame.setFrameShadow(QtWidgets.QFrame.Raised) self.middle_frame.setObjectName("middle_frame") self.horizontalLayout = QtWidgets.QHBoxLayout(self.middle_frame) self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.horizontalLayout.setSpacing(0) self.horizontalLayout.setObjectName("horizontalLayout") self.graph_display_frame = QtWidgets.QFrame(self.middle_frame) self.graph_display_frame.setFrameShape(QtWidgets.QFrame.StyledPanel) self.graph_display_frame.setFrameShadow(QtWidgets.QFrame.Raised) self.graph_display_frame.setObjectName("graph_display_frame") self.verticalLayout_13 = QtWidgets.QVBoxLayout(self.graph_display_frame) self.verticalLayout_13.setContentsMargins(5, 5, 0, 0) self.verticalLayout_13.setSpacing(5) self.verticalLayout_13.setObjectName("verticalLayout_13") self.gv_pressure = PlotWidget(self.graph_display_frame) self.gv_pressure.setAutoFillBackground(False) self.gv_pressure.setStyleSheet("background-color: rgb(0, 0, 0);") self.gv_pressure.setFrameShape(QtWidgets.QFrame.Box) self.gv_pressure.setFrameShadow(QtWidgets.QFrame.Sunken) self.gv_pressure.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustIgnored) brush = QtGui.QBrush(QtGui.QColor(252, 163, 17)) brush.setStyle(QtCore.Qt.NoBrush) self.gv_pressure.setForegroundBrush(brush) self.gv_pressure.setObjectName("gv_pressure") self.verticalLayout_13.addWidget(self.gv_pressure) self.gv_flow = PlotWidget(self.graph_display_frame) self.gv_flow.setStyleSheet("background-color: rgb(0, 0, 0);") self.gv_flow.setFrameShape(QtWidgets.QFrame.Box) self.gv_flow.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustIgnored) brush = QtGui.QBrush(QtGui.QColor(252, 163, 17)) brush.setStyle(QtCore.Qt.NoBrush) self.gv_flow.setForegroundBrush(brush) self.gv_flow.setObjectName("gv_flow") self.verticalLayout_13.addWidget(self.gv_flow) self.gv_volume = PlotWidget(self.graph_display_frame) self.gv_volume.setStyleSheet("background-color: rgb(0, 0, 0);") self.gv_volume.setFrameShape(QtWidgets.QFrame.Box) self.gv_volume.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustIgnored) brush = QtGui.QBrush(QtGui.QColor(252, 163, 17)) brush.setStyle(QtCore.Qt.NoBrush) self.gv_volume.setForegroundBrush(brush) self.gv_volume.setObjectName("gv_volume") self.verticalLayout_13.addWidget(self.gv_volume) self.horizontalLayout.addWidget(self.graph_display_frame) self.right_frame = QtWidgets.QFrame(self.middle_frame) self.right_frame.setMaximumSize(QtCore.QSize(200, 16777215)) self.right_frame.setFrameShape(QtWidgets.QFrame.StyledPanel) self.right_frame.setFrameShadow(QtWidgets.QFrame.Raised) self.right_frame.setObjectName("right_frame") self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.right_frame) self.verticalLayout_2.setContentsMargins(5, 5, 5, 0) self.verticalLayout_2.setSpacing(5) self.verticalLayout_2.setObjectName("verticalLayout_2") self.frame_12 = QtWidgets.QFrame(self.right_frame) self.frame_12.setMaximumSize(QtCore.QSize(200, 16777215)) self.frame_12.setStyleSheet("border-radius: 3px;\n" "background-color: rgb(252, 163, 17);") self.frame_12.setFrameShape(QtWidgets.QFrame.NoFrame) self.frame_12.setFrameShadow(QtWidgets.QFrame.Plain) self.frame_12.setObjectName("frame_12") self.verticalLayout_8 = QtWidgets.QVBoxLayout(self.frame_12) self.verticalLayout_8.setSpacing(6) self.verticalLayout_8.setObjectName("verticalLayout_8") self.label_13 = QtWidgets.QLabel(self.frame_12) self.label_13.setStyleSheet("font: 25 10pt \"Segoe UI Light\" bold;") self.label_13.setAlignment(QtCore.Qt.AlignCenter) self.label_13.setObjectName("label_13") self.verticalLayout_8.addWidget(self.label_13) self.lbl_pressure_peak = QtWidgets.QLabel(self.frame_12) self.lbl_pressure_peak.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.lbl_pressure_peak.setStyleSheet("font: 25 14pt \"Segoe UI Light\" bold;\n" "border-radius: 5px;\n" "background-color: #E5E5E5;") self.lbl_pressure_peak.setAlignment(QtCore.Qt.AlignCenter) self.lbl_pressure_peak.setObjectName("lbl_pressure_peak") self.verticalLayout_8.addWidget(self.lbl_pressure_peak) self.verticalLayout_2.addWidget(self.frame_12) self.frame_9 = QtWidgets.QFrame(self.right_frame) self.frame_9.setMaximumSize(QtCore.QSize(200, 16777215)) self.frame_9.setStyleSheet("border-radius: 3px;\n" "background-color: rgb(252, 163, 17);") self.frame_9.setFrameShape(QtWidgets.QFrame.NoFrame) self.frame_9.setFrameShadow(QtWidgets.QFrame.Plain) self.frame_9.setObjectName("frame_9") self.verticalLayout_9 = QtWidgets.QVBoxLayout(self.frame_9) self.verticalLayout_9.setObjectName("verticalLayout_9") self.label_15 = QtWidgets.QLabel(self.frame_9) self.label_15.setStyleSheet("font: 25 10pt \"Segoe UI Light\" bold;") self.label_15.setAlignment(QtCore.Qt.AlignCenter) self.label_15.setObjectName("label_15") self.verticalLayout_9.addWidget(self.label_15) self.lbl_p_plateau = QtWidgets.QLabel(self.frame_9) self.lbl_p_plateau.setStyleSheet("font: 25 14pt \"Segoe UI Light\" bold;\n" "border-radius: 5px;\n" "background-color: #E5E5E5;") self.lbl_p_plateau.setAlignment(QtCore.Qt.AlignCenter) self.lbl_p_plateau.setObjectName("lbl_p_plateau") self.verticalLayout_9.addWidget(self.lbl_p_plateau) self.verticalLayout_2.addWidget(self.frame_9) self.frame_13 = QtWidgets.QFrame(self.right_frame) self.frame_13.setMaximumSize(QtCore.QSize(200, 16777215)) self.frame_13.setStyleSheet("border-radius: 3px;\n" "background-color: rgb(252, 163, 17);") self.frame_13.setFrameShape(QtWidgets.QFrame.NoFrame) self.frame_13.setFrameShadow(QtWidgets.QFrame.Plain) self.frame_13.setObjectName("frame_13") self.verticalLayout_10 = QtWidgets.QVBoxLayout(self.frame_13) self.verticalLayout_10.setObjectName("verticalLayout_10") self.label_17 = QtWidgets.QLabel(self.frame_13) self.label_17.setStyleSheet("font: 25 10pt \"Segoe UI Light\" bold;") self.label_17.setAlignment(QtCore.Qt.AlignCenter) self.label_17.setObjectName("label_17") self.verticalLayout_10.addWidget(self.label_17) self.lbl_peep = QtWidgets.QLabel(self.frame_13) self.lbl_peep.setStyleSheet("font: 25 14pt \"Segoe UI Light\" bold;\n" "border-radius: 5px;\n" "background-color: #E5E5E5;") self.lbl_peep.setAlignment(QtCore.Qt.AlignCenter) self.lbl_peep.setObjectName("lbl_peep") self.verticalLayout_10.addWidget(self.lbl_peep) self.verticalLayout_2.addWidget(self.frame_13) self.frame_10 = QtWidgets.QFrame(self.right_frame) self.frame_10.setMaximumSize(QtCore.QSize(200, 16777215)) self.frame_10.setStyleSheet("border-radius: 3px;\n" "background-color: rgb(252, 163, 17);") self.frame_10.setFrameShape(QtWidgets.QFrame.NoFrame) self.frame_10.setFrameShadow(QtWidgets.QFrame.Plain) self.frame_10.setObjectName("frame_10") self.verticalLayout_11 = QtWidgets.QVBoxLayout(self.frame_10) self.verticalLayout_11.setObjectName("verticalLayout_11") self.label_19 = QtWidgets.QLabel(self.frame_10) self.label_19.setStyleSheet("font: 25 10pt \"Segoe UI Light\" bold;") self.label_19.setAlignment(QtCore.Qt.AlignCenter) self.label_19.setObjectName("label_19") self.verticalLayout_11.addWidget(self.label_19) self.lbl_flow = QtWidgets.QLabel(self.frame_10) self.lbl_flow.setStyleSheet("font: 25 14pt \"Segoe UI Light\" bold;\n" "border-radius: 5px;\n" "background-color: #E5E5E5;") self.lbl_flow.setAlignment(QtCore.Qt.AlignCenter) self.lbl_flow.setObjectName("lbl_flow") self.verticalLayout_11.addWidget(self.lbl_flow) self.verticalLayout_2.addWidget(self.frame_10) self.frame_11 = QtWidgets.QFrame(self.right_frame) self.frame_11.setMaximumSize(QtCore.QSize(200, 16777215)) self.frame_11.setStyleSheet("border-radius: 3px;\n" "background-color: rgb(252, 163, 17);") self.frame_11.setFrameShape(QtWidgets.QFrame.NoFrame) self.frame_11.setFrameShadow(QtWidgets.QFrame.Plain) self.frame_11.setObjectName("frame_11") self.verticalLayout_12 = QtWidgets.QVBoxLayout(self.frame_11) self.verticalLayout_12.setObjectName("verticalLayout_12") self.label_21 = QtWidgets.QLabel(self.frame_11) self.label_21.setStyleSheet("font: 25 12pt \"Segoe UI Light\" bold;") self.label_21.setAlignment(QtCore.Qt.AlignCenter) self.label_21.setObjectName("label_21") self.verticalLayout_12.addWidget(self.label_21) self.lbl_tidal_volume = QtWidgets.QLabel(self.frame_11) self.lbl_tidal_volume.setStyleSheet("font: 25 14pt \"Segoe UI Light\" bold;\n" "border-radius: 5px;\n" "background-color: #E5E5E5;") self.lbl_tidal_volume.setAlignment(QtCore.Qt.AlignCenter) self.lbl_tidal_volume.setObjectName("lbl_tidal_volume") self.verticalLayout_12.addWidget(self.lbl_tidal_volume) self.verticalLayout_2.addWidget(self.frame_11) self.horizontalLayout.addWidget(self.right_frame) self.verticalLayout.addWidget(self.middle_frame) self.bottom_frame = QtWidgets.QFrame(self.centralwidget) self.bottom_frame.setMaximumSize(QtCore.QSize(16777215, 100)) self.bottom_frame.setStyleSheet("background-color: rgb(20, 33, 61);") self.bottom_frame.setFrameShape(QtWidgets.QFrame.NoFrame) self.bottom_frame.setFrameShadow(QtWidgets.QFrame.Raised) self.bottom_frame.setObjectName("bottom_frame") self.horizontalLayout_6 = QtWidgets.QHBoxLayout(self.bottom_frame) self.horizontalLayout_6.setContentsMargins(5, 5, 5, 5) self.horizontalLayout_6.setSpacing(5) self.horizontalLayout_6.setObjectName("horizontalLayout_6") self.alarm_color = QtWidgets.QFrame(self.bottom_frame) self.alarm_color.setMaximumSize(QtCore.QSize(150, 16777215)) self.alarm_color.setStyleSheet("border-radius: 3px;\n" "background-color: rgb(252, 163, 17);") self.alarm_color.setFrameShape(QtWidgets.QFrame.NoFrame) self.alarm_color.setFrameShadow(QtWidgets.QFrame.Plain) self.alarm_color.setObjectName("alarm_color") self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.alarm_color) self.verticalLayout_3.setObjectName("verticalLayout_3") self.label_3 = QtWidgets.QLabel(self.alarm_color) self.label_3.setStyleSheet("font: 25 10pt \"Segoe UI Light\" bold;") self.label_3.setAlignment(QtCore.Qt.AlignCenter) self.label_3.setObjectName("label_3") self.verticalLayout_3.addWidget(self.label_3) self.alarm_status = QtWidgets.QLabel(self.alarm_color) self.alarm_status.setStyleSheet("font: 25 14pt \"Segoe UI Light\" bold;\n" "border-radius: 5px;\n" "background-color: #E5E5E5;") self.alarm_status.setAlignment(QtCore.Qt.AlignCenter) self.alarm_status.setObjectName("alarm_status") self.verticalLayout_3.addWidget(self.alarm_status) self.horizontalLayout_6.addWidget(self.alarm_color) self.frame_5 = QtWidgets.QFrame(self.bottom_frame) self.frame_5.setMaximumSize(QtCore.QSize(150, 16777215)) self.frame_5.setStyleSheet("border-radius: 3px;\n" "background-color: rgb(252, 163, 17);") self.frame_5.setFrameShape(QtWidgets.QFrame.NoFrame) self.frame_5.setFrameShadow(QtWidgets.QFrame.Plain) self.frame_5.setObjectName("frame_5") self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.frame_5) self.verticalLayout_4.setObjectName("verticalLayout_4") self.label_5 = QtWidgets.QLabel(self.frame_5) self.label_5.setStyleSheet("font: 25 10pt \"Segoe UI Light\" bold;") self.label_5.setAlignment(QtCore.Qt.AlignCenter) self.label_5.setObjectName("label_5") self.verticalLayout_4.addWidget(self.label_5) self.lbl_mode = QtWidgets.QLabel(self.frame_5) self.lbl_mode.setStyleSheet("font: 25 14pt \"Segoe UI Light\" bold;\n" "border-radius: 5px;\n" "background-color: #E5E5E5;") self.lbl_mode.setAlignment(QtCore.Qt.AlignCenter) self.lbl_mode.setObjectName("lbl_mode") self.verticalLayout_4.addWidget(self.lbl_mode) self.horizontalLayout_6.addWidget(self.frame_5) self.frame_6 = QtWidgets.QFrame(self.bottom_frame) self.frame_6.setMaximumSize(QtCore.QSize(150, 16777215)) self.frame_6.setStyleSheet("border-radius: 3px;\n" "background-color: rgb(252, 163, 17);") self.frame_6.setFrameShape(QtWidgets.QFrame.NoFrame) self.frame_6.setFrameShadow(QtWidgets.QFrame.Plain) self.frame_6.setObjectName("frame_6") self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.frame_6) self.verticalLayout_5.setObjectName("verticalLayout_5") self.label_7 = QtWidgets.QLabel(self.frame_6) self.label_7.setStyleSheet("font: 25 10pt \"Segoe UI Light\" bold;") self.label_7.setAlignment(QtCore.Qt.AlignCenter) self.label_7.setObjectName("label_7") self.verticalLayout_5.addWidget(self.label_7) self.lbl_fio2 = QtWidgets.QLabel(self.frame_6) self.lbl_fio2.setStyleSheet("font: 25 14pt \"Segoe UI Light\" bold;\n" "border-radius: 5px;\n" "background-color: #E5E5E5;") self.lbl_fio2.setAlignment(QtCore.Qt.AlignCenter) self.lbl_fio2.setObjectName("lbl_fio2") self.verticalLayout_5.addWidget(self.lbl_fio2) self.horizontalLayout_6.addWidget(self.frame_6) self.frame_7 = QtWidgets.QFrame(self.bottom_frame) self.frame_7.setMaximumSize(QtCore.QSize(150, 16777215)) self.frame_7.setStyleSheet("border-radius: 3px;\n" "background-color: rgb(252, 163, 17);") self.frame_7.setFrameShape(QtWidgets.QFrame.NoFrame) self.frame_7.setFrameShadow(QtWidgets.QFrame.Plain) self.frame_7.setObjectName("frame_7") self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.frame_7) self.verticalLayout_6.setObjectName("verticalLayout_6") self.label_9 = QtWidgets.QLabel(self.frame_7) self.label_9.setStyleSheet("font: 25 10pt \"Segoe UI Light\" bold;") self.label_9.setAlignment(QtCore.Qt.AlignCenter) self.label_9.setObjectName("label_9") self.verticalLayout_6.addWidget(self.label_9) self.lbl_resp_rate = QtWidgets.QLabel(self.frame_7) self.lbl_resp_rate.setStyleSheet("font: 25 14pt \"Segoe UI Light\" bold;\n" "border-radius: 5px;\n" "background-color: #E5E5E5;") self.lbl_resp_rate.setAlignment(QtCore.Qt.AlignCenter) self.lbl_resp_rate.setObjectName("lbl_resp_rate") self.verticalLayout_6.addWidget(self.lbl_resp_rate) self.horizontalLayout_6.addWidget(self.frame_7) self.frame_8 = QtWidgets.QFrame(self.bottom_frame) self.frame_8.setMaximumSize(QtCore.QSize(150, 16777215)) self.frame_8.setStyleSheet("border-radius: 3px;\n" "background-color: rgb(252, 163, 17);") self.frame_8.setFrameShape(QtWidgets.QFrame.NoFrame) self.frame_8.setFrameShadow(QtWidgets.QFrame.Plain) self.frame_8.setObjectName("frame_8") self.verticalLayout_7 = QtWidgets.QVBoxLayout(self.frame_8) self.verticalLayout_7.setObjectName("verticalLayout_7") self.label_11 = QtWidgets.QLabel(self.frame_8) self.label_11.setStyleSheet("font: 25 10pt \"Segoe UI Light\" bold;") self.label_11.setAlignment(QtCore.Qt.AlignCenter) self.label_11.setObjectName("label_11") self.verticalLayout_7.addWidget(self.label_11) self.lbl_ieratio = QtWidgets.QLabel(self.frame_8) self.lbl_ieratio.setStyleSheet("font: 25 14pt \"Segoe UI Light\" bold;\n" "border-radius: 5px;\n" "background-color: #E5E5E5;") self.lbl_ieratio.setAlignment(QtCore.Qt.AlignCenter) self.lbl_ieratio.setObjectName("lbl_ieratio") self.verticalLayout_7.addWidget(self.lbl_ieratio) self.horizontalLayout_6.addWidget(self.frame_8) self.verticalLayout.addWidget(self.bottom_frame) MainWindow.setCentralWidget(self.centralwidget) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "SPIRITUS VITAE")) self.label.setText(_translate("MainWindow", "Patient ID:")) self.lbl_patient_id.setText(_translate("MainWindow", "0000")) self.label_2.setText(_translate("MainWindow", "Runtime:")) self.lbl_runtime.setText(_translate("MainWindow", "00d 00h 00s")) self.label_13.setText(_translate("MainWindow", "Peak Pressure(cmH2O)")) self.lbl_pressure_peak.setText(_translate("MainWindow", "35")) self.label_15.setText(_translate("MainWindow", "P Plateau(cmH2O)")) self.lbl_p_plateau.setText(_translate("MainWindow", "25")) self.label_17.setText(_translate("MainWindow", "PEEP(cmH2O)")) self.lbl_peep.setText(_translate("MainWindow", "5")) self.label_19.setText(_translate("MainWindow", "Flow(Lpm)")) self.lbl_flow.setText(_translate("MainWindow", "35")) self.label_21.setText(_translate("MainWindow", "V(mL)")) self.lbl_tidal_volume.setText(_translate("MainWindow", "500")) self.label_3.setText(_translate("MainWindow", "Alarm")) self.alarm_status.setText(_translate("MainWindow", "--")) self.label_5.setText(_translate("MainWindow", "Mode")) self.lbl_mode.setText(_translate("MainWindow", "Assist")) self.label_7.setText(_translate("MainWindow", "FiO2")) self.lbl_fio2.setText(_translate("MainWindow", "21%")) self.label_9.setText(_translate("MainWindow", "f(BPM)")) self.lbl_resp_rate.setText(_translate("MainWindow", "12")) self.label_11.setText(_translate("MainWindow", "I:E")) self.lbl_ieratio.setText(_translate("MainWindow", "1:2"))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1957, 894) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.gridLayout = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout.setObjectName("gridLayout") self.tabWidget = QtWidgets.QTabWidget(self.centralwidget) self.tabWidget.setObjectName("tabWidget") self.tab = QtWidgets.QWidget() self.tab.setObjectName("tab") self.gridLayout_2 = QtWidgets.QGridLayout(self.tab) self.gridLayout_2.setObjectName("gridLayout_2") self.Q1 = PlotWidget(self.tab) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.Q1.sizePolicy().hasHeightForWidth()) self.Q1.setSizePolicy(sizePolicy) self.Q1.setFrameShape(QtWidgets.QFrame.Box) self.Q1.setMidLineWidth(0) self.Q1.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContentsOnFirstShow) self.Q1.setInteractive(True) self.Q1.setRenderHints(QtGui.QPainter.SmoothPixmapTransform|QtGui.QPainter.TextAntialiasing) self.Q1.setObjectName("Q1") self.gridLayout_2.addWidget(self.Q1, 0, 0, 1, 1) self.Q2 = PlotWidget(self.tab) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.Q2.sizePolicy().hasHeightForWidth()) self.Q2.setSizePolicy(sizePolicy) self.Q2.setFrameShape(QtWidgets.QFrame.Box) self.Q2.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContentsOnFirstShow) self.Q2.setInteractive(True) self.Q2.setObjectName("Q2") self.gridLayout_2.addWidget(self.Q2, 0, 1, 1, 1) self.Q3 = PlotWidget(self.tab) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.Q3.sizePolicy().hasHeightForWidth()) self.Q3.setSizePolicy(sizePolicy) self.Q3.setFrameShape(QtWidgets.QFrame.Box) self.Q3.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContentsOnFirstShow) self.Q3.setObjectName("Q3") self.gridLayout_2.addWidget(self.Q3, 1, 0, 1, 1) self.Decode = QtWidgets.QPushButton(self.tab) self.Decode.setMaximumSize(QtCore.QSize(16777215, 22)) font = QtGui.QFont() font.setFamily("Ubuntu Condensed") font.setPointSize(12) font.setBold(True) font.setWeight(75) self.Decode.setFont(font) self.Decode.setObjectName("Decode") self.gridLayout_2.addWidget(self.Decode, 2, 0, 1, 1) self.Q4 = PlotWidget(self.tab) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.Q4.sizePolicy().hasHeightForWidth()) self.Q4.setSizePolicy(sizePolicy) self.Q4.setFrameShape(QtWidgets.QFrame.Box) self.Q4.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContentsOnFirstShow) self.Q4.setInteractive(True) self.Q4.setObjectName("Q4") self.gridLayout_2.addWidget(self.Q4, 1, 1, 1, 1) self.tabWidget.addTab(self.tab, "") self.tab_2 = QtWidgets.QWidget() self.tab_2.setObjectName("tab_2") self.gridLayout_3 = QtWidgets.QGridLayout(self.tab_2) self.gridLayout_3.setObjectName("gridLayout_3") self.Q8 = PlotWidget(self.tab_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.Q8.sizePolicy().hasHeightForWidth()) self.Q8.setSizePolicy(sizePolicy) self.Q8.setFrameShape(QtWidgets.QFrame.Box) self.Q8.setObjectName("Q8") self.gridLayout_3.addWidget(self.Q8, 3, 1, 1, 1) self.Q6 = PlotWidget(self.tab_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.Q6.sizePolicy().hasHeightForWidth()) self.Q6.setSizePolicy(sizePolicy) self.Q6.setFrameShape(QtWidgets.QFrame.Box) self.Q6.setInteractive(True) self.Q6.setObjectName("Q6") self.gridLayout_3.addWidget(self.Q6, 0, 1, 1, 1) self.Q5 = PlotWidget(self.tab_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.Q5.sizePolicy().hasHeightForWidth()) self.Q5.setSizePolicy(sizePolicy) self.Q5.setFrameShape(QtWidgets.QFrame.Box) self.Q5.setInteractive(True) self.Q5.setObjectName("Q5") self.gridLayout_3.addWidget(self.Q5, 0, 0, 1, 1) self.Q7 = PlotWidget(self.tab_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.Q7.sizePolicy().hasHeightForWidth()) self.Q7.setSizePolicy(sizePolicy) self.Q7.setFrameShape(QtWidgets.QFrame.Box) self.Q7.setObjectName("Q7") self.gridLayout_3.addWidget(self.Q7, 3, 0, 1, 1) self.label = QtWidgets.QLabel(self.tab_2) self.label.setMaximumSize(QtCore.QSize(1000, 20)) font = QtGui.QFont() font.setFamily("Ubuntu Condensed") font.setPointSize(13) font.setBold(True) font.setWeight(75) self.label.setFont(font) self.label.setFrameShape(QtWidgets.QFrame.NoFrame) self.label.setAlignment(QtCore.Qt.AlignCenter) self.label.setObjectName("label") self.gridLayout_3.addWidget(self.label, 2, 1, 1, 1) self.tabWidget.addTab(self.tab_2, "") self.gridLayout.addWidget(self.tabWidget, 0, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.Q1.setBackground('w') self.Q1.getPlotItem().hideAxis('left') self.Q1.getPlotItem().hideAxis('bottom') self.Q2.setBackground('w') self.Q2.getPlotItem().hideAxis('left') self.Q2.getPlotItem().hideAxis('bottom') self.Q3.setBackground('w') self.Q3.getPlotItem().hideAxis('left') self.Q3.getPlotItem().hideAxis('bottom') self.Q4.setBackground('w') self.Q4.getPlotItem().hideAxis('left') self.Q4.getPlotItem().hideAxis('bottom') self.Q5.setBackground('w') self.Q5.getPlotItem().hideAxis('left') self.Q5.getPlotItem().hideAxis('bottom') self.Q6.setBackground('w') self.Q6.getPlotItem().hideAxis('left') self.Q6.getPlotItem().hideAxis('bottom') self.Q7.setBackground('w') self.Q7.getPlotItem().hideAxis('left') self.Q7.getPlotItem().hideAxis('bottom') self.Q8.setBackground('w') self.Q8.getPlotItem().hideAxis('left') self.Q8.getPlotItem().hideAxis('bottom') self.retranslateUi(MainWindow) self.tabWidget.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.Decode.setText(_translate("MainWindow", "Decode")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Frist4")) self.label.setText(_translate("MainWindow", "Final image")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "Second4"))
class Ui_Form(object): def setupUi(self, Form): Form.setObjectName("Form") Form.resize(800, 480) Form.setStyleSheet("background-color: rgb(255, 255, 255);") self.TitleBar = QtWidgets.QLabel(Form) self.TitleBar.setGeometry(QtCore.QRect(0, 430, 800, 50)) self.TitleBar.setStyleSheet("background-color: rgb(0, 135, 68);\n" "font: 81 25pt \"나눔스퀘어 ExtraBold\";\n" "color: white\n" "") self.TitleBar.setObjectName("TitleBar") self.MainBtn = QtWidgets.QPushButton(Form) self.MainBtn.setGeometry(QtCore.QRect(320, 438, 110, 34)) self.MainBtn.setStyleSheet( "QPushButton\n" "{ \n" " background-color: rgb(255, 255, 255);\n" " border-radius: 15px;\n" " font: 75 15pt \"나눔스퀘어 ExtraBold\";\n" " color: rgb(0, 135, 68); \n" "}\n" "\n" "QPushButton:hover\n" "{ \n" " background-color: rgb(0, 0, 0, 0%);\n" " border: 3px solid white;\n" " color: rgb(255,255,255);\n" "}\n" "\n" "QPushButton:focus:checked\n" "{ \n" " background-color: rgb(0, 0, 0, 0%);\n" " border: 3px solid white;\n" " color: rgb(255,255,255);\n" "}") self.MainBtn.setCheckable(True) self.MainBtn.setChecked(True) self.MainBtn.setAutoRepeat(False) self.MainBtn.setAutoExclusive(False) self.MainBtn.setAutoDefault(False) self.MainBtn.setObjectName("MainBtn") self.GraphBtn = QtWidgets.QPushButton(Form) self.GraphBtn.setGeometry(QtCore.QRect(440, 438, 110, 34)) self.GraphBtn.setStyleSheet( "QPushButton\n" "{ \n" " background-color: rgb(255, 255, 255);\n" " border-radius: 15px;\n" " font: 75 15pt \"나눔스퀘어 ExtraBold\";\n" " color: rgb(0, 135, 68); \n" "}\n" "\n" "QPushButton:hover\n" "{ \n" " background-color: rgb(0, 0, 0, 0%);\n" " border: 3px solid white;\n" " color: rgb(255,255,255);\n" "}\n" "\n" "QPushButton:focus:checked\n" "{ \n" " background-color: rgb(0, 0, 0, 0%);\n" " border: 3px solid white;\n" " color: rgb(255,255,255);\n" "}") self.GraphBtn.setCheckable(True) self.GraphBtn.setObjectName("GraphBtn") self.SetBtn = QtWidgets.QPushButton(Form) self.SetBtn.setGeometry(QtCore.QRect(680, 438, 110, 34)) self.SetBtn.setStyleSheet("QPushButton\n" "{ \n" " background-color: rgb(255, 255, 255);\n" " border-radius: 15px;\n" " font: 75 15pt \"나눔스퀘어 ExtraBold\";\n" " color: rgb(0, 135, 68); \n" "}\n" "\n" "QPushButton:hover\n" "{ \n" " background-color: rgb(0, 0, 0, 0%);\n" " border: 3px solid white;\n" " color: rgb(255,255,255);\n" "}\n" "\n" "QPushButton:focus:checked\n" "{ \n" " background-color: rgb(0, 0, 0, 0%);\n" " border: 3px solid white;\n" " color: rgb(255,255,255);\n" "}") self.SetBtn.setCheckable(True) self.SetBtn.setObjectName("SetBtn") self.stackedWidget = QtWidgets.QStackedWidget(Form) self.stackedWidget.setGeometry(QtCore.QRect(0, -1, 800, 431)) self.stackedWidget.setObjectName("stackedWidget") self.MainPage = QtWidgets.QWidget() self.MainPage.setObjectName("MainPage") self.TempLabel = QtWidgets.QLabel(self.MainPage) self.TempLabel.setGeometry(QtCore.QRect(30, 80, 177, 30)) self.TempLabel.setStyleSheet( "background-color: rgba(255, 255, 255, 0);\n" "font: 75 20pt \"나눔스퀘어 ExtraBold\";\n" "color: white;") self.TempLabel.setAlignment(QtCore.Qt.AlignBottom | QtCore.Qt.AlignHCenter) self.TempLabel.setObjectName("TempLabel") self.Temp = QtWidgets.QLabel(self.MainPage) self.Temp.setGeometry(QtCore.QRect(60, 70, 200, 120)) self.Temp.setStyleSheet("font: 81 60pt \"나눔스퀘어 ExtraBold\";\n" "color: #FFFFFF;\n" "background-color: rgb(0, 135, 68);\n" "border-radius: 30px;") self.Temp.setFrameShape(QtWidgets.QFrame.NoFrame) self.Temp.setFrameShadow(QtWidgets.QFrame.Plain) self.Temp.setLineWidth(1) self.Temp.setMidLineWidth(0) self.Temp.setAlignment(QtCore.Qt.AlignBottom | QtCore.Qt.AlignHCenter) self.Temp.setObjectName("Temp") self.Humi = QtWidgets.QLabel(self.MainPage) self.Humi.setGeometry(QtCore.QRect(300, 70, 200, 120)) self.Humi.setStyleSheet("font: 81 60pt \"나눔스퀘어 ExtraBold\";\n" "color: #FFFFFF;\n" "background-color: rgb(0, 135, 68);\n" "border-radius: 30px;") self.Humi.setAlignment(QtCore.Qt.AlignBottom | QtCore.Qt.AlignHCenter) self.Humi.setObjectName("Humi") self.HumiLabel = QtWidgets.QLabel(self.MainPage) self.HumiLabel.setGeometry(QtCore.QRect(320, 80, 71, 30)) self.HumiLabel.setStyleSheet( "background-color: rgba(255, 255, 255, 0);\n" "font: 75 20pt \"나눔스퀘어 ExtraBold\";\n" "color: white;") self.HumiLabel.setAlignment(QtCore.Qt.AlignBottom | QtCore.Qt.AlignHCenter) self.HumiLabel.setObjectName("HumiLabel") self.PhLabel = QtWidgets.QLabel(self.MainPage) self.PhLabel.setGeometry(QtCore.QRect(550, 80, 51, 30)) self.PhLabel.setStyleSheet( "background-color: rgba(255, 255, 255, 0);\n" "font: 75 20pt \"나눔스퀘어 ExtraBold\";\n" "color: white;") self.PhLabel.setAlignment(QtCore.Qt.AlignBottom | QtCore.Qt.AlignHCenter) self.PhLabel.setObjectName("PhLabel") self.Ph = QtWidgets.QLabel(self.MainPage) self.Ph.setGeometry(QtCore.QRect(540, 70, 200, 120)) self.Ph.setStyleSheet("font: 81 60pt \"나눔스퀘어 ExtraBold\";\n" "color: #FFFFFF;\n" "background-color: rgb(0, 135, 68);\n" "border-radius: 30px;") self.Ph.setAlignment(QtCore.Qt.AlignBottom | QtCore.Qt.AlignHCenter) self.Ph.setObjectName("Ph") self.CdsLabel = QtWidgets.QLabel(self.MainPage) self.CdsLabel.setGeometry(QtCore.QRect(40, 250, 150, 30)) self.CdsLabel.setStyleSheet( "background-color: rgba(255, 255, 255, 0);\n" "font: 75 20pt \"나눔스퀘어 ExtraBold\";\n" "color: white;") self.CdsLabel.setAlignment(QtCore.Qt.AlignBottom | QtCore.Qt.AlignHCenter) self.CdsLabel.setObjectName("CdsLabel") self.Cds = QtWidgets.QLabel(self.MainPage) self.Cds.setGeometry(QtCore.QRect(60, 240, 200, 120)) self.Cds.setStyleSheet("font: 81 60pt \"나눔스퀘어 ExtraBold\";\n" "color: #FFFFFF;\n" "background-color: rgb(0, 135, 68);\n" "border-radius: 30px;") self.Cds.setAlignment(QtCore.Qt.AlignBottom | QtCore.Qt.AlignHCenter) self.Cds.setObjectName("Cds") self.DoLabel = QtWidgets.QLabel(self.MainPage) self.DoLabel.setGeometry(QtCore.QRect(523, 250, 131, 31)) self.DoLabel.setStyleSheet( "background-color: rgba(255, 255, 255, 0);\n" "font: 75 20pt \"나눔스퀘어 ExtraBold\";\n" "color: white;") self.DoLabel.setAlignment(QtCore.Qt.AlignBottom | QtCore.Qt.AlignHCenter) self.DoLabel.setObjectName("DoLabel") self.Do = QtWidgets.QLabel(self.MainPage) self.Do.setGeometry(QtCore.QRect(540, 240, 200, 120)) self.Do.setStyleSheet("font: 81 60pt \"나눔스퀘어 ExtraBold\";\n" "color: #FFFFFF;\n" "background-color: rgb(0, 135, 68);\n" "border-radius: 30px;") self.Do.setAlignment(QtCore.Qt.AlignBottom | QtCore.Qt.AlignHCenter) self.Do.setObjectName("Do") self.Tds = QtWidgets.QLabel(self.MainPage) self.Tds.setGeometry(QtCore.QRect(300, 240, 200, 120)) self.Tds.setStyleSheet("font: 81 60pt \"나눔스퀘어 ExtraBold\";\n" "color: #FFFFFF;\n" "background-color: rgb(0, 135, 68);\n" "border-radius: 30px;") self.Tds.setAlignment(QtCore.Qt.AlignBottom | QtCore.Qt.AlignHCenter) self.Tds.setObjectName("Tds") self.TdsLabel = QtWidgets.QLabel(self.MainPage) self.TdsLabel.setGeometry(QtCore.QRect(280, 250, 151, 30)) self.TdsLabel.setStyleSheet( "background-color: rgba(255, 255, 255, 0);\n" "font: 75 20pt \"나눔스퀘어 ExtraBold\";\n" "color: white;") self.TdsLabel.setAlignment(QtCore.Qt.AlignBottom | QtCore.Qt.AlignHCenter) self.TdsLabel.setObjectName("TdsLabel") self.Ph.raise_() self.PhLabel.raise_() self.Temp.raise_() self.Cds.raise_() self.TempLabel.raise_() self.Humi.raise_() self.HumiLabel.raise_() self.CdsLabel.raise_() self.Do.raise_() self.Tds.raise_() self.TdsLabel.raise_() self.DoLabel.raise_() self.stackedWidget.addWidget(self.MainPage) self.GraphPage = QtWidgets.QWidget() self.GraphPage.setObjectName("GraphPage") self.horizontalLayoutWidget = QtWidgets.QWidget(self.GraphPage) self.horizontalLayoutWidget.setGeometry(QtCore.QRect(10, 0, 761, 36)) self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget") self.horizontalLayout_2 = QtWidgets.QHBoxLayout( self.horizontalLayoutWidget) self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.TempCheck = QtWidgets.QCheckBox(self.horizontalLayoutWidget) self.TempCheck.setStyleSheet("font: 13pt \"나눔스퀘어\";\n" "color: #FF0000") self.TempCheck.setChecked(True) self.TempCheck.setObjectName("TempCheck") self.horizontalLayout_2.addWidget(self.TempCheck) self.HumiCheck = QtWidgets.QCheckBox(self.horizontalLayoutWidget) self.HumiCheck.setStyleSheet("font: 13pt \"나눔스퀘어\";\n" "color: #0000FF") self.HumiCheck.setChecked(True) self.HumiCheck.setObjectName("HumiCheck") self.horizontalLayout_2.addWidget(self.HumiCheck) self.CdsCheck = QtWidgets.QCheckBox(self.horizontalLayoutWidget) self.CdsCheck.setStyleSheet("font: 13pt \"나눔스퀘어\"; color: #00FF00") self.CdsCheck.setChecked(True) self.CdsCheck.setObjectName("CdsCheck") self.horizontalLayout_2.addWidget(self.CdsCheck) spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem) self.MonthRadio = QtWidgets.QRadioButton(self.horizontalLayoutWidget) self.MonthRadio.setStyleSheet("font: 13pt \"나눔스퀘어\";") self.MonthRadio.setObjectName("MonthRadio") self.horizontalLayout_2.addWidget(self.MonthRadio) self.WeekRadio = QtWidgets.QRadioButton(self.horizontalLayoutWidget) self.WeekRadio.setStyleSheet("font: 13pt \"나눔스퀘어\";") self.WeekRadio.setObjectName("WeekRadio") self.horizontalLayout_2.addWidget(self.WeekRadio) self.DayRadio = QtWidgets.QRadioButton(self.horizontalLayoutWidget) self.DayRadio.setStyleSheet("font: 13pt \"나눔스퀘어\";") self.DayRadio.setObjectName("DayRadio") self.horizontalLayout_2.addWidget(self.DayRadio) self.Graph = PlotWidget(self.GraphPage) self.Graph.setGeometry(QtCore.QRect(-1, 36, 802, 395)) self.Graph.setFrameShape(QtWidgets.QFrame.NoFrame) self.Graph.setObjectName("Graph") self.stackedWidget.addWidget(self.GraphPage) self.ActuatorPage = QtWidgets.QWidget() self.ActuatorPage.setObjectName("ActuatorPage") self.horizontalLayoutWidget_2 = QtWidgets.QWidget(self.ActuatorPage) self.horizontalLayoutWidget_2.setGeometry( QtCore.QRect(60, 80, 721, 271)) self.horizontalLayoutWidget_2.setObjectName("horizontalLayoutWidget_2") self.horizontalLayout = QtWidgets.QHBoxLayout( self.horizontalLayoutWidget_2) self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.horizontalLayout.setObjectName("horizontalLayout") self.Fan = QtWidgets.QFrame(self.horizontalLayoutWidget_2) self.Fan.setFrameShape(QtWidgets.QFrame.StyledPanel) self.Fan.setFrameShadow(QtWidgets.QFrame.Raised) self.Fan.setObjectName("Fan") self.label = QtWidgets.QLabel(self.Fan) self.label.setGeometry(QtCore.QRect(0, 0, 191, 181)) self.label.setStyleSheet("background-color: rgb(0, 135, 68);\n" "border-radius: 50px;") self.label.setText("") self.label.setObjectName("label") self.label_2 = QtWidgets.QLabel(self.Fan) self.label_2.setGeometry(QtCore.QRect(0, 150, 191, 111)) self.label_2.setStyleSheet("border: 3px solid #008744;\n" "border-radius: 35px;") self.label_2.setText("") self.label_2.setObjectName("label_2") self.label_3 = QtWidgets.QLabel(self.Fan) self.label_3.setGeometry(QtCore.QRect(0, 130, 191, 51)) self.label_3.setStyleSheet("background-color: rgb(0, 135, 68);") self.label_3.setText("") self.label_3.setObjectName("label_3") self.FanAuto = QtWidgets.QCheckBox(self.Fan) self.FanAuto.setGeometry(QtCore.QRect(45, 205, 91, 31)) self.FanAuto.setStyleSheet("font: 81 20pt \"나눔스퀘어 ExtraBold\";\n" "color: #008744") self.FanAuto.setObjectName("FanAuto") self.label_10 = QtWidgets.QLabel(self.Fan) self.label_10.setGeometry(QtCore.QRect(40, 30, 111, 121)) self.label_10.setStyleSheet("border-image: url(:/image/fan.jpg);") self.label_10.setText("") self.label_10.setObjectName("label_10") self.horizontalLayout.addWidget(self.Fan) self.Light = QtWidgets.QFrame(self.horizontalLayoutWidget_2) self.Light.setFrameShape(QtWidgets.QFrame.StyledPanel) self.Light.setFrameShadow(QtWidgets.QFrame.Raised) self.Light.setObjectName("Light") self.label_4 = QtWidgets.QLabel(self.Light) self.label_4.setGeometry(QtCore.QRect(0, 0, 191, 181)) self.label_4.setStyleSheet("background-color: rgb(0, 135, 68);\n" "border-radius: 50px;") self.label_4.setText("") self.label_4.setObjectName("label_4") self.label_5 = QtWidgets.QLabel(self.Light) self.label_5.setGeometry(QtCore.QRect(0, 150, 191, 111)) self.label_5.setStyleSheet("border: 3px solid #008744;\n" "border-radius: 35px;") self.label_5.setText("") self.label_5.setObjectName("label_5") self.label_6 = QtWidgets.QLabel(self.Light) self.label_6.setGeometry(QtCore.QRect(0, 130, 191, 51)) self.label_6.setStyleSheet("background-color: rgb(0, 135, 68);") self.label_6.setText("") self.label_6.setObjectName("label_6") self.LedAuto = QtWidgets.QCheckBox(self.Light) self.LedAuto.setGeometry(QtCore.QRect(45, 205, 91, 31)) self.LedAuto.setStyleSheet("font: 81 20pt \"나눔스퀘어 ExtraBold\";\n" "color: #008744") self.LedAuto.setObjectName("LedAuto") self.label_11 = QtWidgets.QLabel(self.Light) self.label_11.setGeometry(QtCore.QRect(40, 30, 111, 121)) self.label_11.setStyleSheet("border-image: url(:/image/bulb.png);") self.label_11.setText("") self.label_11.setObjectName("label_11") self.horizontalLayout.addWidget(self.Light) self.Water = QtWidgets.QFrame(self.horizontalLayoutWidget_2) self.Water.setFrameShape(QtWidgets.QFrame.StyledPanel) self.Water.setFrameShadow(QtWidgets.QFrame.Raised) self.Water.setObjectName("Water") self.label_7 = QtWidgets.QLabel(self.Water) self.label_7.setGeometry(QtCore.QRect(0, 0, 191, 181)) self.label_7.setStyleSheet("background-color: rgb(0, 135, 68);\n" "border-radius: 50px;") self.label_7.setText("") self.label_7.setObjectName("label_7") self.label_8 = QtWidgets.QLabel(self.Water) self.label_8.setGeometry(QtCore.QRect(0, 150, 191, 111)) self.label_8.setStyleSheet("border: 3px solid #008744;\n" "border-radius: 35px;") self.label_8.setText("") self.label_8.setObjectName("label_8") self.label_9 = QtWidgets.QLabel(self.Water) self.label_9.setGeometry(QtCore.QRect(0, 130, 191, 51)) self.label_9.setStyleSheet("background-color: rgb(0, 135, 68);") self.label_9.setText("") self.label_9.setObjectName("label_9") self.WaterAuto = QtWidgets.QCheckBox(self.Water) self.WaterAuto.setGeometry(QtCore.QRect(45, 205, 91, 31)) self.WaterAuto.setStyleSheet("font: 81 20pt \"나눔스퀘어 ExtraBold\";\n" "color: #008744") self.WaterAuto.setObjectName("WaterAuto") self.label_12 = QtWidgets.QLabel(self.Water) self.label_12.setGeometry(QtCore.QRect(40, 30, 111, 121)) self.label_12.setStyleSheet("border-image: url(:/image/water.jpg);") self.label_12.setText("") self.label_12.setObjectName("label_12") self.horizontalLayout.addWidget(self.Water) self.stackedWidget.addWidget(self.ActuatorPage) self.SettingPage = QtWidgets.QWidget() self.SettingPage.setObjectName("SettingPage") self.label_13 = QtWidgets.QLabel(self.SettingPage) self.label_13.setGeometry(QtCore.QRect(20, 30, 391, 180)) self.label_13.setStyleSheet("border: 3px solid #008744;\n" "border-radius: 30px;\n" "font: 15pt \"나눔스퀘어 Bold\";\n" "color: #008744") self.label_13.setAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignTop) self.label_13.setObjectName("label_13") self.label_14 = QtWidgets.QLabel(self.SettingPage) self.label_14.setGeometry(QtCore.QRect(20, 230, 391, 180)) self.label_14.setStyleSheet("border: 3px solid #008744;\n" "border-radius: 30px;\n" "font: 15pt \"나눔스퀘어 Bold\";\n" "color: #008744") self.label_14.setAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignTop) self.label_14.setObjectName("label_14") self.comboBox = QtWidgets.QComboBox(self.SettingPage) self.comboBox.setGeometry(QtCore.QRect(155, 73, 121, 22)) self.comboBox.setStyleSheet("border: 2px solid #008744") self.comboBox.setFrame(True) self.comboBox.setObjectName("comboBox") self.pushButton_2 = QtWidgets.QPushButton(self.SettingPage) self.pushButton_2.setGeometry(QtCore.QRect(100, 110, 101, 41)) self.pushButton_2.setStyleSheet( "background-color: rgba(255, 255, 255, 0);\n" "border: 2px solid #008744;\n" "border-radius: 20px;\n" "font: 25 12pt \"나눔스퀘어 Light\";\n" "color: #008744;") self.pushButton_2.setObjectName("pushButton_2") self.pushButton = QtWidgets.QPushButton(self.SettingPage) self.pushButton.setGeometry(QtCore.QRect(220, 110, 101, 41)) self.pushButton.setStyleSheet( "background-color: rgba(255, 255, 255, 0);\n" "border: 2px solid #008744;\n" "border-radius: 20px;\n" "font: 25 12pt \"나눔스퀘어 Light\";\n" "color: #008744;") self.pushButton.setObjectName("pushButton") self.spinBox = QtWidgets.QSpinBox(self.SettingPage) self.spinBox.setGeometry(QtCore.QRect(160, 170, 61, 21)) self.spinBox.setStyleSheet("border-radius: 4px;\n" "border: 1px solid #008744") self.spinBox.setMinimum(1) self.spinBox.setMaximum(60) self.spinBox.setObjectName("spinBox") self.label_18 = QtWidgets.QLabel(self.SettingPage) self.label_18.setGeometry(QtCore.QRect(120, 170, 31, 16)) self.label_18.setStyleSheet("font: 75 11pt \"나눔스퀘어\";\n" "color: #008744") self.label_18.setObjectName("label_18") self.pushButton_3 = QtWidgets.QPushButton(self.SettingPage) self.pushButton_3.setGeometry(QtCore.QRect(230, 170, 71, 21)) self.pushButton_3.setStyleSheet( "background-color: rgba(255, 255, 255, 0);\n" "border: 1px solid #008744;\n" "border-radius: 10px;\n" "font: 25 12pt \"나눔스퀘어 Light\";\n" "color: #008744;") self.pushButton_3.setObjectName("pushButton_3") self.lineEdit = QtWidgets.QLineEdit(self.SettingPage) self.lineEdit.setGeometry(QtCore.QRect(140, 270, 181, 31)) self.lineEdit.setStyleSheet("border: 2px solid #008744;\n" "border-radius: 5px;\n" "font: 11pt \"나눔스퀘어\";\n" "color: #008744") self.lineEdit.setText("") self.lineEdit.setAlignment(QtCore.Qt.AlignCenter) self.lineEdit.setObjectName("lineEdit") self.lineEdit_2 = QtWidgets.QLineEdit(self.SettingPage) self.lineEdit_2.setGeometry(QtCore.QRect(140, 310, 101, 31)) self.lineEdit_2.setStyleSheet("border: 2px solid #008744;\n" "border-radius: 5px;\n" "font: 11pt \"나눔스퀘어\";\n" "color: #008744") self.lineEdit_2.setText("") self.lineEdit_2.setAlignment(QtCore.Qt.AlignCenter) self.lineEdit_2.setObjectName("lineEdit_2") self.label_19 = QtWidgets.QLabel(self.SettingPage) self.label_19.setGeometry(QtCore.QRect(110, 278, 21, 16)) self.label_19.setStyleSheet("font: 75 11pt \"나눔스퀘어\";\n" "color: #008744") self.label_19.setObjectName("label_19") self.label_20 = QtWidgets.QLabel(self.SettingPage) self.label_20.setGeometry(QtCore.QRect(92, 317, 41, 16)) self.label_20.setStyleSheet("font: 75 11pt \"나눔스퀘어\";\n" "color: #008744") self.label_20.setObjectName("label_20") self.pushButton_4 = QtWidgets.QPushButton(self.SettingPage) self.pushButton_4.setGeometry(QtCore.QRect(250, 315, 71, 21)) self.pushButton_4.setStyleSheet( "background-color: rgba(255, 255, 255, 0);\n" "border: 1px solid #008744;\n" "border-radius: 10px;\n" "font: 25 12pt \"나눔스퀘어 Light\";\n" "color: #008744;") self.pushButton_4.setObjectName("pushButton_4") self.pushButton_5 = QtWidgets.QPushButton(self.SettingPage) self.pushButton_5.setGeometry(QtCore.QRect(240, 360, 71, 21)) self.pushButton_5.setStyleSheet( "background-color: rgba(255, 255, 255, 0);\n" "border: 1px solid #008744;\n" "border-radius: 10px;\n" "font: 25 12pt \"나눔스퀘어 Light\";\n" "color: #008744;") self.pushButton_5.setObjectName("pushButton_5") self.label_21 = QtWidgets.QLabel(self.SettingPage) self.label_21.setGeometry(QtCore.QRect(130, 360, 31, 16)) self.label_21.setStyleSheet("font: 75 11pt \"나눔스퀘어\";\n" "color: #008744") self.label_21.setObjectName("label_21") self.spinBox_2 = QtWidgets.QSpinBox(self.SettingPage) self.spinBox_2.setGeometry(QtCore.QRect(170, 360, 61, 21)) self.spinBox_2.setStyleSheet("border-radius: 4px;\n" "border: 1px solid #008744") self.spinBox_2.setMinimum(1) self.spinBox_2.setMaximum(60) self.spinBox_2.setObjectName("spinBox_2") self.spinBox_3 = QtWidgets.QSpinBox(self.SettingPage) self.spinBox_3.setGeometry(QtCore.QRect(570, 60, 61, 21)) self.spinBox_3.setStyleSheet("border-radius: 4px;\n" "border: 1px solid #008744") self.spinBox_3.setMinimum(0) self.spinBox_3.setMaximum(99) self.spinBox_3.setObjectName("spinBox_3") self.label_22 = QtWidgets.QLabel(self.SettingPage) self.label_22.setGeometry(QtCore.QRect(530, 60, 31, 16)) self.label_22.setStyleSheet("font: 75 11pt \"나눔스퀘어\";\n" "color: #008744") self.label_22.setObjectName("label_22") self.label_16 = QtWidgets.QLabel(self.SettingPage) self.label_16.setGeometry(QtCore.QRect(420, 160, 359, 120)) self.label_16.setStyleSheet("border: 3px solid #008744;\n" "border-radius: 30px;\n" "font: 15pt \"나눔스퀘어 Bold\";\n" "color: #008744") self.label_16.setAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignTop) self.label_16.setObjectName("label_16") self.label_17 = QtWidgets.QLabel(self.SettingPage) self.label_17.setGeometry(QtCore.QRect(420, 290, 359, 120)) self.label_17.setStyleSheet("border: 3px solid #008744;\n" "border-radius: 30px;\n" "font: 15pt \"나눔스퀘어 Bold\";\n" "color: #008744") self.label_17.setAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignTop) self.label_17.setObjectName("label_17") self.label_15 = QtWidgets.QLabel(self.SettingPage) self.label_15.setGeometry(QtCore.QRect(420, 30, 359, 120)) self.label_15.setStyleSheet("border: 3px solid #008744;\n" "border-radius: 30px;\n" "font: 15pt \"나눔스퀘어 Bold\";\n" "color: #008744") self.label_15.setAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignTop) self.label_15.setObjectName("label_15") self.label_23 = QtWidgets.QLabel(self.SettingPage) self.label_23.setGeometry(QtCore.QRect(640, 60, 31, 16)) self.label_23.setStyleSheet("font: 75 11pt \"나눔스퀘어\";\n" "color: #008744") self.label_23.setObjectName("label_23") self.label_24 = QtWidgets.QLabel(self.SettingPage) self.label_24.setGeometry(QtCore.QRect(640, 90, 31, 16)) self.label_24.setStyleSheet("font: 75 11pt \"나눔스퀘어\";\n" "color: #008744") self.label_24.setObjectName("label_24") self.spinBox_4 = QtWidgets.QSpinBox(self.SettingPage) self.spinBox_4.setGeometry(QtCore.QRect(570, 90, 61, 21)) self.spinBox_4.setStyleSheet("border-radius: 4px;\n" "border: 1px solid #008744") self.spinBox_4.setMinimum(0) self.spinBox_4.setMaximum(99) self.spinBox_4.setObjectName("spinBox_4") self.label_25 = QtWidgets.QLabel(self.SettingPage) self.label_25.setGeometry(QtCore.QRect(530, 90, 31, 16)) self.label_25.setStyleSheet("font: 75 11pt \"나눔스퀘어\";\n" "color: #008744") self.label_25.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_25.setObjectName("label_25") self.pushButton_6 = QtWidgets.QPushButton(self.SettingPage) self.pushButton_6.setGeometry(QtCore.QRect(565, 118, 71, 21)) self.pushButton_6.setStyleSheet( "background-color: rgba(255, 255, 255, 0);\n" "border: 1px solid #008744;\n" "border-radius: 10px;\n" "font: 25 12pt \"나눔스퀘어 Light\";\n" "color: #008744;") self.pushButton_6.setObjectName("pushButton_6") self.label_26 = QtWidgets.QLabel(self.SettingPage) self.label_26.setGeometry(QtCore.QRect(640, 220, 31, 16)) self.label_26.setStyleSheet("font: 75 11pt \"나눔스퀘어\";\n" "color: #008744") self.label_26.setObjectName("label_26") self.spinBox_5 = QtWidgets.QSpinBox(self.SettingPage) self.spinBox_5.setGeometry(QtCore.QRect(570, 220, 61, 21)) self.spinBox_5.setStyleSheet("border-radius: 4px;\n" "border: 1px solid #008744") self.spinBox_5.setMinimum(0) self.spinBox_5.setMaximum(99) self.spinBox_5.setObjectName("spinBox_5") self.spinBox_6 = QtWidgets.QSpinBox(self.SettingPage) self.spinBox_6.setGeometry(QtCore.QRect(570, 190, 61, 21)) self.spinBox_6.setStyleSheet("border-radius: 4px;\n" "border: 1px solid #008744") self.spinBox_6.setMinimum(0) self.spinBox_6.setMaximum(99) self.spinBox_6.setObjectName("spinBox_6") self.pushButton_7 = QtWidgets.QPushButton(self.SettingPage) self.pushButton_7.setGeometry(QtCore.QRect(565, 248, 71, 21)) self.pushButton_7.setStyleSheet( "background-color: rgba(255, 255, 255, 0);\n" "border: 1px solid #008744;\n" "border-radius: 10px;\n" "font: 25 12pt \"나눔스퀘어 Light\";\n" "color: #008744;") self.pushButton_7.setObjectName("pushButton_7") self.label_27 = QtWidgets.QLabel(self.SettingPage) self.label_27.setGeometry(QtCore.QRect(640, 190, 31, 16)) self.label_27.setStyleSheet("font: 75 11pt \"나눔스퀘어\";\n" "color: #008744") self.label_27.setObjectName("label_27") self.label_28 = QtWidgets.QLabel(self.SettingPage) self.label_28.setGeometry(QtCore.QRect(530, 220, 31, 16)) self.label_28.setStyleSheet("font: 75 11pt \"나눔스퀘어\";\n" "color: #008744") self.label_28.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_28.setObjectName("label_28") self.label_29 = QtWidgets.QLabel(self.SettingPage) self.label_29.setGeometry(QtCore.QRect(530, 190, 31, 16)) self.label_29.setStyleSheet("font: 75 11pt \"나눔스퀘어\";\n" "color: #008744") self.label_29.setObjectName("label_29") self.timeEdit = QtWidgets.QTimeEdit(self.SettingPage) self.timeEdit.setGeometry(QtCore.QRect(540, 330, 118, 22)) self.timeEdit.setStyleSheet("border-radius: 4px;\n" "border: 1px solid #008744;\n" "font: 9pt \"나눔스퀘어\";\n" "color: #008744") self.timeEdit.setObjectName("timeEdit") self.timeEdit_2 = QtWidgets.QTimeEdit(self.SettingPage) self.timeEdit_2.setGeometry(QtCore.QRect(540, 370, 118, 22)) self.timeEdit_2.setStyleSheet("border-radius: 4px;\n" "border: 1px solid #008744;\n" "font: 9pt \"나눔스퀘어\";\n" "color: #008744") self.timeEdit_2.setObjectName("timeEdit_2") self.label_30 = QtWidgets.QLabel(self.SettingPage) self.label_30.setGeometry(QtCore.QRect(500, 372, 31, 16)) self.label_30.setStyleSheet("font: 75 11pt \"나눔스퀘어\";\n" "color: #008744") self.label_30.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_30.setObjectName("label_30") self.label_31 = QtWidgets.QLabel(self.SettingPage) self.label_31.setGeometry(QtCore.QRect(510, 332, 21, 16)) self.label_31.setStyleSheet("font: 75 11pt \"나눔스퀘어\";\n" "color: #008744") self.label_31.setObjectName("label_31") self.label_15.raise_() self.label_13.raise_() self.label_14.raise_() self.comboBox.raise_() self.pushButton_2.raise_() self.pushButton.raise_() self.spinBox.raise_() self.label_18.raise_() self.pushButton_3.raise_() self.lineEdit.raise_() self.lineEdit_2.raise_() self.label_19.raise_() self.label_20.raise_() self.pushButton_4.raise_() self.pushButton_5.raise_() self.label_21.raise_() self.spinBox_2.raise_() self.spinBox_3.raise_() self.label_22.raise_() self.label_16.raise_() self.label_17.raise_() self.label_23.raise_() self.label_24.raise_() self.spinBox_4.raise_() self.label_25.raise_() self.pushButton_6.raise_() self.label_26.raise_() self.spinBox_5.raise_() self.spinBox_6.raise_() self.pushButton_7.raise_() self.label_27.raise_() self.label_28.raise_() self.label_29.raise_() self.timeEdit.raise_() self.timeEdit_2.raise_() self.label_30.raise_() self.label_31.raise_() self.stackedWidget.addWidget(self.SettingPage) self.ActBtn = QtWidgets.QPushButton(Form) self.ActBtn.setGeometry(QtCore.QRect(560, 438, 110, 34)) self.ActBtn.setStyleSheet("QPushButton\n" "{ \n" " background-color: rgb(255, 255, 255);\n" " border-radius: 15px;\n" " font: 75 15pt \"나눔스퀘어 ExtraBold\";\n" " color: rgb(0, 135, 68); \n" "}\n" "\n" "QPushButton:hover\n" "{ \n" " background-color: rgb(0, 0, 0, 0%);\n" " border: 3px solid white;\n" " color: rgb(255,255,255);\n" "}\n" "\n" "QPushButton:focus:checked\n" "{ \n" " background-color: rgb(0, 0, 0, 0%);\n" " border: 3px solid white;\n" " color: rgb(255,255,255);\n" "}") self.ActBtn.setCheckable(True) self.ActBtn.setAutoExclusive(True) self.ActBtn.setObjectName("ActBtn") self.logo = QtWidgets.QLabel(Form) self.logo.setGeometry(QtCore.QRect(3, 433, 45, 45)) self.logo.setStyleSheet("border-image: url(:/image/leaf.jpg);") self.logo.setText("") self.logo.setObjectName("logo") self.retranslateUi(Form) self.stackedWidget.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(Form) def retranslateUi(self, Form): _translate = QtCore.QCoreApplication.translate Form.setWindowTitle(_translate("Form", "Form")) self.TitleBar.setText(_translate("Form", " Smart Farm")) self.MainBtn.setText(_translate("Form", "Main")) self.GraphBtn.setText(_translate("Form", "Graph")) self.SetBtn.setText(_translate("Form", "Setting")) self.TempLabel.setText(_translate("Form", "Temp")) self.Temp.setText(_translate("Form", "00.0")) self.Humi.setText(_translate("Form", "00.0")) self.HumiLabel.setText(_translate("Form", "Humi")) self.PhLabel.setText(_translate("Form", "pH")) self.Ph.setText(_translate("Form", "00.0")) self.CdsLabel.setText(_translate("Form", "Cds")) self.Cds.setText(_translate("Form", "000")) self.DoLabel.setText(_translate("Form", "DO")) self.Do.setText(_translate("Form", "000")) self.Tds.setText(_translate("Form", "000")) self.TdsLabel.setText(_translate("Form", "TDS")) self.TempCheck.setText(_translate("Form", "Temperature")) self.HumiCheck.setText(_translate("Form", "Humidity")) self.CdsCheck.setText(_translate("Form", "Cds")) self.MonthRadio.setText(_translate("Form", "Month")) self.WeekRadio.setText(_translate("Form", "Week")) self.DayRadio.setText(_translate("Form", "Day")) self.FanAuto.setText(_translate("Form", "AUTO")) self.LedAuto.setText(_translate("Form", "AUTO")) self.WaterAuto.setText(_translate("Form", "AUTO")) self.label_13.setText(_translate("Form", "SENSOR")) self.label_14.setText(_translate("Form", "SERVER")) self.pushButton_2.setText(_translate("Form", "Connect")) self.pushButton.setText(_translate("Form", "Disconnect")) self.label_18.setText(_translate("Form", "Freq")) self.pushButton_3.setText(_translate("Form", "apply")) self.label_19.setText(_translate("Form", "IP")) self.label_20.setText(_translate("Form", "Port")) self.pushButton_4.setText(_translate("Form", "save")) self.pushButton_5.setText(_translate("Form", "apply")) self.label_21.setText(_translate("Form", "Freq")) self.label_22.setText(_translate("Form", "Freq")) self.label_16.setText(_translate("Form", "Culture Solution")) self.label_17.setText(_translate("Form", "LED")) self.label_15.setText(_translate("Form", "Fan")) self.label_23.setText(_translate("Form", "hour")) self.label_24.setText(_translate("Form", "min")) self.label_25.setText(_translate("Form", "Act")) self.pushButton_6.setText(_translate("Form", "save")) self.label_26.setText(_translate("Form", "min")) self.pushButton_7.setText(_translate("Form", "save")) self.label_27.setText(_translate("Form", "hour")) self.label_28.setText(_translate("Form", "Act")) self.label_29.setText(_translate("Form", "Freq")) self.label_30.setText(_translate("Form", "Off")) self.label_31.setText(_translate("Form", "On")) self.ActBtn.setText(_translate("Form", "Actuator"))
class Ui_HP34401ADialog(object): def setupUi(self, HP34401ADialog): HP34401ADialog.setObjectName("HP34401ADialog") HP34401ADialog.resize(1397, 1004) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Ignored) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( HP34401ADialog.sizePolicy().hasHeightForWidth()) HP34401ADialog.setSizePolicy(sizePolicy) HP34401ADialog.setStyleSheet("background-color: rgb(0, 0, 0);") HP34401ADialog.setSizeGripEnabled(True) self.gridLayout_3 = QtWidgets.QGridLayout(HP34401ADialog) self.gridLayout_3.setObjectName("gridLayout_3") self.ExitpushButton = QtWidgets.QPushButton(HP34401ADialog) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.ExitpushButton.sizePolicy().hasHeightForWidth()) self.ExitpushButton.setSizePolicy(sizePolicy) self.ExitpushButton.setMinimumSize(QtCore.QSize(0, 50)) self.ExitpushButton.setMaximumSize(QtCore.QSize(800, 90)) self.ExitpushButton.setStyleSheet( "background-color: rgb(129, 129, 129);") self.ExitpushButton.setObjectName("ExitpushButton") self.gridLayout_3.addWidget(self.ExitpushButton, 2, 2, 1, 1) self.statustextBrowser = QtWidgets.QTextBrowser(HP34401ADialog) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.statustextBrowser.sizePolicy().hasHeightForWidth()) self.statustextBrowser.setSizePolicy(sizePolicy) self.statustextBrowser.setMaximumSize(QtCore.QSize(700, 90)) self.statustextBrowser.setStyleSheet( "background-color: rgb(158, 158, 158);\n" "background-color: rgb(7, 142, 198);") self.statustextBrowser.setFrameShape(QtWidgets.QFrame.Box) self.statustextBrowser.setFrameShadow(QtWidgets.QFrame.Raised) self.statustextBrowser.setLineWidth(1) self.statustextBrowser.setObjectName("statustextBrowser") self.gridLayout_3.addWidget(self.statustextBrowser, 1, 0, 1, 1) self.frame_3 = QtWidgets.QFrame(HP34401ADialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.frame_3.sizePolicy().hasHeightForWidth()) self.frame_3.setSizePolicy(sizePolicy) self.frame_3.setMinimumSize(QtCore.QSize(0, 0)) self.frame_3.setMaximumSize(QtCore.QSize(700, 900)) self.frame_3.setStyleSheet("background-color: rgb(0, 85, 127);\n" "color: rgb(255, 255, 131);") self.frame_3.setFrameShape(QtWidgets.QFrame.Box) self.frame_3.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_3.setLineWidth(4) self.frame_3.setObjectName("frame_3") self.verticalLayout = QtWidgets.QVBoxLayout(self.frame_3) self.verticalLayout.setObjectName("verticalLayout") self.frame_6 = QtWidgets.QFrame(self.frame_3) self.frame_6.setStyleSheet("background-color: rgb(0, 85, 127);\n" "color: rgb(0, 255, 255);") self.frame_6.setFrameShape(QtWidgets.QFrame.Box) self.frame_6.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_6.setLineWidth(2) self.frame_6.setObjectName("frame_6") self.gridLayout_2 = QtWidgets.QGridLayout(self.frame_6) self.gridLayout_2.setObjectName("gridLayout_2") self.NplcLabel = QtWidgets.QLabel(self.frame_6) self.NplcLabel.setMinimumSize(QtCore.QSize(0, 25)) self.NplcLabel.setObjectName("NplcLabel") self.gridLayout_2.addWidget(self.NplcLabel, 6, 0, 1, 1) spacerItem = QtWidgets.QSpacerItem(20, 50, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout_2.addItem(spacerItem, 14, 1, 1, 1) self.TrigdelayLabel = QtWidgets.QLabel(self.frame_6) self.TrigdelayLabel.setMinimumSize(QtCore.QSize(0, 25)) self.TrigdelayLabel.setObjectName("TrigdelayLabel") self.gridLayout_2.addWidget(self.TrigdelayLabel, 16, 0, 1, 1) self.PeriodapertureCombobox = QtWidgets.QComboBox(self.frame_6) self.PeriodapertureCombobox.setMinimumSize(QtCore.QSize(100, 25)) self.PeriodapertureCombobox.setObjectName("PeriodapertureCombobox") self.gridLayout_2.addWidget(self.PeriodapertureCombobox, 8, 1, 1, 1, QtCore.Qt.AlignLeft) self.AutozeroCombobox = QtWidgets.QComboBox(self.frame_6) self.AutozeroCombobox.setMinimumSize(QtCore.QSize(100, 25)) self.AutozeroCombobox.setObjectName("AutozeroCombobox") self.gridLayout_2.addWidget(self.AutozeroCombobox, 3, 1, 1, 1, QtCore.Qt.AlignLeft) self.AcbwLabel = QtWidgets.QLabel(self.frame_6) self.AcbwLabel.setMinimumSize(QtCore.QSize(0, 25)) self.AcbwLabel.setObjectName("AcbwLabel") self.gridLayout_2.addWidget(self.AcbwLabel, 11, 0, 1, 1) self.ImpedanceCombobox = QtWidgets.QComboBox(self.frame_6) self.ImpedanceCombobox.setMinimumSize(QtCore.QSize(100, 25)) self.ImpedanceCombobox.setToolTipDuration(-1) self.ImpedanceCombobox.setObjectName("ImpedanceCombobox") self.gridLayout_2.addWidget(self.ImpedanceCombobox, 2, 1, 1, 1, QtCore.Qt.AlignLeft) self.AutozeroLabel = QtWidgets.QLabel(self.frame_6) self.AutozeroLabel.setMinimumSize(QtCore.QSize(0, 25)) self.AutozeroLabel.setObjectName("AutozeroLabel") self.gridLayout_2.addWidget(self.AutozeroLabel, 3, 0, 1, 1) self.RangeCombobox = QtWidgets.QComboBox(self.frame_6) self.RangeCombobox.setMinimumSize(QtCore.QSize(100, 25)) self.RangeCombobox.setObjectName("RangeCombobox") self.gridLayout_2.addWidget(self.RangeCombobox, 4, 1, 1, 1, QtCore.Qt.AlignLeft) self.TrigsrcLabel = QtWidgets.QLabel(self.frame_6) self.TrigsrcLabel.setMinimumSize(QtCore.QSize(0, 25)) self.TrigsrcLabel.setObjectName("TrigsrcLabel") self.gridLayout_2.addWidget(self.TrigsrcLabel, 13, 0, 1, 1) self.ImpedanceLabel = QtWidgets.QLabel(self.frame_6) self.ImpedanceLabel.setMinimumSize(QtCore.QSize(0, 25)) self.ImpedanceLabel.setObjectName("ImpedanceLabel") self.gridLayout_2.addWidget(self.ImpedanceLabel, 2, 0, 1, 1) self.NplcCombobox = QtWidgets.QComboBox(self.frame_6) self.NplcCombobox.setMinimumSize(QtCore.QSize(100, 25)) self.NplcCombobox.setObjectName("NplcCombobox") self.gridLayout_2.addWidget(self.NplcCombobox, 6, 1, 1, 1, QtCore.Qt.AlignLeft) self.MathCombobox = QtWidgets.QComboBox(self.frame_6) self.MathCombobox.setMinimumSize(QtCore.QSize(100, 25)) self.MathCombobox.setObjectName("MathCombobox") self.gridLayout_2.addWidget(self.MathCombobox, 12, 1, 1, 1, QtCore.Qt.AlignLeft) self.TriggerDelaySpinbox = QtWidgets.QSpinBox(self.frame_6) self.TriggerDelaySpinbox.setObjectName("TriggerDelaySpinbox") self.gridLayout_2.addWidget(self.TriggerDelaySpinbox, 16, 1, 1, 1) self.ResolutionLabel = QtWidgets.QLabel(self.frame_6) self.ResolutionLabel.setMinimumSize(QtCore.QSize(0, 25)) self.ResolutionLabel.setObjectName("ResolutionLabel") self.gridLayout_2.addWidget(self.ResolutionLabel, 5, 0, 1, 1) self.scaleLabel_2 = QtWidgets.QLabel(self.frame_6) font = QtGui.QFont() font.setPointSize(10) font.setBold(True) font.setWeight(75) self.scaleLabel_2.setFont(font) self.scaleLabel_2.setAlignment(QtCore.Qt.AlignCenter) self.scaleLabel_2.setObjectName("scaleLabel_2") self.gridLayout_2.addWidget(self.scaleLabel_2, 0, 0, 1, 1, QtCore.Qt.AlignLeft) self.ACbandwidthCombobox = QtWidgets.QComboBox(self.frame_6) self.ACbandwidthCombobox.setMinimumSize(QtCore.QSize(100, 25)) self.ACbandwidthCombobox.setObjectName("ACbandwidthCombobox") self.gridLayout_2.addWidget(self.ACbandwidthCombobox, 11, 1, 1, 1, QtCore.Qt.AlignLeft) self.RangeLabel = QtWidgets.QLabel(self.frame_6) self.RangeLabel.setMinimumSize(QtCore.QSize(0, 25)) self.RangeLabel.setObjectName("RangeLabel") self.gridLayout_2.addWidget(self.RangeLabel, 4, 0, 1, 1) self.ResolutionCombobox = QtWidgets.QComboBox(self.frame_6) self.ResolutionCombobox.setMinimumSize(QtCore.QSize(100, 25)) self.ResolutionCombobox.setObjectName("ResolutionCombobox") self.gridLayout_2.addWidget(self.ResolutionCombobox, 5, 1, 1, 1, QtCore.Qt.AlignLeft) self.FreqapertureLabel = QtWidgets.QLabel(self.frame_6) self.FreqapertureLabel.setMinimumSize(QtCore.QSize(0, 25)) self.FreqapertureLabel.setObjectName("FreqapertureLabel") self.gridLayout_2.addWidget(self.FreqapertureLabel, 7, 0, 1, 1) self.TrigsrcCombobox = QtWidgets.QComboBox(self.frame_6) self.TrigsrcCombobox.setMinimumSize(QtCore.QSize(100, 25)) self.TrigsrcCombobox.setObjectName("TrigsrcCombobox") self.gridLayout_2.addWidget(self.TrigsrcCombobox, 13, 1, 1, 1, QtCore.Qt.AlignLeft) self.PeriodapertureLabel = QtWidgets.QLabel(self.frame_6) self.PeriodapertureLabel.setMinimumSize(QtCore.QSize(0, 25)) self.PeriodapertureLabel.setObjectName("PeriodapertureLabel") self.gridLayout_2.addWidget(self.PeriodapertureLabel, 8, 0, 1, 1) self.FreqapertureCombobox = QtWidgets.QComboBox(self.frame_6) self.FreqapertureCombobox.setMinimumSize(QtCore.QSize(100, 25)) self.FreqapertureCombobox.setObjectName("FreqapertureCombobox") self.gridLayout_2.addWidget(self.FreqapertureCombobox, 7, 1, 1, 1, QtCore.Qt.AlignLeft) self.MathLabel = QtWidgets.QLabel(self.frame_6) self.MathLabel.setMinimumSize(QtCore.QSize(0, 25)) self.MathLabel.setObjectName("MathLabel") self.gridLayout_2.addWidget(self.MathLabel, 12, 0, 1, 1) self.verticalLayout.addWidget(self.frame_6) self.frame = QtWidgets.QFrame(self.frame_3) self.frame.setMinimumSize(QtCore.QSize(0, 300)) self.frame.setFrameShape(QtWidgets.QFrame.Box) self.frame.setFrameShadow(QtWidgets.QFrame.Raised) self.frame.setLineWidth(2) self.frame.setObjectName("frame") self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.frame) self.verticalLayout_2.setObjectName("verticalLayout_2") self.samplesSlider = QtWidgets.QSlider(self.frame) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.samplesSlider.sizePolicy().hasHeightForWidth()) self.samplesSlider.setSizePolicy(sizePolicy) self.samplesSlider.setMinimumSize(QtCore.QSize(350, 40)) self.samplesSlider.setStyleSheet( "background-color: rgb(7, 142, 198);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 0, 255), stop:1 rgba(255, 255, 255, 255));" ) self.samplesSlider.setMaximum(100000) self.samplesSlider.setPageStep(1) self.samplesSlider.setProperty("value", 16) self.samplesSlider.setOrientation(QtCore.Qt.Horizontal) self.samplesSlider.setInvertedAppearance(False) self.samplesSlider.setInvertedControls(False) self.samplesSlider.setTickPosition(QtWidgets.QSlider.TicksAbove) self.samplesSlider.setTickInterval(2000) self.samplesSlider.setObjectName("samplesSlider") self.verticalLayout_2.addWidget(self.samplesSlider, 0, QtCore.Qt.AlignHCenter) self.sampledisplayLabel = QtWidgets.QLabel(self.frame) self.sampledisplayLabel.setObjectName("sampledisplayLabel") self.verticalLayout_2.addWidget(self.sampledisplayLabel, 0, QtCore.Qt.AlignHCenter) self.samplestartpushButton = QtWidgets.QPushButton(self.frame) self.samplestartpushButton.setMinimumSize(QtCore.QSize(300, 30)) self.samplestartpushButton.setMaximumSize(QtCore.QSize(400, 16777215)) self.samplestartpushButton.setObjectName("samplestartpushButton") self.verticalLayout_2.addWidget(self.samplestartpushButton, 0, QtCore.Qt.AlignHCenter) spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_2.addItem(spacerItem1) self.samplestoppushButton = QtWidgets.QPushButton(self.frame) self.samplestoppushButton.setMinimumSize(QtCore.QSize(300, 30)) self.samplestoppushButton.setMaximumSize(QtCore.QSize(400, 16777215)) self.samplestoppushButton.setStyleSheet("") self.samplestoppushButton.setObjectName("samplestoppushButton") self.verticalLayout_2.addWidget(self.samplestoppushButton, 0, QtCore.Qt.AlignHCenter) self.samplestakenLabel = QtWidgets.QLabel(self.frame) self.samplestakenLabel.setMinimumSize(QtCore.QSize(300, 25)) font = QtGui.QFont() font.setFamily("Trebuchet MS") font.setPointSize(9) self.samplestakenLabel.setFont(font) self.samplestakenLabel.setText("") self.samplestakenLabel.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) self.samplestakenLabel.setObjectName("samplestakenLabel") self.verticalLayout_2.addWidget(self.samplestakenLabel, 0, QtCore.Qt.AlignHCenter) self.samplestakenLabel_2 = QtWidgets.QLabel(self.frame) self.samplestakenLabel_2.setMinimumSize(QtCore.QSize(300, 25)) font = QtGui.QFont() font.setFamily("Trebuchet MS") font.setPointSize(9) self.samplestakenLabel_2.setFont(font) self.samplestakenLabel_2.setText("") self.samplestakenLabel_2.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) self.samplestakenLabel_2.setObjectName("samplestakenLabel_2") self.verticalLayout_2.addWidget(self.samplestakenLabel_2) self.progressBar = QtWidgets.QProgressBar(self.frame) self.progressBar.setMinimumSize(QtCore.QSize(300, 0)) self.progressBar.setProperty("value", 0) self.progressBar.setObjectName("progressBar") self.verticalLayout_2.addWidget(self.progressBar, 0, QtCore.Qt.AlignHCenter) self.verticalLayout.addWidget(self.frame) self.frame_2 = QtWidgets.QFrame(self.frame_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.frame_2.sizePolicy().hasHeightForWidth()) self.frame_2.setSizePolicy(sizePolicy) self.frame_2.setStyleSheet("background-color: rgb(7, 142, 198);") self.frame_2.setFrameShape(QtWidgets.QFrame.Box) self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_2.setLineWidth(2) self.frame_2.setObjectName("frame_2") self.gridLayout = QtWidgets.QGridLayout(self.frame_2) self.gridLayout.setObjectName("gridLayout") self.TWOpushButton = QtWidgets.QPushButton(self.frame_2) self.TWOpushButton.setStyleSheet("background-color: rgb(4, 69, 115);\n" "color: rgb(85, 255, 255);") self.TWOpushButton.setCheckable(True) self.TWOpushButton.setObjectName("TWOpushButton") self.gridLayout.addWidget(self.TWOpushButton, 1, 2, 1, 1) self.ACIpushButton = QtWidgets.QPushButton(self.frame_2) self.ACIpushButton.setStyleSheet("background-color: rgb(4, 69, 115);\n" "color: rgb(85, 255, 255);") self.ACIpushButton.setCheckable(True) self.ACIpushButton.setObjectName("ACIpushButton") self.gridLayout.addWidget(self.ACIpushButton, 0, 1, 1, 1) self.DCVpushButton = QtWidgets.QPushButton(self.frame_2) self.DCVpushButton.setStyleSheet("background-color: rgb(4, 69, 115);\n" "color: rgb(85, 255, 255);") self.DCVpushButton.setCheckable(True) self.DCVpushButton.setChecked(True) self.DCVpushButton.setObjectName("DCVpushButton") self.gridLayout.addWidget(self.DCVpushButton, 1, 0, 1, 1) self.ACVpushButton = QtWidgets.QPushButton(self.frame_2) self.ACVpushButton.setStyleSheet("background-color: rgb(4, 69, 115);\n" "color: rgb(85, 255, 255);") self.ACVpushButton.setCheckable(True) self.ACVpushButton.setObjectName("ACVpushButton") self.gridLayout.addWidget(self.ACVpushButton, 1, 1, 1, 1) self.CONpushButton = QtWidgets.QPushButton(self.frame_2) self.CONpushButton.setStyleSheet("background-color: rgb(4, 69, 115);\n" "color: rgb(85, 255, 255);") self.CONpushButton.setCheckable(True) self.CONpushButton.setObjectName("CONpushButton") self.gridLayout.addWidget(self.CONpushButton, 1, 4, 1, 1) self.DCIpushButton = QtWidgets.QPushButton(self.frame_2) self.DCIpushButton.setStyleSheet("background-color: rgb(4, 69, 115);\n" "color: rgb(85, 255, 255);") self.DCIpushButton.setCheckable(True) self.DCIpushButton.setObjectName("DCIpushButton") self.gridLayout.addWidget(self.DCIpushButton, 0, 0, 1, 1) self.DIOpushButton = QtWidgets.QPushButton(self.frame_2) self.DIOpushButton.setStyleSheet( "background-color: rgb(4, 69, 115);\n" "alternate-background-color: rgb(0, 170, 255);\n" "color: rgb(85, 255, 255);") self.DIOpushButton.setCheckable(True) self.DIOpushButton.setObjectName("DIOpushButton") self.gridLayout.addWidget(self.DIOpushButton, 0, 4, 1, 1) self.FREpushButton = QtWidgets.QPushButton(self.frame_2) self.FREpushButton.setStyleSheet("background-color: rgb(4, 69, 115);\n" "color: rgb(85, 255, 255);") self.FREpushButton.setCheckable(True) self.FREpushButton.setObjectName("FREpushButton") self.gridLayout.addWidget(self.FREpushButton, 1, 3, 1, 1) self.PERpushButton = QtWidgets.QPushButton(self.frame_2) self.PERpushButton.setStyleSheet("background-color: rgb(4, 69, 115);\n" "color: rgb(85, 255, 255);") self.PERpushButton.setCheckable(True) self.PERpushButton.setObjectName("PERpushButton") self.gridLayout.addWidget(self.PERpushButton, 0, 3, 1, 1) self.FWOpushButton = QtWidgets.QPushButton(self.frame_2) self.FWOpushButton.setStyleSheet("background-color: rgb(4, 69, 115);\n" "color: rgb(85, 255, 255);") self.FWOpushButton.setCheckable(True) self.FWOpushButton.setObjectName("FWOpushButton") self.gridLayout.addWidget(self.FWOpushButton, 0, 2, 1, 1) self.verticalLayout.addWidget(self.frame_2) self.gridLayout_3.addWidget(self.frame_3, 0, 0, 1, 1, QtCore.Qt.AlignBottom) self.plotWidget = PlotWidget(HP34401ADialog) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.plotWidget.sizePolicy().hasHeightForWidth()) self.plotWidget.setSizePolicy(sizePolicy) self.plotWidget.setMinimumSize(QtCore.QSize(600, 0)) self.plotWidget.setMaximumSize(QtCore.QSize(2000, 16777215)) font = QtGui.QFont() font.setStyleStrategy(QtGui.QFont.PreferAntialias) self.plotWidget.setFont(font) self.plotWidget.setFrameShape(QtWidgets.QFrame.Box) self.plotWidget.setObjectName("plotWidget") self.gridLayout_3.addWidget(self.plotWidget, 0, 2, 1, 1) self.hp34401aTitlelabel = QtWidgets.QLabel(HP34401ADialog) font = QtGui.QFont() font.setPointSize(12) font.setBold(True) font.setWeight(75) self.hp34401aTitlelabel.setFont(font) self.hp34401aTitlelabel.setStyleSheet("color: rgb(85, 170, 255);") self.hp34401aTitlelabel.setTextFormat(QtCore.Qt.RichText) self.hp34401aTitlelabel.setScaledContents(False) self.hp34401aTitlelabel.setAlignment(QtCore.Qt.AlignCenter) self.hp34401aTitlelabel.setObjectName("hp34401aTitlelabel") self.gridLayout_3.addWidget(self.hp34401aTitlelabel, 2, 0, 1, 1) self.frame_5 = QtWidgets.QFrame(HP34401ADialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.frame_5.sizePolicy().hasHeightForWidth()) self.frame_5.setSizePolicy(sizePolicy) self.frame_5.setMinimumSize(QtCore.QSize(0, 900)) self.frame_5.setMaximumSize(QtCore.QSize(700, 900)) self.frame_5.setStyleSheet("background-color: rgb(0, 85, 127);\n" "color: rgb(255, 255, 131);") self.frame_5.setFrameShape(QtWidgets.QFrame.Box) self.frame_5.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_5.setLineWidth(4) self.frame_5.setObjectName("frame_5") self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.frame_5) self.verticalLayout_3.setObjectName("verticalLayout_3") self.frame_8 = QtWidgets.QFrame(self.frame_5) self.frame_8.setMinimumSize(QtCore.QSize(0, 300)) self.frame_8.setFrameShape(QtWidgets.QFrame.Box) self.frame_8.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_8.setLineWidth(2) self.frame_8.setObjectName("frame_8") self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.frame_8) self.verticalLayout_4.setObjectName("verticalLayout_4") self.PlotsettingsLabel = QtWidgets.QLabel(self.frame_8) self.PlotsettingsLabel.setMaximumSize(QtCore.QSize(16777215, 40)) font = QtGui.QFont() font.setPointSize(10) font.setBold(True) font.setWeight(75) self.PlotsettingsLabel.setFont(font) self.PlotsettingsLabel.setObjectName("PlotsettingsLabel") self.verticalLayout_4.addWidget(self.PlotsettingsLabel) self.frame_7 = QtWidgets.QFrame(self.frame_8) self.frame_7.setStyleSheet("background-color: rgb(0, 85, 127);\n" "color: rgb(0, 255, 255);") self.frame_7.setFrameShape(QtWidgets.QFrame.Box) self.frame_7.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_7.setLineWidth(2) self.frame_7.setObjectName("frame_7") self.gridLayout_4 = QtWidgets.QGridLayout(self.frame_7) self.gridLayout_4.setObjectName("gridLayout_4") self.PlotmodeLabel = QtWidgets.QLabel(self.frame_7) self.PlotmodeLabel.setMinimumSize(QtCore.QSize(0, 25)) self.PlotmodeLabel.setObjectName("PlotmodeLabel") self.gridLayout_4.addWidget(self.PlotmodeLabel, 3, 0, 1, 1) self.label_2 = QtWidgets.QLabel(self.frame_7) self.label_2.setObjectName("label_2") self.gridLayout_4.addWidget(self.label_2, 4, 0, 1, 1) self.PlotmodeCombobox = QtWidgets.QComboBox(self.frame_7) self.PlotmodeCombobox.setMinimumSize(QtCore.QSize(100, 25)) self.PlotmodeCombobox.setObjectName("PlotmodeCombobox") self.gridLayout_4.addWidget(self.PlotmodeCombobox, 3, 1, 1, 1) self.scrollwindowcomboBox = QtWidgets.QComboBox(self.frame_7) self.scrollwindowcomboBox.setObjectName("scrollwindowcomboBox") self.gridLayout_4.addWidget(self.scrollwindowcomboBox, 4, 1, 1, 1) spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout_4.addItem(spacerItem2, 5, 1, 1, 1) self.showminmaxcheckBox = QtWidgets.QCheckBox(self.frame_7) self.showminmaxcheckBox.setObjectName("showminmaxcheckBox") self.gridLayout_4.addWidget(self.showminmaxcheckBox, 1, 1, 1, 1) self.plotaveragecheckBox = QtWidgets.QCheckBox(self.frame_7) self.plotaveragecheckBox.setObjectName("plotaveragecheckBox") self.gridLayout_4.addWidget(self.plotaveragecheckBox, 1, 0, 1, 1) self.showdatapointscheckBox = QtWidgets.QCheckBox(self.frame_7) self.showdatapointscheckBox.setChecked(True) self.showdatapointscheckBox.setObjectName("showdatapointscheckBox") self.gridLayout_4.addWidget(self.showdatapointscheckBox, 2, 1, 1, 1) self.verticalLayout_4.addWidget(self.frame_7) spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_4.addItem(spacerItem3) self.savescanpushButton = QtWidgets.QPushButton(self.frame_8) self.savescanpushButton.setObjectName("savescanpushButton") self.verticalLayout_4.addWidget(self.savescanpushButton) self.saveplotButton = QtWidgets.QPushButton(self.frame_8) self.saveplotButton.setObjectName("saveplotButton") self.verticalLayout_4.addWidget(self.saveplotButton) self.verticalLayout_3.addWidget(self.frame_8) self.gridLayout_3.addWidget(self.frame_5, 0, 1, 1, 1, QtCore.Qt.AlignBottom) self.lcdNumber = QtWidgets.QLCDNumber(HP34401ADialog) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.lcdNumber.sizePolicy().hasHeightForWidth()) self.lcdNumber.setSizePolicy(sizePolicy) self.lcdNumber.setMinimumSize(QtCore.QSize(0, 70)) self.lcdNumber.setMaximumSize(QtCore.QSize(800, 90)) self.lcdNumber.setAutoFillBackground(False) self.lcdNumber.setStyleSheet("background-color: rgb(15, 204, 12);") self.lcdNumber.setFrameShape(QtWidgets.QFrame.Box) self.lcdNumber.setFrameShadow(QtWidgets.QFrame.Sunken) self.lcdNumber.setLineWidth(2) self.lcdNumber.setMidLineWidth(2) self.lcdNumber.setSmallDecimalPoint(False) self.lcdNumber.setDigitCount(16) self.lcdNumber.setSegmentStyle(QtWidgets.QLCDNumber.Flat) self.lcdNumber.setObjectName("lcdNumber") self.gridLayout_3.addWidget(self.lcdNumber, 1, 2, 1, 1) self.label_3 = QtWidgets.QLabel(HP34401ADialog) self.label_3.setObjectName("label_3") self.gridLayout_3.addWidget(self.label_3, 2, 1, 1, 1, QtCore.Qt.AlignBottom) self.label = QtWidgets.QLabel(HP34401ADialog) self.label.setObjectName("label") self.gridLayout_3.addWidget(self.label, 1, 1, 1, 1, QtCore.Qt.AlignBottom) self.statustextBrowser.raise_() self.lcdNumber.raise_() self.hp34401aTitlelabel.raise_() self.ExitpushButton.raise_() self.plotWidget.raise_() self.frame_5.raise_() self.label.raise_() self.label_3.raise_() self.frame_3.raise_() self.retranslateUi(HP34401ADialog) QtCore.QMetaObject.connectSlotsByName(HP34401ADialog) def retranslateUi(self, HP34401ADialog): _translate = QtCore.QCoreApplication.translate HP34401ADialog.setWindowTitle( _translate("HP34401ADialog", "HP Agilent 34401A Instrument Module")) self.ExitpushButton.setText(_translate("HP34401ADialog", "Exit")) self.NplcLabel.setText(_translate("HP34401ADialog", "NPLC Cycles")) self.TrigdelayLabel.setText( _translate("HP34401ADialog", "Trigger Delay(0-3600Sec)")) self.AutozeroCombobox.setToolTip( _translate( "HP34401ADialog", "<html><head/><body><p><span style=\" color:#00007f;\">Auto-Zero: Off=NO AZ, On=AZ/sample, Once= Once at Scan Start</span></p></body></html>" )) self.AcbwLabel.setText(_translate("HP34401ADialog", "AC Bandwidth")) self.ImpedanceCombobox.setToolTip( _translate( "HP34401ADialog", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline; color:#00007f;\">Impedance Selector </span></p><p><span style=\" color:#00007f;\">Auto Off Zin=10Mohm all DCV Ranges</span></p><p><span style=\" color:#00007f;\">Auto On Zin=>10Gohm for 100mv, 1v, & 10v DCV Ranges</span></p></body></html>" )) self.AutozeroLabel.setText(_translate("HP34401ADialog", "AutoZero")) self.TrigsrcLabel.setText( _translate("HP34401ADialog", "Trigger Source")) self.ImpedanceLabel.setText(_translate("HP34401ADialog", "Impedance")) self.ResolutionLabel.setText( _translate("HP34401ADialog", "Resolution (V)")) self.scaleLabel_2.setText(_translate("HP34401ADialog", "SETTINGS")) self.RangeLabel.setText(_translate("HP34401ADialog", "Range (V)")) self.FreqapertureLabel.setText( _translate("HP34401ADialog", "Freq Aperture")) self.PeriodapertureLabel.setText( _translate("HP34401ADialog", "Period Aperture")) self.MathLabel.setText(_translate("HP34401ADialog", "Math")) self.sampledisplayLabel.setText( _translate("HP34401ADialog", "TARGET SAMPLES")) self.samplestartpushButton.setText( _translate("HP34401ADialog", "SAMPLING START")) self.samplestoppushButton.setText( _translate("HP34401ADialog", "SAMPLING STOP")) self.TWOpushButton.setText(_translate("HP34401ADialog", "2-wire Ohms")) self.ACIpushButton.setText(_translate("HP34401ADialog", "AC Current")) self.DCVpushButton.setText(_translate("HP34401ADialog", "DC Voltage")) self.ACVpushButton.setText(_translate("HP34401ADialog", "AC Voltage")) self.CONpushButton.setText(_translate("HP34401ADialog", "Continuity")) self.DCIpushButton.setText(_translate("HP34401ADialog", "DC Current")) self.DIOpushButton.setText(_translate("HP34401ADialog", "Diode")) self.FREpushButton.setText(_translate("HP34401ADialog", "Frequency")) self.PERpushButton.setText(_translate("HP34401ADialog", "Period")) self.FWOpushButton.setText(_translate("HP34401ADialog", "4-wire Ohms")) self.hp34401aTitlelabel.setText( _translate("HP34401ADialog", "HP 34401A Instrument")) self.PlotsettingsLabel.setText( _translate("HP34401ADialog", "PLOT SETTINGS")) self.PlotmodeLabel.setText(_translate("HP34401ADialog", "PLOT MODE")) self.label_2.setText(_translate("HP34401ADialog", "SCROLL WINDOW")) self.showminmaxcheckBox.setText( _translate("HP34401ADialog", "SHOW MIN/MAX")) self.plotaveragecheckBox.setText( _translate("HP34401ADialog", "PLOT AVERAGE")) self.showdatapointscheckBox.setText( _translate("HP34401ADialog", "SHOW DATAPOINTS")) self.savescanpushButton.setText( _translate("HP34401ADialog", "SAVE CSV")) self.saveplotButton.setText(_translate("HP34401ADialog", "SAVE PLOT")) self.label_3.setText(_translate("HP34401ADialog", "TextLabel")) self.label.setText(_translate("HP34401ADialog", "TextLabel"))
class Ui_dialog(object): def setupUi(self, dialog): dialog.setObjectName("dialog") dialog.resize(1144, 771) dialog.setWindowOpacity(0.95) self.raytraceView = PlotWidget(dialog) self.raytraceView.setGeometry(QtCore.QRect(40, 40, 512, 512)) self.raytraceView.setFrameShape(QtWidgets.QFrame.WinPanel) self.raytraceView.setFrameShadow(QtWidgets.QFrame.Raised) self.raytraceView.setObjectName("raytraceView") self.sarView = PlotWidget(dialog) self.sarView.setGeometry(QtCore.QRect(590, 40, 512, 512)) self.sarView.setFrameShape(QtWidgets.QFrame.WinPanel) self.sarView.setFrameShadow(QtWidgets.QFrame.Raised) self.sarView.setObjectName("sarView") self.openButton = QtWidgets.QPushButton(dialog) self.openButton.setGeometry(QtCore.QRect(40, 580, 191, 31)) font = QtGui.QFont() font.setPointSize(11) self.openButton.setFont(font) self.openButton.setStyleSheet("") self.openButton.setObjectName("openButton") self.offnadSpinBox = QtWidgets.QDoubleSpinBox(dialog) self.offnadSpinBox.setGeometry(QtCore.QRect(110, 640, 121, 31)) font = QtGui.QFont() font.setPointSize(11) self.offnadSpinBox.setFont(font) self.offnadSpinBox.setMinimum(30.0) self.offnadSpinBox.setMaximum(70.0) self.offnadSpinBox.setSingleStep(5.0) self.offnadSpinBox.setObjectName("offnadSpinBox") self.label_3 = QtWidgets.QLabel(dialog) self.label_3.setGeometry(QtCore.QRect(40, 640, 61, 31)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_3.setFont(font) self.label_3.setObjectName("label_3") self.lineEdit = QtWidgets.QLineEdit(dialog) self.lineEdit.setGeometry(QtCore.QRect(270, 580, 631, 31)) font = QtGui.QFont() font.setPointSize(11) self.lineEdit.setFont(font) self.lineEdit.setObjectName("lineEdit") self.offnadSlider = QtWidgets.QSlider(dialog) self.offnadSlider.setGeometry(QtCore.QRect(250, 640, 411, 31)) self.offnadSlider.setStyleSheet( "QSlider::groove:horizontal {\n" "border: 1px solid #bbb;\n" "background: white;\n" "height: 10px;\n" "border-radius: 4px;\n" "}\n" "\n" "QSlider::sub-page:horizontal {\n" "background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,\n" " stop: 0 #6ee, stop: 1 #bff);\n" "background: qlineargradient(x1: 0, y1: 0.2, x2: 1, y2: 1,\n" " stop: 0 #bee, stop: 1 #5bf);\n" "border: 1px solid #777;\n" "height: 10px;\n" "border-radius: 4px;\n" "}\n" "\n" "QSlider::add-page:horizontal {\n" "background: #555;\n" "border: 1px solid #777;\n" "height: 10px;\n" "border-radius: 4px;\n" "}\n" "\n" "QSlider::handle:horizontal {\n" "background: qlineargradient(x1:0, y1:0, x2:1, y2:1,\n" " stop:0 #eee, stop:1 #ccc);\n" "border: 1px solid #777;\n" "width: 13px;\n" "margin-top: -2px;\n" "margin-bottom: -2px;\n" "border-radius: 4px;\n" "}\n" "\n" "QSlider::handle:horizontal:hover {\n" "background: qlineargradient(x1:0, y1:0, x2:1, y2:1,\n" " stop:0 #fff, stop:1 #ddd);\n" "border: 1px solid #444;\n" "border-radius: 4px;\n" "}\n" "\n" "QSlider::sub-page:horizontal:disabled {\n" "background: #bbb;\n" "border-color: #999;\n" "}\n" "\n" "QSlider::add-page:horizontal:disabled {\n" "background: #eee;\n" "border-color: #999;\n" "}\n" "\n" "QSlider::handle:horizontal:disabled {\n" "background: #eee;\n" "border: 1px solid #aaa;\n" "border-radius: 4px;\n" "}") self.offnadSlider.setMinimum(30) self.offnadSlider.setMaximum(70) self.offnadSlider.setSingleStep(5) self.offnadSlider.setProperty("value", 30) self.offnadSlider.setOrientation(QtCore.Qt.Horizontal) self.offnadSlider.setObjectName("offnadSlider") self.label_4 = QtWidgets.QLabel(dialog) self.label_4.setGeometry(QtCore.QRect(40, 700, 61, 31)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_4.setFont(font) self.label_4.setObjectName("label_4") self.rotateSlider = QtWidgets.QSlider(dialog) self.rotateSlider.setGeometry(QtCore.QRect(250, 700, 411, 31)) self.rotateSlider.setStyleSheet( "QSlider::groove:horizontal {\n" "border: 1px solid #bbb;\n" "background: white;\n" "height: 10px;\n" "border-radius: 4px;\n" "}\n" "\n" "QSlider::sub-page:horizontal {\n" "background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,\n" " stop: 0 #6ee, stop: 1 #bff);\n" "background: qlineargradient(x1: 0, y1: 0.2, x2: 1, y2: 1,\n" " stop: 0 #bee, stop: 1 #5bf);\n" "border: 1px solid #777;\n" "height: 10px;\n" "border-radius: 4px;\n" "}\n" "\n" "QSlider::add-page:horizontal {\n" "background: #555;\n" "border: 1px solid #777;\n" "height: 10px;\n" "border-radius: 4px;\n" "}\n" "\n" "QSlider::handle:horizontal {\n" "background: qlineargradient(x1:0, y1:0, x2:1, y2:1,\n" " stop:0 #eee, stop:1 #ccc);\n" "border: 1px solid #777;\n" "width: 13px;\n" "margin-top: -2px;\n" "margin-bottom: -2px;\n" "border-radius: 4px;\n" "}\n" "\n" "QSlider::handle:horizontal:hover {\n" "background: qlineargradient(x1:0, y1:0, x2:1, y2:1,\n" " stop:0 #fff, stop:1 #ddd);\n" "border: 1px solid #444;\n" "border-radius: 4px;\n" "}\n" "\n" "QSlider::sub-page:horizontal:disabled {\n" "background: #bbb;\n" "border-color: #999;\n" "}\n" "\n" "QSlider::add-page:horizontal:disabled {\n" "background: #eee;\n" "border-color: #999;\n" "}\n" "\n" "QSlider::handle:horizontal:disabled {\n" "background: #eee;\n" "border: 1px solid #aaa;\n" "border-radius: 4px;\n" "}") self.rotateSlider.setMinimum(0) self.rotateSlider.setMaximum(360) self.rotateSlider.setSingleStep(5) self.rotateSlider.setProperty("value", 0) self.rotateSlider.setOrientation(QtCore.Qt.Horizontal) self.rotateSlider.setObjectName("rotateSlider") self.rotateSpinBox = QtWidgets.QDoubleSpinBox(dialog) self.rotateSpinBox.setGeometry(QtCore.QRect(110, 700, 121, 31)) font = QtGui.QFont() font.setPointSize(11) self.rotateSpinBox.setFont(font) self.rotateSpinBox.setMinimum(-5.0) self.rotateSpinBox.setMaximum(360.0) self.rotateSpinBox.setSingleStep(5.0) self.rotateSpinBox.setProperty("value", 0.0) self.rotateSpinBox.setObjectName("rotateSpinBox") self.runSARButton = QtWidgets.QPushButton(dialog) self.runSARButton.setGeometry(QtCore.QRect(910, 700, 191, 31)) font = QtGui.QFont() font.setPointSize(11) self.runSARButton.setFont(font) self.runSARButton.setObjectName("runSARButton") self.label_5 = QtWidgets.QLabel(dialog) self.label_5.setGeometry(QtCore.QRect(750, 640, 61, 31)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_5.setFont(font) self.label_5.setObjectName("label_5") self.scale1SpinBox = QtWidgets.QDoubleSpinBox(dialog) self.scale1SpinBox.setGeometry(QtCore.QRect(820, 640, 81, 31)) font = QtGui.QFont() font.setPointSize(11) self.scale1SpinBox.setFont(font) self.scale1SpinBox.setDecimals(1) self.scale1SpinBox.setMinimum(0.0) self.scale1SpinBox.setMaximum(1000.0) self.scale1SpinBox.setSingleStep(5.0) self.scale1SpinBox.setProperty("value", 80.0) self.scale1SpinBox.setObjectName("scale1SpinBox") self.label_7 = QtWidgets.QLabel(dialog) self.label_7.setGeometry(QtCore.QRect(80, 10, 81, 21)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_7.setFont(font) self.label_7.setObjectName("label_7") self.label_8 = QtWidgets.QLabel(dialog) self.label_8.setGeometry(QtCore.QRect(630, 10, 81, 21)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_8.setFont(font) self.label_8.setObjectName("label_8") self.sarUpView = PlotWidget(dialog) self.sarUpView.setGeometry(QtCore.QRect(591, 41, 181, 181)) self.sarUpView.setFrameShape(QtWidgets.QFrame.Box) self.sarUpView.setFrameShadow(QtWidgets.QFrame.Raised) self.sarUpView.setLineWidth(2) self.sarUpView.setObjectName("sarUpView") self.runRayTraceButton = QtWidgets.QPushButton(dialog) self.runRayTraceButton.setGeometry(QtCore.QRect(710, 700, 191, 31)) font = QtGui.QFont() font.setPointSize(11) self.runRayTraceButton.setFont(font) self.runRayTraceButton.setObjectName("runRayTraceButton") self.label = QtWidgets.QLabel(dialog) self.label.setGeometry(QtCore.QRect(555, 245, 31, 101)) self.label.setText("") self.label.setPixmap(QtGui.QPixmap("arrow.png")) self.label.setScaledContents(True) self.label.setObjectName("label") self.label_2 = QtWidgets.QLabel(dialog) self.label_2.setGeometry(QtCore.QRect(910, 740, 231, 31)) self.label_2.setText("") self.label_2.setPixmap(QtGui.QPixmap("ashida.png")) self.label_2.setScaledContents(True) self.label_2.setObjectName("label_2") self.stepLabel = QtWidgets.QLabel(dialog) self.stepLabel.setGeometry(QtCore.QRect(960, 580, 121, 111)) self.stepLabel.setText("") self.stepLabel.setPixmap(QtGui.QPixmap("step0.png")) self.stepLabel.setScaledContents(True) self.stepLabel.setObjectName("stepLabel") self.label_6 = QtWidgets.QLabel(dialog) self.label_6.setGeometry(QtCore.QRect(1068, 518, 60, 60)) self.label_6.setText("") self.label_6.setPixmap(QtGui.QPixmap("edge2.png")) self.label_6.setScaledContents(True) self.label_6.setObjectName("label_6") self.label_9 = QtWidgets.QLabel(dialog) self.label_9.setGeometry(QtCore.QRect(518, 518, 60, 60)) self.label_9.setText("") self.label_9.setPixmap(QtGui.QPixmap("edge2.png")) self.label_9.setScaledContents(True) self.label_9.setObjectName("label_9") self.label_10 = QtWidgets.QLabel(dialog) self.label_10.setGeometry(QtCore.QRect(15, 15, 60, 60)) self.label_10.setText("") self.label_10.setPixmap(QtGui.QPixmap("edge1.png")) self.label_10.setScaledContents(True) self.label_10.setObjectName("label_10") self.label_11 = QtWidgets.QLabel(dialog) self.label_11.setGeometry(QtCore.QRect(565, 15, 60, 60)) self.label_11.setText("") self.label_11.setPixmap(QtGui.QPixmap("edge1.png")) self.label_11.setScaledContents(True) self.label_11.setObjectName("label_11") self.label_12 = QtWidgets.QLabel(dialog) self.label_12.setGeometry(QtCore.QRect(0, 710, 31, 60)) self.label_12.setText("") self.label_12.setPixmap(QtGui.QPixmap("edge3.png")) self.label_12.setScaledContents(True) self.label_12.setObjectName("label_12") self.label_13 = QtWidgets.QLabel(dialog) self.label_13.setGeometry(QtCore.QRect(0, 580, 1141, 191)) self.label_13.setText("") self.label_13.setPixmap(QtGui.QPixmap("line2.png")) self.label_13.setScaledContents(True) self.label_13.setObjectName("label_13") self.label_14 = QtWidgets.QLabel(dialog) self.label_14.setGeometry(QtCore.QRect(170, 15, 381, 21)) self.label_14.setText("") self.label_14.setPixmap(QtGui.QPixmap("bar.png")) self.label_14.setScaledContents(True) self.label_14.setObjectName("label_14") self.label_15 = QtWidgets.QLabel(dialog) self.label_15.setGeometry(QtCore.QRect(720, 15, 381, 21)) self.label_15.setText("") self.label_15.setPixmap(QtGui.QPixmap("bar.png")) self.label_15.setScaledContents(True) self.label_15.setObjectName("label_15") self.label_16 = QtWidgets.QLabel(dialog) self.label_16.setGeometry(QtCore.QRect(0, 80, 41, 621)) self.label_16.setText("") self.label_16.setPixmap(QtGui.QPixmap("line.png")) self.label_16.setScaledContents(True) self.label_16.setObjectName("label_16") self.label_17 = QtWidgets.QLabel(dialog) self.label_17.setGeometry(QtCore.QRect(1100, 40, 41, 471)) self.label_17.setText("") self.label_17.setPixmap(QtGui.QPixmap("line.png")) self.label_17.setScaledContents(True) self.label_17.setObjectName("label_17") self.label_13.raise_() self.label_16.raise_() self.label_17.raise_() self.label_12.raise_() self.label_11.raise_() self.label_10.raise_() self.label_9.raise_() self.label_6.raise_() self.raytraceView.raise_() self.sarView.raise_() self.openButton.raise_() self.offnadSpinBox.raise_() self.label_3.raise_() self.offnadSlider.raise_() self.rotateSlider.raise_() self.rotateSpinBox.raise_() self.runSARButton.raise_() self.label_5.raise_() self.scale1SpinBox.raise_() self.label_7.raise_() self.label_8.raise_() self.sarUpView.raise_() self.runRayTraceButton.raise_() self.label.raise_() self.label_2.raise_() self.stepLabel.raise_() self.lineEdit.raise_() self.label_4.raise_() self.label_14.raise_() self.label_15.raise_() self.retranslateUi(dialog) QtCore.QMetaObject.connectSlotsByName(dialog) def retranslateUi(self, dialog): _translate = QtCore.QCoreApplication.translate dialog.setWindowTitle(_translate("dialog", "SAR simulator")) self.openButton.setText(_translate("dialog", "1.Open")) self.label_3.setText(_translate("dialog", "Offnadir")) self.lineEdit.setText(_translate("dialog", "c130.obj")) self.label_4.setText(_translate("dialog", "Rotate")) self.runSARButton.setText(_translate("dialog", "3.Run SAR")) self.label_5.setText(_translate("dialog", "Scale")) self.label_7.setText(_translate("dialog", "Ray Trace")) self.label_8.setText(_translate("dialog", "SAR")) self.runRayTraceButton.setText(_translate("dialog", "2.Run Ray Trace"))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(993, 692) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.verticalLayout_2 = QtGui.QVBoxLayout(self.centralwidget) self.verticalLayout_2.setContentsMargins(10, 10, 10, 10) self.verticalLayout_2.setSpacing(10) self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) self.frame_4 = QtGui.QFrame(self.centralwidget) self.frame_4.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_4.setFrameShadow(QtGui.QFrame.Raised) self.frame_4.setObjectName(_fromUtf8("frame_4")) self.horizontalLayout = QtGui.QHBoxLayout(self.frame_4) self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.horizontalLayout.setSpacing(0) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.label_3 = QtGui.QLabel(self.frame_4) font = QtGui.QFont() font.setPointSize(12) font.setBold(True) font.setWeight(75) self.label_3.setFont(font) self.label_3.setObjectName(_fromUtf8("label_3")) self.horizontalLayout.addWidget(self.label_3) self.label_4 = QtGui.QLabel(self.frame_4) self.label_4.setEnabled(True) self.label_4.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) self.label_4.setObjectName(_fromUtf8("label_4")) self.horizontalLayout.addWidget(self.label_4) spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem) self.btnSite = QtGui.QPushButton(self.frame_4) self.btnSite.setStyleSheet(_fromUtf8("color: rgb(0, 0, 255);")) self.btnSite.setCheckable(False) self.btnSite.setFlat(True) self.btnSite.setObjectName(_fromUtf8("btnSite")) self.horizontalLayout.addWidget(self.btnSite) self.verticalLayout_2.addWidget(self.frame_4) self.frame_5 = QtGui.QFrame(self.centralwidget) self.frame_5.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_5.setFrameShadow(QtGui.QFrame.Raised) self.frame_5.setObjectName(_fromUtf8("frame_5")) self.horizontalLayout_3 = QtGui.QHBoxLayout(self.frame_5) self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_3.setSpacing(0) self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3")) self.lblDevice = QtGui.QLabel(self.frame_5) self.lblDevice.setEnabled(False) self.lblDevice.setObjectName(_fromUtf8("lblDevice")) self.horizontalLayout_3.addWidget(self.lblDevice) spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem1) self.verticalLayout_2.addWidget(self.frame_5) self.frame = QtGui.QFrame(self.centralwidget) self.frame.setFrameShape(QtGui.QFrame.NoFrame) self.frame.setFrameShadow(QtGui.QFrame.Plain) self.frame.setObjectName(_fromUtf8("frame")) self.verticalLayout = QtGui.QVBoxLayout(self.frame) self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.verticalLayout.setSpacing(10) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.frame_2 = QtGui.QFrame(self.frame) self.frame_2.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_2.setFrameShadow(QtGui.QFrame.Raised) self.frame_2.setObjectName(_fromUtf8("frame_2")) self.horizontalLayout_2 = QtGui.QHBoxLayout(self.frame_2) self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) self.chkInvert = QtGui.QCheckBox(self.frame_2) self.chkInvert.setObjectName(_fromUtf8("chkInvert")) self.horizontalLayout_2.addWidget(self.chkInvert) self.chkAutoscale = QtGui.QCheckBox(self.frame_2) self.chkAutoscale.setChecked(True) self.chkAutoscale.setObjectName(_fromUtf8("chkAutoscale")) self.horizontalLayout_2.addWidget(self.chkAutoscale) self.line = QtGui.QFrame(self.frame_2) self.line.setFrameShape(QtGui.QFrame.VLine) self.line.setFrameShadow(QtGui.QFrame.Sunken) self.line.setObjectName(_fromUtf8("line")) self.horizontalLayout_2.addWidget(self.line) self.label_2 = QtGui.QLabel(self.frame_2) 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.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_2.setObjectName(_fromUtf8("label_2")) self.horizontalLayout_2.addWidget(self.label_2) self.spinLowpass = QtGui.QSpinBox(self.frame_2) self.spinLowpass.setPrefix(_fromUtf8("")) self.spinLowpass.setMinimum(0) self.spinLowpass.setMaximum(999999) self.spinLowpass.setSingleStep(1) self.spinLowpass.setProperty("value", 45) self.spinLowpass.setObjectName(_fromUtf8("spinLowpass")) self.horizontalLayout_2.addWidget(self.spinLowpass) self.label_5 = QtGui.QLabel(self.frame_2) 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.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_5.setObjectName(_fromUtf8("label_5")) self.horizontalLayout_2.addWidget(self.label_5) self.lineTitle = QtGui.QLineEdit(self.frame_2) self.lineTitle.setObjectName(_fromUtf8("lineTitle")) self.horizontalLayout_2.addWidget(self.lineTitle) self.line_2 = QtGui.QFrame(self.frame_2) self.line_2.setFrameShape(QtGui.QFrame.VLine) self.line_2.setFrameShadow(QtGui.QFrame.Sunken) self.line_2.setObjectName(_fromUtf8("line_2")) self.horizontalLayout_2.addWidget(self.line_2) self.btnPause = QtGui.QPushButton(self.frame_2) self.btnPause.setCheckable(True) self.btnPause.setObjectName(_fromUtf8("btnPause")) self.horizontalLayout_2.addWidget(self.btnPause) self.btnSave = QtGui.QPushButton(self.frame_2) self.btnSave.setObjectName(_fromUtf8("btnSave")) self.horizontalLayout_2.addWidget(self.btnSave) self.verticalLayout.addWidget(self.frame_2) self.frame_3 = QtGui.QFrame(self.frame) self.frame_3.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_3.setFrameShadow(QtGui.QFrame.Plain) self.frame_3.setObjectName(_fromUtf8("frame_3")) self.verticalLayout_3 = QtGui.QVBoxLayout(self.frame_3) self.verticalLayout_3.setContentsMargins(0, 0, 0, 0) self.verticalLayout_3.setSpacing(0) self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3")) self.grECG = PlotWidget(self.frame_3) self.grECG.setFrameShape(QtGui.QFrame.NoFrame) self.grECG.setFrameShadow(QtGui.QFrame.Plain) self.grECG.setLineWidth(0) self.grECG.setObjectName(_fromUtf8("grECG")) self.verticalLayout_3.addWidget(self.grECG) self.verticalLayout.addWidget(self.frame_3) self.verticalLayout_2.addWidget(self.frame) MainWindow.setCentralWidget(self.centralwidget) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(_translate("MainWindow", "diyECG", None)) self.label_3.setText(_translate("MainWindow", "diyECG", None)) self.label_4.setText( _translate( "MainWindow", " open-source live soundcard monitor with realtime iFFT filtering by Scott Harden", None)) self.btnSite.setText(_translate("MainWindow", "www.SWHarden.com", None)) self.lblDevice.setText( _translate( "MainWindow", "!!! ERROR !!! no valid input sound devices found. Plug in a microphone and restart this program!", None)) self.chkInvert.setText(_translate("MainWindow", "invert", None)) self.chkAutoscale.setText(_translate("MainWindow", "autoscale", None)) self.label_2.setText(_translate("MainWindow", "lowpass:"******"MainWindow", "set to 0 to disable", None)) self.spinLowpass.setSuffix(_translate("MainWindow", " Hz", None)) self.label_5.setText(_translate("MainWindow", "title:", None)) self.lineTitle.setText(_translate("MainWindow", "DIY ECG", None)) self.btnPause.setText(_translate("MainWindow", "Pause", None)) self.btnSave.setText(_translate("MainWindow", "Save Figure", None))
def addPlotTab(self, tabwidget, *args, **kwargs): ''' EDIT TAB WIDGET PROPERTIES ''' tabwidget.setTabsClosable(True) tabwidget.setMovable(True) tabwidget.setTabBarAutoHide(False) tabnum = tabwidget.count() + 1 ''' CREATE THE NEW TAB ''' newtab = QtWidgets.QWidget() tabname = f'StoredDataTab{tabnum}' ''' CREATE THE LAYOUTS ''' layout = QtWidgets.QGridLayout(newtab) layout.setContentsMargins(4, 6, 4, 4) layout.setHorizontalSpacing(6) layout.setVerticalSpacing(0) topleftlayout = QtWidgets.QGridLayout(newtab) topleftlayout.setContentsMargins(0, 0, -1, -1) topleftlayout.setSpacing(0) topcenterlayout = QtWidgets.QGridLayout() toprightlayout = QtWidgets.QGridLayout() toprightlayout.setContentsMargins(-1, 0, -1, -1) toprightlayout.setSpacing(0) ''' ADDING THE FREQUENCY LABEL ''' freqlabel = QtWidgets.QLabel(newtab) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(freqlabel.sizePolicy().hasHeightForWidth()) freqlabel.setSizePolicy(sizePolicy) freqlabel.setPalette(standardPalette()) freqlabel.setMouseTracking(True) freqlabel.setText('') freqlabel.setMinimumSize(QtCore.QSize(90, 0)) freqlabelname = f'{tabname}FreqLabel' freqlabel.setObjectName(freqlabelname) freqlabel.setAlignment(QtCore.Qt.AlignCenter) freqlabel.setIndent(6) topleftlayout.addWidget(freqlabel, 0, 0, 1, 1) layout.addLayout(topleftlayout, 0, 0, 1, 1) ''' ADDING THE NUMBER OF PEAKS LABEL ''' numpeakslabel = QtWidgets.QLabel(newtab) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( numpeakslabel.sizePolicy().hasHeightForWidth()) numpeakslabel.setSizePolicy(sizePolicy) numpeakslabel.setMaximumSize(QtCore.QSize(60, 16777215)) numpeakslabel.setPalette(standardPalette()) font = QtGui.QFont() font.setFamily("Bahnschrift SemiLight") font.setPointSize(11) font.setBold(False) font.setItalic(False) font.setWeight(50) numpeakslabel.setFont(font) numpeakslabel.setText('Peaks:') numpeakslabel.setMouseTracking(True) numpeakslabel.setAlignment(QtCore.Qt.AlignCenter) numpeakslabel.setIndent(0) numpeakslabel.setObjectName("numpeaks1Label") topcenterlayout.addWidget(numpeakslabel, 0, 0, 1, 1) ''' SET UP THE SPINBOX FOR NUMBER OF PEAKS ''' numpeaks = QtWidgets.QSpinBox(newtab) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(numpeaks.sizePolicy().hasHeightForWidth()) numpeaks.setSizePolicy(sizePolicy) numpeaks.setMaximumSize(QtCore.QSize(16777215, 16777215)) numpeaks.setPalette(spinboxPalette()) font = QtGui.QFont() font.setFamily('Bahnschrift SemiLight') font.setPointSize(11) font.setBold(False) font.setItalic(False) font.setWeight(50) numpeaks.setFont(font) numpeaks.setMouseTracking(True) numpeaks.setWrapping(False) numpeaks.setFrame(True) numpeaks.setAlignment(QtCore.Qt.AlignCenter) numpeaks.setButtonSymbols(QtWidgets.QAbstractSpinBox.UpDownArrows) numpeaks.setKeyboardTracking(False) numpeaks.setMinimum(1) numpeaks.setMaximum(99) numpeaks.setProperty('value', 10) numpeaksname = f'{tabname}NumPeaks' numpeaks.setObjectName(numpeaksname) topcenterlayout.addWidget(numpeaks, 0, 1, 1, 1) layout.addLayout(topcenterlayout, 0, 1, 1, 1) # Connect the spinbox the the manual frequency calculation function numpeaks.valueChanged.connect(lambda: guifuncs.manualFreqCalc(self, axes)) ''' ADDING THE T = LABEL ''' tequals = QtWidgets.QLabel(newtab) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(tequals.sizePolicy().hasHeightForWidth()) tequals.setSizePolicy(sizePolicy) tequals.setMinimumSize(QtCore.QSize(45, 0)) tequals.setText('') tequalsname = f'{tabname}TEqualsLabel' tequals.setObjectName(tequalsname) tequals.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) toprightlayout.addWidget(tequals, 0, 0, 1, 1) layout.addLayout(toprightlayout, 0, 2, 1, 1) ''' LABEL TO DISPLAY CURSOR POSITION ''' tlabel = QtWidgets.QLabel(newtab) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(tlabel.sizePolicy().hasHeightForWidth()) tlabel.setSizePolicy(sizePolicy) tlabel.setMinimumSize(QtCore.QSize(45, 0)) tlabel.setPalette(standardPalette()) tlabel.setMouseTracking(True) tlabel.setText('') tlabelname = f'{tabname}TLabel' tlabel.setObjectName(tlabelname) tlabel.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) tlabel.setIndent(-1) toprightlayout.addWidget(tlabel, 0, 1, 1, 1) ''' ADDING THE PLOT WIDGET ''' axes = PlotWidget(newtab) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHeightForWidth(axes.sizePolicy().hasHeightForWidth()) axes.setSizePolicy(sizePolicy) axes.setPalette(standardPalette()) axes.setFrameShape(QtWidgets.QFrame.NoFrame) axes.setMouseTracking(True) axes_name = f'{tabname}Axes' axes.setObjectName(axes_name) tabwidget.addTab(newtab, '') tabnum_txt = str(tabnum).zfill(2) tabtext = f'Data {tabnum_txt}' tabwidget.setTabText(tabwidget.indexOf(newtab), tabtext) axes.setPalette(standardPalette()) layout.addWidget(axes, 1, 0, 1, 3) return axes