Ejemplo n.º 1
0
class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(386, 376)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.graphicsView = PlotWidget(self.centralwidget)
        self.graphicsView.setGeometry(QtCore.QRect(10, 20, 361, 261))
        self.graphicsView.setObjectName(_fromUtf8("graphicsView"))
        self.pushButton = QtGui.QPushButton(self.centralwidget)
        self.pushButton.setGeometry(QtCore.QRect(280, 290, 95, 31))
        self.pushButton.setObjectName(_fromUtf8("pushButton"))
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 386, 27))
        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.QObject.connect(self.pushButton, QtCore.SIGNAL(_fromUtf8("clicked()")), MainWindow.close)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None))
        self.pushButton.setText(_translate("MainWindow", "Salir", None))
Ejemplo n.º 2
0
class Example(QtGui.QWidget):
    
    def __init__(self):
        super(Example, self).__init__()        
        self.initUI()


        self.current_y = 0

        self.timer = QtCore.QTimer()
        self.timer.timeout.connect(self.update_plot)
        self.timer.setInterval(1000/FREQ)
        self.timer.start()
        
        
    def initUI(self):
        
        self.setGeometry(300, 300, 1000, 1000)
        self.setWindowTitle('Icon')
        self.setWindowIcon(QtGui.QIcon('web.png'))



        self.plot = PlotWidget(self, axisItems={'bottom': TimeAxisItem(orientation='bottom')})
        self.plot.resize(900, 900)
        self.curve = self.plot.plot(x, ys[0])
        #self.curve.attach(self.plot)
        self.show()

    def update_plot(self):
        self.curve.setData(x, ys[self.current_y])
        self.current_y = (self.current_y + 1) % YS
class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(400, 300)
        self.gridLayout = QtGui.QGridLayout(Form)
        self.gridLayout.setObjectName("gridLayout")
        self.sizeSpin = QtGui.QSpinBox(Form)
        self.sizeSpin.setProperty("value", 10)
        self.sizeSpin.setObjectName("sizeSpin")
        self.gridLayout.addWidget(self.sizeSpin, 1, 1, 1, 1)
        self.pixelModeCheck = QtGui.QCheckBox(Form)
        self.pixelModeCheck.setObjectName("pixelModeCheck")
        self.gridLayout.addWidget(self.pixelModeCheck, 1, 3, 1, 1)
        self.label = QtGui.QLabel(Form)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
        self.plot = PlotWidget(Form)
        self.plot.setObjectName("plot")
        self.gridLayout.addWidget(self.plot, 0, 0, 1, 4)
        self.randCheck = QtGui.QCheckBox(Form)
        self.randCheck.setObjectName("randCheck")
        self.gridLayout.addWidget(self.randCheck, 1, 2, 1, 1)

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

    def retranslateUi(self, Form):
        Form.setWindowTitle(QtGui.QApplication.translate("Form", "Form", None, QtGui.QApplication.UnicodeUTF8))
        self.pixelModeCheck.setText(QtGui.QApplication.translate("Form", "pixel mode", None, QtGui.QApplication.UnicodeUTF8))
        self.label.setText(QtGui.QApplication.translate("Form", "Size", None, QtGui.QApplication.UnicodeUTF8))
        self.randCheck.setText(QtGui.QApplication.translate("Form", "Randomize", None, QtGui.QApplication.UnicodeUTF8))
Ejemplo n.º 4
0
class Ui_MainWindow(object):

    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(800, 600)
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Arial"))
        MainWindow.setFont(font)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.gridLayout = QtGui.QGridLayout(self.centralwidget)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.pushButton = QtGui.QPushButton(self.centralwidget)
        self.pushButton.setObjectName(_fromUtf8("pushButton"))
        self.gridLayout.addWidget(self.pushButton, 0, 0, 1, 1)
        self.plot = PlotWidget(self.centralwidget)
        self.plot.setObjectName(_fromUtf8("graphicsView"))
        self.gridLayout.addWidget(self.plot, 1, 0, 1, 1)
        MainWindow.setCentralWidget(self.centralwidget)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        MainWindow.setStatusBar(self.statusbar)

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

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(_translate("MainWindow", "BTI Plot Test", None))
        self.pushButton.setText(_translate("MainWindow", "Start Listening (settings in bti.py)", None))
 def __init__(self, parent=None, scale_min=0, scale_max=1, steps=0.1, title='None'):
     setConfigOption('background', 'w')
     PlotWidget.__init__(self,  parent, enableMenu=False, border=False, title=title)
     self.range_ = arange(scale_min, scale_max, steps)
     self.curve = self.plot(self.range_, zeros([len(self.range_)]), clear=False, pen='b')
     # self.curve2 = self.plot(self.range_, zeros([len(self.range_)]) + 0.5, clear=False, pen='r')
     self.disableAutoRange()
     self.setRange(xRange=(scale_min, scale_max))
Ejemplo n.º 6
0
class Example(QtGui.QWidget):
    def __init__(self):
        super(Example, self).__init__()        
        self.setGeometry(300, 300, 400, 400)
        self.plot = PlotWidget(self, axisItems={'bottom': TimeAxisItem(orientation='bottom')})
        self.plot.resize(300, 300)
        self.curve = self.plot.plot(np.linspace(0, 10, 100), np.random.random(100))
        self.show()
Ejemplo n.º 7
0
    def setupUi(self, mainWindow):
        mainWindow.setObjectName(_fromUtf8("mainWindow"))
        mainWindow.resize(1200, 800)
        self.centralwidget = QtGui.QWidget(mainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.gridLayout = QtGui.QGridLayout(self.centralwidget)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.verticalLayout0 = QtGui.QVBoxLayout()
        self.verticalLayout0.setObjectName(_fromUtf8("verticalLayout0"))
        self.splitter0 = QtGui.QSplitter(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(self.splitter0.sizePolicy().hasHeightForWidth())
        self.splitter0.setSizePolicy(sizePolicy)
        self.splitter0.setOrientation(QtCore.Qt.Horizontal)
        self.splitter0.setObjectName(_fromUtf8("splitter0"))
        self.imageView = ImageView(self.splitter0)
        self.imageView.setObjectName(_fromUtf8("imageView"))
        self.splitter1 = QtGui.QSplitter(self.splitter0)
        self.splitter1.setOrientation(QtCore.Qt.Vertical)
        self.splitter1.setObjectName(_fromUtf8("splitter1"))
        self.hitRatePlotWidget = PlotWidget(self.splitter1)
        self.hitRatePlotWidget.setObjectName(_fromUtf8("hitRatePlotWidget"))
        self.saturationPlotViewer = PlotWidget(self.splitter1)
        self.saturationPlotViewer.setObjectName(_fromUtf8("saturationPlotViewer"))
        self.verticalLayout0.addWidget(self.splitter0)
        self.horizontalLayout0 = QtGui.QHBoxLayout()
        self.horizontalLayout0.setObjectName(_fromUtf8("horizontalLayout0"))
        self.resetPeaksButton = QtGui.QPushButton(self.centralwidget)
        self.resetPeaksButton.setObjectName(_fromUtf8("resetPeaksButton"))
        self.horizontalLayout0.addWidget(self.resetPeaksButton)
        self.resetPlotsButton = QtGui.QPushButton(self.centralwidget)
        self.resetPlotsButton.setObjectName(_fromUtf8("resetPlotsButton"))
        self.horizontalLayout0.addWidget(self.resetPlotsButton)
        self.delayLabel = QtGui.QLabel(self.centralwidget)
        self.delayLabel.setObjectName(_fromUtf8("delayLabel"))
        self.horizontalLayout0.addWidget(self.delayLabel)
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout0.addItem(spacerItem)
        self.resolutionRingsCheckBox = QtGui.QCheckBox(self.centralwidget)
        self.resolutionRingsCheckBox.setObjectName(_fromUtf8("resolutionRingsCheckBox"))
        self.horizontalLayout0.addWidget(self.resolutionRingsCheckBox)
        self.resolutionRingsLineEdit = QtGui.QLineEdit(self.centralwidget)
        self.resolutionRingsLineEdit.setObjectName(_fromUtf8("resolutionRingsLineEdit"))
        self.horizontalLayout0.addWidget(self.resolutionRingsLineEdit)
        self.accumulatedPeaksCheckBox = QtGui.QCheckBox(self.centralwidget)
        self.accumulatedPeaksCheckBox.setObjectName(_fromUtf8("accumulatedPeaksCheckBox"))
        self.horizontalLayout0.addWidget(self.accumulatedPeaksCheckBox)
        self.verticalLayout0.addLayout(self.horizontalLayout0)
        self.gridLayout.addLayout(self.verticalLayout0, 0, 0, 1, 1)
        mainWindow.setCentralWidget(self.centralwidget)
        self.statusbar = QtGui.QStatusBar(mainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        mainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(mainWindow)
        QtCore.QMetaObject.connectSlotsByName(mainWindow)
Ejemplo n.º 8
0
    def draw_right_part(self):
        rightPart = QtGui.QVBoxLayout()

        from pyqtgraph import PlotWidget
        pl = PlotWidget()
        self.plotU = pl.plot(pen=(255, 0, 0))

        rightPart.addWidget(pl)

        self.menuLayout = QtGui.QGridLayout()

        temp = QtGui.QHBoxLayout()
        templabel = QtGui.QLabel(u'  COM порт №    ')
        self.text_COM_number = QtGui.QLineEdit()
        temp.addWidget(templabel)
        temp.addWidget(self.text_COM_number)

        self.button_setCOM = QtGui.QPushButton(u'Выбрать')
        self.button_setCOM.clicked.connect(self.button_setCOM_pressed)
        temp.addWidget(self.button_setCOM)
        temp.addStretch(1)

        #self.menuLayout.addWidget(self.button_setCOM, 0, 1)#, alignment=1)
        self.menuLayout.addLayout(temp,0,0)

        temp = QtGui.QHBoxLayout()
        self.button_hardware = QtGui.QPushButton(u'Старт платформы')
        self.button_hardware.clicked.connect(self.button_hardware_pressed)
        temp.addWidget(self.button_hardware)
        #self.menuLayout.addWidget(self.button_hardware, 1, 0)#, alignment=1)

        self.button_watch = QtGui.QPushButton(u'Начать просмотр')
        self.button_watch.clicked.connect(self.button_watch_pressed)
        temp.addWidget(self.button_watch)

        self.button_record = QtGui.QPushButton(u' Начать запись ')
        self.button_record.clicked.connect(self.button_record_pressed)
        temp.addWidget(self.button_record)
        temp.addStretch(1)

        self.menuLayout.addLayout(temp, 1,0)#Widget(self.button_watch, 1, 1)#, alignment=1)

        self.menuLayout.addLayout(self.build_parameters_menu(), 2, 0)

        temp = QtGui.QHBoxLayout()
        temp.insertSpacing(-1, 10)
        self.string_message = QtGui.QLineEdit()
        temp.addWidget(self.string_message)

        self.button_send_string = QtGui.QPushButton(u'Отправить строку')
        self.button_send_string.clicked.connect(self.button_send_string_pressed)
        temp.addWidget(self.button_send_string)
        temp.insertStretch(-1, 1)
        self.menuLayout.addLayout(temp, 3, 0)#, alignment=1)

        rightPart.addLayout(self.menuLayout)

        self.parts[1].setLayout(rightPart)
Ejemplo n.º 9
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(1341, 925)
        MainWindow.setFocusPolicy(QtCore.Qt.NoFocus)
        MainWindow.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu)
        MainWindow.setStyleSheet(_fromUtf8("background-color: rgb(60,60,60); QMenuBar{ background-color: rgb(60,60,60)} QMenuBar::Item{background: transparent}; QMenu::Item{background-color: rgb(60,60,60)}; QPushButton{background-color: rgb(A4,A4,A4)};\n"
""))
        MainWindow.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.USVirginIslands))
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setStyleSheet(_fromUtf8("background-color: rgb(60,60,60)"))
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.pltView1 = PlotWidget(self.centralwidget)
        self.pltView1.setGeometry(QtCore.QRect(40, 10, 401, 451))
        self.pltView1.setObjectName(_fromUtf8("pltView1"))
        self.ImageView1 = ImageView(self.centralwidget)
        self.ImageView1.setGeometry(QtCore.QRect(40, 480, 611, 361))
        self.ImageView1.setObjectName(_fromUtf8("ImageView1"))
        self.ImageView2 = ImageView(self.centralwidget)
        self.ImageView2.setGeometry(QtCore.QRect(670, 480, 651, 361))
        self.ImageView2.setObjectName(_fromUtf8("ImageView2"))
        self.updateBtn = QtGui.QPushButton(self.centralwidget)
        self.updateBtn.setGeometry(QtCore.QRect(40, 850, 75, 23))
        self.updateBtn.setStyleSheet(_fromUtf8("background-color: rgb(117, 117, 117);"))
        self.updateBtn.setObjectName(_fromUtf8("updateBtn"))
        self.pltView2 = PlotWidget(self.centralwidget)
        self.pltView2.setGeometry(QtCore.QRect(460, 10, 441, 451))
        self.pltView2.setObjectName(_fromUtf8("pltView2"))
        self.ImageView3 = ImageView(self.centralwidget)
        self.ImageView3.setGeometry(QtCore.QRect(920, 10, 401, 451))
        self.ImageView3.setObjectName(_fromUtf8("ImageView3"))
        self.openBtn = QtGui.QPushButton(self.centralwidget)
        self.openBtn.setGeometry(QtCore.QRect(130, 850, 75, 23))
        self.openBtn.setStyleSheet(_fromUtf8("background-color: rgb(117, 117, 117);"))
        self.openBtn.setObjectName(_fromUtf8("openBtn"))
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1341, 21))
        font = QtGui.QFont()
        font.setStyleStrategy(QtGui.QFont.PreferAntialias)
        self.menubar.setFont(font)
        self.menubar.setAutoFillBackground(False)
        self.menubar.setStyleSheet(_fromUtf8(""))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        self.menuFile = QtGui.QMenu(self.menubar)
        self.menuFile.setStyleSheet(_fromUtf8("background-color: rgb(97, 97, 97);"))
        self.menuFile.setObjectName(_fromUtf8("menuFile"))
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        MainWindow.setStatusBar(self.statusbar)
        self.actionExit = QtGui.QAction(MainWindow)
        self.actionExit.setObjectName(_fromUtf8("actionExit"))
        self.menuFile.addAction(self.actionExit)
        self.menubar.addAction(self.menuFile.menuAction())

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Ejemplo n.º 10
0
class Ui_Dialog(object):
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(800, 450)
        self.verticalLayout = QtWidgets.QVBoxLayout(Dialog)
        self.verticalLayout.setObjectName("verticalLayout")
        self.widget = QtWidgets.QWidget(Dialog)
        self.widget.setObjectName("widget")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.widget)
        self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.widget_3 = QtWidgets.QWidget(self.widget)
        self.widget_3.setObjectName("widget_3")
        self.label = QtWidgets.QLabel(self.widget_3)
        self.label.setGeometry(QtCore.QRect(30, 340, 67, 17))
        self.label.setObjectName("label")
        self.label_2 = QtWidgets.QLabel(self.widget_3)
        self.label_2.setGeometry(QtCore.QRect(20, 0, 67, 17))
        self.label_2.setObjectName("label_2")
        self.lineEdit = QtWidgets.QLineEdit(self.widget_3)
        self.lineEdit.setGeometry(QtCore.QRect(10, 30, 113, 27))
        self.lineEdit.setObjectName("lineEdit")
        self.horizontalLayout_2.addWidget(self.widget_3)
        self.graphicsView = PlotWidget(self.widget)
        self.graphicsView.setMaximumSize(QtCore.QSize(640, 16777215))
        self.graphicsView.setObjectName("graphicsView")
        self.horizontalLayout_2.addWidget(self.graphicsView)
        self.verticalLayout.addWidget(self.widget)
        self.widget_2 = QtWidgets.QWidget(Dialog)
        self.widget_2.setMaximumSize(QtCore.QSize(16777215, 30))
        self.widget_2.setObjectName("widget_2")
        self.horizontalLayout = QtWidgets.QHBoxLayout(self.widget_2)
        self.horizontalLayout.setContentsMargins(100, 0, 100, 0)
        self.horizontalLayout.setSpacing(100)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.pushButton = QtWidgets.QPushButton(self.widget_2)
        self.pushButton.setObjectName("pushButton")
        self.horizontalLayout.addWidget(self.pushButton)
        self.pushButton_3 = QtWidgets.QPushButton(self.widget_2)
        self.pushButton_3.setObjectName("pushButton_3")
        self.horizontalLayout.addWidget(self.pushButton_3)
        self.pushButton_2 = QtWidgets.QPushButton(self.widget_2)
        self.pushButton_2.setObjectName("pushButton_2")
        self.horizontalLayout.addWidget(self.pushButton_2)
        self.verticalLayout.addWidget(self.widget_2)

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

    def retranslateUi(self, Dialog):
        _translate = QtCore.QCoreApplication.translate
        Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
        self.label.setText(_translate("Dialog", "TextLabel"))
        self.label_2.setText(_translate("Dialog", "TextLabel"))
        self.pushButton.setText(_translate("Dialog", "PushButton"))
        self.pushButton_3.setText(_translate("Dialog", "PushButton"))
        self.pushButton_2.setText(_translate("Dialog", "PushButton"))
Ejemplo n.º 11
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1004, 691)
        MainWindow.setMouseTracking(False)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap("../../../../../usr/share/pixmaps/cubeview48.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        MainWindow.setWindowIcon(icon)
        MainWindow.setWindowOpacity(1.0)
        MainWindow.setToolTip("")
        MainWindow.setAutoFillBackground(False)
        MainWindow.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly)
        MainWindow.setTabShape(QtGui.QTabWidget.Rounded)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.label = QtGui.QLabel(self.centralwidget)
        self.label.setGeometry(QtCore.QRect(420, 0, 271, 21))
        font = QtGui.QFont()
        font.setFamily("URW Chancery L")
        font.setPointSize(12)
        font.setWeight(75)
        font.setItalic(True)
        font.setBold(True)
        self.label.setFont(font)
        self.label.setObjectName("label")
        self.graph = PlotWidget(self.centralwidget)
        self.graph.setGeometry(QtCore.QRect(20, 30, 981, 351))
        self.graph.setObjectName("graph")
        self.label_2 = QtGui.QLabel(self.centralwidget)
        self.label_2.setGeometry(QtCore.QRect(920, 650, 81, 31))
        font = QtGui.QFont()
        font.setPointSize(7)
        font.setWeight(75)
        font.setItalic(True)
        font.setBold(True)
        self.label_2.setFont(font)
        self.label_2.setObjectName("label_2")
        self.editedgraph = PlotWidget(self.centralwidget)
        self.editedgraph.setGeometry(QtCore.QRect(20, 390, 471, 281))
        self.editedgraph.setObjectName("editedgraph")
        self.dIdVval = QtGui.QLabel(self.centralwidget)
        self.dIdVval.setGeometry(QtCore.QRect(670, 390, 151, 16))
        self.dIdVval.setText("")
        self.dIdVval.setObjectName("dIdVval")
        self.dVdIval = QtGui.QLabel(self.centralwidget)
        self.dVdIval.setGeometry(QtCore.QRect(670, 420, 151, 16))
        self.dVdIval.setText("")
        self.dVdIval.setObjectName("dVdIval")
        self.fitgraph = PlotWidget(self.centralwidget)
        self.fitgraph.setGeometry(QtCore.QRect(500, 390, 501, 281))
        self.fitgraph.setObjectName("fitgraph")
        MainWindow.setCentralWidget(self.centralwidget)
        self.actionSave_as = QtGui.QAction(MainWindow)
        self.actionSave_as.setObjectName("actionSave_as")

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Ejemplo n.º 12
0
 def __init__(self,settings):
     PlotWidget.__init__(self)
     self.trace = self.plot(
         [0],
         [0],
         pen=None,
         symbol='o',
         symbolPen=None,
         symbolSize=3
     )
     self.update_settings(settings)
Ejemplo n.º 13
0
 def __init__(self,channel,trace,units):
     QtGui.QDialog.__init__(self)
     layout = QtGui.QVBoxLayout()
     self.setLayout(layout)
     plot_widget = PlotWidget(
         title='%s trace' % channel, 
         labels={'left':units}
                 )
     layout.addWidget(plot_widget)
     plot = plot_widget.plot(trace)
     self.plot = plot
     self.trace = trace
Ejemplo n.º 14
0
class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(911, 696)
        self.graphicsView_time = PlotWidget(Form)
        self.graphicsView_time.setGeometry(QtCore.QRect(450, 10, 451, 301))
        self.graphicsView_time.setObjectName("graphicsView_time")
        self.pushButton_plot = QtGui.QPushButton(Form)
        self.pushButton_plot.setGeometry(QtCore.QRect(130, 400, 83, 24))
        self.pushButton_plot.setObjectName("pushButton_plot")
        self.pushButton_measure = QtGui.QPushButton(Form)
        self.pushButton_measure.setGeometry(QtCore.QRect(130, 440, 83, 24))
        self.pushButton_measure.setObjectName("pushButton_measure")
        self.graphicsView_freq = PlotWidget(Form)
        self.graphicsView_freq.setGeometry(QtCore.QRect(450, 320, 451, 301))
        self.graphicsView_freq.setObjectName("graphicsView_freq")
        self.pushButton_liveStart = QtGui.QPushButton(Form)
        self.pushButton_liveStart.setGeometry(QtCore.QRect(130, 540, 83, 24))
        self.pushButton_liveStart.setObjectName("pushButton_liveStart")
        self.pushButton_liveStop = QtGui.QPushButton(Form)
        self.pushButton_liveStop.setGeometry(QtCore.QRect(130, 580, 83, 24))
        self.pushButton_liveStop.setObjectName("pushButton_liveStop")

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

    def retranslateUi(self, Form):
        Form.setWindowTitle(QtGui.QApplication.translate("Form", "Form", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton_plot.setText(QtGui.QApplication.translate("Form", "Plot!", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton_measure.setText(QtGui.QApplication.translate("Form", "Measure", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton_liveStart.setText(QtGui.QApplication.translate("Form", "Live start", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton_liveStop.setText(QtGui.QApplication.translate("Form", "Live stop", None, QtGui.QApplication.UnicodeUTF8))
Ejemplo n.º 15
0
class Ui_AifView(object):
    def setupUi(self, AifView):
        AifView.setObjectName("AifView")
        AifView.resize(400, 300)
        self.gridLayout = QtGui.QGridLayout(AifView)
        self.gridLayout.setObjectName("gridLayout")
        self.plotWidget = PlotWidget(AifView)
        self.plotWidget.setObjectName("plotWidget")
        self.gridLayout.addWidget(self.plotWidget, 0, 0, 1, 1)

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

    def retranslateUi(self, AifView):
        AifView.setWindowTitle(QtGui.QApplication.translate("AifView", "AIF curve", None, QtGui.QApplication.UnicodeUTF8))
Ejemplo n.º 16
0
class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(560, 236)
        self.verticalLayout = QtGui.QVBoxLayout(Form)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.graphicsView = PlotWidget(Form)
        self.graphicsView.setObjectName(_fromUtf8("graphicsView"))
        self.verticalLayout.addWidget(self.graphicsView)

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

    def retranslateUi(self, Form):
        Form.setWindowTitle(_translate("Form", "Grafico", None))
    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.graphicsView = PlotWidget(DataPlotPanel)
        self.graphicsView.setFrameShape(QtGui.QFrame.StyledPanel)
        self.graphicsView.setFrameShadow(QtGui.QFrame.Plain)
        self.graphicsView.setObjectName(_fromUtf8("graphicsView"))
        self.gridLayout.addWidget(self.graphicsView, 0, 1, 1, 1)
        self.treeWidget = QtGui.QTreeWidget(DataPlotPanel)
        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(DataPlotPanel)
        QtCore.QMetaObject.connectSlotsByName(DataPlotPanel)
Ejemplo n.º 18
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(800, 600)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)
        self.verticalLayout.setObjectName("verticalLayout")
        self.graphicsView = PlotWidget(self.centralwidget)
        self.graphicsView.setObjectName("graphicsView")
        self.verticalLayout.addWidget(self.graphicsView)
        MainWindow.setCentralWidget(self.centralwidget)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 23))
        self.menubar.setDefaultUp(False)
        self.menubar.setObjectName("menubar")
        self.menuFile = QtGui.QMenu(self.menubar)
        self.menuFile.setObjectName("menuFile")
        MainWindow.setMenuBar(self.menubar)
        self.actionOpen = QtGui.QAction(MainWindow)
        self.actionOpen.setShortcutContext(QtCore.Qt.ApplicationShortcut)
        self.actionOpen.setObjectName("actionOpen")
        self.actionExit = QtGui.QAction(MainWindow)
        self.actionExit.setObjectName("actionExit")
        self.menuFile.addAction(self.actionOpen)
        self.menuFile.addSeparator()
        self.menubar.addAction(self.menuFile.menuAction())

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Ejemplo n.º 19
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(820, 650)
        MainWindow.setAutoFillBackground(False)
        MainWindow.setDocumentMode(False)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setContentsMargins(-1, -1, 0, 0)
        self.horizontalLayout.setSpacing(10)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.btnAdd = QtGui.QPushButton(self.centralwidget)
        self.btnAdd.setObjectName(_fromUtf8("btnAdd"))
        self.horizontalLayout.addWidget(self.btnAdd)
        self.chkMore = QtGui.QCheckBox(self.centralwidget)
        self.chkMore.setObjectName(_fromUtf8("chkMore"))
        self.horizontalLayout.addWidget(self.chkMore)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.grPlot = PlotWidget(self.centralwidget)
        self.grPlot.setObjectName(_fromUtf8("grPlot"))
        self.verticalLayout.addWidget(self.grPlot)
        MainWindow.setCentralWidget(self.centralwidget)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Ejemplo n.º 20
0
  def __init__(self, config, parent=None, **kwargs):
    QWidget.__init__(self, parent)
    self.startTime = None
    self.numDataPoints = 0

    self.datasets = {}

    for display in config['displays']:
      self.datasets[display['field']] = self.createDatasetForDisplay(display)

    self.graph = PlotWidget(title=config['title'], labels=config['labels'])

    # Only add a legend to the graph if there is more than one dataset displayed on it
    if len(self.datasets) > 1:
      self.graph.addLegend()

    # Show grid lines
    self.graph.showGrid(x=True, y=True)

    for _, dataset in self.datasets.items():
      self.graph.addItem(dataset['plotData'])

    vbox = QVBoxLayout()
    vbox.addWidget(self.graph)
    self.setLayout(vbox)
Ejemplo n.º 21
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(1225, 588)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.horizontalLayout_3 = QtGui.QHBoxLayout(self.centralwidget)
        self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.graphicsView = PlotWidget(self.centralwidget)
        self.graphicsView.setObjectName(_fromUtf8("graphicsView"))
        self.horizontalLayout.addWidget(self.graphicsView)
        self.horizontalLayout_3.addLayout(self.horizontalLayout)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.listView = QtGui.QListView(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.listView.sizePolicy().hasHeightForWidth())
        self.listView.setSizePolicy(sizePolicy)
        self.listView.setObjectName(_fromUtf8("listView"))
        self.horizontalLayout_2.addWidget(self.listView)
        self.horizontalLayout_3.addLayout(self.horizontalLayout_2)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1225, 26))
        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)
Ejemplo n.º 22
0
    def setupUi(self, win_plot):
        win_plot.setObjectName(_fromUtf8("win_plot"))
        win_plot.resize(1220, 872)
        self.centralwidget = QtGui.QWidget(win_plot)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.gridLayout = QtGui.QGridLayout(self.centralwidget)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.editorButton = QtGui.QPushButton(self.centralwidget)
        self.editorButton.setObjectName(_fromUtf8("editorButton"))
        self.horizontalLayout.addWidget(self.editorButton)
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.playButton = QtGui.QPushButton(self.centralwidget)
        self.playButton.setObjectName(_fromUtf8("playButton"))
        self.horizontalLayout.addWidget(self.playButton)
        self.openButton = QtGui.QPushButton(self.centralwidget)
        self.openButton.setObjectName(_fromUtf8("openButton"))
        self.horizontalLayout.addWidget(self.openButton)
        self.recordButton = QtGui.QPushButton(self.centralwidget)
        self.recordButton.setObjectName(_fromUtf8("recordButton"))
        self.horizontalLayout.addWidget(self.recordButton)
        self.horizontalLayout.setStretch(0, 2)
        self.horizontalLayout.setStretch(1, 10)
        self.horizontalLayout.setStretch(2, 2)
        self.horizontalLayout.setStretch(3, 2)
        self.horizontalLayout.setStretch(4, 2)
        self.gridLayout.addLayout(self.horizontalLayout, 2, 0, 1, 2)
        self.tlWidget = PlotWidget(self.centralwidget)
        self.tlWidget.setObjectName(_fromUtf8("tlWidget"))
        self.gridLayout.addWidget(self.tlWidget, 0, 0, 1, 1)
        self.trWidget = PlotWidget(self.centralwidget)
        self.trWidget.setObjectName(_fromUtf8("trWidget"))
        self.gridLayout.addWidget(self.trWidget, 0, 1, 1, 1)
        self.blWidget = PlotWidget(self.centralwidget)
        self.blWidget.setObjectName(_fromUtf8("blWidget"))
        self.gridLayout.addWidget(self.blWidget, 1, 0, 1, 1)
        self.brWidget = SpectrogramWidget(self.centralwidget)
        self.brWidget.setObjectName(_fromUtf8("brWidget"))
        self.gridLayout.addWidget(self.brWidget, 1, 1, 1, 1)
        self.gridLayout.setRowStretch(0, 1)
        self.gridLayout.setRowStretch(1, 1)
        win_plot.setCentralWidget(self.centralwidget)

        self.retranslateUi(win_plot)
        QtCore.QMetaObject.connectSlotsByName(win_plot)
Ejemplo n.º 23
0
class Ui_Plot(object):
    def setupUi(self, Plot):
        Plot.setObjectName(_fromUtf8("Plot"))
        Plot.setWindowModality(QtCore.Qt.NonModal)
        Plot.resize(560, 236)
        Plot.setWindowTitle(_fromUtf8(""))
        self.verticalLayout = QtGui.QVBoxLayout(Plot)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.graphicsView = PlotWidget(Plot)
        self.graphicsView.setObjectName(_fromUtf8("graphicsView"))
        self.verticalLayout.addWidget(self.graphicsView)

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

    def retranslateUi(self, Plot):
        pass
Ejemplo n.º 24
0
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.horizontalLayout = QtGui.QHBoxLayout(self.centralwidget)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.pbLevel = QtGui.QProgressBar(self.centralwidget)
        self.pbLevel.setMaximum(1000)
        self.pbLevel.setProperty("value", 123)
        self.pbLevel.setTextVisible(False)
        self.pbLevel.setOrientation(QtCore.Qt.Vertical)
        self.pbLevel.setObjectName(_fromUtf8("pbLevel"))
        self.horizontalLayout.addWidget(self.pbLevel)
        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.setMargin(0)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.label = QtGui.QLabel(self.frame)
        self.label.setObjectName(_fromUtf8("label"))
        self.verticalLayout.addWidget(self.label)
        self.grFFT = PlotWidget(self.frame)
        self.grFFT.setObjectName(_fromUtf8("grFFT"))
        self.verticalLayout.addWidget(self.grFFT)
        self.label_2 = QtGui.QLabel(self.frame)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.verticalLayout.addWidget(self.label_2)
        self.grPCM = PlotWidget(self.frame)
        self.grPCM.setObjectName(_fromUtf8("grPCM"))
        self.verticalLayout.addWidget(self.grPCM)
        self.horizontalLayout.addWidget(self.frame)
        MainWindow.setCentralWidget(self.centralwidget)

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

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None))
        self.label.setText(_translate("MainWindow", "frequency data (FFT):", None))
        self.label_2.setText(_translate("MainWindow", "raw data (PCM):", None))
Ejemplo n.º 25
0
class Ui_Dialog(object):
    def setupUi(self, Dialog):
        Dialog.setObjectName(_fromUtf8("Dialog"))
        Dialog.resize(1352, 757)
        self.gridLayout_2 = QtGui.QGridLayout(Dialog)
        self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
        self.gridLayout = QtGui.QGridLayout()
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.acce_graphicsView = PlotWidget(Dialog)
        self.acce_graphicsView.setObjectName(_fromUtf8("acce_graphicsView"))
        self.verticalLayout.addWidget(self.acce_graphicsView)
        self.linear_acce_graphicsView = PlotWidget(Dialog)
        self.linear_acce_graphicsView.setObjectName(_fromUtf8("linear_acce_graphicsView"))
        self.verticalLayout.addWidget(self.linear_acce_graphicsView)
        self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1)
        self.verticalLayout_2 = QtGui.QVBoxLayout()
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        spacerItem = QtGui.QSpacerItem(20, 328, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem)
        self.close_pushButton = QtGui.QPushButton(Dialog)
        self.close_pushButton.setObjectName(_fromUtf8("close_pushButton"))
        self.verticalLayout_2.addWidget(self.close_pushButton)
        self.gridLayout.addLayout(self.verticalLayout_2, 0, 1, 1, 1)
        self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
        self.verticalLayout_3 = QtGui.QVBoxLayout()
        self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
        # self.dumb_graphicsView = QtGui.QGraphicsView(Dialog)
        # self.dumb_graphicsView.setObjectName(_fromUtf8("dumb_graphicsView"))
        # self.verticalLayout_3.addWidget(self.dumb_graphicsView)
        self.glWidget = GLWidget()
        self.verticalLayout_3.addWidget(self.glWidget)
        spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout_3.addItem(spacerItem1)
        self.gridLayout_2.addLayout(self.verticalLayout_3, 0, 1, 1, 1)

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

    def retranslateUi(self, Dialog):
        Dialog.setWindowTitle(_translate("Dialog", "Title", None))
        self.close_pushButton.setText(_translate("Dialog", "Close", None))
Ejemplo n.º 26
0
    def setupUi(self, Form):
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(560, 236)
        self.verticalLayout = QtGui.QVBoxLayout(Form)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.graphicsView = PlotWidget(Form)
        self.graphicsView.setObjectName(_fromUtf8("graphicsView"))
        self.verticalLayout.addWidget(self.graphicsView)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
Ejemplo n.º 27
0
    def setupUi(self, AifView):
        AifView.setObjectName("AifView")
        AifView.resize(400, 300)
        self.gridLayout = QtGui.QGridLayout(AifView)
        self.gridLayout.setObjectName("gridLayout")
        self.plotWidget = PlotWidget(AifView)
        self.plotWidget.setObjectName("plotWidget")
        self.gridLayout.addWidget(self.plotWidget, 0, 0, 1, 1)

        self.retranslateUi(AifView)
        QtCore.QMetaObject.connectSlotsByName(AifView)
class Ui_MonitForm(object):
    def setupUi(self, MonitForm):
        MonitForm.setObjectName(_fromUtf8("MonitForm"))
        MonitForm.resize(699, 206)
        self.lblBpm = QtGui.QLabel(MonitForm)
        self.lblBpm.setGeometry(QtCore.QRect(630, 40, 66, 17))
        self.lblBpm.setObjectName(_fromUtf8("lblBpm"))
        self.lblSpo = QtGui.QLabel(MonitForm)
        self.lblSpo.setGeometry(QtCore.QRect(630, 70, 66, 17))
        self.lblSpo.setObjectName(_fromUtf8("lblSpo"))
        self.graphicsView = PlotWidget(MonitForm)
        self.graphicsView.setGeometry(QtCore.QRect(10, 10, 611, 192))
        self.graphicsView.setObjectName(_fromUtf8("graphicsView"))

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

    def retranslateUi(self, MonitForm):
        MonitForm.setWindowTitle(QtGui.QApplication.translate("MonitForm", "Form", None, QtGui.QApplication.UnicodeUTF8))
        self.lblBpm.setText(QtGui.QApplication.translate("MonitForm", "TextLabel", None, QtGui.QApplication.UnicodeUTF8))
        self.lblSpo.setText(QtGui.QApplication.translate("MonitForm", "TextLabel", None, QtGui.QApplication.UnicodeUTF8))
Ejemplo n.º 29
0
class Ui_CustomWidget(object):
    def setupUi(self, CustomWidget):
        CustomWidget.setObjectName("CustomWidget")
        CustomWidget.resize(400, 300)
        self.gridLayout = QtWidgets.QGridLayout(CustomWidget)
        self.gridLayout.setObjectName("gridLayout")
        self.plotWidget = PlotWidget(CustomWidget)
        self.plotWidget.setObjectName("plotWidget")
        self.gridLayout.addWidget(self.plotWidget, 0, 0, 1, 1)
        self.checkBox = QtWidgets.QCheckBox(CustomWidget)
        self.checkBox.setChecked(True)
        self.checkBox.setObjectName("checkBox")
        self.gridLayout.addWidget(self.checkBox, 1, 0, 1, 1)

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

    def retranslateUi(self, CustomWidget):
        _translate = QtCore.QCoreApplication.translate
        CustomWidget.setWindowTitle(_translate("CustomWidget", "Form"))
        self.checkBox.setText(_translate("CustomWidget", "Mouse Enabled"))
Ejemplo n.º 30
0
    def __init__(self, parent=None):
        
        super(Form, self).__init__()

        self.tab = QTabWidget()

        # Add demo data for tab 1
        x = np.random.normal(size=1000)
        y = np.random.normal(size=1000)
        plot1 = PlotWidget()
        plot1.plot(x, y, pen=None, symbol='o')

        self.tab.insertTab(0, plot1, "random")

        # Add demo data for tab 2
        x = np.linspace(0, 6*np.pi, 1000)
        y = np.sin(x)
        plot2 = PlotWidget()
        plot2.plot(x, y)

        self.tab.insertTab(1, plot2, "sinus")

        self.main_window = QMainWindow()
        self.main_window.setCentralWidget(self.tab)
        self.main_window.show()

        # Force the window to stay on top
        self.setWindowFlags(Qt.WindowStaysOnTopHint)
Ejemplo n.º 31
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1173, 400)
        MainWindow.setMinimumSize(QtCore.QSize(1150, 340))
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.verticalLayoutWidget = QtWidgets.QWidget(self.centralwidget)
        self.verticalLayoutWidget.setGeometry(QtCore.QRect(10, 7, 1133, 331))
        self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.analyzerHorizontalLayout = QtWidgets.QHBoxLayout()
        self.analyzerHorizontalLayout.setObjectName("analyzerHorizontalLayout")
        self.graphWidget = PlotWidget(self.verticalLayoutWidget)
        self.graphWidget.setMinimumSize(QtCore.QSize(500, 300))
        self.graphWidget.setObjectName("graphWidget")
        self.analyzerHorizontalLayout.addWidget(self.graphWidget)
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.parametersHorizontalLayout = QtWidgets.QHBoxLayout()
        self.parametersHorizontalLayout.setContentsMargins(-1, 9, -1, -1)
        self.parametersHorizontalLayout.setObjectName("parametersHorizontalLayout")
        self.tabWidget = QtWidgets.QTabWidget(self.verticalLayoutWidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth())
        self.tabWidget.setSizePolicy(sizePolicy)
        self.tabWidget.setMinimumSize(QtCore.QSize(0, 0))
        self.tabWidget.setObjectName("tabWidget")
        self.analyzerTab = QtWidgets.QWidget()
        self.analyzerTab.setObjectName("analyzerTab")
        self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.analyzerTab)
        self.verticalLayout_5.setObjectName("verticalLayout_5")
        self.analyzerInputHorizontalLayout = QtWidgets.QHBoxLayout()
        self.analyzerInputHorizontalLayout.setContentsMargins(10, 0, 10, 0)
        self.analyzerInputHorizontalLayout.setSpacing(10)
        self.analyzerInputHorizontalLayout.setObjectName("analyzerInputHorizontalLayout")
        self.analyzerComboBox = QtWidgets.QComboBox(self.analyzerTab)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.analyzerComboBox.sizePolicy().hasHeightForWidth())
        self.analyzerComboBox.setSizePolicy(sizePolicy)
        self.analyzerComboBox.setObjectName("analyzerComboBox")
        self.analyzerInputHorizontalLayout.addWidget(self.analyzerComboBox)
        self.analyzerConnectButton = QtWidgets.QPushButton(self.analyzerTab)
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.analyzerConnectButton.setFont(font)
        self.analyzerConnectButton.setObjectName("analyzerConnectButton")
        self.analyzerInputHorizontalLayout.addWidget(self.analyzerConnectButton)
        spacerItem = QtWidgets.QSpacerItem(80, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
        self.analyzerInputHorizontalLayout.addItem(spacerItem)
        self.analyzerLineEdit = QtWidgets.QLineEdit(self.analyzerTab)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.analyzerLineEdit.sizePolicy().hasHeightForWidth())
        self.analyzerLineEdit.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setFamily("MS Reference Sans Serif")
        font.setPointSize(10)
        self.analyzerLineEdit.setFont(font)
        self.analyzerLineEdit.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
        self.analyzerLineEdit.setObjectName("analyzerLineEdit")
        self.analyzerInputHorizontalLayout.addWidget(self.analyzerLineEdit)
        self.verticalLayout_5.addLayout(self.analyzerInputHorizontalLayout)
        self.analyzerParamHorizontalLayout = QtWidgets.QHBoxLayout()
        self.analyzerParamHorizontalLayout.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint)
        self.analyzerParamHorizontalLayout.setContentsMargins(10, -1, 10, 0)
        self.analyzerParamHorizontalLayout.setSpacing(20)
        self.analyzerParamHorizontalLayout.setObjectName("analyzerParamHorizontalLayout")
        self.analyzatorGridLayout = QtWidgets.QGridLayout()
        self.analyzatorGridLayout.setVerticalSpacing(0)
        self.analyzatorGridLayout.setObjectName("analyzatorGridLayout")
        self.continuousCheckBox = QtWidgets.QCheckBox(self.analyzerTab)
        self.continuousCheckBox.setObjectName("continuousCheckBox")
        self.analyzatorGridLayout.addWidget(self.continuousCheckBox, 7, 2, 1, 1)
        self.fstepLabel = QtWidgets.QLabel(self.analyzerTab)
        self.fstepLabel.setObjectName("fstepLabel")
        self.analyzatorGridLayout.addWidget(self.fstepLabel, 4, 0, 1, 1)
        self.fstopLineEdit = QtWidgets.QLineEdit(self.analyzerTab)
        self.fstopLineEdit.setObjectName("fstopLineEdit")
        self.analyzatorGridLayout.addWidget(self.fstopLineEdit, 3, 2, 1, 1)
        self.label_5 = QtWidgets.QLabel(self.analyzerTab)
        self.label_5.setText("")
        self.label_5.setObjectName("label_5")
        self.analyzatorGridLayout.addWidget(self.label_5, 6, 2, 1, 1)
        self.fstepLineEdit = QtWidgets.QLineEdit(self.analyzerTab)
        self.fstepLineEdit.setObjectName("fstepLineEdit")
        self.analyzatorGridLayout.addWidget(self.fstepLineEdit, 4, 2, 1, 1)
        self.fstartLabel = QtWidgets.QLabel(self.analyzerTab)
        self.fstartLabel.setObjectName("fstartLabel")
        self.analyzatorGridLayout.addWidget(self.fstartLabel, 2, 0, 1, 1)
        self.singleCheckBox = QtWidgets.QCheckBox(self.analyzerTab)
        self.singleCheckBox.setObjectName("singleCheckBox_3")
        self.analyzatorGridLayout.addWidget(self.singleCheckBox, 7, 3, 1, 1)
        self.fsetButton = QtWidgets.QPushButton(self.analyzerTab)
        self.fsetButton.setObjectName("fsetButton")
        self.analyzatorGridLayout.addWidget(self.fsetButton, 5, 3, 1, 1)
        self.fbwLabel = QtWidgets.QLabel(self.analyzerTab)
        self.fbwLabel.setObjectName("fbwLabel")
        self.analyzatorGridLayout.addWidget(self.fbwLabel, 5, 0, 1, 1)
        self.fbwLineEdit = QtWidgets.QLineEdit(self.analyzerTab)
        self.fbwLineEdit.setObjectName("fbwLineEdit")
        self.analyzatorGridLayout.addWidget(self.fbwLineEdit, 5, 2, 1, 1)
        self.fstopLabel = QtWidgets.QLabel(self.analyzerTab)
        self.fstopLabel.setObjectName("fstopLabel")
        self.analyzatorGridLayout.addWidget(self.fstopLabel, 3, 0, 1, 1)
        self.fstartLineEdit = QtWidgets.QLineEdit(self.analyzerTab)
        self.fstartLineEdit.setObjectName("fstartLineEdit")
        self.analyzatorGridLayout.addWidget(self.fstartLineEdit, 2, 2, 1, 1)
        self.label_2 = QtWidgets.QLabel(self.analyzerTab)
        self.label_2.setObjectName("label_2")
        self.analyzatorGridLayout.addWidget(self.label_2, 0, 0, 1, 1)
        self.analyzerParamHorizontalLayout.addLayout(self.analyzatorGridLayout)
        spacerItem1 = QtWidgets.QSpacerItem(500, 120, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
        self.analyzerParamHorizontalLayout.addItem(spacerItem1)
        self.verticalLayout_5.addLayout(self.analyzerParamHorizontalLayout)
        self.tabWidget.addTab(self.analyzerTab, "")
        self.generatorTab = QtWidgets.QWidget()
        self.generatorTab.setObjectName("generatorTab")
        self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.generatorTab)
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.generatorInputHorizontalLayout = QtWidgets.QHBoxLayout()
        self.generatorInputHorizontalLayout.setContentsMargins(10, 0, 10, 0)
        self.generatorInputHorizontalLayout.setSpacing(10)
        self.generatorInputHorizontalLayout.setObjectName("generatorInputHorizontalLayout")
        self.generatorComboBox = QtWidgets.QComboBox(self.generatorTab)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.generatorComboBox.sizePolicy().hasHeightForWidth())
        self.generatorComboBox.setSizePolicy(sizePolicy)
        self.generatorComboBox.setObjectName("generatorComboBox")
        self.generatorInputHorizontalLayout.addWidget(self.generatorComboBox)
        self.generatorConnectButton = QtWidgets.QPushButton(self.generatorTab)
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.generatorConnectButton.setFont(font)
        self.generatorConnectButton.setObjectName("generatorConnectButton")
        self.generatorInputHorizontalLayout.addWidget(self.generatorConnectButton)
        spacerItem2 = QtWidgets.QSpacerItem(80, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
        self.generatorInputHorizontalLayout.addItem(spacerItem2)
        self.generatorLineEdit = QtWidgets.QLineEdit(self.generatorTab)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.generatorLineEdit.sizePolicy().hasHeightForWidth())
        self.generatorLineEdit.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setFamily("MS Reference Sans Serif")
        font.setPointSize(10)
        self.generatorLineEdit.setFont(font)
        self.generatorLineEdit.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
        self.generatorLineEdit.setObjectName("generatorLineEdit")
        self.generatorInputHorizontalLayout.addWidget(self.generatorLineEdit)
        self.verticalLayout_4.addLayout(self.generatorInputHorizontalLayout)
        self.generatorParamHorizontalLayout = QtWidgets.QHBoxLayout()
        self.generatorParamHorizontalLayout.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint)
        self.generatorParamHorizontalLayout.setContentsMargins(10, 0, 10, 0)
        self.generatorParamHorizontalLayout.setSpacing(10)
        self.generatorParamHorizontalLayout.setObjectName("generatorParamHorizontalLayout")
        self.generatorGridLayout = QtWidgets.QGridLayout()
        self.generatorGridLayout.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint)
        self.generatorGridLayout.setContentsMargins(-1, 0, -1, 0)
        self.generatorGridLayout.setHorizontalSpacing(3)
        self.generatorGridLayout.setVerticalSpacing(0)
        self.generatorGridLayout.setObjectName("generatorGridLayout")
        self.label_7 = QtWidgets.QLabel(self.generatorTab)
        self.label_7.setText("")
        self.label_7.setObjectName("label_7")
        self.generatorGridLayout.addWidget(self.label_7, 8, 0, 1, 1)
        self.freqLabel = QtWidgets.QLabel(self.generatorTab)
        self.freqLabel.setObjectName("freqLabel")
        self.generatorGridLayout.addWidget(self.freqLabel, 3, 0, 1, 1)
        self.powerLabel = QtWidgets.QLabel(self.generatorTab)
        self.powerLabel.setObjectName("powerLabel")
        self.generatorGridLayout.addWidget(self.powerLabel, 2, 0, 1, 1)
        self.genFreqLineEdit = QtWidgets.QLineEdit(self.generatorTab)
        self.genFreqLineEdit.setObjectName("genFreqLineEdit")
        self.generatorGridLayout.addWidget(self.genFreqLineEdit, 3, 1, 1, 1)
        self.genPowerLineEdit = QtWidgets.QLineEdit(self.generatorTab)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(20)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.genPowerLineEdit.sizePolicy().hasHeightForWidth())
        self.genPowerLineEdit.setSizePolicy(sizePolicy)
        self.genPowerLineEdit.setObjectName("genPowerLineEdit")
        self.generatorGridLayout.addWidget(self.genPowerLineEdit, 2, 1, 1, 1)
        self.label_6 = QtWidgets.QLabel(self.generatorTab)
        self.label_6.setText("")
        self.label_6.setObjectName("label_6")
        self.generatorGridLayout.addWidget(self.label_6, 6, 0, 1, 1)
        self.psweepCheckBox = QtWidgets.QCheckBox(self.generatorTab)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.psweepCheckBox.sizePolicy().hasHeightForWidth())
        self.psweepCheckBox.setSizePolicy(sizePolicy)
        self.psweepCheckBox.setMinimumSize(QtCore.QSize(0, 20))
        self.psweepCheckBox.setObjectName("psweepCheckBox")
        self.generatorGridLayout.addWidget(self.psweepCheckBox, 7, 2, 1, 1)
        self.genFreqButton = QtWidgets.QPushButton(self.generatorTab)
        self.genFreqButton.setObjectName("genFreqButton")
        self.generatorGridLayout.addWidget(self.genFreqButton, 3, 2, 1, 1)
        self.genPowerButton = QtWidgets.QPushButton(self.generatorTab)
        self.genPowerButton.setObjectName("genPowerButton")
        self.generatorGridLayout.addWidget(self.genPowerButton, 2, 2, 1, 1)
        self.fsweepCheckBox = QtWidgets.QCheckBox(self.generatorTab)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.fsweepCheckBox.sizePolicy().hasHeightForWidth())
        self.fsweepCheckBox.setSizePolicy(sizePolicy)
        self.fsweepCheckBox.setMinimumSize(QtCore.QSize(0, 20))
        self.fsweepCheckBox.setObjectName("fsweepCheckBox")
        self.generatorGridLayout.addWidget(self.fsweepCheckBox, 7, 1, 1, 1)
        self.genOnButton = QtWidgets.QPushButton(self.generatorTab)
        self.genOnButton.setObjectName("genOnButton")
        self.generatorGridLayout.addWidget(self.genOnButton, 8, 1, 1, 2)
        self.generatorParamHorizontalLayout.addLayout(self.generatorGridLayout)
        spacerItem3 = QtWidgets.QSpacerItem(200, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
        self.generatorParamHorizontalLayout.addItem(spacerItem3)
        self.psweepGridLayout = QtWidgets.QGridLayout()
        self.psweepGridLayout.setHorizontalSpacing(3)
        self.psweepGridLayout.setVerticalSpacing(0)
        self.psweepGridLayout.setObjectName("psweepGridLayout")
        self.fstartLabel_2 = QtWidgets.QLabel(self.generatorTab)
        self.fstartLabel_2.setObjectName("fstartLabel_2")
        self.psweepGridLayout.addWidget(self.fstartLabel_2, 1, 0, 1, 1)
        self.fstopLabel_2 = QtWidgets.QLabel(self.generatorTab)
        self.fstopLabel_2.setObjectName("fstopLabel_2")
        self.psweepGridLayout.addWidget(self.fstopLabel_2, 2, 0, 1, 1)
        self.fbwLabel_2 = QtWidgets.QLabel(self.generatorTab)
        self.fbwLabel_2.setObjectName("fbwLabel_2")
        self.psweepGridLayout.addWidget(self.fbwLabel_2, 4, 0, 1, 1)
        self.fstepLineEdit_2 = QtWidgets.QLineEdit(self.generatorTab)
        self.fstepLineEdit_2.setObjectName("fstepLineEdit_2")
        self.psweepGridLayout.addWidget(self.fstepLineEdit_2, 3, 2, 1, 1)
        self.fbwLineEdit_2 = QtWidgets.QLineEdit(self.generatorTab)
        self.fbwLineEdit_2.setObjectName("fbwLineEdit_2")
        self.psweepGridLayout.addWidget(self.fbwLineEdit_2, 4, 2, 1, 1)
        self.fstopLineEdit_2 = QtWidgets.QLineEdit(self.generatorTab)
        self.fstopLineEdit_2.setObjectName("fstopLineEdit_2")
        self.psweepGridLayout.addWidget(self.fstopLineEdit_2, 2, 2, 1, 1)
        self.label_4 = QtWidgets.QLabel(self.generatorTab)
        self.label_4.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.label_4.setObjectName("label_4")
        self.psweepGridLayout.addWidget(self.label_4, 0, 2, 1, 2)
        self.fstepLabel_2 = QtWidgets.QLabel(self.generatorTab)
        self.fstepLabel_2.setObjectName("fstepLabel_2")
        self.psweepGridLayout.addWidget(self.fstepLabel_2, 3, 0, 1, 1)
        self.fstartLineEdit_2 = QtWidgets.QLineEdit(self.generatorTab)
        self.fstartLineEdit_2.setEnabled(True)
        self.fstartLineEdit_2.setObjectName("fstartLineEdit_2")
        self.psweepGridLayout.addWidget(self.fstartLineEdit_2, 1, 2, 1, 1)
        self.fsetButton_2 = QtWidgets.QPushButton(self.generatorTab)
        self.fsetButton_2.setObjectName("fsetButton_2")
        self.psweepGridLayout.addWidget(self.fsetButton_2, 4, 3, 1, 1)
        self.generatorParamHorizontalLayout.addLayout(self.psweepGridLayout)
        self.fsweepGridLayout = QtWidgets.QGridLayout()
        self.fsweepGridLayout.setContentsMargins(0, -1, -1, -1)
        self.fsweepGridLayout.setHorizontalSpacing(3)
        self.fsweepGridLayout.setVerticalSpacing(0)
        self.fsweepGridLayout.setObjectName("fsweepGridLayout")
        self.fstopLineEdit_3 = QtWidgets.QLineEdit(self.generatorTab)
        self.fstopLineEdit_3.setObjectName("fstopLineEdit_3")
        self.fsweepGridLayout.addWidget(self.fstopLineEdit_3, 2, 2, 1, 1)
        self.fstartLineEdit_3 = QtWidgets.QLineEdit(self.generatorTab)
        self.fstartLineEdit_3.setObjectName("fstartLineEdit_3")
        self.fsweepGridLayout.addWidget(self.fstartLineEdit_3, 1, 2, 1, 1)
        self.fbwLineEdit_3 = QtWidgets.QLineEdit(self.generatorTab)
        self.fbwLineEdit_3.setObjectName("fbwLineEdit_3")
        self.fsweepGridLayout.addWidget(self.fbwLineEdit_3, 4, 2, 1, 1)
        self.fstepLineEdit_3 = QtWidgets.QLineEdit(self.generatorTab)
        self.fstepLineEdit_3.setObjectName("fstepLineEdit_3")
        self.fsweepGridLayout.addWidget(self.fstepLineEdit_3, 3, 2, 1, 1)
        self.fsetButton_3 = QtWidgets.QPushButton(self.generatorTab)
        self.fsetButton_3.setObjectName("fsetButton_3")
        self.fsweepGridLayout.addWidget(self.fsetButton_3, 4, 3, 1, 1)
        self.label_3 = QtWidgets.QLabel(self.generatorTab)
        self.label_3.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.label_3.setObjectName("label_3")
        self.fsweepGridLayout.addWidget(self.label_3, 0, 2, 1, 2)
        self.fstartLabel_3 = QtWidgets.QLabel(self.generatorTab)
        self.fstartLabel_3.setObjectName("fstartLabel_3")
        self.fsweepGridLayout.addWidget(self.fstartLabel_3, 1, 0, 1, 2)
        self.fstopLabel_3 = QtWidgets.QLabel(self.generatorTab)
        self.fstopLabel_3.setObjectName("fstopLabel_3")
        self.fsweepGridLayout.addWidget(self.fstopLabel_3, 2, 0, 1, 2)
        self.fstepLabel_3 = QtWidgets.QLabel(self.generatorTab)
        self.fstepLabel_3.setObjectName("fstepLabel_3")
        self.fsweepGridLayout.addWidget(self.fstepLabel_3, 3, 0, 1, 2)
        self.fbwLabel_3 = QtWidgets.QLabel(self.generatorTab)
        self.fbwLabel_3.setObjectName("fbwLabel_3")
        self.fsweepGridLayout.addWidget(self.fbwLabel_3, 4, 0, 1, 2)
        self.generatorParamHorizontalLayout.addLayout(self.fsweepGridLayout)
        self.verticalLayout_4.addLayout(self.generatorParamHorizontalLayout)
        self.tabWidget.addTab(self.generatorTab, "")
        self.parametersHorizontalLayout.addWidget(self.tabWidget)
        self.verticalLayout_2.addLayout(self.parametersHorizontalLayout)
        self.gridLayout_2 = QtWidgets.QGridLayout()
        self.gridLayout_2.setSizeConstraint(QtWidgets.QLayout.SetFixedSize)
        self.gridLayout_2.setContentsMargins(20, 0, 0, 0)
        self.gridLayout_2.setVerticalSpacing(0)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.dbLabel = QtWidgets.QLabel(self.verticalLayoutWidget)
        self.dbLabel.setObjectName("dbLabel")
        self.gridLayout_2.addWidget(self.dbLabel, 3, 0, 1, 1)
        self.refLabel = QtWidgets.QLabel(self.verticalLayoutWidget)
        self.refLabel.setObjectName("refLabel")
        self.gridLayout_2.addWidget(self.refLabel, 2, 0, 1, 1)
        self.dbLineEdit = QtWidgets.QLineEdit(self.verticalLayoutWidget)
        self.dbLineEdit.setObjectName("dbLineEdit")
        self.gridLayout_2.addWidget(self.dbLineEdit, 3, 1, 1, 1)
        self.refLineEdit = QtWidgets.QLineEdit(self.verticalLayoutWidget)
        self.refLineEdit.setObjectName("refLineEdit")
        self.gridLayout_2.addWidget(self.refLineEdit, 2, 1, 1, 1)
        self.dbButton = QtWidgets.QPushButton(self.verticalLayoutWidget)
        self.dbButton.setObjectName("dbButton")
        self.gridLayout_2.addWidget(self.dbButton, 3, 2, 1, 1)
        self.label = QtWidgets.QLabel(self.verticalLayoutWidget)
        self.label.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.label.setObjectName("label")
        self.gridLayout_2.addWidget(self.label, 1, 0, 1, 3)
        spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout_2.addItem(spacerItem4, 2, 3, 1, 1)
        self.refButton = QtWidgets.QPushButton(self.verticalLayoutWidget)
        self.refButton.setObjectName("refButton")
        self.gridLayout_2.addWidget(self.refButton, 2, 2, 1, 1)
        spacerItem5 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.gridLayout_2.addItem(spacerItem5, 0, 0, 1, 1)
        self.verticalLayout_2.addLayout(self.gridLayout_2)
        self.analyzerHorizontalLayout.addLayout(self.verticalLayout_2)
        self.verticalLayout.addLayout(self.analyzerHorizontalLayout)
        # MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1173, 21))
        self.menubar.setObjectName("menubar")
        self.menuFile = QtWidgets.QMenu(self.menubar)
        self.menuFile.setObjectName("menuFile")
        # MainWindow.setMenuBar(self.menubar)
        # self.statusbar = QtWidgets.QStatusBar(MainWindow)
        # self.statusbar.setObjectName("statusbar")
        # MainWindow.setStatusBar(self.statusbar)
        self.actionLoad = QtWidgets.QAction(MainWindow)
        self.actionLoad.setObjectName("actionLoad")
        self.actionSave = QtWidgets.QAction(MainWindow)
        self.actionSave.setObjectName("actionSave")
        self.menuFile.addAction(self.actionLoad)
        self.menuFile.addAction(self.actionSave)
        self.menubar.addAction(self.menuFile.menuAction())

        self.retranslateUi(MainWindow)
        self.tabWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Ejemplo n.º 32
0
    def setupUi(self, TwoColorAbs):
        TwoColorAbs.setObjectName("TwoColorAbs")
        TwoColorAbs.resize(624, 635)
        self.verticalLayout = QtWidgets.QVBoxLayout(TwoColorAbs)
        self.verticalLayout.setObjectName("verticalLayout")
        self.splitterAll = QtWidgets.QSplitter(TwoColorAbs)
        self.splitterAll.setOrientation(QtCore.Qt.Vertical)
        self.splitterAll.setObjectName("splitterAll")
        self.splitterTop = QtWidgets.QSplitter(self.splitterAll)
        self.splitterTop.setOrientation(QtCore.Qt.Horizontal)
        self.splitterTop.setObjectName("splitterTop")
        self.tabWidget_3 = QtWidgets.QTabWidget(self.splitterTop)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.tabWidget_3.sizePolicy().hasHeightForWidth())
        self.tabWidget_3.setSizePolicy(sizePolicy)
        self.tabWidget_3.setObjectName("tabWidget_3")
        self.tab_3 = QtWidgets.QWidget()
        self.tab_3.setObjectName("tab_3")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.tab_3)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.bCCDBack = QtWidgets.QPushButton(self.tab_3)
        self.bCCDBack.setObjectName("bCCDBack")
        self.gridLayout.addWidget(self.bCCDBack, 4, 0, 1, 1)
        self.groupBox_35 = QtWidgets.QGroupBox(self.tab_3)
        self.groupBox_35.setFlat(True)
        self.groupBox_35.setObjectName("groupBox_35")
        self.horizontalLayout_33 = QtWidgets.QHBoxLayout(self.groupBox_35)
        self.horizontalLayout_33.setContentsMargins(0, 10, 0, 0)
        self.horizontalLayout_33.setObjectName("horizontalLayout_33")
        self.tEMCCDGain = QINumberEdit(self.groupBox_35)
        self.tEMCCDGain.setObjectName("tEMCCDGain")
        self.horizontalLayout_33.addWidget(self.tEMCCDGain)
        self.gridLayout.addWidget(self.groupBox_35, 4, 1, 1, 1)
        self.groupBox_38 = QtWidgets.QGroupBox(self.tab_3)
        self.groupBox_38.setFlat(True)
        self.groupBox_38.setCheckable(False)
        self.groupBox_38.setObjectName("groupBox_38")
        self.gridLayout_8 = QtWidgets.QGridLayout(self.groupBox_38)
        self.gridLayout_8.setSpacing(0)
        self.gridLayout_8.setContentsMargins(0, 10, 0, 0)
        self.gridLayout_8.setObjectName("gridLayout_8")
        self.tCCDBGNum = QINumberEdit(self.groupBox_38)
        self.tCCDBGNum.setObjectName("tCCDBGNum")
        self.gridLayout_8.addWidget(self.tCCDBGNum, 0, 0, 1, 1)
        self.bProcessBackgroundSequence = QtWidgets.QToolButton(
            self.groupBox_38)
        self.bProcessBackgroundSequence.setText("")
        self.bProcessBackgroundSequence.setArrowType(QtCore.Qt.RightArrow)
        self.bProcessBackgroundSequence.setObjectName(
            "bProcessBackgroundSequence")
        self.gridLayout_8.addWidget(self.bProcessBackgroundSequence, 0, 1, 1,
                                    1)
        self.gridLayout.addWidget(self.groupBox_38, 4, 2, 1, 1)
        self.groupBox_34 = QtWidgets.QGroupBox(self.tab_3)
        self.groupBox_34.setFlat(True)
        self.groupBox_34.setObjectName("groupBox_34")
        self.horizontalLayout_32 = QtWidgets.QHBoxLayout(self.groupBox_34)
        self.horizontalLayout_32.setContentsMargins(0, 10, 0, 0)
        self.horizontalLayout_32.setObjectName("horizontalLayout_32")
        self.tEMCCDExp = QFNumberEdit(self.groupBox_34)
        self.tEMCCDExp.setObjectName("tEMCCDExp")
        self.horizontalLayout_32.addWidget(self.tEMCCDExp)
        self.gridLayout.addWidget(self.groupBox_34, 3, 1, 1, 1)
        self.bCCDImage = QtWidgets.QPushButton(self.tab_3)
        self.bCCDImage.setObjectName("bCCDImage")
        self.gridLayout.addWidget(self.bCCDImage, 0, 0, 1, 1)
        self.bCCDReference = QtWidgets.QPushButton(self.tab_3)
        self.bCCDReference.setObjectName("bCCDReference")
        self.gridLayout.addWidget(self.bCCDReference, 3, 0, 1, 1)
        self.groupBox_42 = QtWidgets.QGroupBox(self.tab_3)
        self.groupBox_42.setFlat(True)
        self.groupBox_42.setCheckable(False)
        self.groupBox_42.setObjectName("groupBox_42")
        self.gridLayout_12 = QtWidgets.QGridLayout(self.groupBox_42)
        self.gridLayout_12.setSpacing(0)
        self.gridLayout_12.setContentsMargins(0, 10, 0, 0)
        self.gridLayout_12.setObjectName("gridLayout_12")
        self.tSampleName = QtWidgets.QLineEdit(self.groupBox_42)
        self.tSampleName.setToolTip("")
        self.tSampleName.setStatusTip("")
        self.tSampleName.setWhatsThis("")
        self.tSampleName.setAccessibleName("")
        self.tSampleName.setAccessibleDescription("")
        self.tSampleName.setInputMethodHints(QtCore.Qt.ImhNone)
        self.tSampleName.setText("")
        self.tSampleName.setObjectName("tSampleName")
        self.gridLayout_12.addWidget(self.tSampleName, 0, 0, 1, 1)
        self.gridLayout.addWidget(self.groupBox_42, 0, 1, 1, 1)
        self.groupBox_37 = QtWidgets.QGroupBox(self.tab_3)
        self.groupBox_37.setFlat(True)
        self.groupBox_37.setCheckable(False)
        self.groupBox_37.setObjectName("groupBox_37")
        self.horizontalLayout_6 = QtWidgets.QHBoxLayout(self.groupBox_37)
        self.horizontalLayout_6.setContentsMargins(0, 10, 0, 0)
        self.horizontalLayout_6.setObjectName("horizontalLayout_6")
        self.tCCDImageNum = QINumberEdit(self.groupBox_37)
        self.tCCDImageNum.setObjectName("tCCDImageNum")
        self.horizontalLayout_6.addWidget(self.tCCDImageNum)
        self.bProcessImageSequence = QtWidgets.QToolButton(self.groupBox_37)
        self.bProcessImageSequence.setText("")
        self.bProcessImageSequence.setArrowType(QtCore.Qt.RightArrow)
        self.bProcessImageSequence.setObjectName("bProcessImageSequence")
        self.horizontalLayout_6.addWidget(self.bProcessImageSequence)
        self.gridLayout.addWidget(self.groupBox_37, 0, 2, 1, 1)
        self.groupBox = QtWidgets.QGroupBox(self.tab_3)
        self.groupBox.setFlat(True)
        self.groupBox.setObjectName("groupBox")
        self.horizontalLayout = QtWidgets.QHBoxLayout(self.groupBox)
        self.horizontalLayout.setContentsMargins(0, 10, 0, 0)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.tCCDRefNum = QINumberEdit(self.groupBox)
        self.tCCDRefNum.setObjectName("tCCDRefNum")
        self.horizontalLayout.addWidget(self.tCCDRefNum)
        self.bProcessReferenceSequence = QtWidgets.QToolButton(self.groupBox)
        self.bProcessReferenceSequence.setText("")
        self.bProcessReferenceSequence.setArrowType(QtCore.Qt.RightArrow)
        self.bProcessReferenceSequence.setObjectName(
            "bProcessReferenceSequence")
        self.horizontalLayout.addWidget(self.bProcessReferenceSequence)
        self.gridLayout.addWidget(self.groupBox, 3, 2, 1, 1)
        self.gridLayout.setColumnStretch(0, 1)
        self.verticalLayout_2.addLayout(self.gridLayout)
        self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
        self.groupBox_Series = QtWidgets.QGroupBox(self.tab_3)
        self.groupBox_Series.setFlat(True)
        self.groupBox_Series.setObjectName("groupBox_Series")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.groupBox_Series)
        self.horizontalLayout_2.setContentsMargins(0, 10, 0, 0)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.tCCDSeries = QtWidgets.QLineEdit(self.groupBox_Series)
        self.tCCDSeries.setObjectName("tCCDSeries")
        self.horizontalLayout_2.addWidget(self.tCCDSeries)
        self.horizontalLayout_5.addWidget(self.groupBox_Series)
        self.groupBox_4 = QtWidgets.QGroupBox(self.tab_3)
        self.groupBox_4.setFlat(True)
        self.groupBox_4.setObjectName("groupBox_4")
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.groupBox_4)
        self.horizontalLayout_3.setSpacing(6)
        self.horizontalLayout_3.setContentsMargins(0, 10, 0, 0)
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.tSpectrumStep = QtWidgets.QLineEdit(self.groupBox_4)
        self.tSpectrumStep.setObjectName("tSpectrumStep")
        self.horizontalLayout_3.addWidget(self.tSpectrumStep)
        self.horizontalLayout_5.addWidget(self.groupBox_4)
        self.verticalLayout_2.addLayout(self.horizontalLayout_5)
        self.groupBox_46 = QtWidgets.QGroupBox(self.tab_3)
        self.groupBox_46.setFlat(True)
        self.groupBox_46.setObjectName("groupBox_46")
        self.horizontalLayout_37 = QtWidgets.QHBoxLayout(self.groupBox_46)
        self.horizontalLayout_37.setContentsMargins(0, 10, 0, 0)
        self.horizontalLayout_37.setObjectName("horizontalLayout_37")
        self.tCCDComments = QtWidgets.QTextEdit(self.groupBox_46)
        self.tCCDComments.setObjectName("tCCDComments")
        self.horizontalLayout_37.addWidget(self.tCCDComments)
        self.verticalLayout_2.addWidget(self.groupBox_46)
        self.tabWidget_3.addTab(self.tab_3, "")
        self.tab_4 = QtWidgets.QWidget()
        self.tab_4.setObjectName("tab_4")
        self.horizontalLayout_52 = QtWidgets.QHBoxLayout(self.tab_4)
        self.horizontalLayout_52.setObjectName("horizontalLayout_52")
        self.gridLayout_17 = QtWidgets.QGridLayout()
        self.gridLayout_17.setObjectName("gridLayout_17")
        self.groupBox_43 = QtWidgets.QGroupBox(self.tab_4)
        self.groupBox_43.setFlat(True)
        self.groupBox_43.setCheckable(False)
        self.groupBox_43.setObjectName("groupBox_43")
        self.gridLayout_13 = QtWidgets.QGridLayout(self.groupBox_43)
        self.gridLayout_13.setSpacing(0)
        self.gridLayout_13.setContentsMargins(0, 10, 0, 0)
        self.gridLayout_13.setObjectName("gridLayout_13")
        self.tCCDYMin = QtWidgets.QLineEdit(self.groupBox_43)
        self.tCCDYMin.setObjectName("tCCDYMin")
        self.gridLayout_13.addWidget(self.tCCDYMin, 0, 0, 1, 1)
        self.gridLayout_17.addWidget(self.groupBox_43, 1, 0, 1, 1)
        self.groupBox_2 = QtWidgets.QGroupBox(self.tab_4)
        self.groupBox_2.setFlat(True)
        self.groupBox_2.setObjectName("groupBox_2")
        self.horizontalLayout_44 = QtWidgets.QHBoxLayout(self.groupBox_2)
        self.horizontalLayout_44.setContentsMargins(0, 10, 0, 0)
        self.horizontalLayout_44.setObjectName("horizontalLayout_44")
        self.tCCDSampleTemp = QtWidgets.QLineEdit(self.groupBox_2)
        self.tCCDSampleTemp.setObjectName("tCCDSampleTemp")
        self.horizontalLayout_44.addWidget(self.tCCDSampleTemp)
        self.gridLayout_17.addWidget(self.groupBox_2, 0, 0, 1, 1)
        self.groupBox_3 = QtWidgets.QGroupBox(self.tab_4)
        self.groupBox_3.setFlat(True)
        self.groupBox_3.setObjectName("groupBox_3")
        self.horizontalLayout_15 = QtWidgets.QHBoxLayout(self.groupBox_3)
        self.horizontalLayout_15.setContentsMargins(0, 10, 0, 0)
        self.horizontalLayout_15.setObjectName("horizontalLayout_15")
        self.tCCDLEDCurrent = QtWidgets.QLineEdit(self.groupBox_3)
        self.tCCDLEDCurrent.setObjectName("tCCDLEDCurrent")
        self.horizontalLayout_15.addWidget(self.tCCDLEDCurrent)
        self.gridLayout_17.addWidget(self.groupBox_3, 3, 0, 1, 1)
        spacerItem = QtWidgets.QSpacerItem(20, 40,
                                           QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Expanding)
        self.gridLayout_17.addItem(spacerItem, 4, 0, 1, 1)
        self.groupBox_14 = QtWidgets.QGroupBox(self.tab_4)
        self.groupBox_14.setFlat(True)
        self.groupBox_14.setObjectName("groupBox_14")
        self.horizontalLayout_16 = QtWidgets.QHBoxLayout(self.groupBox_14)
        self.horizontalLayout_16.setContentsMargins(0, 10, 0, 0)
        self.horizontalLayout_16.setObjectName("horizontalLayout_16")
        self.tCCDLEDTemp = QtWidgets.QLineEdit(self.groupBox_14)
        self.tCCDLEDTemp.setObjectName("tCCDLEDTemp")
        self.horizontalLayout_16.addWidget(self.tCCDLEDTemp)
        self.gridLayout_17.addWidget(self.groupBox_14, 3, 2, 1, 1)
        self.groupBox_44 = QtWidgets.QGroupBox(self.tab_4)
        self.groupBox_44.setFlat(True)
        self.groupBox_44.setCheckable(False)
        self.groupBox_44.setObjectName("groupBox_44")
        self.gridLayout_14 = QtWidgets.QGridLayout(self.groupBox_44)
        self.gridLayout_14.setSpacing(0)
        self.gridLayout_14.setContentsMargins(0, 10, 0, 0)
        self.gridLayout_14.setObjectName("gridLayout_14")
        self.tCCDYMax = QtWidgets.QLineEdit(self.groupBox_44)
        self.tCCDYMax.setObjectName("tCCDYMax")
        self.gridLayout_14.addWidget(self.tCCDYMax, 0, 0, 1, 1)
        self.gridLayout_17.addWidget(self.groupBox_44, 1, 2, 1, 1)
        self.groupBox_45 = QtWidgets.QGroupBox(self.tab_4)
        self.groupBox_45.setFlat(True)
        self.groupBox_45.setCheckable(False)
        self.groupBox_45.setObjectName("groupBox_45")
        self.gridLayout_15 = QtWidgets.QGridLayout(self.groupBox_45)
        self.gridLayout_15.setSpacing(0)
        self.gridLayout_15.setContentsMargins(0, 10, 0, 0)
        self.gridLayout_15.setObjectName("gridLayout_15")
        self.tCCDSlits = QtWidgets.QLineEdit(self.groupBox_45)
        self.tCCDSlits.setObjectName("tCCDSlits")
        self.gridLayout_15.addWidget(self.tCCDSlits, 0, 0, 1, 1)
        self.gridLayout_17.addWidget(self.groupBox_45, 0, 2, 1, 1)
        self.groupBox_17 = QtWidgets.QGroupBox(self.tab_4)
        self.groupBox_17.setFlat(True)
        self.groupBox_17.setObjectName("groupBox_17")
        self.horizontalLayout_19 = QtWidgets.QHBoxLayout(self.groupBox_17)
        self.horizontalLayout_19.setContentsMargins(0, 10, 0, 0)
        self.horizontalLayout_19.setObjectName("horizontalLayout_19")
        self.tCCDLEDPower = QtWidgets.QLineEdit(self.groupBox_17)
        self.tCCDLEDPower.setObjectName("tCCDLEDPower")
        self.horizontalLayout_19.addWidget(self.tCCDLEDPower)
        self.gridLayout_17.addWidget(self.groupBox_17, 2, 2, 1, 1)
        self.groupBox_15 = QtWidgets.QGroupBox(self.tab_4)
        self.groupBox_15.setFlat(True)
        self.groupBox_15.setObjectName("groupBox_15")
        self.horizontalLayout_17 = QtWidgets.QHBoxLayout(self.groupBox_15)
        self.horizontalLayout_17.setContentsMargins(0, 10, 0, 0)
        self.horizontalLayout_17.setObjectName("horizontalLayout_17")
        self.tCCDNIRPol = QtWidgets.QLineEdit(self.groupBox_15)
        self.tCCDNIRPol.setObjectName("tCCDNIRPol")
        self.horizontalLayout_17.addWidget(self.tCCDNIRPol)
        self.gridLayout_17.addWidget(self.groupBox_15, 2, 0, 1, 1)
        self.horizontalLayout_52.addLayout(self.gridLayout_17)
        self.tabWidget_3.addTab(self.tab_4, "")
        self.splitterImages = QtWidgets.QSplitter(self.splitterTop)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(10)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.splitterImages.sizePolicy().hasHeightForWidth())
        self.splitterImages.setSizePolicy(sizePolicy)
        self.splitterImages.setOrientation(QtCore.Qt.Vertical)
        self.splitterImages.setObjectName("splitterImages")
        self.gCCDImage = ImageViewWithPlotItemContainer(self.splitterImages)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(
            self.gCCDImage.sizePolicy().hasHeightForWidth())
        self.gCCDImage.setSizePolicy(sizePolicy)
        self.gCCDImage.setObjectName("gCCDImage")
        self.gCCDBack = ImageViewWithPlotItemContainer(self.splitterImages)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(
            self.gCCDBack.sizePolicy().hasHeightForWidth())
        self.gCCDBack.setSizePolicy(sizePolicy)
        self.gCCDBack.setObjectName("gCCDBack")
        self.gCCDBin = PlotWidget(self.splitterAll)
        self.gCCDBin.setObjectName("gCCDBin")
        self.layoutWidget = QtWidgets.QWidget(self.splitterAll)
        self.layoutWidget.setObjectName("layoutWidget")
        self.horizontalLayout_34 = QtWidgets.QHBoxLayout(self.layoutWidget)
        self.horizontalLayout_34.setContentsMargins(-1, -1, -1, 0)
        self.horizontalLayout_34.setObjectName("horizontalLayout_34")
        self.pCCD = QtWidgets.QProgressBar(self.layoutWidget)
        self.pCCD.setProperty("value", 0)
        self.pCCD.setObjectName("pCCD")
        self.horizontalLayout_34.addWidget(self.pCCD)
        self.lCCDProg = QtWidgets.QLabel(self.layoutWidget)
        self.lCCDProg.setObjectName("lCCDProg")
        self.horizontalLayout_34.addWidget(self.lCCDProg)
        spacerItem1 = QtWidgets.QSpacerItem(40, 20,
                                            QtWidgets.QSizePolicy.Expanding,
                                            QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_34.addItem(spacerItem1)
        self.groupBox_13 = QtWidgets.QGroupBox(self.layoutWidget)
        self.groupBox_13.setFlat(True)
        self.groupBox_13.setObjectName("groupBox_13")
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout(self.groupBox_13)
        self.horizontalLayout_4.setContentsMargins(0, 10, 0, 0)
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.tCCDFELPulses = QtWidgets.QLineEdit(self.groupBox_13)
        self.tCCDFELPulses.setReadOnly(True)
        self.tCCDFELPulses.setObjectName("tCCDFELPulses")
        self.horizontalLayout_4.addWidget(self.tCCDFELPulses)
        self.horizontalLayout_34.addWidget(self.groupBox_13)
        self.horizontalLayout_34.setStretch(0, 9)
        self.horizontalLayout_34.setStretch(1, 1)
        self.horizontalLayout_34.setStretch(2, 1)
        self.horizontalLayout_34.setStretch(3, 1)
        self.verticalLayout.addWidget(self.splitterAll)

        self.retranslateUi(TwoColorAbs)
        self.tabWidget_3.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(TwoColorAbs)
Ejemplo n.º 33
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(639, 516)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.verticalLayout_2 = QtGui.QVBoxLayout(self.centralwidget)
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.graphicsView = PlotWidget(self.centralwidget)
        self.graphicsView.setObjectName(_fromUtf8("graphicsView"))
        self.verticalLayout_2.addWidget(self.graphicsView)
        self.label_2 = QtGui.QLabel(self.centralwidget)
        self.label_2.setAlignment(QtCore.Qt.AlignRight
                                  | QtCore.Qt.AlignTrailing
                                  | QtCore.Qt.AlignVCenter)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.verticalLayout_2.addWidget(self.label_2)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 639, 25))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        self.menuMenu = QtGui.QMenu(self.menubar)
        self.menuMenu.setObjectName(_fromUtf8("menuMenu"))
        self.menuAbout = QtGui.QMenu(self.menubar)
        self.menuAbout.setObjectName(_fromUtf8("menuAbout"))
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        MainWindow.setStatusBar(self.statusbar)
        self.dockWidget = QtGui.QDockWidget(MainWindow)
        self.dockWidget.setObjectName(_fromUtf8("dockWidget"))
        self.dockWidgetContents = QtGui.QWidget()
        self.dockWidgetContents.setObjectName(_fromUtf8("dockWidgetContents"))
        self.verticalLayout = QtGui.QVBoxLayout(self.dockWidgetContents)
        self.verticalLayout.setMargin(0)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.label = QtGui.QLabel(self.dockWidgetContents)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label.setFont(font)
        self.label.setObjectName(_fromUtf8("label"))
        self.verticalLayout.addWidget(self.label)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setContentsMargins(-1, 0, -1, -1)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.label_5 = QtGui.QLabel(self.dockWidgetContents)
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.horizontalLayout.addWidget(self.label_5)
        self.comboBox = QtGui.QComboBox(self.dockWidgetContents)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.comboBox.sizePolicy().hasHeightForWidth())
        self.comboBox.setSizePolicy(sizePolicy)
        self.comboBox.setObjectName(_fromUtf8("comboBox"))
        self.horizontalLayout.addWidget(self.comboBox)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.verticalLayout_4 = QtGui.QVBoxLayout()
        self.verticalLayout_4.setContentsMargins(-1, 0, -1, -1)
        self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4"))
        self.label_8 = QtGui.QLabel(self.dockWidgetContents)
        self.label_8.setObjectName(_fromUtf8("label_8"))
        self.verticalLayout_4.addWidget(self.label_8)
        self.horizontalSlider_3 = QtGui.QSlider(self.dockWidgetContents)
        self.horizontalSlider_3.setProperty("value", 40)
        self.horizontalSlider_3.setOrientation(QtCore.Qt.Horizontal)
        self.horizontalSlider_3.setObjectName(_fromUtf8("horizontalSlider_3"))
        self.verticalLayout_4.addWidget(self.horizontalSlider_3)
        self.label_6 = QtGui.QLabel(self.dockWidgetContents)
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self.verticalLayout_4.addWidget(self.label_6)
        self.horizontalSlider = QtGui.QSlider(self.dockWidgetContents)
        self.horizontalSlider.setMaximum(50)
        self.horizontalSlider.setProperty("value", 5)
        self.horizontalSlider.setOrientation(QtCore.Qt.Horizontal)
        self.horizontalSlider.setObjectName(_fromUtf8("horizontalSlider"))
        self.verticalLayout_4.addWidget(self.horizontalSlider)
        self.label_7 = QtGui.QLabel(self.dockWidgetContents)
        self.label_7.setObjectName(_fromUtf8("label_7"))
        self.verticalLayout_4.addWidget(self.label_7)
        self.horizontalSlider_2 = QtGui.QSlider(self.dockWidgetContents)
        self.horizontalSlider_2.setProperty("value", 20)
        self.horizontalSlider_2.setOrientation(QtCore.Qt.Horizontal)
        self.horizontalSlider_2.setObjectName(_fromUtf8("horizontalSlider_2"))
        self.verticalLayout_4.addWidget(self.horizontalSlider_2)
        self.verticalLayout.addLayout(self.verticalLayout_4)
        spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.verticalLayout_6 = QtGui.QVBoxLayout()
        self.verticalLayout_6.setContentsMargins(-1, 0, -1, -1)
        self.verticalLayout_6.setObjectName(_fromUtf8("verticalLayout_6"))
        self.label_10 = QtGui.QLabel(self.dockWidgetContents)
        self.label_10.setObjectName(_fromUtf8("label_10"))
        self.verticalLayout_6.addWidget(self.label_10)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setContentsMargins(-1, 0, -1, -1)
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.checkBox = QtGui.QCheckBox(self.dockWidgetContents)
        self.checkBox.setObjectName(_fromUtf8("checkBox"))
        self.horizontalLayout_2.addWidget(self.checkBox)
        self.checkBox_2 = QtGui.QCheckBox(self.dockWidgetContents)
        self.checkBox_2.setObjectName(_fromUtf8("checkBox_2"))
        self.horizontalLayout_2.addWidget(self.checkBox_2)
        self.verticalLayout_6.addLayout(self.horizontalLayout_2)
        self.verticalLayout.addLayout(self.verticalLayout_6)
        self.verticalLayout_5 = QtGui.QVBoxLayout()
        self.verticalLayout_5.setContentsMargins(-1, 0, -1, -1)
        self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5"))
        self.label_9 = QtGui.QLabel(self.dockWidgetContents)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_9.setFont(font)
        self.label_9.setObjectName(_fromUtf8("label_9"))
        self.verticalLayout_5.addWidget(self.label_9)
        self.checkBox_3 = QtGui.QCheckBox(self.dockWidgetContents)
        self.checkBox_3.setObjectName(_fromUtf8("checkBox_3"))
        self.verticalLayout_5.addWidget(self.checkBox_3)
        self.checkBox_4 = QtGui.QCheckBox(self.dockWidgetContents)
        self.checkBox_4.setObjectName(_fromUtf8("checkBox_4"))
        self.verticalLayout_5.addWidget(self.checkBox_4)
        self.checkBox_5 = QtGui.QCheckBox(self.dockWidgetContents)
        self.checkBox_5.setObjectName(_fromUtf8("checkBox_5"))
        self.verticalLayout_5.addWidget(self.checkBox_5)
        self.verticalLayout.addLayout(self.verticalLayout_5)
        self.pushButton = QtGui.QPushButton(self.dockWidgetContents)
        font = QtGui.QFont()
        font.setPointSize(14)
        self.pushButton.setFont(font)
        self.pushButton.setAutoFillBackground(False)
        self.pushButton.setObjectName(_fromUtf8("pushButton"))
        self.verticalLayout.addWidget(self.pushButton)
        self.dockWidget.setWidget(self.dockWidgetContents)
        MainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(1), self.dockWidget)
        self.dockWidget_2 = QtGui.QDockWidget(MainWindow)
        self.dockWidget_2.setObjectName(_fromUtf8("dockWidget_2"))
        self.dockWidgetContents_2 = QtGui.QWidget()
        self.dockWidgetContents_2.setObjectName(
            _fromUtf8("dockWidgetContents_2"))
        self.verticalLayout_3 = QtGui.QVBoxLayout(self.dockWidgetContents_2)
        self.verticalLayout_3.setMargin(0)
        self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
        self.label_3 = QtGui.QLabel(self.dockWidgetContents_2)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_3.setFont(font)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.verticalLayout_3.addWidget(self.label_3)
        self.label_4 = QtGui.QLabel(self.dockWidgetContents_2)
        font = QtGui.QFont()
        font.setPointSize(15)
        font.setBold(True)
        font.setWeight(75)
        self.label_4.setFont(font)
        self.label_4.setAlignment(QtCore.Qt.AlignCenter)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.verticalLayout_3.addWidget(self.label_4)
        spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
                                        QtGui.QSizePolicy.Expanding)
        self.verticalLayout_3.addItem(spacerItem1)
        self.dockWidget_2.setWidget(self.dockWidgetContents_2)
        MainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(2),
                                 self.dockWidget_2)
        self.actionRefresh_Serial_Ports = QtGui.QAction(MainWindow)
        self.actionRefresh_Serial_Ports.setObjectName(
            _fromUtf8("actionRefresh_Serial_Ports"))
        self.actionProjeto_GitHub = QtGui.QAction(MainWindow)
        self.actionProjeto_GitHub.setObjectName(
            _fromUtf8("actionProjeto_GitHub"))
        self.actionReportar_Erro = QtGui.QAction(MainWindow)
        self.actionReportar_Erro.setObjectName(
            _fromUtf8("actionReportar_Erro"))
        self.actionContato = QtGui.QAction(MainWindow)
        self.actionContato.setObjectName(_fromUtf8("actionContato"))
        self.menuMenu.addAction(self.actionRefresh_Serial_Ports)
        self.menuAbout.addAction(self.actionProjeto_GitHub)
        self.menuAbout.addAction(self.actionReportar_Erro)
        self.menuAbout.addAction(self.actionContato)
        self.menubar.addAction(self.menuMenu.menuAction())
        self.menubar.addAction(self.menuAbout.menuAction())

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Ejemplo n.º 34
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(900, 1000)
        font = QtGui.QFont()
        font.setFamily("Microsoft YaHei UI Light")
        font.setPointSize(16)
        MainWindow.setFont(font)
        icon = QtGui.QIcon()
        icon.addPixmap(
            QtGui.QPixmap(
                "../hackathons/Simple_PySide_Base/icons/16x16/cil-magnifying-glass.png"
            ), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        MainWindow.setWindowIcon(icon)
        MainWindow.setStyleSheet("background-color: rgb(22, 22, 37);\n" "")
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.frame = QtWidgets.QFrame(self.centralwidget)
        self.frame.setGeometry(QtCore.QRect(300, 60, 241, 71))
        self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame.setObjectName("frame")
        self.Keyword_box = QtWidgets.QLineEdit(self.frame)
        self.Keyword_box.setGeometry(QtCore.QRect(0, 10, 240, 40))
        self.Keyword_box.setMinimumSize(QtCore.QSize(240, 40))
        self.Keyword_box.setMaximumSize(QtCore.QSize(240, 40))
        font = QtGui.QFont()
        font.setPointSize(18)
        self.Keyword_box.setFont(font)
        self.Keyword_box.setStyleSheet(
            "QLineEdit\n"
            "{\n"
            "    border: 2px solid rgb(48, 48, 81);\n"
            "    border-radius:20px;\n"
            "    color :#FFF;\n"
            "    padding-left: 68px;\n"
            "    padding-right: 20px;\n"
            "    background-color: rgb(30, 30, 48);\n"
            "}\n"
            "QLineEdit:hover{\n"
            "    border: 2px solid rgb(138, 102, 64);\n"
            "}\n"
            "QLineEdit:focus{\n"
            "    border:2px solid rgb(85, 150, 270);\n"
            "    background-color: rgb(43, 45, 56);\n"
            "}")
        self.Keyword_box.setText("")
        self.Keyword_box.setAlignment(QtCore.Qt.AlignJustify
                                      | QtCore.Qt.AlignVCenter)
        self.Keyword_box.setObjectName("Keyword_box")
        self.frame_2 = QtWidgets.QFrame(self.centralwidget)
        self.frame_2.setGeometry(QtCore.QRect(200, 190, 121, 81))
        self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_2.setObjectName("frame_2")
        self.pushButton = QtWidgets.QPushButton(self.frame_2)
        self.pushButton.setGeometry(QtCore.QRect(0, 0, 121, 81))
        font = QtGui.QFont()
        font.setPointSize(16)
        self.pushButton.setFont(font)
        self.pushButton.setStyleSheet("QPushButton{\n"
                                      "    border-color: rgb(85, 0, 0);\n"
                                      "    background-color:rgb(22, 22, 37);\n"
                                      "    border:none;\n"
                                      "    border-radius:20px;\n"
                                      "    color: rgb(108,117,125);\n"
                                      "\n"
                                      "}\n"
                                      "QPushButton:hover{\n"
                                      "    background-color:rgb(40,41,58);\n"
                                      "    border:none;\n"
                                      "    color:rgb(108,117,125);\n"
                                      "}\n"
                                      "QPushButton:pressed{\n"
                                      "\n"
                                      "    color:rgb(76,117,242);\n"
                                      "    background-color:rgb(30,30,48);\n"
                                      "}")
        self.pushButton.setObjectName("pushButton")
        self.graphicsView = PlotWidget(self.centralwidget)
        self.graphicsView.setGeometry(QtCore.QRect(130, 280, 591, 411))
        self.graphicsView.setStyleSheet("border-radius:20px;\n"
                                        "background-color=rgb(255, 255, 255);")
        self.graphicsView.setObjectName("graphicsView")
        self.frame_3 = QtWidgets.QFrame(self.centralwidget)
        self.frame_3.setGeometry(QtCore.QRect(360, 190, 121, 81))
        self.frame_3.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_3.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_3.setObjectName("frame_3")
        self.pushButton_2 = QtWidgets.QPushButton(self.frame_3)
        self.pushButton_2.setGeometry(QtCore.QRect(0, 0, 121, 81))
        font = QtGui.QFont()
        font.setPointSize(16)
        self.pushButton_2.setFont(font)
        self.pushButton_2.setStyleSheet(
            "QPushButton{\n"
            "    border-color: rgb(85, 0, 0);\n"
            "    background-color:rgb(22, 22, 37);\n"
            "    border:none;\n"
            "    border-radius:20px;\n"
            "    color: rgb(108,117,125);\n"
            "\n"
            "}\n"
            "QPushButton:hover{\n"
            "    background-color:rgb(40,41,58);\n"
            "    border:none;\n"
            "    color:rgb(108,117,125);\n"
            "}\n"
            "QPushButton:pressed{\n"
            "\n"
            "    color:rgb(76,117,242);\n"
            "    background-color:rgb(30,30,48);\n"
            "}")
        self.pushButton_2.setObjectName("pushButton_2")
        self.frame_4 = QtWidgets.QFrame(self.centralwidget)
        self.frame_4.setGeometry(QtCore.QRect(520, 190, 121, 81))
        self.frame_4.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_4.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_4.setObjectName("frame_4")
        self.pushButton_3 = QtWidgets.QPushButton(self.frame_4)
        self.pushButton_3.setGeometry(QtCore.QRect(0, 0, 131, 71))
        font = QtGui.QFont()
        font.setPointSize(13)
        self.pushButton_3.setFont(font)
        self.pushButton_3.setStyleSheet(
            "QPushButton{\n"
            "    font-size = 10px;\n"
            "    border-color: rgb(85, 0, 0);\n"
            "    background-color:rgb(22, 22, 37);\n"
            "    border:none;\n"
            "    border-radius:20px;\n"
            "    color: rgb(108,117,125);\n"
            "\n"
            "}\n"
            "QPushButton:hover{\n"
            "    background-color:rgb(40,41,58);\n"
            "    border:none;\n"
            "    color:rgb(108,117,125);\n"
            "}\n"
            "QPushButton:pressed{\n"
            "\n"
            "    color:rgb(76,117,242);\n"
            "    background-color:rgb(30,30,48);\n"
            "}")
        self.pushButton_3.setObjectName("pushButton_3")
        self.Search_button = QtWidgets.QPushButton(self.centralwidget)
        self.Search_button.setGeometry(QtCore.QRect(340, 140, 170, 40))
        font = QtGui.QFont()
        font.setFamily("Microsoft JhengHei UI")
        font.setPointSize(16)
        self.Search_button.setFont(font)
        self.Search_button.setStyleSheet(
            "QPushButton{\n"
            "    border-color: rgb(85, 0, 0);\n"
            "    background-color:rgb(55, 94, 115);\n"
            "    border:rgb(32, 32, 47);\n"
            "    border-radius:20px;\n"
            "    color: rgb(255, 255, 255);\n"
            "    border-left:3px solid rgb(130, 65, 0);\n"
            "    border-right:3px solid rgb(130, 65, 0);\n"
            "    border-bottom:3px solid rgb(130, 65, 0);\n"
            "    border-top:3px solid rgb(130, 65, 0);\n"
            "}\n"
            "QPushButton:hover{\n"
            "    background-color:rgb(138, 79, 149);\n"
            "    border:rgb(19, 73, 106);\n"
            "    border-left:1px solid rgb(30, 30, 48);\n"
            "    border-right:1px solid rgb(30, 30, 48);\n"
            "    border-bottom:1px solid rgb(30, 30, 48);\n"
            "}\n"
            "\n"
            "QPushButton:pressed{\n"
            "    background-color:rgb(99, 37, 242);\n"
            "    border-left:1px solid rgb(30, 30, 48);\n"
            "    border-right:1px solid rgb(30, 30, 48);\n"
            "    border-bottom:none;\n"
            "}")
        icon1 = QtGui.QIcon()
        icon1.addPixmap(
            QtGui.QPixmap(
                "../hackathons/Simple_PySide_Base/icons/16x16/cil-magnifying-glass.png"
            ), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        icon1.addPixmap(
            QtGui.QPixmap(
                "../hackathons/Simple_PySide_Base/icons/16x16/cil-reload.png"),
            QtGui.QIcon.Selected, QtGui.QIcon.Off)
        icon1.addPixmap(
            QtGui.QPixmap(
                "../hackathons/Simple_PySide_Base/icons/16x16/cil-magnifying-glass.png"
            ), QtGui.QIcon.Selected, QtGui.QIcon.On)
        self.Search_button.setIcon(icon1)
        self.Search_button.setAutoDefault(False)
        self.Search_button.setDefault(False)
        self.Search_button.setObjectName("Search_button")
        self.lineEdit = QtWidgets.QLineEdit(self.centralwidget)
        self.lineEdit.setGeometry(QtCore.QRect(62, 704, 751, 241))
        self.lineEdit.setObjectName("lineEdit")
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 900, 22))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
        self.pushButton.clicked.connect(self.Display_Tweets)
        self.pushButton_3.clicked.connect(self.graphs)
        self.Search_button.clicked.connect(self.senti_analysis)
Ejemplo n.º 35
0
class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(566, 433)
        self.gridLayout = QtWidgets.QGridLayout(Form)
        self.gridLayout.setObjectName("gridLayout")
        self.tabWidget = QtWidgets.QTabWidget(Form)
        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.graphicsView_t1 = PlotWidget(self.tab)
        self.graphicsView_t1.setObjectName("graphicsView_t1")
        self.gridLayout_2.addWidget(self.graphicsView_t1, 0, 3, 1, 3)
        self.graphicsView_t2 = PlotWidget(self.tab)
        self.graphicsView_t2.setObjectName("graphicsView_t2")
        self.gridLayout_2.addWidget(self.graphicsView_t2, 1, 3, 1, 3)
        self.pushButton = QtWidgets.QPushButton(self.tab)
        self.pushButton.setObjectName("pushButton")
        self.gridLayout_2.addWidget(self.pushButton, 2, 0, 1, 1)
        self.comboBox_sp = QtWidgets.QComboBox(self.tab)
        self.comboBox_sp.setObjectName("comboBox_sp")
        self.comboBox_sp.addItem("")
        self.comboBox_sp.addItem("")
        self.comboBox_sp.addItem("")
        self.comboBox_sp.addItem("")
        self.gridLayout_2.addWidget(self.comboBox_sp, 2, 1, 1, 1)
        self.spinBox_TR = QtWidgets.QSpinBox(self.tab)
        self.spinBox_TR.setObjectName("spinBox_TR")
        self.gridLayout_2.addWidget(self.spinBox_TR, 2, 2, 1, 1)
        self.spinBox_TE = QtWidgets.QSpinBox(self.tab)
        self.spinBox_TE.setObjectName("spinBox_TE")
        self.gridLayout_2.addWidget(self.spinBox_TE, 2, 3, 1, 1)
        self.spinBox_FA = QtWidgets.QSpinBox(self.tab)
        self.spinBox_FA.setObjectName("spinBox_FA")
        self.gridLayout_2.addWidget(self.spinBox_FA, 2, 4, 1, 1)
        self.spinBox_time = QtWidgets.QSpinBox(self.tab)
        self.spinBox_time.setObjectName("spinBox_time")
        self.gridLayout_2.addWidget(self.spinBox_time, 2, 5, 1, 1)
        self.phantom1 = QtWidgets.QLabel(self.tab)
        self.phantom1.setScaledContents(True)
        self.phantom1.setAlignment(QtCore.Qt.AlignCenter)
        self.phantom1.setObjectName("phantom1")
        self.gridLayout_2.addWidget(self.phantom1, 0, 0, 1, 3)
        self.phantom2 = QtWidgets.QLabel(self.tab)
        self.phantom2.setScaledContents(True)
        self.phantom2.setAlignment(QtCore.Qt.AlignCenter)
        self.phantom2.setObjectName("phantom2")
        self.gridLayout_2.addWidget(self.phantom2, 1, 0, 1, 3)
        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.i = QtWidgets.QLabel(self.tab_2)
        self.i.setScaledContents(True)
        self.i.setAlignment(QtCore.Qt.AlignCenter)
        self.i.setObjectName("i")
        self.gridLayout_3.addWidget(self.i, 0, 0, 1, 1)
        self.kspace = QtWidgets.QLabel(self.tab_2)
        self.kspace.setScaledContents(True)
        self.kspace.setAlignment(QtCore.Qt.AlignCenter)
        self.kspace.setObjectName("kspace")
        self.gridLayout_3.addWidget(self.kspace, 1, 0, 1, 1)
        self.tabWidget.addTab(self.tab_2, "")
        self.gridLayout.addWidget(self.tabWidget, 0, 0, 1, 1)

        self.retranslateUi(Form)
        self.tabWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        _translate = QtCore.QCoreApplication.translate
        Form.setWindowTitle(_translate("Form", "Form"))
        self.pushButton.setText(_translate("Form", "Browse"))
        self.comboBox_sp.setItemText(0, _translate("Form", "O.Array"))
        self.comboBox_sp.setItemText(1, _translate("Form", "T1"))
        self.comboBox_sp.setItemText(2, _translate("Form", "T2"))
        self.comboBox_sp.setItemText(3, _translate("Form", "PD"))
        self.phantom1.setText(_translate("Form", "phantom1"))
        self.phantom2.setText(_translate("Form", "phantom2"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab),
                                  _translate("Form", "Tab 1"))
        self.i.setText(_translate("Form", "image"))
        self.kspace.setText(_translate("Form", "Kspace"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2),
                                  _translate("Form", "Tab 2"))
Ejemplo n.º 36
0
 def __getattr__(self, item):
     try:
         return PlotWidget.__getattr__(self, item)
     except NameError:
         raise AttributeError("{} has no attribute {}".format(
             self.__class__.__name__, item))
Ejemplo n.º 37
0
    def setupUi(self, lasagna_mainWindow):
        lasagna_mainWindow.setObjectName("lasagna_mainWindow")
        lasagna_mainWindow.resize(1002, 795)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            lasagna_mainWindow.sizePolicy().hasHeightForWidth())
        lasagna_mainWindow.setSizePolicy(sizePolicy)
        lasagna_mainWindow.setMinimumSize(QtCore.QSize(540, 540))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/icons/icons/lasagna_32.png"),
                       QtGui.QIcon.Normal, QtGui.QIcon.On)
        lasagna_mainWindow.setWindowIcon(icon)
        self.centralwidget = QtWidgets.QWidget(lasagna_mainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.gridLayout = QtWidgets.QGridLayout(self.centralwidget)
        self.gridLayout.setObjectName("gridLayout")
        self.splitter_3 = QtWidgets.QSplitter(self.centralwidget)
        self.splitter_3.setOrientation(QtCore.Qt.Vertical)
        self.splitter_3.setObjectName("splitter_3")
        self.splitter = QtWidgets.QSplitter(self.splitter_3)
        self.splitter.setOrientation(QtCore.Qt.Horizontal)
        self.splitter.setObjectName("splitter")
        self.graphicsView_1 = LasagnaPlotWidget(self.splitter)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Ignored,
                                           QtWidgets.QSizePolicy.Ignored)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.graphicsView_1.sizePolicy().hasHeightForWidth())
        self.graphicsView_1.setSizePolicy(sizePolicy)
        self.graphicsView_1.setObjectName("graphicsView_1")
        self.graphicsView_2 = LasagnaPlotWidget(self.splitter)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Ignored,
                                           QtWidgets.QSizePolicy.Ignored)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.graphicsView_2.sizePolicy().hasHeightForWidth())
        self.graphicsView_2.setSizePolicy(sizePolicy)
        self.graphicsView_2.setObjectName("graphicsView_2")
        self.splitter_2 = QtWidgets.QSplitter(self.splitter_3)
        self.splitter_2.setOrientation(QtCore.Qt.Horizontal)
        self.splitter_2.setObjectName("splitter_2")
        self.graphicsView_3 = LasagnaPlotWidget(self.splitter_2)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Ignored,
                                           QtWidgets.QSizePolicy.Ignored)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.graphicsView_3.sizePolicy().hasHeightForWidth())
        self.graphicsView_3.setSizePolicy(sizePolicy)
        self.graphicsView_3.setObjectName("graphicsView_3")
        self.frame_2 = QtWidgets.QFrame(self.splitter_2)
        self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_2.setObjectName("frame_2")
        self.gridLayout.addWidget(self.splitter_3, 0, 0, 1, 1)
        lasagna_mainWindow.setCentralWidget(self.centralwidget)
        self.menuBar = QtWidgets.QMenuBar(lasagna_mainWindow)
        self.menuBar.setGeometry(QtCore.QRect(0, 0, 1002, 22))
        self.menuBar.setObjectName("menuBar")
        self.menuFile = QtWidgets.QMenu(self.menuBar)
        self.menuFile.setObjectName("menuFile")
        self.menuOpen_recent = QtWidgets.QMenu(self.menuFile)
        self.menuOpen_recent.setObjectName("menuOpen_recent")
        self.menuLoad_ingredient = QtWidgets.QMenu(self.menuFile)
        self.menuLoad_ingredient.setObjectName("menuLoad_ingredient")
        self.menuHelp = QtWidgets.QMenu(self.menuBar)
        self.menuHelp.setObjectName("menuHelp")
        self.menuPlugins = QtWidgets.QMenu(self.menuBar)
        self.menuPlugins.setObjectName("menuPlugins")
        lasagna_mainWindow.setMenuBar(self.menuBar)
        self.mainDockWidget = QtWidgets.QDockWidget(lasagna_mainWindow)
        self.mainDockWidget.setMinimumSize(QtCore.QSize(380, 613))
        self.mainDockWidget.setFeatures(
            QtWidgets.QDockWidget.DockWidgetFloatable
            | QtWidgets.QDockWidget.DockWidgetMovable)
        self.mainDockWidget.setObjectName("mainDockWidget")
        self.dockWidgetContents = QtWidgets.QWidget()
        self.dockWidgetContents.setObjectName("dockWidgetContents")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.dockWidgetContents)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.tabWidget = QtWidgets.QTabWidget(self.dockWidgetContents)
        self.tabWidget.setObjectName("tabWidget")
        self.imageSettingsTab = QtWidgets.QWidget()
        self.imageSettingsTab.setObjectName("imageSettingsTab")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.imageSettingsTab)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.intensityHistogram = PlotWidget(self.imageSettingsTab)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.intensityHistogram.sizePolicy().hasHeightForWidth())
        self.intensityHistogram.setSizePolicy(sizePolicy)
        self.intensityHistogram.setMinimumSize(QtCore.QSize(0, 180))
        self.intensityHistogram.setMaximumSize(QtCore.QSize(16777215, 180))
        self.intensityHistogram.setObjectName("intensityHistogram")
        self.verticalLayout_3.addWidget(self.intensityHistogram)
        self.horizontalLayout_13 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_13.setObjectName("horizontalLayout_13")
        self.logYcheckBox = QtWidgets.QCheckBox(self.imageSettingsTab)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.logYcheckBox.sizePolicy().hasHeightForWidth())
        self.logYcheckBox.setSizePolicy(sizePolicy)
        self.logYcheckBox.setMaximumSize(QtCore.QSize(16777215, 21))
        self.logYcheckBox.setChecked(True)
        self.logYcheckBox.setObjectName("logYcheckBox")
        self.horizontalLayout_13.addWidget(self.logYcheckBox)
        self.imageAlpha_horizontalSlider = QtWidgets.QSlider(
            self.imageSettingsTab)
        self.imageAlpha_horizontalSlider.setMinimumSize(QtCore.QSize(221, 0))
        self.imageAlpha_horizontalSlider.setMaximum(100)
        self.imageAlpha_horizontalSlider.setProperty("value", 100)
        self.imageAlpha_horizontalSlider.setOrientation(QtCore.Qt.Horizontal)
        self.imageAlpha_horizontalSlider.setInvertedAppearance(False)
        self.imageAlpha_horizontalSlider.setInvertedControls(False)
        self.imageAlpha_horizontalSlider.setObjectName(
            "imageAlpha_horizontalSlider")
        self.horizontalLayout_13.addWidget(self.imageAlpha_horizontalSlider)
        self.verticalLayout_3.addLayout(self.horizontalLayout_13)
        self.imageStackLayers_TreeView = QtWidgets.QTreeView(
            self.imageSettingsTab)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.imageStackLayers_TreeView.sizePolicy().hasHeightForWidth())
        self.imageStackLayers_TreeView.setSizePolicy(sizePolicy)
        self.imageStackLayers_TreeView.setMinimumSize(QtCore.QSize(0, 271))
        self.imageStackLayers_TreeView.setRootIsDecorated(False)
        self.imageStackLayers_TreeView.setObjectName(
            "imageStackLayers_TreeView")
        self.verticalLayout_3.addWidget(self.imageStackLayers_TreeView)
        spacerItem = QtWidgets.QSpacerItem(20, 162,
                                           QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_3.addItem(spacerItem)
        self.tabWidget.addTab(self.imageSettingsTab, "")
        self.pointsSettingsTab = QtWidgets.QWidget()
        self.pointsSettingsTab.setObjectName("pointsSettingsTab")
        self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.pointsSettingsTab)
        self.verticalLayout_5.setObjectName("verticalLayout_5")
        self.points_TreeView = QtWidgets.QTreeView(self.pointsSettingsTab)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.points_TreeView.sizePolicy().hasHeightForWidth())
        self.points_TreeView.setSizePolicy(sizePolicy)
        self.points_TreeView.setMinimumSize(QtCore.QSize(0, 281))
        self.points_TreeView.setMaximumSize(QtCore.QSize(16777215, 330))
        self.points_TreeView.setObjectName("points_TreeView")
        self.verticalLayout_5.addWidget(self.points_TreeView)
        self.horizontalLayout_10 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_10.setObjectName("horizontalLayout_10")
        self.groupBoxAxisRatio_2 = QtWidgets.QGroupBox(self.pointsSettingsTab)
        self.groupBoxAxisRatio_2.setEnabled(True)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.groupBoxAxisRatio_2.sizePolicy().hasHeightForWidth())
        self.groupBoxAxisRatio_2.setSizePolicy(sizePolicy)
        self.groupBoxAxisRatio_2.setMinimumSize(QtCore.QSize(131, 131))
        self.groupBoxAxisRatio_2.setMaximumSize(QtCore.QSize(131, 16777215))
        self.groupBoxAxisRatio_2.setObjectName("groupBoxAxisRatio_2")
        self.layoutWidget = QtWidgets.QWidget(self.groupBoxAxisRatio_2)
        self.layoutWidget.setGeometry(QtCore.QRect(11, 30, 106, 29))
        self.layoutWidget.setObjectName("layoutWidget")
        self.horizontalLayout_5 = QtWidgets.QHBoxLayout(self.layoutWidget)
        self.horizontalLayout_5.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
        self.axisRatioLabel_4 = QtWidgets.QLabel(self.layoutWidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.axisRatioLabel_4.sizePolicy().hasHeightForWidth())
        self.axisRatioLabel_4.setSizePolicy(sizePolicy)
        self.axisRatioLabel_4.setMinimumSize(QtCore.QSize(45, 16))
        self.axisRatioLabel_4.setMaximumSize(QtCore.QSize(45, 16))
        self.axisRatioLabel_4.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.axisRatioLabel_4.setAlignment(QtCore.Qt.AlignRight
                                           | QtCore.Qt.AlignTrailing
                                           | QtCore.Qt.AlignVCenter)
        self.axisRatioLabel_4.setObjectName("axisRatioLabel_4")
        self.horizontalLayout_5.addWidget(self.axisRatioLabel_4)
        self.view1Z_spinBox = QtWidgets.QSpinBox(self.layoutWidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.view1Z_spinBox.sizePolicy().hasHeightForWidth())
        self.view1Z_spinBox.setSizePolicy(sizePolicy)
        self.view1Z_spinBox.setMinimum(1)
        self.view1Z_spinBox.setMaximum(99)
        self.view1Z_spinBox.setObjectName("view1Z_spinBox")
        self.horizontalLayout_5.addWidget(self.view1Z_spinBox)
        self.layoutWidget1 = QtWidgets.QWidget(self.groupBoxAxisRatio_2)
        self.layoutWidget1.setGeometry(QtCore.QRect(11, 60, 106, 29))
        self.layoutWidget1.setObjectName("layoutWidget1")
        self.horizontalLayout_6 = QtWidgets.QHBoxLayout(self.layoutWidget1)
        self.horizontalLayout_6.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_6.setObjectName("horizontalLayout_6")
        self.axisRatioLabel_5 = QtWidgets.QLabel(self.layoutWidget1)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.axisRatioLabel_5.sizePolicy().hasHeightForWidth())
        self.axisRatioLabel_5.setSizePolicy(sizePolicy)
        self.axisRatioLabel_5.setMinimumSize(QtCore.QSize(45, 16))
        self.axisRatioLabel_5.setMaximumSize(QtCore.QSize(45, 16))
        self.axisRatioLabel_5.setAlignment(QtCore.Qt.AlignRight
                                           | QtCore.Qt.AlignTrailing
                                           | QtCore.Qt.AlignVCenter)
        self.axisRatioLabel_5.setObjectName("axisRatioLabel_5")
        self.horizontalLayout_6.addWidget(self.axisRatioLabel_5)
        self.view2Z_spinBox = QtWidgets.QSpinBox(self.layoutWidget1)
        self.view2Z_spinBox.setMinimum(1)
        self.view2Z_spinBox.setObjectName("view2Z_spinBox")
        self.horizontalLayout_6.addWidget(self.view2Z_spinBox)
        self.layoutWidget2 = QtWidgets.QWidget(self.groupBoxAxisRatio_2)
        self.layoutWidget2.setGeometry(QtCore.QRect(11, 90, 106, 29))
        self.layoutWidget2.setObjectName("layoutWidget2")
        self.horizontalLayout_7 = QtWidgets.QHBoxLayout(self.layoutWidget2)
        self.horizontalLayout_7.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_7.setObjectName("horizontalLayout_7")
        self.axisRatioLabel_6 = QtWidgets.QLabel(self.layoutWidget2)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.axisRatioLabel_6.sizePolicy().hasHeightForWidth())
        self.axisRatioLabel_6.setSizePolicy(sizePolicy)
        self.axisRatioLabel_6.setMinimumSize(QtCore.QSize(45, 16))
        self.axisRatioLabel_6.setMaximumSize(QtCore.QSize(45, 16))
        self.axisRatioLabel_6.setAlignment(QtCore.Qt.AlignRight
                                           | QtCore.Qt.AlignTrailing
                                           | QtCore.Qt.AlignVCenter)
        self.axisRatioLabel_6.setObjectName("axisRatioLabel_6")
        self.horizontalLayout_7.addWidget(self.axisRatioLabel_6)
        self.view3Z_spinBox = QtWidgets.QSpinBox(self.layoutWidget2)
        self.view3Z_spinBox.setMinimum(1)
        self.view3Z_spinBox.setObjectName("view3Z_spinBox")
        self.horizontalLayout_7.addWidget(self.view3Z_spinBox)
        self.horizontalLayout_10.addWidget(self.groupBoxAxisRatio_2)
        self.frame = QtWidgets.QFrame(self.pointsSettingsTab)
        self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame.setObjectName("frame")
        self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.frame)
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.labelMarker = QtWidgets.QLabel(self.frame)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.labelMarker.sizePolicy().hasHeightForWidth())
        self.labelMarker.setSizePolicy(sizePolicy)
        self.labelMarker.setMaximumSize(QtCore.QSize(42, 24))
        self.labelMarker.setObjectName("labelMarker")
        self.horizontalLayout_4.addWidget(self.labelMarker)
        self.markerSymbol_comboBox = QtWidgets.QComboBox(self.frame)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.markerSymbol_comboBox.sizePolicy().hasHeightForWidth())
        self.markerSymbol_comboBox.setSizePolicy(sizePolicy)
        self.markerSymbol_comboBox.setMaximumSize(QtCore.QSize(85, 24))
        self.markerSymbol_comboBox.setObjectName("markerSymbol_comboBox")
        self.horizontalLayout_4.addWidget(self.markerSymbol_comboBox)
        self.verticalLayout_4.addLayout(self.horizontalLayout_4)
        self.horizontalLayout_8 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_8.setObjectName("horizontalLayout_8")
        self.labelMarker_2 = QtWidgets.QLabel(self.frame)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.labelMarker_2.sizePolicy().hasHeightForWidth())
        self.labelMarker_2.setSizePolicy(sizePolicy)
        self.labelMarker_2.setMaximumSize(QtCore.QSize(42, 24))
        self.labelMarker_2.setObjectName("labelMarker_2")
        self.horizontalLayout_8.addWidget(self.labelMarker_2)
        self.markerSize_spinBox = QtWidgets.QSpinBox(self.frame)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.markerSize_spinBox.sizePolicy().hasHeightForWidth())
        self.markerSize_spinBox.setSizePolicy(sizePolicy)
        self.markerSize_spinBox.setMinimum(1)
        self.markerSize_spinBox.setMaximum(99)
        self.markerSize_spinBox.setProperty("value", 1)
        self.markerSize_spinBox.setObjectName("markerSize_spinBox")
        self.horizontalLayout_8.addWidget(self.markerSize_spinBox)
        self.verticalLayout_4.addLayout(self.horizontalLayout_8)
        self.horizontalLayout_9 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_9.setObjectName("horizontalLayout_9")
        self.labelMarker_3 = QtWidgets.QLabel(self.frame)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.labelMarker_3.sizePolicy().hasHeightForWidth())
        self.labelMarker_3.setSizePolicy(sizePolicy)
        self.labelMarker_3.setMaximumSize(QtCore.QSize(42, 24))
        self.labelMarker_3.setObjectName("labelMarker_3")
        self.horizontalLayout_9.addWidget(self.labelMarker_3)
        self.markerAlpha_spinBox = QtWidgets.QSpinBox(self.frame)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.markerAlpha_spinBox.sizePolicy().hasHeightForWidth())
        self.markerAlpha_spinBox.setSizePolicy(sizePolicy)
        self.markerAlpha_spinBox.setMinimum(0)
        self.markerAlpha_spinBox.setMaximum(255)
        self.markerAlpha_spinBox.setProperty("value", 255)
        self.markerAlpha_spinBox.setObjectName("markerAlpha_spinBox")
        self.horizontalLayout_9.addWidget(self.markerAlpha_spinBox)
        self.verticalLayout_4.addLayout(self.horizontalLayout_9)
        self.horizontalLayout_12 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_12.setObjectName("horizontalLayout_12")
        self.labelMarker_5 = QtWidgets.QLabel(self.frame)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.labelMarker_5.sizePolicy().hasHeightForWidth())
        self.labelMarker_5.setSizePolicy(sizePolicy)
        self.labelMarker_5.setMaximumSize(QtCore.QSize(42, 24))
        self.labelMarker_5.setObjectName("labelMarker_5")
        self.horizontalLayout_12.addWidget(self.labelMarker_5)
        self.lineWidth_spinBox = QtWidgets.QSpinBox(self.frame)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.lineWidth_spinBox.sizePolicy().hasHeightForWidth())
        self.lineWidth_spinBox.setSizePolicy(sizePolicy)
        self.lineWidth_spinBox.setMinimum(1)
        self.lineWidth_spinBox.setMaximum(25)
        self.lineWidth_spinBox.setProperty("value", 2)
        self.lineWidth_spinBox.setObjectName("lineWidth_spinBox")
        self.horizontalLayout_12.addWidget(self.lineWidth_spinBox)
        self.verticalLayout_4.addLayout(self.horizontalLayout_12)
        self.markerColor_pushButton = QtWidgets.QPushButton(self.frame)
        self.markerColor_pushButton.setObjectName("markerColor_pushButton")
        self.verticalLayout_4.addWidget(self.markerColor_pushButton)
        self.markerColor_pushButton.raise_()
        self.horizontalLayout_10.addWidget(self.frame)
        self.verticalLayout_5.addLayout(self.horizontalLayout_10)
        spacerItem1 = QtWidgets.QSpacerItem(20, 204,
                                            QtWidgets.QSizePolicy.Minimum,
                                            QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_5.addItem(spacerItem1)
        self.points_TreeView.raise_()
        self.tabWidget.addTab(self.pointsSettingsTab, "")
        self.axisSetingsTab = QtWidgets.QWidget()
        self.axisSetingsTab.setObjectName("axisSetingsTab")
        self.groupBoxAxisRatio = QtWidgets.QGroupBox(self.axisSetingsTab)
        self.groupBoxAxisRatio.setGeometry(QtCore.QRect(10, 10, 131, 121))
        self.groupBoxAxisRatio.setObjectName("groupBoxAxisRatio")
        self.layoutWidget3 = QtWidgets.QWidget(self.groupBoxAxisRatio)
        self.layoutWidget3.setGeometry(QtCore.QRect(10, 30, 114, 22))
        self.layoutWidget3.setObjectName("layoutWidget3")
        self.horizontalLayout = QtWidgets.QHBoxLayout(self.layoutWidget3)
        self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.axisRatioLabel_1 = QtWidgets.QLabel(self.layoutWidget3)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.axisRatioLabel_1.sizePolicy().hasHeightForWidth())
        self.axisRatioLabel_1.setSizePolicy(sizePolicy)
        self.axisRatioLabel_1.setMinimumSize(QtCore.QSize(71, 16))
        self.axisRatioLabel_1.setMaximumSize(QtCore.QSize(71, 16))
        self.axisRatioLabel_1.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.axisRatioLabel_1.setAlignment(QtCore.Qt.AlignRight
                                           | QtCore.Qt.AlignTrailing
                                           | QtCore.Qt.AlignVCenter)
        self.axisRatioLabel_1.setObjectName("axisRatioLabel_1")
        self.horizontalLayout.addWidget(self.axisRatioLabel_1)
        self.axisRatioLineEdit_1 = QtWidgets.QLineEdit(self.layoutWidget3)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.axisRatioLineEdit_1.sizePolicy().hasHeightForWidth())
        self.axisRatioLineEdit_1.setSizePolicy(sizePolicy)
        self.axisRatioLineEdit_1.setMaximumSize(QtCore.QSize(31, 20))
        self.axisRatioLineEdit_1.setInputMethodHints(
            QtCore.Qt.ImhPreferNumbers)
        self.axisRatioLineEdit_1.setObjectName("axisRatioLineEdit_1")
        self.horizontalLayout.addWidget(self.axisRatioLineEdit_1)
        self.layoutWidget4 = QtWidgets.QWidget(self.groupBoxAxisRatio)
        self.layoutWidget4.setGeometry(QtCore.QRect(10, 50, 114, 22))
        self.layoutWidget4.setObjectName("layoutWidget4")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.layoutWidget4)
        self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.axisRatioLabel_2 = QtWidgets.QLabel(self.layoutWidget4)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.axisRatioLabel_2.sizePolicy().hasHeightForWidth())
        self.axisRatioLabel_2.setSizePolicy(sizePolicy)
        self.axisRatioLabel_2.setMinimumSize(QtCore.QSize(71, 16))
        self.axisRatioLabel_2.setMaximumSize(QtCore.QSize(71, 16))
        self.axisRatioLabel_2.setAlignment(QtCore.Qt.AlignRight
                                           | QtCore.Qt.AlignTrailing
                                           | QtCore.Qt.AlignVCenter)
        self.axisRatioLabel_2.setObjectName("axisRatioLabel_2")
        self.horizontalLayout_2.addWidget(self.axisRatioLabel_2)
        self.axisRatioLineEdit_2 = QtWidgets.QLineEdit(self.layoutWidget4)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.axisRatioLineEdit_2.sizePolicy().hasHeightForWidth())
        self.axisRatioLineEdit_2.setSizePolicy(sizePolicy)
        self.axisRatioLineEdit_2.setMaximumSize(QtCore.QSize(31, 20))
        self.axisRatioLineEdit_2.setInputMethodHints(
            QtCore.Qt.ImhPreferNumbers)
        self.axisRatioLineEdit_2.setObjectName("axisRatioLineEdit_2")
        self.horizontalLayout_2.addWidget(self.axisRatioLineEdit_2)
        self.layoutWidget5 = QtWidgets.QWidget(self.groupBoxAxisRatio)
        self.layoutWidget5.setGeometry(QtCore.QRect(10, 70, 114, 22))
        self.layoutWidget5.setObjectName("layoutWidget5")
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.layoutWidget5)
        self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.axisRatioLabel_3 = QtWidgets.QLabel(self.layoutWidget5)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.axisRatioLabel_3.sizePolicy().hasHeightForWidth())
        self.axisRatioLabel_3.setSizePolicy(sizePolicy)
        self.axisRatioLabel_3.setMinimumSize(QtCore.QSize(71, 16))
        self.axisRatioLabel_3.setMaximumSize(QtCore.QSize(71, 16))
        self.axisRatioLabel_3.setAlignment(QtCore.Qt.AlignRight
                                           | QtCore.Qt.AlignTrailing
                                           | QtCore.Qt.AlignVCenter)
        self.axisRatioLabel_3.setObjectName("axisRatioLabel_3")
        self.horizontalLayout_3.addWidget(self.axisRatioLabel_3)
        self.axisRatioLineEdit_3 = QtWidgets.QLineEdit(self.layoutWidget5)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.axisRatioLineEdit_3.sizePolicy().hasHeightForWidth())
        self.axisRatioLineEdit_3.setSizePolicy(sizePolicy)
        self.axisRatioLineEdit_3.setMaximumSize(QtCore.QSize(31, 20))
        self.axisRatioLineEdit_3.setInputMethodHints(
            QtCore.Qt.ImhPreferNumbers)
        self.axisRatioLineEdit_3.setObjectName("axisRatioLineEdit_3")
        self.horizontalLayout_3.addWidget(self.axisRatioLineEdit_3)
        self.groupBoxFlip = QtWidgets.QGroupBox(self.axisSetingsTab)
        self.groupBoxFlip.setEnabled(True)
        self.groupBoxFlip.setGeometry(QtCore.QRect(150, 10, 81, 121))
        self.groupBoxFlip.setToolTip("")
        self.groupBoxFlip.setObjectName("groupBoxFlip")
        self.layoutWidget6 = QtWidgets.QWidget(self.groupBoxFlip)
        self.layoutWidget6.setGeometry(QtCore.QRect(20, 20, 43, 95))
        self.layoutWidget6.setObjectName("layoutWidget6")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget6)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.pushButton_FlipView1 = QtWidgets.QPushButton(self.layoutWidget6)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.pushButton_FlipView1.sizePolicy().hasHeightForWidth())
        self.pushButton_FlipView1.setSizePolicy(sizePolicy)
        self.pushButton_FlipView1.setMaximumSize(QtCore.QSize(41, 16777215))
        font = QtGui.QFont()
        font.setPointSize(7)
        self.pushButton_FlipView1.setFont(font)
        self.pushButton_FlipView1.setCheckable(True)
        self.pushButton_FlipView1.setObjectName("pushButton_FlipView1")
        self.verticalLayout.addWidget(self.pushButton_FlipView1)
        self.pushButton_FlipView2 = QtWidgets.QPushButton(self.layoutWidget6)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.pushButton_FlipView2.sizePolicy().hasHeightForWidth())
        self.pushButton_FlipView2.setSizePolicy(sizePolicy)
        self.pushButton_FlipView2.setMaximumSize(QtCore.QSize(41, 16777215))
        font = QtGui.QFont()
        font.setPointSize(7)
        self.pushButton_FlipView2.setFont(font)
        self.pushButton_FlipView2.setCheckable(True)
        self.pushButton_FlipView2.setObjectName("pushButton_FlipView2")
        self.verticalLayout.addWidget(self.pushButton_FlipView2)
        self.pushButton_FlipView3 = QtWidgets.QPushButton(self.layoutWidget6)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.pushButton_FlipView3.sizePolicy().hasHeightForWidth())
        self.pushButton_FlipView3.setSizePolicy(sizePolicy)
        self.pushButton_FlipView3.setMaximumSize(QtCore.QSize(41, 16777215))
        font = QtGui.QFont()
        font.setPointSize(7)
        self.pushButton_FlipView3.setFont(font)
        self.pushButton_FlipView3.setCheckable(True)
        self.pushButton_FlipView3.setObjectName("pushButton_FlipView3")
        self.verticalLayout.addWidget(self.pushButton_FlipView3)
        self.tabWidget.addTab(self.axisSetingsTab, "")
        self.verticalLayout_2.addWidget(self.tabWidget)
        self.mainDockWidget.setWidget(self.dockWidgetContents)
        lasagna_mainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(1),
                                         self.mainDockWidget)
        self.toolBar = QtWidgets.QToolBar(lasagna_mainWindow)
        self.toolBar.setObjectName("toolBar")
        lasagna_mainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
        self.statusBar = QtWidgets.QStatusBar(lasagna_mainWindow)
        self.statusBar.setObjectName("statusBar")
        lasagna_mainWindow.setStatusBar(self.statusBar)
        self.actionOpen = QtWidgets.QAction(lasagna_mainWindow)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(":/actions/icons/document-open.png"),
                        QtGui.QIcon.Normal, QtGui.QIcon.On)
        self.actionOpen.setIcon(icon1)
        self.actionOpen.setObjectName("actionOpen")
        self.actionAbout = QtWidgets.QAction(lasagna_mainWindow)
        self.actionAbout.setObjectName("actionAbout")
        self.actionQuit = QtWidgets.QAction(lasagna_mainWindow)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(":/actions/icons/window-close.png"),
                        QtGui.QIcon.Normal, QtGui.QIcon.On)
        self.actionQuit.setIcon(icon2)
        self.actionQuit.setObjectName("actionQuit")
        self.action_ARA_Explorer = QtWidgets.QAction(lasagna_mainWindow)
        self.action_ARA_Explorer.setCheckable(True)
        self.action_ARA_Explorer.setObjectName("action_ARA_Explorer")
        self.actionResetAxes = QtWidgets.QAction(lasagna_mainWindow)
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap(":/actions/icons/edit-redo.png"),
                        QtGui.QIcon.Normal, QtGui.QIcon.On)
        self.actionResetAxes.setIcon(icon3)
        self.actionResetAxes.setObjectName("actionResetAxes")
        self.actionLoadOverlay = QtWidgets.QAction(lasagna_mainWindow)
        self.actionLoadOverlay.setEnabled(False)
        icon4 = QtGui.QIcon()
        icon4.addPixmap(QtGui.QPixmap(":/actions/icons/overlay.png"),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionLoadOverlay.setIcon(icon4)
        self.actionLoadOverlay.setShortcut("")
        self.actionLoadOverlay.setObjectName("actionLoadOverlay")
        self.actionRemoveOverlay = QtWidgets.QAction(lasagna_mainWindow)
        self.actionRemoveOverlay.setEnabled(False)
        icon5 = QtGui.QIcon()
        icon5.addPixmap(QtGui.QPixmap(":/actions/icons/removeoverlay.png"),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionRemoveOverlay.setIcon(icon5)
        self.actionRemoveOverlay.setObjectName("actionRemoveOverlay")
        self.actionNone = QtWidgets.QAction(lasagna_mainWindow)
        self.actionNone.setObjectName("actionNone")
        self.actionOpen_2 = QtWidgets.QAction(lasagna_mainWindow)
        self.actionOpen_2.setObjectName("actionOpen_2")
        self.menuLoad_ingredient.addAction(self.actionOpen)
        self.menuFile.addAction(self.menuLoad_ingredient.menuAction())
        self.menuFile.addAction(self.menuOpen_recent.menuAction())
        self.menuFile.addAction(self.actionQuit)
        self.menuHelp.addAction(self.actionAbout)
        self.menuBar.addAction(self.menuFile.menuAction())
        self.menuBar.addAction(self.menuPlugins.menuAction())
        self.menuBar.addAction(self.menuHelp.menuAction())
        self.toolBar.addAction(self.actionResetAxes)
        self.toolBar.addSeparator()

        self.retranslateUi(lasagna_mainWindow)
        self.tabWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(lasagna_mainWindow)
Ejemplo n.º 38
0
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(929, 769)
        self.gridLayout = QtWidgets.QGridLayout(Form)
        self.gridLayout.setObjectName("gridLayout")
        self.splitter_2 = QtWidgets.QSplitter(Form)
        self.splitter_2.setOrientation(QtCore.Qt.Horizontal)
        self.splitter_2.setObjectName("splitter_2")
        self.splitter = QtWidgets.QSplitter(self.splitter_2)
        self.splitter.setOrientation(QtCore.Qt.Vertical)
        self.splitter.setObjectName("splitter")
        self.horizontalLayoutWidget = QtWidgets.QWidget(self.splitter)
        self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
        self.horizontalLayout_settings = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
        self.horizontalLayout_settings.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_settings.setObjectName("horizontalLayout_settings")
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setSpacing(0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setSpacing(0)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.zoom_pb = QtWidgets.QPushButton(self.horizontalLayoutWidget)
        self.zoom_pb.setText("")
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/icons/Icon_Library/Zoom_to_Selection.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.zoom_pb.setIcon(icon)
        self.zoom_pb.setCheckable(True)
        self.zoom_pb.setObjectName("zoom_pb")
        self.horizontalLayout.addWidget(self.zoom_pb)
        self.Do_math_pb = QtWidgets.QPushButton(self.horizontalLayoutWidget)
        self.Do_math_pb.setText("")
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(":/icons/Icon_Library/Calculator.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.Do_math_pb.setIcon(icon1)
        self.Do_math_pb.setCheckable(True)
        self.Do_math_pb.setObjectName("Do_math_pb")
        self.horizontalLayout.addWidget(self.Do_math_pb)
        self.do_measurements_pb = QtWidgets.QPushButton(self.horizontalLayoutWidget)
        self.do_measurements_pb.setText("")
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(":/icons/Icon_Library/MeasurementStudio_32.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.do_measurements_pb.setIcon(icon2)
        self.do_measurements_pb.setCheckable(True)
        self.do_measurements_pb.setObjectName("do_measurements_pb")
        self.horizontalLayout.addWidget(self.do_measurements_pb)
        self.crosshair_pb = QtWidgets.QPushButton(self.horizontalLayoutWidget)
        self.crosshair_pb.setText("")
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap(":/icons/Icon_Library/reset.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.crosshair_pb.setIcon(icon3)
        self.crosshair_pb.setCheckable(True)
        self.crosshair_pb.setObjectName("crosshair_pb")
        self.horizontalLayout.addWidget(self.crosshair_pb)
        self.aspect_ratio_pb = QtWidgets.QPushButton(self.horizontalLayoutWidget)
        self.aspect_ratio_pb.setText("")
        icon4 = QtGui.QIcon()
        icon4.addPixmap(QtGui.QPixmap(":/icons/Icon_Library/zoomReset.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.aspect_ratio_pb.setIcon(icon4)
        self.aspect_ratio_pb.setCheckable(True)
        self.aspect_ratio_pb.setObjectName("aspect_ratio_pb")
        self.horizontalLayout.addWidget(self.aspect_ratio_pb)
        self.x_label = QtWidgets.QLabel(self.horizontalLayoutWidget)
        self.x_label.setObjectName("x_label")
        self.horizontalLayout.addWidget(self.x_label)
        self.y_label = QtWidgets.QLabel(self.horizontalLayoutWidget)
        self.y_label.setObjectName("y_label")
        self.horizontalLayout.addWidget(self.y_label)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.horizontalLayout_settings.addLayout(self.verticalLayout)
        self.Graph_Lineouts = PlotWidget(self.splitter)
        self.Graph_Lineouts.setObjectName("Graph_Lineouts")
        self.ROIs_widget = QtWidgets.QWidget(self.splitter_2)
        self.ROIs_widget.setMaximumSize(QtCore.QSize(300, 16777215))
        self.ROIs_widget.setObjectName("ROIs_widget")
        self.gridLayout.addWidget(self.splitter_2, 0, 0, 1, 1)
        self.StatusBarLayout = QtWidgets.QHBoxLayout()
        self.StatusBarLayout.setObjectName("StatusBarLayout")
        self.gridLayout.addLayout(self.StatusBarLayout, 1, 0, 1, 1)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
Ejemplo n.º 39
0
class Ui_Dialog(object):
    def setupUi(self, Dialog):
        Dialog.setObjectName(_fromUtf8("Dialog"))
        Dialog.resize(1143, 845)
        self.gridLayout_7 = QtGui.QGridLayout(Dialog)
        self.gridLayout_7.setObjectName(_fromUtf8("gridLayout_7"))
        self.tabWidget = QtGui.QTabWidget(Dialog)
        self.tabWidget.setTabShape(QtGui.QTabWidget.Rounded)
        self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
        self.tab = QtGui.QWidget()
        self.tab.setObjectName(_fromUtf8("tab"))
        self.gridLayout_4 = QtGui.QGridLayout(self.tab)
        self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4"))
        self.groupBox_3 = QtGui.QGroupBox(self.tab)
        self.groupBox_3.setObjectName(_fromUtf8("groupBox_3"))
        self.gridLayout_3 = QtGui.QGridLayout(self.groupBox_3)
        self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3"))
        self.verticalLayout_3 = QtGui.QVBoxLayout()
        self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
        self.HTS_input_file_table = QtGui.QTableWidget(self.groupBox_3)
        self.HTS_input_file_table.setObjectName(
            _fromUtf8("HTS_input_file_table"))
        self.HTS_input_file_table.setColumnCount(1)
        self.HTS_input_file_table.setRowCount(0)
        item = QtGui.QTableWidgetItem()
        self.HTS_input_file_table.setHorizontalHeaderItem(0, item)
        self.HTS_input_file_table.horizontalHeader().setVisible(True)
        self.HTS_input_file_table.horizontalHeader(
        ).setCascadingSectionResizes(True)
        self.HTS_input_file_table.horizontalHeader().setDefaultSectionSize(121)
        self.HTS_input_file_table.horizontalHeader().setSortIndicatorShown(
            True)
        self.HTS_input_file_table.horizontalHeader().setStretchLastSection(
            True)
        self.HTS_input_file_table.verticalHeader().setDefaultSectionSize(30)
        self.verticalLayout_3.addWidget(self.HTS_input_file_table)
        self.horizontalLayout_9 = QtGui.QHBoxLayout()
        self.horizontalLayout_9.setObjectName(_fromUtf8("horizontalLayout_9"))
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_9.addItem(spacerItem)
        self.HTS_load_input_files_button = QtGui.QPushButton(self.groupBox_3)
        self.HTS_load_input_files_button.setObjectName(
            _fromUtf8("HTS_load_input_files_button"))
        self.horizontalLayout_9.addWidget(self.HTS_load_input_files_button)
        spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                        QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_9.addItem(spacerItem1)
        self.HTS_remove_row_button = QtGui.QPushButton(self.groupBox_3)
        self.HTS_remove_row_button.setObjectName(
            _fromUtf8("HTS_remove_row_button"))
        self.horizontalLayout_9.addWidget(self.HTS_remove_row_button)
        spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                        QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_9.addItem(spacerItem2)
        self.verticalLayout_3.addLayout(self.horizontalLayout_9)
        self.gridLayout_3.addLayout(self.verticalLayout_3, 0, 0, 1, 1)
        self.line_2 = QtGui.QFrame(self.groupBox_3)
        self.line_2.setGeometry(QtCore.QRect(73, 303, 16, 16))
        self.line_2.setFrameShape(QtGui.QFrame.HLine)
        self.line_2.setFrameShadow(QtGui.QFrame.Sunken)
        self.line_2.setObjectName(_fromUtf8("line_2"))
        self.gridLayout_4.addWidget(self.groupBox_3, 0, 0, 1, 1)
        self.groupBox = QtGui.QGroupBox(self.tab)
        self.groupBox.setObjectName(_fromUtf8("groupBox"))
        self.gridLayout = QtGui.QGridLayout(self.groupBox)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.verticalLayout_11 = QtGui.QVBoxLayout()
        self.verticalLayout_11.setObjectName(_fromUtf8("verticalLayout_11"))
        self.horizontalLayout_16 = QtGui.QHBoxLayout()
        self.horizontalLayout_16.setObjectName(
            _fromUtf8("horizontalLayout_16"))
        spacerItem3 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Maximum,
                                        QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_16.addItem(spacerItem3)
        self.HTS_define_scan = QtGui.QTableWidget(self.groupBox)
        self.HTS_define_scan.setObjectName(_fromUtf8("HTS_define_scan"))
        self.HTS_define_scan.setColumnCount(1)
        self.HTS_define_scan.setRowCount(8)
        item = QtGui.QTableWidgetItem()
        self.HTS_define_scan.setVerticalHeaderItem(0, item)
        item = QtGui.QTableWidgetItem()
        self.HTS_define_scan.setVerticalHeaderItem(1, item)
        item = QtGui.QTableWidgetItem()
        self.HTS_define_scan.setVerticalHeaderItem(2, item)
        item = QtGui.QTableWidgetItem()
        self.HTS_define_scan.setVerticalHeaderItem(3, item)
        item = QtGui.QTableWidgetItem()
        self.HTS_define_scan.setVerticalHeaderItem(4, item)
        item = QtGui.QTableWidgetItem()
        self.HTS_define_scan.setVerticalHeaderItem(5, item)
        item = QtGui.QTableWidgetItem()
        self.HTS_define_scan.setVerticalHeaderItem(6, item)
        item = QtGui.QTableWidgetItem()
        self.HTS_define_scan.setVerticalHeaderItem(7, item)
        item = QtGui.QTableWidgetItem()
        self.HTS_define_scan.setHorizontalHeaderItem(0, item)
        self.horizontalLayout_16.addWidget(self.HTS_define_scan)
        spacerItem4 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Maximum,
                                        QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_16.addItem(spacerItem4)
        self.verticalLayout_11.addLayout(self.horizontalLayout_16)
        spacerItem5 = QtGui.QSpacerItem(20, 30, QtGui.QSizePolicy.Minimum,
                                        QtGui.QSizePolicy.Maximum)
        self.verticalLayout_11.addItem(spacerItem5)
        self.verticalLayout_10 = QtGui.QVBoxLayout()
        self.verticalLayout_10.setObjectName(_fromUtf8("verticalLayout_10"))
        self.horizontalLayout_8 = QtGui.QHBoxLayout()
        self.horizontalLayout_8.setObjectName(_fromUtf8("horizontalLayout_8"))
        self.HTS_set_output_file = QtGui.QPushButton(self.groupBox)
        self.HTS_set_output_file.setObjectName(
            _fromUtf8("HTS_set_output_file"))
        self.horizontalLayout_8.addWidget(self.HTS_set_output_file)
        self.HTS_restore_defaults = QtGui.QPushButton(self.groupBox)
        self.HTS_restore_defaults.setObjectName(
            _fromUtf8("HTS_restore_defaults"))
        self.horizontalLayout_8.addWidget(self.HTS_restore_defaults)
        self.verticalLayout_10.addLayout(self.horizontalLayout_8)
        self.HTS_apply_params = QtGui.QPushButton(self.groupBox)
        self.HTS_apply_params.setObjectName(_fromUtf8("HTS_apply_params"))
        self.verticalLayout_10.addWidget(self.HTS_apply_params)
        spacerItem6 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Minimum,
                                        QtGui.QSizePolicy.Maximum)
        self.verticalLayout_10.addItem(spacerItem6)
        self.HTS_run_HT_search = QtGui.QPushButton(self.groupBox)
        self.HTS_run_HT_search.setObjectName(_fromUtf8("HTS_run_HT_search"))
        self.verticalLayout_10.addWidget(self.HTS_run_HT_search)
        self.verticalLayout_11.addLayout(self.verticalLayout_10)
        spacerItem7 = QtGui.QSpacerItem(20, 30, QtGui.QSizePolicy.Minimum,
                                        QtGui.QSizePolicy.Maximum)
        self.verticalLayout_11.addItem(spacerItem7)
        self.label = QtGui.QLabel(self.groupBox)
        self.label.setObjectName(_fromUtf8("label"))
        self.verticalLayout_11.addWidget(self.label)
        self.HTS_status_text = QtGui.QPlainTextEdit(self.groupBox)
        self.HTS_status_text.setObjectName(_fromUtf8("HTS_status_text"))
        self.verticalLayout_11.addWidget(self.HTS_status_text)
        self.gridLayout.addLayout(self.verticalLayout_11, 1, 0, 1, 1)
        spacerItem8 = QtGui.QSpacerItem(20, 30, QtGui.QSizePolicy.Minimum,
                                        QtGui.QSizePolicy.Maximum)
        self.gridLayout.addItem(spacerItem8, 0, 0, 1, 1)
        self.gridLayout_4.addWidget(self.groupBox, 0, 1, 1, 1)
        self.tabWidget.addTab(self.tab, _fromUtf8(""))
        self.tab_3 = QtGui.QWidget()
        self.tab_3.setObjectName(_fromUtf8("tab_3"))
        self.gridLayout_17 = QtGui.QGridLayout(self.tab_3)
        self.gridLayout_17.setObjectName(_fromUtf8("gridLayout_17"))
        self.horizontalLayout_4 = QtGui.QHBoxLayout()
        self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4"))
        self.groupBox_4 = QtGui.QGroupBox(self.tab_3)
        self.groupBox_4.setObjectName(_fromUtf8("groupBox_4"))
        self.gridLayout_14 = QtGui.QGridLayout(self.groupBox_4)
        self.gridLayout_14.setObjectName(_fromUtf8("gridLayout_14"))
        self.gridLayout_11 = QtGui.QGridLayout()
        self.gridLayout_11.setObjectName(_fromUtf8("gridLayout_11"))
        self.label_13 = QtGui.QLabel(self.groupBox_4)
        self.label_13.setObjectName(_fromUtf8("label_13"))
        self.gridLayout_11.addWidget(self.label_13, 0, 0, 1, 1)
        self.HT_BS_treatment_field = QtGui.QLineEdit(self.groupBox_4)
        self.HT_BS_treatment_field.setObjectName(
            _fromUtf8("HT_BS_treatment_field"))
        self.gridLayout_11.addWidget(self.HT_BS_treatment_field, 0, 1, 1, 1)
        self.HT_BS_treatment_browse = QtGui.QPushButton(self.groupBox_4)
        self.HT_BS_treatment_browse.setObjectName(
            _fromUtf8("HT_BS_treatment_browse"))
        self.gridLayout_11.addWidget(self.HT_BS_treatment_browse, 0, 2, 1, 1)
        self.label_20 = QtGui.QLabel(self.groupBox_4)
        self.label_20.setObjectName(_fromUtf8("label_20"))
        self.gridLayout_11.addWidget(self.label_20, 1, 0, 1, 1)
        self.HT_BS_control_field = QtGui.QLineEdit(self.groupBox_4)
        self.HT_BS_control_field.setObjectName(
            _fromUtf8("HT_BS_control_field"))
        self.gridLayout_11.addWidget(self.HT_BS_control_field, 1, 1, 1, 1)
        self.HT_BS_control_browse = QtGui.QPushButton(self.groupBox_4)
        self.HT_BS_control_browse.setObjectName(
            _fromUtf8("HT_BS_control_browse"))
        self.gridLayout_11.addWidget(self.HT_BS_control_browse, 1, 2, 1, 1)
        self.label_25 = QtGui.QLabel(self.groupBox_4)
        self.label_25.setObjectName(_fromUtf8("label_25"))
        self.gridLayout_11.addWidget(self.label_25, 2, 0, 1, 1)
        self.HT_BS_output_field = QtGui.QLineEdit(self.groupBox_4)
        self.HT_BS_output_field.setObjectName(_fromUtf8("HT_BS_output_field"))
        self.gridLayout_11.addWidget(self.HT_BS_output_field, 2, 1, 1, 1)
        self.HT_BS_output_browse = QtGui.QPushButton(self.groupBox_4)
        self.HT_BS_output_browse.setObjectName(
            _fromUtf8("HT_BS_output_browse"))
        self.gridLayout_11.addWidget(self.HT_BS_output_browse, 2, 2, 1, 1)
        self.gridLayout_14.addLayout(self.gridLayout_11, 0, 0, 1, 1)
        self.horizontalLayout_4.addWidget(self.groupBox_4)
        spacerItem9 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Maximum,
                                        QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_4.addItem(spacerItem9)
        self.groupBox_5 = QtGui.QGroupBox(self.tab_3)
        self.groupBox_5.setObjectName(_fromUtf8("groupBox_5"))
        self.gridLayout_13 = QtGui.QGridLayout(self.groupBox_5)
        self.gridLayout_13.setObjectName(_fromUtf8("gridLayout_13"))
        self.gridLayout_12 = QtGui.QGridLayout()
        self.gridLayout_12.setObjectName(_fromUtf8("gridLayout_12"))
        self.label_26 = QtGui.QLabel(self.groupBox_5)
        self.label_26.setObjectName(_fromUtf8("label_26"))
        self.gridLayout_12.addWidget(self.label_26, 0, 0, 1, 1)
        self.HT_BS_mz_tol = QtGui.QLineEdit(self.groupBox_5)
        self.HT_BS_mz_tol.setObjectName(_fromUtf8("HT_BS_mz_tol"))
        self.gridLayout_12.addWidget(self.HT_BS_mz_tol, 0, 1, 1, 1)
        self.label_27 = QtGui.QLabel(self.groupBox_5)
        self.label_27.setObjectName(_fromUtf8("label_27"))
        self.gridLayout_12.addWidget(self.label_27, 1, 0, 1, 1)
        self.HT_BS_rt_tol = QtGui.QLineEdit(self.groupBox_5)
        self.HT_BS_rt_tol.setObjectName(_fromUtf8("HT_BS_rt_tol"))
        self.gridLayout_12.addWidget(self.HT_BS_rt_tol, 1, 1, 1, 1)
        self.label_29 = QtGui.QLabel(self.groupBox_5)
        self.label_29.setObjectName(_fromUtf8("label_29"))
        self.gridLayout_12.addWidget(self.label_29, 2, 0, 1, 1)
        self.HT_BS_score_cutoff = QtGui.QLineEdit(self.groupBox_5)
        self.HT_BS_score_cutoff.setObjectName(_fromUtf8("HT_BS_score_cutoff"))
        self.gridLayout_12.addWidget(self.HT_BS_score_cutoff, 2, 1, 1, 1)
        self.gridLayout_13.addLayout(self.gridLayout_12, 0, 0, 1, 1)
        self.horizontalLayout_4.addWidget(self.groupBox_5)
        self.gridLayout_17.addLayout(self.horizontalLayout_4, 0, 0, 1, 1)
        self.groupBox_6 = QtGui.QGroupBox(self.tab_3)
        self.groupBox_6.setObjectName(_fromUtf8("groupBox_6"))
        self.gridLayout_16 = QtGui.QGridLayout(self.groupBox_6)
        self.gridLayout_16.setObjectName(_fromUtf8("gridLayout_16"))
        self.horizontalLayout_13 = QtGui.QHBoxLayout()
        self.horizontalLayout_13.setObjectName(
            _fromUtf8("horizontalLayout_13"))
        self.verticalLayout_5 = QtGui.QVBoxLayout()
        self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5"))
        spacerItem10 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
                                         QtGui.QSizePolicy.Expanding)
        self.verticalLayout_5.addItem(spacerItem10)
        self.groupBox_7 = QtGui.QGroupBox(self.groupBox_6)
        self.groupBox_7.setObjectName(_fromUtf8("groupBox_7"))
        self.gridLayout_15 = QtGui.QGridLayout(self.groupBox_7)
        self.gridLayout_15.setObjectName(_fromUtf8("gridLayout_15"))
        self.HT_BS_active_treatment = QtGui.QRadioButton(self.groupBox_7)
        self.HT_BS_active_treatment.setObjectName(
            _fromUtf8("HT_BS_active_treatment"))
        self.gridLayout_15.addWidget(self.HT_BS_active_treatment, 0, 0, 1, 1)
        self.HT_BS_active_control = QtGui.QRadioButton(self.groupBox_7)
        self.HT_BS_active_control.setObjectName(
            _fromUtf8("HT_BS_active_control"))
        self.gridLayout_15.addWidget(self.HT_BS_active_control, 1, 0, 1, 1)
        self.HT_BS_active_output = QtGui.QRadioButton(self.groupBox_7)
        self.HT_BS_active_output.setObjectName(
            _fromUtf8("HT_BS_active_output"))
        self.gridLayout_15.addWidget(self.HT_BS_active_output, 2, 0, 1, 1)
        self.verticalLayout_5.addWidget(self.groupBox_7)
        spacerItem11 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
                                         QtGui.QSizePolicy.Expanding)
        self.verticalLayout_5.addItem(spacerItem11)
        self.HT_BS_run = QtGui.QPushButton(self.groupBox_6)
        self.HT_BS_run.setObjectName(_fromUtf8("HT_BS_run"))
        self.verticalLayout_5.addWidget(self.HT_BS_run)
        spacerItem12 = QtGui.QSpacerItem(20, 118, QtGui.QSizePolicy.Minimum,
                                         QtGui.QSizePolicy.Expanding)
        self.verticalLayout_5.addItem(spacerItem12)
        self.horizontalLayout_13.addLayout(self.verticalLayout_5)
        self.HT_BS_HM = PlotWidget(self.groupBox_6)
        self.HT_BS_HM.setObjectName(_fromUtf8("HT_BS_HM"))
        self.horizontalLayout_13.addWidget(self.HT_BS_HM)
        self.gridLayout_16.addLayout(self.horizontalLayout_13, 0, 0, 1, 1)
        self.gridLayout_17.addWidget(self.groupBox_6, 1, 0, 1, 1)
        self.tabWidget.addTab(self.tab_3, _fromUtf8(""))
        self.tab_2 = QtGui.QWidget()
        self.tab_2.setObjectName(_fromUtf8("tab_2"))
        self.verticalLayout_9 = QtGui.QVBoxLayout(self.tab_2)
        self.verticalLayout_9.setObjectName(_fromUtf8("verticalLayout_9"))
        spacerItem13 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Minimum,
                                         QtGui.QSizePolicy.Maximum)
        self.verticalLayout_9.addItem(spacerItem13)
        self.horizontalLayout_15 = QtGui.QHBoxLayout()
        self.horizontalLayout_15.setObjectName(
            _fromUtf8("horizontalLayout_15"))
        spacerItem14 = QtGui.QSpacerItem(50, 20, QtGui.QSizePolicy.Maximum,
                                         QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_15.addItem(spacerItem14)
        self.gridLayout_9 = QtGui.QGridLayout()
        self.gridLayout_9.setObjectName(_fromUtf8("gridLayout_9"))
        self.label_9 = QtGui.QLabel(self.tab_2)
        self.label_9.setObjectName(_fromUtf8("label_9"))
        self.gridLayout_9.addWidget(self.label_9, 0, 0, 1, 1)
        self.RP_HT_input_field = QtGui.QLineEdit(self.tab_2)
        self.RP_HT_input_field.setObjectName(_fromUtf8("RP_HT_input_field"))
        self.gridLayout_9.addWidget(self.RP_HT_input_field, 0, 1, 1, 1)
        self.RP_HT_input_button = QtGui.QPushButton(self.tab_2)
        self.RP_HT_input_button.setObjectName(_fromUtf8("RP_HT_input_button"))
        self.gridLayout_9.addWidget(self.RP_HT_input_button, 0, 2, 1, 1)
        self.label_15 = QtGui.QLabel(self.tab_2)
        self.label_15.setObjectName(_fromUtf8("label_15"))
        self.gridLayout_9.addWidget(self.label_15, 1, 0, 1, 1)
        self.RP_mascot_input_field = QtGui.QLineEdit(self.tab_2)
        self.RP_mascot_input_field.setObjectName(
            _fromUtf8("RP_mascot_input_field"))
        self.gridLayout_9.addWidget(self.RP_mascot_input_field, 1, 1, 1, 1)
        self.RP_mascot_input_button = QtGui.QPushButton(self.tab_2)
        self.RP_mascot_input_button.setObjectName(
            _fromUtf8("RP_mascot_input_button"))
        self.gridLayout_9.addWidget(self.RP_mascot_input_button, 1, 2, 1, 1)
        self.horizontalLayout_15.addLayout(self.gridLayout_9)
        spacerItem15 = QtGui.QSpacerItem(50, 20, QtGui.QSizePolicy.Maximum,
                                         QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_15.addItem(spacerItem15)
        self.verticalLayout_9.addLayout(self.horizontalLayout_15)
        spacerItem16 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Minimum,
                                         QtGui.QSizePolicy.Maximum)
        self.verticalLayout_9.addItem(spacerItem16)
        self.verticalLayout_6 = QtGui.QVBoxLayout()
        self.verticalLayout_6.setObjectName(_fromUtf8("verticalLayout_6"))
        self.horizontalLayout_14 = QtGui.QHBoxLayout()
        self.horizontalLayout_14.setObjectName(
            _fromUtf8("horizontalLayout_14"))
        spacerItem17 = QtGui.QSpacerItem(50, 20, QtGui.QSizePolicy.Maximum,
                                         QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_14.addItem(spacerItem17)
        self.horizontalLayout_10 = QtGui.QHBoxLayout()
        self.horizontalLayout_10.setObjectName(
            _fromUtf8("horizontalLayout_10"))
        self.label_14 = QtGui.QLabel(self.tab_2)
        self.label_14.setObjectName(_fromUtf8("label_14"))
        self.horizontalLayout_10.addWidget(self.label_14)
        self.RP_min_HT_score = QtGui.QLineEdit(self.tab_2)
        self.RP_min_HT_score.setObjectName(_fromUtf8("RP_min_HT_score"))
        self.horizontalLayout_10.addWidget(self.RP_min_HT_score)
        self.horizontalLayout_14.addLayout(self.horizontalLayout_10)
        spacerItem18 = QtGui.QSpacerItem(18, 20, QtGui.QSizePolicy.Expanding,
                                         QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_14.addItem(spacerItem18)
        self.horizontalLayout_6 = QtGui.QHBoxLayout()
        self.horizontalLayout_6.setObjectName(_fromUtf8("horizontalLayout_6"))
        self.label_12 = QtGui.QLabel(self.tab_2)
        self.label_12.setObjectName(_fromUtf8("label_12"))
        self.horizontalLayout_6.addWidget(self.label_12)
        self.RP_mzWidth = QtGui.QLineEdit(self.tab_2)
        self.RP_mzWidth.setObjectName(_fromUtf8("RP_mzWidth"))
        self.horizontalLayout_6.addWidget(self.RP_mzWidth)
        self.horizontalLayout_14.addLayout(self.horizontalLayout_6)
        spacerItem19 = QtGui.QSpacerItem(17, 20, QtGui.QSizePolicy.Expanding,
                                         QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_14.addItem(spacerItem19)
        self.horizontalLayout_7 = QtGui.QHBoxLayout()
        self.horizontalLayout_7.setObjectName(_fromUtf8("horizontalLayout_7"))
        self.label_11 = QtGui.QLabel(self.tab_2)
        self.label_11.setObjectName(_fromUtf8("label_11"))
        self.horizontalLayout_7.addWidget(self.label_11)
        self.RP_rtWidth = QtGui.QLineEdit(self.tab_2)
        self.RP_rtWidth.setObjectName(_fromUtf8("RP_rtWidth"))
        self.horizontalLayout_7.addWidget(self.RP_rtWidth)
        self.horizontalLayout_14.addLayout(self.horizontalLayout_7)
        spacerItem20 = QtGui.QSpacerItem(17, 20, QtGui.QSizePolicy.Expanding,
                                         QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_14.addItem(spacerItem20)
        self.horizontalLayout_12 = QtGui.QHBoxLayout()
        self.horizontalLayout_12.setObjectName(
            _fromUtf8("horizontalLayout_12"))
        self.label_30 = QtGui.QLabel(self.tab_2)
        self.label_30.setObjectName(_fromUtf8("label_30"))
        self.horizontalLayout_12.addWidget(self.label_30)
        self.HT_RP_rt_exclusion = QtGui.QLineEdit(self.tab_2)
        self.HT_RP_rt_exclusion.setObjectName(_fromUtf8("HT_RP_rt_exclusion"))
        self.horizontalLayout_12.addWidget(self.HT_RP_rt_exclusion)
        self.horizontalLayout_14.addLayout(self.horizontalLayout_12)
        spacerItem21 = QtGui.QSpacerItem(50, 20, QtGui.QSizePolicy.Maximum,
                                         QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_14.addItem(spacerItem21)
        self.verticalLayout_6.addLayout(self.horizontalLayout_14)
        self.horizontalLayout_11 = QtGui.QHBoxLayout()
        self.horizontalLayout_11.setObjectName(
            _fromUtf8("horizontalLayout_11"))
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.label_10 = QtGui.QLabel(self.tab_2)
        self.label_10.setObjectName(_fromUtf8("label_10"))
        self.verticalLayout.addWidget(self.label_10)
        self.RP_histogram = PlotWidget(self.tab_2)
        self.RP_histogram.setObjectName(_fromUtf8("RP_histogram"))
        self.verticalLayout.addWidget(self.RP_histogram)
        self.horizontalLayout_11.addLayout(self.verticalLayout)
        self.verticalLayout_2 = QtGui.QVBoxLayout()
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.label_16 = QtGui.QLabel(self.tab_2)
        self.label_16.setObjectName(_fromUtf8("label_16"))
        self.verticalLayout_2.addWidget(self.label_16)
        self.RP_heat_map = PlotWidget(self.tab_2)
        self.RP_heat_map.setObjectName(_fromUtf8("RP_heat_map"))
        self.verticalLayout_2.addWidget(self.RP_heat_map)
        self.horizontalLayout_11.addLayout(self.verticalLayout_2)
        self.verticalLayout_6.addLayout(self.horizontalLayout_11)
        self.verticalLayout_9.addLayout(self.verticalLayout_6)
        spacerItem22 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Minimum,
                                         QtGui.QSizePolicy.Maximum)
        self.verticalLayout_9.addItem(spacerItem22)
        self.verticalLayout_4 = QtGui.QVBoxLayout()
        self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4"))
        self.horizontalLayout_5 = QtGui.QHBoxLayout()
        self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5"))
        spacerItem23 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                         QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_5.addItem(spacerItem23)
        self.HT_RP_use_peptide_isotope_scaling = QtGui.QCheckBox(self.tab_2)
        self.HT_RP_use_peptide_isotope_scaling.setObjectName(
            _fromUtf8("HT_RP_use_peptide_isotope_scaling"))
        self.horizontalLayout_5.addWidget(
            self.HT_RP_use_peptide_isotope_scaling)
        spacerItem24 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                         QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_5.addItem(spacerItem24)
        self.HT_RP_plot_EICs = QtGui.QCheckBox(self.tab_2)
        self.HT_RP_plot_EICs.setObjectName(_fromUtf8("HT_RP_plot_EICs"))
        self.horizontalLayout_5.addWidget(self.HT_RP_plot_EICs)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.label_17 = QtGui.QLabel(self.tab_2)
        self.label_17.setObjectName(_fromUtf8("label_17"))
        self.horizontalLayout.addWidget(self.label_17)
        self.RP_mzDelta = QtGui.QLineEdit(self.tab_2)
        self.RP_mzDelta.setObjectName(_fromUtf8("RP_mzDelta"))
        self.horizontalLayout.addWidget(self.RP_mzDelta)
        self.horizontalLayout_5.addLayout(self.horizontalLayout)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.label_18 = QtGui.QLabel(self.tab_2)
        self.label_18.setObjectName(_fromUtf8("label_18"))
        self.horizontalLayout_2.addWidget(self.label_18)
        self.RP_EIC_width = QtGui.QLineEdit(self.tab_2)
        self.RP_EIC_width.setObjectName(_fromUtf8("RP_EIC_width"))
        self.horizontalLayout_2.addWidget(self.RP_EIC_width)
        self.horizontalLayout_5.addLayout(self.horizontalLayout_2)
        spacerItem25 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                         QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_5.addItem(spacerItem25)
        self.horizontalLayout_3 = QtGui.QHBoxLayout()
        self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
        self.label_19 = QtGui.QLabel(self.tab_2)
        self.label_19.setObjectName(_fromUtf8("label_19"))
        self.horizontalLayout_3.addWidget(self.label_19)
        self.RP_output_file_field = QtGui.QLineEdit(self.tab_2)
        self.RP_output_file_field.setObjectName(
            _fromUtf8("RP_output_file_field"))
        self.horizontalLayout_3.addWidget(self.RP_output_file_field)
        self.RP_output_file_button = QtGui.QPushButton(self.tab_2)
        self.RP_output_file_button.setObjectName(
            _fromUtf8("RP_output_file_button"))
        self.horizontalLayout_3.addWidget(self.RP_output_file_button)
        self.horizontalLayout_5.addLayout(self.horizontalLayout_3)
        self.verticalLayout_4.addLayout(self.horizontalLayout_5)
        spacerItem26 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Minimum,
                                         QtGui.QSizePolicy.Maximum)
        self.verticalLayout_4.addItem(spacerItem26)
        self.RP_run_button = QtGui.QPushButton(self.tab_2)
        self.RP_run_button.setObjectName(_fromUtf8("RP_run_button"))
        self.verticalLayout_4.addWidget(self.RP_run_button)
        self.verticalLayout_9.addLayout(self.verticalLayout_4)
        self.tabWidget.addTab(self.tab_2, _fromUtf8(""))
        self.tab_6 = QtGui.QWidget()
        self.tab_6.setObjectName(_fromUtf8("tab_6"))
        self.gridLayout_6 = QtGui.QGridLayout(self.tab_6)
        self.gridLayout_6.setObjectName(_fromUtf8("gridLayout_6"))
        self.gridLayout_2 = QtGui.QGridLayout()
        self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
        self.verticalLayout_7 = QtGui.QVBoxLayout()
        self.verticalLayout_7.setObjectName(_fromUtf8("verticalLayout_7"))
        self.horizontalLayout_22 = QtGui.QHBoxLayout()
        self.horizontalLayout_22.setObjectName(
            _fromUtf8("horizontalLayout_22"))
        self.HT_RV_load_results = QtGui.QPushButton(self.tab_6)
        self.HT_RV_load_results.setObjectName(_fromUtf8("HT_RV_load_results"))
        self.horizontalLayout_22.addWidget(self.HT_RV_load_results)
        self.RV_reset = QtGui.QPushButton(self.tab_6)
        self.RV_reset.setObjectName(_fromUtf8("RV_reset"))
        self.horizontalLayout_22.addWidget(self.RV_reset)
        self.verticalLayout_7.addLayout(self.horizontalLayout_22)
        self.HT_RV_hitlist = QtGui.QTableWidget(self.tab_6)
        self.HT_RV_hitlist.setEditTriggers(
            QtGui.QAbstractItemView.NoEditTriggers)
        self.HT_RV_hitlist.setObjectName(_fromUtf8("HT_RV_hitlist"))
        self.HT_RV_hitlist.setColumnCount(4)
        self.HT_RV_hitlist.setRowCount(0)
        item = QtGui.QTableWidgetItem()
        self.HT_RV_hitlist.setHorizontalHeaderItem(0, item)
        item = QtGui.QTableWidgetItem()
        self.HT_RV_hitlist.setHorizontalHeaderItem(1, item)
        item = QtGui.QTableWidgetItem()
        self.HT_RV_hitlist.setHorizontalHeaderItem(2, item)
        item = QtGui.QTableWidgetItem()
        self.HT_RV_hitlist.setHorizontalHeaderItem(3, item)
        self.verticalLayout_7.addWidget(self.HT_RV_hitlist)
        self.horizontalLayout_23 = QtGui.QHBoxLayout()
        self.horizontalLayout_23.setObjectName(
            _fromUtf8("horizontalLayout_23"))
        self.HT_RV_up = QtGui.QPushButton(self.tab_6)
        self.HT_RV_up.setObjectName(_fromUtf8("HT_RV_up"))
        self.horizontalLayout_23.addWidget(self.HT_RV_up)
        self.HT_RV_down = QtGui.QPushButton(self.tab_6)
        self.HT_RV_down.setObjectName(_fromUtf8("HT_RV_down"))
        self.horizontalLayout_23.addWidget(self.HT_RV_down)
        self.verticalLayout_7.addLayout(self.horizontalLayout_23)
        self.label_28 = QtGui.QLabel(self.tab_6)
        self.label_28.setObjectName(_fromUtf8("label_28"))
        self.verticalLayout_7.addWidget(self.label_28)
        self.HT_RV_accepted_list = QtGui.QTableWidget(self.tab_6)
        self.HT_RV_accepted_list.setEditTriggers(
            QtGui.QAbstractItemView.NoEditTriggers)
        self.HT_RV_accepted_list.setAlternatingRowColors(False)
        self.HT_RV_accepted_list.setObjectName(
            _fromUtf8("HT_RV_accepted_list"))
        self.HT_RV_accepted_list.setColumnCount(4)
        self.HT_RV_accepted_list.setRowCount(0)
        item = QtGui.QTableWidgetItem()
        self.HT_RV_accepted_list.setHorizontalHeaderItem(0, item)
        item = QtGui.QTableWidgetItem()
        self.HT_RV_accepted_list.setHorizontalHeaderItem(1, item)
        item = QtGui.QTableWidgetItem()
        self.HT_RV_accepted_list.setHorizontalHeaderItem(2, item)
        item = QtGui.QTableWidgetItem()
        self.HT_RV_accepted_list.setHorizontalHeaderItem(3, item)
        self.verticalLayout_7.addWidget(self.HT_RV_accepted_list)
        self.horizontalLayout_24 = QtGui.QHBoxLayout()
        self.horizontalLayout_24.setObjectName(
            _fromUtf8("horizontalLayout_24"))
        self.HT_RV_remove = QtGui.QPushButton(self.tab_6)
        self.HT_RV_remove.setObjectName(_fromUtf8("HT_RV_remove"))
        self.horizontalLayout_24.addWidget(self.HT_RV_remove)
        self.HT_RV_write = QtGui.QPushButton(self.tab_6)
        self.HT_RV_write.setObjectName(_fromUtf8("HT_RV_write"))
        self.horizontalLayout_24.addWidget(self.HT_RV_write)
        self.verticalLayout_7.addLayout(self.horizontalLayout_24)
        self.gridLayout_2.addLayout(self.verticalLayout_7, 0, 0, 1, 1)
        self.verticalLayout_8 = QtGui.QVBoxLayout()
        self.verticalLayout_8.setObjectName(_fromUtf8("verticalLayout_8"))
        self.horizontalLayout_25 = QtGui.QHBoxLayout()
        self.horizontalLayout_25.setObjectName(
            _fromUtf8("horizontalLayout_25"))
        self.label_21 = QtGui.QLabel(self.tab_6)
        self.label_21.setObjectName(_fromUtf8("label_21"))
        self.horizontalLayout_25.addWidget(self.label_21)
        self.label_22 = QtGui.QLabel(self.tab_6)
        self.label_22.setObjectName(_fromUtf8("label_22"))
        self.horizontalLayout_25.addWidget(self.label_22)
        self.verticalLayout_8.addLayout(self.horizontalLayout_25)
        self.horizontalLayout_26 = QtGui.QHBoxLayout()
        self.horizontalLayout_26.setObjectName(
            _fromUtf8("horizontalLayout_26"))
        self.HT_RV_HM_widget = PlotWidget(self.tab_6)
        self.HT_RV_HM_widget.setObjectName(_fromUtf8("HT_RV_HM_widget"))
        self.horizontalLayout_26.addWidget(self.HT_RV_HM_widget)
        self.HT_RV_EIC = PlotWidget(self.tab_6)
        self.HT_RV_EIC.setObjectName(_fromUtf8("HT_RV_EIC"))
        self.horizontalLayout_26.addWidget(self.HT_RV_EIC)
        self.verticalLayout_8.addLayout(self.horizontalLayout_26)
        self.horizontalLayout_27 = QtGui.QHBoxLayout()
        self.horizontalLayout_27.setObjectName(
            _fromUtf8("horizontalLayout_27"))
        self.label_23 = QtGui.QLabel(self.tab_6)
        self.label_23.setObjectName(_fromUtf8("label_23"))
        self.horizontalLayout_27.addWidget(self.label_23)
        self.label_24 = QtGui.QLabel(self.tab_6)
        self.label_24.setText(_fromUtf8(""))
        self.label_24.setObjectName(_fromUtf8("label_24"))
        self.horizontalLayout_27.addWidget(self.label_24)
        self.verticalLayout_8.addLayout(self.horizontalLayout_27)
        self.HT_RV_MS = PlotWidget(self.tab_6)
        self.HT_RV_MS.setObjectName(_fromUtf8("HT_RV_MS"))
        self.verticalLayout_8.addWidget(self.HT_RV_MS)
        self.horizontalLayout_28 = QtGui.QHBoxLayout()
        self.horizontalLayout_28.setObjectName(
            _fromUtf8("horizontalLayout_28"))
        self.HT_RV_accept = QtGui.QPushButton(self.tab_6)
        self.HT_RV_accept.setObjectName(_fromUtf8("HT_RV_accept"))
        self.horizontalLayout_28.addWidget(self.HT_RV_accept)
        self.HT_RV_reject = QtGui.QPushButton(self.tab_6)
        self.HT_RV_reject.setObjectName(_fromUtf8("HT_RV_reject"))
        self.horizontalLayout_28.addWidget(self.HT_RV_reject)
        self.verticalLayout_8.addLayout(self.horizontalLayout_28)
        self.gridLayout_2.addLayout(self.verticalLayout_8, 0, 1, 1, 1)
        self.gridLayout_2.setColumnStretch(1, 1)
        self.gridLayout_6.addLayout(self.gridLayout_2, 0, 0, 1, 1)
        self.tabWidget.addTab(self.tab_6, _fromUtf8(""))
        self.gridLayout_7.addWidget(self.tabWidget, 0, 1, 1, 1)

        self.retranslateUi(Dialog)
        self.tabWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(Dialog)

    def retranslateUi(self, Dialog):
        Dialog.setWindowTitle(_translate("Dialog", "Dialog", None))
        self.groupBox_3.setTitle(_translate("Dialog", "Input mzML files",
                                            None))
        item = self.HTS_input_file_table.horizontalHeaderItem(0)
        item.setText(_translate("Dialog", "Input File", None))
        self.HTS_load_input_files_button.setText(
            _translate("Dialog", "Add Input File", None))
        self.HTS_remove_row_button.setText(
            _translate("Dialog", "Remove Highlighted row", None))
        self.groupBox.setTitle(_translate("Dialog", "Define Search", None))
        item = self.HTS_define_scan.verticalHeaderItem(0)
        item.setText(_translate("Dialog", "mzDelta", None))
        item = self.HTS_define_scan.verticalHeaderItem(1)
        item.setText(_translate("Dialog", "Intensity Ratio", None))
        item = self.HTS_define_scan.verticalHeaderItem(2)
        item.setText(_translate("Dialog", "mzWidth", None))
        item = self.HTS_define_scan.verticalHeaderItem(3)
        item.setText(_translate("Dialog", "rtWidth", None))
        item = self.HTS_define_scan.verticalHeaderItem(4)
        item.setText(_translate("Dialog", "mzSigma", None))
        item = self.HTS_define_scan.verticalHeaderItem(5)
        item.setText(_translate("Dialog", "rtSigma", None))
        item = self.HTS_define_scan.verticalHeaderItem(6)
        item.setText(_translate("Dialog", "Threads (CPP only)", None))
        item = self.HTS_define_scan.verticalHeaderItem(7)
        item.setText(_translate("Dialog", "Output File Name", None))
        item = self.HTS_define_scan.horizontalHeaderItem(0)
        item.setText(_translate("Dialog", "Value", None))
        self.HTS_set_output_file.setText(
            _translate("Dialog", "Set output Directory", None))
        self.HTS_restore_defaults.setText(
            _translate("Dialog", "Restore Defaults", None))
        self.HTS_apply_params.setText(
            _translate("Dialog", "Apply Parameters", None))
        self.HTS_run_HT_search.setText(
            _translate("Dialog", "Run HiTIME search", None))
        self.label.setText(_translate("Dialog", "Status", None))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab),
                                  _translate("Dialog", "HiTIME Search", None))
        self.groupBox_4.setTitle(_translate("Dialog", "Input Data", None))
        self.label_13.setText(_translate("Dialog", "Treatment", None))
        self.HT_BS_treatment_browse.setText(
            _translate("Dialog", "Browse", None))
        self.label_20.setText(_translate("Dialog", "Control", None))
        self.HT_BS_control_browse.setText(_translate("Dialog", "Browse", None))
        self.label_25.setText(_translate("Dialog", "Output", None))
        self.HT_BS_output_browse.setText(_translate("Dialog", "Browse", None))
        self.groupBox_5.setTitle(
            _translate("Dialog", "Subtraction Parameters", None))
        self.label_26.setText(_translate("Dialog", "m/z Tolerance", None))
        self.label_27.setText(_translate("Dialog", "RT Tolerance", None))
        self.label_29.setText(_translate("Dialog", "Score Cutoff", None))
        self.groupBox_6.setTitle(_translate("Dialog", "Data Viewer", None))
        self.groupBox_7.setTitle(_translate("Dialog", "Active Plot", None))
        self.HT_BS_active_treatment.setText(
            _translate("Dialog", "Treatment", None))
        self.HT_BS_active_control.setText(_translate("Dialog", "Control",
                                                     None))
        self.HT_BS_active_output.setText(_translate("Dialog", "Output", None))
        self.HT_BS_run.setText(_translate("Dialog", "Run Subtraction", None))
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.tab_3),
            _translate("Dialog", "Background Subtraction", None))
        self.label_9.setText(_translate("Dialog", "HiTIME Output File", None))
        self.RP_HT_input_button.setText(_translate("Dialog", "Browse", None))
        self.label_15.setText(_translate("Dialog", "mzML File", None))
        self.RP_mascot_input_button.setText(
            _translate("Dialog", "Browse", None))
        self.label_14.setText(_translate("Dialog", "Minimum HT Score", None))
        self.label_12.setText(_translate("Dialog", "m/z Width", None))
        self.label_11.setText(
            _translate("Dialog", "Retention TIme Width", None))
        self.label_30.setText(_translate("Dialog", "RT exclusion", None))
        self.label_10.setText(_translate("Dialog", "Scores Histogram", None))
        self.label_16.setText(_translate("Dialog", "Heat Map", None))
        self.HT_RP_use_peptide_isotope_scaling.setText(
            _translate("Dialog", "Use Peptide Isotope Scaling", None))
        self.HT_RP_plot_EICs.setText(_translate("Dialog", "Plot EICs", None))
        self.label_17.setText(_translate("Dialog", "mzDelta", None))
        self.label_18.setText(_translate("Dialog", "EIC Width", None))
        self.label_19.setText(_translate("Dialog", "Output File", None))
        self.RP_output_file_button.setText(_translate("Dialog", "Browse",
                                                      None))
        self.RP_run_button.setText(
            _translate("Dialog", "Run Postprocessing", None))
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.tab_2),
            _translate("Dialog", "Results Postprocessing", None))
        self.HT_RV_load_results.setText(
            _translate("Dialog", "Load Results", None))
        self.RV_reset.setText(_translate("Dialog", "Reset", None))
        item = self.HT_RV_hitlist.horizontalHeaderItem(0)
        item.setText(_translate("Dialog", "Hit", None))
        item = self.HT_RV_hitlist.horizontalHeaderItem(1)
        item.setText(_translate("Dialog", "RT", None))
        item = self.HT_RV_hitlist.horizontalHeaderItem(2)
        item.setText(_translate("Dialog", "m/z", None))
        item = self.HT_RV_hitlist.horizontalHeaderItem(3)
        item.setText(_translate("Dialog", "Score", None))
        self.HT_RV_up.setText(_translate("Dialog", "Up", None))
        self.HT_RV_down.setText(_translate("Dialog", "Down", None))
        self.label_28.setText(_translate("Dialog", "Accepted Hits", None))
        item = self.HT_RV_accepted_list.horizontalHeaderItem(0)
        item.setText(_translate("Dialog", "Hit", None))
        item = self.HT_RV_accepted_list.horizontalHeaderItem(1)
        item.setText(_translate("Dialog", "RT", None))
        item = self.HT_RV_accepted_list.horizontalHeaderItem(2)
        item.setText(_translate("Dialog", "m/z", None))
        item = self.HT_RV_accepted_list.horizontalHeaderItem(3)
        item.setText(_translate("Dialog", "Score", None))
        self.HT_RV_remove.setText(_translate("Dialog", "Remove", None))
        self.HT_RV_write.setText(
            _translate("Dialog", "Write Results to File", None))
        self.label_21.setText(_translate("Dialog", "Heat Map", None))
        self.label_22.setText(_translate("Dialog", "EIC", None))
        self.label_23.setText(_translate("Dialog", "MS1 Spectrum", None))
        self.HT_RV_accept.setText(_translate("Dialog", "Accept", None))
        self.HT_RV_reject.setText(_translate("Dialog", "Reject", None))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_6),
                                  _translate("Dialog", "Results Viewer", None))
Ejemplo n.º 40
0
    def __init__(self, parent=None):
        QMainWindow.__init__(self, parent)
        self.help_menu = self.menuBar().addMenu("&Help")
        self.file_menu = self.menuBar().addMenu("&File")
        self.status_text = QLabel()
        self.plot = PlotWidget(alpha=0.75)
        self.ui = Ui_RTBSA()
        self.ui.setupUi(self)
        self.setWindowTitle('Real Time BSA')
        self.loadStyleSheet()
        self.setUpGraph()

        self.bsapvs = [
            'GDET:FEE1:241:ENRC', 'GDET:FEE1:242:ENRC', 'GDET:FEE1:361:ENRC',
            'GDET:FEE1:362:ENRC'
        ]

        self.populateBSAPVs()
        self.connectGuiFunctions()

        # Initial number of points
        self.numPoints = 2800

        # Initial number of standard deviations
        self.stdDevstoKeep = 3.0

        # 20ms polling time
        self.updateTime = 50

        # Set initial polynomial fit to 2
        self.fitOrder = 2

        self.disableInputs()
        self.abort = True

        # Used to update plot
        self.timer = QTimer(self)

        self.ratePV = PV('IOC:IN20:EV01:RG01_ACTRATE')

        self.menuBar().setStyleSheet(
            'QWidget{background-color:grey;color:purple}')
        self.create_menu()
        self.create_status_bar()

        # The PV names
        self.devices = {"A": "", "B": ""}

        self.pvObjects = {"A": None, "B": None}

        # The raw, unsynchronized, unfiltered buffers
        self.rawBuffers = {"A": empty(2800), "B": empty(2800)}

        # The times when each buffer finished its last data acquisition
        self.timeStamps = {"A": None, "B": None}

        self.synchronizedBuffers = {"A": empty(2800), "B": empty(2800)}

        # Versions of data buffers A and B that are filtered by standard
        # deviation. Didn't want to edit those buffers directly so that we could
        # unfilter or refilter with a different number more efficiently
        self.filteredBuffers = {"A": empty(2800), "B": empty(2800)}

        # Text objects that appear on the plot
        self.text = {"avg": None, "std": None, "slope": None, "corr": None}

        # All things plot related!
        self.plotAttributes = {
            "curve": None,
            "fit": None,
            "parab": None,
            "frequencies": None
        }

        # Used for the kill swtich
        self.counter = {"A": 0, "B": 0}

        # Used to implement scrolling for time plots
        self.currIdx = {"A": 0, "B": 0}
Ejemplo n.º 41
0
class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(823, 597)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.graphicsView = PlotWidget(self.centralwidget)
        self.graphicsView.setGeometry(QtCore.QRect(5, 21, 421, 481))
        self.graphicsView.setObjectName("graphicsView")
        self.gridLayoutWidget = QtWidgets.QWidget(self.centralwidget)
        self.gridLayoutWidget.setGeometry(QtCore.QRect(440, 20, 376, 481))
        self.gridLayoutWidget.setObjectName("gridLayoutWidget")
        self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setObjectName("gridLayout")
        self.rectYLeft = QtWidgets.QLineEdit(self.gridLayoutWidget)
        self.rectYLeft.setObjectName("rectYLeft")
        self.gridLayout.addWidget(self.rectYLeft, 7, 1, 1, 1)
        self.pushButton = QtWidgets.QPushButton(self.gridLayoutWidget)
        self.pushButton.setObjectName("pushButton")
        self.gridLayout.addWidget(self.pushButton, 10, 0, 1, 2)
        self.tableWidget = QtWidgets.QTableWidget(self.gridLayoutWidget)
        self.tableWidget.setObjectName("tableWidget")
        self.tableWidget.setColumnCount(0)
        self.tableWidget.setRowCount(0)
        self.gridLayout.addWidget(self.tableWidget, 4, 0, 1, 2)
        self.lengthEdit = QtWidgets.QLineEdit(self.gridLayoutWidget)
        self.lengthEdit.setObjectName("lengthEdit")
        self.gridLayout.addWidget(self.lengthEdit, 9, 0, 1, 1)
        self.label_3 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 6, 1, 1, 1)
        self.label_2 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 6, 0, 1, 1)
        self.sectionButton = QtWidgets.QPushButton(self.gridLayoutWidget)
        self.sectionButton.setObjectName("sectionButton")
        self.gridLayout.addWidget(self.sectionButton, 11, 0, 1, 2)
        self.label_6 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label_6.setObjectName("label_6")
        self.gridLayout.addWidget(self.label_6, 3, 0, 1, 2)
        self.widthEdit = QtWidgets.QLineEdit(self.gridLayoutWidget)
        self.widthEdit.setObjectName("widthEdit")
        self.gridLayout.addWidget(self.widthEdit, 9, 1, 1, 1)
        self.label = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 5, 0, 1, 2)
        self.label_4 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label_4.setObjectName("label_4")
        self.gridLayout.addWidget(self.label_4, 8, 0, 1, 1)
        self.label_5 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label_5.setObjectName("label_5")
        self.gridLayout.addWidget(self.label_5, 8, 1, 1, 1)
        self.rectXLeft = QtWidgets.QLineEdit(self.gridLayoutWidget)
        self.rectXLeft.setObjectName("rectXLeft")
        self.gridLayout.addWidget(self.rectXLeft, 7, 0, 1, 1)
        self.linesEdit = QtWidgets.QLineEdit(self.gridLayoutWidget)
        self.linesEdit.setObjectName("linesEdit")
        self.gridLayout.addWidget(self.linesEdit, 1, 0, 1, 2)
        self.label_7 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label_7.setObjectName("label_7")
        self.gridLayout.addWidget(self.label_7, 0, 0, 1, 2)
        self.linesTableButton = QtWidgets.QPushButton(self.gridLayoutWidget)
        self.linesTableButton.setObjectName("linesTableButton")
        self.gridLayout.addWidget(self.linesTableButton, 2, 0, 1, 2)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 823, 22))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

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

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
        self.pushButton.setText(
            _translate("MainWindow", "Построить отрезки и прямоугольник"))
        self.label_3.setText(
            _translate("MainWindow", "Верхний левый угол по у"))
        self.label_2.setText(
            _translate("MainWindow", "Верхний левый угол по х"))
        self.sectionButton.setText(_translate("MainWindow", "Отсечь"))
        self.label_6.setText(
            _translate("MainWindow", "Введите координаты отрезков"))
        self.label.setText(
            _translate("MainWindow", "Введите параметры прямоугольника"))
        self.label_4.setText(_translate("MainWindow", "Длина"))
        self.label_5.setText(_translate("MainWindow", "Ширина"))
        self.label_7.setText(
            _translate("MainWindow", "Введите количество отрезков"))
        self.linesTableButton.setText(
            _translate("MainWindow", "Ввести координаты отрезков"))
Ejemplo n.º 42
0
class PMUGraph:
    """
        A class to display one or more performance graph,
        for the same performance event type

        :param pmuwidget: A PMUWidget object
        :param event_type: The type of performance event to display
    """
    def __init__(self, pmuwidget, event_type, window_size, col, row):
        self.plot = PlotWidget()
        self.perf = pmuwidget.perf
        self.parameters = pmuwidget.parameters
        self.window_size = window_size

        self.curves = {}

        if event_type.has_limits():
            y_min, y_max = event_type.get_limits()
            self.plot.setYRange(y_min, y_max)
        self.plot.setLabel('left', event_type.get_name(),
                           event_type.get_unit())
        self.plot.setLabel('bottom', 'Time', 's')

        pmuwidget.qbox.addWidget(self.plot, col, row)
        if (window_size):
            pmuwidget.graphs[event_type] = self
        else:
            pmuwidget.graphs_full[event_type] = self

    def init(self, event, data_time, data):
        """
            Initialize the graph

            :param event: The event to display
            :param data: The event's data
        """
        name = event.get_name()
        event_type_name = event.get_event_type().get_name()
        color = self.parameters.param(event_type_name, name, 'color').value()
        self.curves[name] = self.plot.plot(data_time, data)
        self.curves[name].setPen(color, width=3)

    def update(self, event, data_time, data):
        """
            Update the graph

            :param event: The event to display
            :param data: The event's data
        """
        name = event.get_name()
        if self.window_size is None:
            self.curves[name].setData(data_time, data)
        else:
            new_data_time = []
            dt0 = data_time[-self.window_size]
            for dt in data_time[-self.window_size:]:
                new_data_time.append(dt-dt0)
            self.curves[name].setData(new_data_time,
                                      data[-self.window_size:])

    def treeChanged(self, event):
        """
            Update graph option when a parameter has been changed

            This updates the color, and show or hide the graph
            when one of this option has been changed in the parameter
            tree.
            :param event:
        """
        name = event.get_name()
        event_type_name = event.get_event_type().get_name()
        color = self.parameters.param(event_type_name, name, 'color').value()
        plot = self.parameters.param(event_type_name, name, 'plot').value()
        if plot:
            self.curves[event.get_name()].setPen(color, width=3)
            self.curves[event.get_name()].show()
        else:
            self.curves[event.get_name()].hide()
Ejemplo n.º 43
0
    def setup(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(400, 300)
        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(48, 47, 46))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush)
        brush = QtGui.QBrush(QtGui.QColor(72, 70, 69))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush)
        brush = QtGui.QBrush(QtGui.QColor(60, 58, 57))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush)
        brush = QtGui.QBrush(QtGui.QColor(24, 23, 23))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush)
        brush = QtGui.QBrush(QtGui.QColor(32, 31, 30))
        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(48, 47, 46))
        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(24, 23, 23))
        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(48, 47, 46))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush)
        brush = QtGui.QBrush(QtGui.QColor(72, 70, 69))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush)
        brush = QtGui.QBrush(QtGui.QColor(60, 58, 57))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight,
                         brush)
        brush = QtGui.QBrush(QtGui.QColor(24, 23, 23))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush)
        brush = QtGui.QBrush(QtGui.QColor(32, 31, 30))
        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(48, 47, 46))
        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(24, 23, 23))
        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(24, 23, 23))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText,
                         brush)
        brush = QtGui.QBrush(QtGui.QColor(48, 47, 46))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush)
        brush = QtGui.QBrush(QtGui.QColor(72, 70, 69))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush)
        brush = QtGui.QBrush(QtGui.QColor(60, 58, 57))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight,
                         brush)
        brush = QtGui.QBrush(QtGui.QColor(24, 23, 23))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush)
        brush = QtGui.QBrush(QtGui.QColor(32, 31, 30))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush)
        brush = QtGui.QBrush(QtGui.QColor(24, 23, 23))
        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(24, 23, 23))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText,
                         brush)
        brush = QtGui.QBrush(QtGui.QColor(48, 47, 46))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(48, 47, 46))
        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(48, 47, 46))
        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)
        self.centralWidget = QtWidgets.QWidget(MainWindow)
        self.centralWidget.setObjectName("centralWidget")
        self.gridLayout = QtWidgets.QGridLayout(self.centralWidget)
        self.gridLayout.setContentsMargins(11, 11, 11, 11)
        self.gridLayout.setSpacing(6)
        self.gridLayout.setObjectName("gridLayout")
        self.DiffTime = PlotWidget(self.centralWidget)
        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(81, 80, 78))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush)
        brush = QtGui.QBrush(QtGui.QColor(121, 120, 117))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush)
        brush = QtGui.QBrush(QtGui.QColor(101, 100, 97))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush)
        brush = QtGui.QBrush(QtGui.QColor(40, 40, 39))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush)
        brush = QtGui.QBrush(QtGui.QColor(54, 53, 52))
        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(81, 80, 78))
        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(40, 40, 39))
        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(81, 80, 78))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush)
        brush = QtGui.QBrush(QtGui.QColor(121, 120, 117))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush)
        brush = QtGui.QBrush(QtGui.QColor(101, 100, 97))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight,
                         brush)
        brush = QtGui.QBrush(QtGui.QColor(40, 40, 39))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush)
        brush = QtGui.QBrush(QtGui.QColor(54, 53, 52))
        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(81, 80, 78))
        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(40, 40, 39))
        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(40, 40, 39))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText,
                         brush)
        brush = QtGui.QBrush(QtGui.QColor(81, 80, 78))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush)
        brush = QtGui.QBrush(QtGui.QColor(121, 120, 117))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush)
        brush = QtGui.QBrush(QtGui.QColor(101, 100, 97))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight,
                         brush)
        brush = QtGui.QBrush(QtGui.QColor(40, 40, 39))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush)
        brush = QtGui.QBrush(QtGui.QColor(54, 53, 52))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush)
        brush = QtGui.QBrush(QtGui.QColor(40, 40, 39))
        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(40, 40, 39))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText,
                         brush)
        brush = QtGui.QBrush(QtGui.QColor(81, 80, 78))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(81, 80, 78))
        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(81, 80, 78))
        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.DiffTime.setPalette(palette)
        self.DiffTime.setObjectName("DiffTime")
        self.gridLayout.addWidget(self.DiffTime, 0, 0, 1, 1)
        self.DiffFreq = PlotWidget(self.centralWidget)
        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(58, 57, 56))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush)
        brush = QtGui.QBrush(QtGui.QColor(87, 85, 84))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush)
        brush = QtGui.QBrush(QtGui.QColor(72, 71, 70))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush)
        brush = QtGui.QBrush(QtGui.QColor(29, 28, 28))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush)
        brush = QtGui.QBrush(QtGui.QColor(38, 38, 37))
        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(58, 57, 56))
        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(29, 28, 28))
        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(58, 57, 56))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush)
        brush = QtGui.QBrush(QtGui.QColor(87, 85, 84))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush)
        brush = QtGui.QBrush(QtGui.QColor(72, 71, 70))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight,
                         brush)
        brush = QtGui.QBrush(QtGui.QColor(29, 28, 28))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush)
        brush = QtGui.QBrush(QtGui.QColor(38, 38, 37))
        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(58, 57, 56))
        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(29, 28, 28))
        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(29, 28, 28))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText,
                         brush)
        brush = QtGui.QBrush(QtGui.QColor(58, 57, 56))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush)
        brush = QtGui.QBrush(QtGui.QColor(87, 85, 84))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush)
        brush = QtGui.QBrush(QtGui.QColor(72, 71, 70))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight,
                         brush)
        brush = QtGui.QBrush(QtGui.QColor(29, 28, 28))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush)
        brush = QtGui.QBrush(QtGui.QColor(38, 38, 37))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush)
        brush = QtGui.QBrush(QtGui.QColor(29, 28, 28))
        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(29, 28, 28))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText,
                         brush)
        brush = QtGui.QBrush(QtGui.QColor(58, 57, 56))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(58, 57, 56))
        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(58, 57, 56))
        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.DiffFreq.setPalette(palette)
        self.DiffFreq.setObjectName("DiffFreq")
        self.gridLayout.addWidget(self.DiffFreq, 1, 0, 1, 1)
        MainWindow.setCentralWidget(self.centralWidget)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Ejemplo n.º 44
0
class DirectDriveWindow(QWidget):
    virtual_controller = None  # will hold an instance of the VirtualController-class
    motor_controller = None  # will hold an instance of the MotorController-class
    game_interfacer = None  # will hold an instance of the GameInterfacer-class

    # Variables that will be shared between multiple processes
    raw_force_signal_global = Value(
        'f', 0.0)  # raw force-feedback value coming from the game
    game_status_playing_global = Value(
        'b', False)  # game status (playing/not-playing)
    motor_pause_mode = Value(
        'b', False)  # if the motor should be idle when game is paused

    data_reconstruction = Value(
        'b', False)  # if the data-reconstruction feature should be used
    data_smoothing_level = Value(
        'i', 0)  # if the temproal smoothing feature should be used

    friction_global = Value('f', 0.0)  # strength of the friction effect
    damping_global = Value('f', 0.0)  # strength of the damping effect
    inertia_global = Value('f', 0.0)  # strength of the inertia effect

    encoder_pos_global = Value(
        'f', 0.0)  # holds the wheel position in encoder counts
    wheel_position_deg_global = Value(
        'f', 0.0)  # holds the wheel position in degrees
    lock_to_lock_global = Value(
        'f', 900.0
    )  # holds the digital limit of the wheel (used by the virtual controller)
    bump_to_bump_global = Value(
        'f', 900.0
    )  # holds the physical limit of the wheel (used by the motor controller)

    motor_current_global = Value(
        'f', 0.0
    )  # holds the current(Ampere) that is applied to the motor at any moment

    actual_max_force_global = Value(
        'f', 0.0
    )  # sets the actual maximum torque(Nm) the motor should be limited to
    invert_force_global = Value(
        'b', False)  # if the raw force-feedback value should be inverted

    motor_connected_global = Value(
        'b', False)  # motor status (connected/not-connected)
    motor_controller_due_for_restart_global = Value(
        'b', False)  # is set to true when connection to odrive board is lost

    motor_control_rate = Value(
        'f', 0.0)  # target refresh rate for the motor-control process

    profiles = []  # holds all loaded and newly created profiles
    selected_profile_index = 0  # holds the index of the currently selected profile

    graph_sample_rate = 60  # update-rate(Hz) for the motor-current graph
    graph_history_time_sec = 2  # time-window of the motor-current graph

    def __init__(self):
        super().__init__()
        self.setGeometry(100, 100, 1700, 575)
        self.setWindowTitle('DIY Direct Drive Wheel')

        #self.updater = LiveGuiUpdater()
        #self.updater.ticked.connect(self.LiveGuiTick)
        #self.updater.start()

        self.timer = QTimer()
        self.timer.timeout.connect(self.graph_update)
        self.timer.setInterval(1000 / self.graph_sample_rate)
        self.timer.start()

        self.gui_timer = QTimer()
        self.gui_timer.timeout.connect(self.LiveGuiTick)
        self.gui_timer.setInterval(1000 / 60)
        self.gui_timer.start()

        self.virtual_controller = VirtualController()
        self.virtual_controller.set_frequency(180)
        self.virtual_controller.steering_value_deg = self.wheel_position_deg_global
        self.virtual_controller.lock_to_lock = self.lock_to_lock_global
        self.virtual_controller.start()

        self.game_interfacer = GameInterfacer()
        self.game_interfacer.set_frequency(180)
        self.game_interfacer.wheel_force = self.raw_force_signal_global
        self.game_interfacer.invert_force = self.invert_force_global
        self.game_interfacer.game_status_playing = self.game_status_playing_global

        self.motor_controller = MotorController()
        self.motor_controller.set_frequency(360)
        self.motor_controller.signal_in = self.raw_force_signal_global
        self.motor_controller.game_status_playing = self.game_status_playing_global
        self.motor_controller.motor_pause_mode = self.motor_pause_mode
        self.motor_controller.data_reconstruction = self.data_reconstruction
        self.motor_controller.data_smoothing_level = self.data_smoothing_level
        self.motor_controller.friction = self.friction_global
        self.motor_controller.damping = self.damping_global
        self.motor_controller.inertia = self.inertia_global
        self.motor_controller.encoder_pos = self.encoder_pos_global
        self.motor_controller.wheel_pos_deg = self.wheel_position_deg_global
        self.motor_controller.bump_to_bump = self.bump_to_bump_global
        self.motor_controller.motor_current = self.motor_current_global
        self.motor_controller.actual_max_force = self.actual_max_force_global
        self.motor_controller.motor_connected = self.motor_connected_global
        self.motor_controller.due_for_restart = self.motor_controller_due_for_restart_global
        self.motor_controller.achieved_freq = self.motor_control_rate
        self.motor_controller.start()

        self.lblMotorRate = QLabel('motor control rate:', self)
        self.lblMotorRate.setFont(QFont("Times", 24, QFont.Normal))
        self.lblMotorRate.move(675, 25)

        self.lblMotorRateHz = QLabel('0.00 Hz', self)
        self.lblMotorRateHz.setFont(QFont("Times", 24, QFont.Normal))
        self.lblMotorRateHz.adjustSize()
        self.lblMotorRateHz.move(1125 - self.lblMotorRateHz.width(), 25)

        self.force_graph = PlotWidget(self)
        self.force_graph.move(675, 75)
        self.force_graph.resize(1000, 475)
        self.force_graph.setYRange(-15.0, 15.0)
        self.force_graph.setBackground((255, 255, 255))
        self.force_graph.showGrid(x=False, y=True)
        self.force_graph.addLegend()

        pen_ffb = pg.mkPen(color=(0, 0, 255))
        self.ffb_curve = self.force_graph.getPlotItem().plot(
            pen=pen_ffb, name='Game FFB (Nm)')
        pen_current = pg.mkPen(color=(0, 255, 0))
        self.current_curve = self.force_graph.getPlotItem().plot(
            pen=pen_current, name='Motor Torque (Nm)')
        self.ffb_history = [
            0
        ] * self.graph_sample_rate * self.graph_history_time_sec
        self.current_history = [
            0
        ] * self.graph_sample_rate * self.graph_history_time_sec

        self.load_profiles_from_file()
        self.build_gui()
        self.select_profile(0)

    # updates the graph showing the raw ffb and the motor torque
    def graph_update(self):
        # adding the latest raw game-ffb value(scaled to the actual torque value) to a list storing a history of this value
        self.ffb_history.append(self.raw_force_signal_global.value /
                                self.actual_max_force_global.value)
        if len(self.ffb_history
               ) >= self.graph_history_time_sec * self.graph_sample_rate:
            self.ffb_history.pop(0)
        self.ffb_curve.setData(self.ffb_history)

        # adding the latest final motor torque value to a list storing a history of this value
        self.current_history.append(
            self.motor_current_global.value /
            (self.actual_max_force_global.value * 2.75))
        if len(self.current_history
               ) >= self.graph_history_time_sec * self.graph_sample_rate:
            self.current_history.pop(0)
        self.current_curve.setData(self.current_history)

        # displaying the actually achieved refresh rate of the motor-control process
        self.lblMotorRateHz.setText(
            str(int(self.motor_control_rate.value * 100) / 100) + ' Hz')
        if self.motor_control_rate.value >= 360.0:
            self.lblMotorRateHz.setStyleSheet(
                'QLabel { color: rgb(0,155,0); }')
        else:
            self.lblMotorRateHz.setStyleSheet(
                'QLabel { color: rgb(155,0,0); }')

    # initializes and configures all the GUI-elements
    def build_gui(self):
        # WHEEL POSITION DATA AND SETTINGS

        # current bar
        self.lblCurrent = QLabel(self)
        self.lblCurrent.move(25 + 128, 25)
        self.lblCurrent.resize(0, 25)
        self.lblCurrent.setAutoFillBackground(True)
        self.lblCurrent.setStyleSheet(
            'QLabel { background-color: rgb(0,255,0); }')

        self.lblCurrentDivider = QLabel(self)
        self.lblCurrentDivider.move(25 + 128 - 1, 20)
        self.lblCurrentDivider.resize(2, 35)
        self.lblCurrentDivider.setAutoFillBackground(True)
        self.lblCurrentDivider.setStyleSheet(
            'QLabel { background-color: rgb(0,0,0); }')

        # wheel image
        self.lblWheelImage = QLabel(self)
        self.wheel_image = QImage('wheel_image.png')
        self.wheel_image_discon = QImage('wheel_image_disconnect.png')
        self.wheel_pixmap = QPixmap.fromImage(self.wheel_image)
        self.lblWheelImage.setPixmap(self.wheel_pixmap)
        self.lblWheelImage.resize(self.wheel_pixmap.width(),
                                  self.wheel_pixmap.height())
        self.lblWheelImage.move(25, 75)

        # motor status label
        self.lblMotorStatus_1 = QLabel('Motor Status:', self)
        self.lblMotorStatus_1.move(15, 60)
        self.lblMotorStatus_2 = QLabel('Not Connected', self)
        self.lblMotorStatus_2.move(15, 75)
        self.lblMotorStatus_2.setStyleSheet('QLabel { color: rgb(155,0,0); }')

        # wheel position
        self.lblWheelPos = QLabel('0.0°', self)
        self.lblWheelPos.move(25 + 150 + 25, 75 + 256 + 10)
        self.lblWheelPos.resize(200, 50)
        self.lblWheelPos.setFont(QFont("Times", 24, QFont.Normal))

        # center button
        center_pos = [25, 75 + 256 + 22, 150, 30]
        self.btnCenter = QPushButton('center Wheel', self)
        self.btnCenter.move(center_pos[0], center_pos[1])
        self.btnCenter.resize(center_pos[2], center_pos[3])
        self.btnCenter.clicked.connect(self.center_wheel)

        # lock-to-lock slider
        self.locklock_pos = [25, 425, 250, 0]
        self.lblLock = QLabel('Lock to Lock:', self)
        self.lblLock.move(self.locklock_pos[0], self.locklock_pos[1])
        self.sliLock = QSlider(Qt.Horizontal, self)
        self.sliLock.setTickPosition(QSlider.TicksAbove)
        self.sliLock.setTickInterval(10)
        self.sliLock.setMinimum(10)
        self.sliLock.setMaximum(120)
        self.sliLock.setValue(90)
        self.sliLock.setSingleStep(1)
        self.sliLock.move(self.locklock_pos[0], self.locklock_pos[1] + 20)
        self.sliLock.resize(self.locklock_pos[2], 25)
        self.sliLock.valueChanged.connect(self.change_lock)
        self.lblLockVal = QLabel('900°', self)
        self.lblLockVal.adjustSize()
        self.lblLockVal.move(
            self.locklock_pos[0] + self.locklock_pos[2] -
            self.lblLockVal.width(), self.locklock_pos[1])

        # bump_to_bump slider
        self.bumpbump_pos = [25, 500, 250, 0]
        self.lblBump = QLabel('Bump to Bump:', self)
        self.lblBump.move(self.bumpbump_pos[0], self.bumpbump_pos[1])
        self.sliBump = QSlider(Qt.Horizontal, self)
        self.sliBump.setTickPosition(QSlider.TicksAbove)
        self.sliBump.setTickInterval(10)
        self.sliBump.setMinimum(10)
        self.sliBump.setMaximum(120)
        self.sliBump.setValue(90)
        self.sliBump.setSingleStep(1)
        self.sliBump.move(self.bumpbump_pos[0], self.bumpbump_pos[1] + 20)
        self.sliBump.resize(self.bumpbump_pos[2], 25)
        self.sliBump.valueChanged.connect(self.change_bump)
        self.lblBumpVal = QLabel('900°', self)
        self.lblBumpVal.adjustSize()
        self.lblBumpVal.move(
            self.bumpbump_pos[0] + self.bumpbump_pos[2] -
            self.lblBumpVal.width(), self.bumpbump_pos[1])

        # WHEEL FORCE AND BEHAVIOR SETTINGS

        # game select combobox
        gameselect_pos = [325, 25, 250, 25]
        self.cbxGame = QComboBox(self)
        self.cbxGame.move(gameselect_pos[0], gameselect_pos[1])
        self.cbxGame.resize(gameselect_pos[2], gameselect_pos[3])
        for game in self.game_interfacer.games_available:
            self.cbxGame.addItem(game)
        self.cbxGame.activated.connect(self.select_game)

        # invert force checkbox
        invert_pos = [325, 55]
        self.cbInvert = QCheckBox('Invert Force Feedback', self)
        self.cbInvert.move(invert_pos[0], invert_pos[1])
        self.cbInvert.stateChanged.connect(self.toggle_invert)

        # motor pause mode checkbox
        motorpause_pos = [325, 85]
        self.cbMotorPause = QCheckBox('pause motor when game is paused', self)
        self.cbMotorPause.move(motorpause_pos[0], motorpause_pos[1])
        self.cbMotorPause.stateChanged.connect(self.toggle_motor_pause_mode)
        self.cbMotorPause.toggle()

        # maximum force slider
        self.max_force_pos = [325, 125, 250, 0]
        self.lblMaxForce = QLabel('Maximum Force in Nm:', self)
        self.lblMaxForce.move(self.max_force_pos[0], self.max_force_pos[1])
        self.sliMaxForce = QSlider(Qt.Horizontal, self)
        self.sliMaxForce.setTickPosition(QSlider.TicksAbove)
        self.sliMaxForce.setTickInterval(10)
        self.sliMaxForce.setMinimum(1)
        self.sliMaxForce.setMaximum(150)
        self.sliMaxForce.setValue(0)
        self.sliMaxForce.setSingleStep(1)
        self.sliMaxForce.move(self.max_force_pos[0],
                              self.max_force_pos[1] + 20)
        self.sliMaxForce.resize(self.max_force_pos[2], 25)
        self.sliMaxForce.valueChanged.connect(self.change_max_force)
        self.lblMaxForceVal = QLabel('0.0 Nm - (0.0 Amp)', self)
        self.lblMaxForceVal.adjustSize()
        self.lblMaxForceVal.move(
            self.max_force_pos[0] + self.max_force_pos[2] -
            self.lblMaxForceVal.width(), self.max_force_pos[1])

        # reconstruction checkbox
        reconst_pos = [325, 175 + 3]
        self.cbReconst = QCheckBox('Use Data Reconstruction', self)
        self.cbReconst.move(reconst_pos[0], reconst_pos[1])
        self.cbReconst.stateChanged.connect(self.toggle_reconstruction)
        self.cbReconst.setEnabled(False)

        # smoothing level combobox
        smoothing_pos = [475, 175, 100, 25]
        self.cbxSmoothing = QComboBox(self)
        self.cbxSmoothing.move(smoothing_pos[0], smoothing_pos[1])
        self.cbxSmoothing.resize(smoothing_pos[2], smoothing_pos[3])
        self.cbxSmoothing.addItem('no Smoothing')
        self.cbxSmoothing.addItem('1')
        self.cbxSmoothing.addItem('2')
        self.cbxSmoothing.addItem('3')
        self.cbxSmoothing.addItem('4')
        self.cbxSmoothing.addItem('5')
        self.cbxSmoothing.addItem('6')
        self.cbxSmoothing.addItem('7')
        self.cbxSmoothing.addItem('8')
        self.cbxSmoothing.addItem('9')
        self.cbxSmoothing.activated.connect(self.change_smoothing)
        self.cbxSmoothing.setEnabled(False)

        # friction slider
        self.friction_pos = [325, 215, 250, 0]
        self.lblFriction = QLabel('Friction:', self)
        self.lblFriction.move(self.friction_pos[0], self.friction_pos[1])
        self.sliFriction = QSlider(Qt.Horizontal, self)
        self.sliFriction.setTickPosition(QSlider.TicksAbove)
        self.sliFriction.setTickInterval(10)
        self.sliFriction.setMinimum(0)
        self.sliFriction.setMaximum(100)
        self.sliFriction.setValue(0)
        self.sliFriction.setSingleStep(1)
        self.sliFriction.move(self.friction_pos[0], self.friction_pos[1] + 20)
        self.sliFriction.resize(self.friction_pos[2], 25)
        self.sliFriction.valueChanged.connect(self.change_friction)
        self.lblFrictionVal = QLabel('0 %', self)
        self.lblFrictionVal.adjustSize()
        self.lblFrictionVal.move(
            self.friction_pos[0] + self.friction_pos[2] -
            self.lblFrictionVal.width(), self.friction_pos[1])

        # damping slider
        self.damping_pos = [325, 275, 250, 0]
        self.lblDamping = QLabel('Damping:', self)
        self.lblDamping.move(self.damping_pos[0], self.damping_pos[1])
        self.sliDamping = QSlider(Qt.Horizontal, self)
        self.sliDamping.setTickPosition(QSlider.TicksAbove)
        self.sliDamping.setTickInterval(10)
        self.sliDamping.setMinimum(0)
        self.sliDamping.setMaximum(100)
        self.sliDamping.setValue(0)
        self.sliDamping.setSingleStep(1)
        self.sliDamping.move(self.damping_pos[0], self.damping_pos[1] + 20)
        self.sliDamping.resize(self.damping_pos[2], 25)
        self.sliDamping.valueChanged.connect(self.change_damping)
        self.lblDampingVal = QLabel('0 %', self)
        self.lblDampingVal.adjustSize()
        self.lblDampingVal.move(
            self.damping_pos[0] + self.damping_pos[2] -
            self.lblDampingVal.width(), self.damping_pos[1])

        # inertia slider
        self.inertia_pos = [325, 335, 250, 0]
        self.lblInertia = QLabel('Inertia:', self)
        self.lblInertia.move(self.inertia_pos[0], self.inertia_pos[1])
        self.sliInertia = QSlider(Qt.Horizontal, self)
        self.sliInertia.setTickPosition(QSlider.TicksAbove)
        self.sliInertia.setTickInterval(10)
        self.sliInertia.setMinimum(0)
        self.sliInertia.setMaximum(100)
        self.sliInertia.setValue(0)
        self.sliInertia.setSingleStep(1)
        self.sliInertia.move(self.inertia_pos[0], self.inertia_pos[1] + 20)
        self.sliInertia.resize(self.inertia_pos[2], 25)
        self.sliInertia.valueChanged.connect(self.change_inertia)
        self.lblInertiaVal = QLabel('0 %', self)
        self.lblInertiaVal.adjustSize()
        self.lblInertiaVal.move(
            self.inertia_pos[0] + self.inertia_pos[2] -
            self.lblInertiaVal.width(), self.inertia_pos[1])

        # profile select combobox
        profileselect_pos = [325, 430, 250, 25]
        self.cbxProfiles = QComboBox(self)
        self.cbxProfiles.move(profileselect_pos[0], profileselect_pos[1])
        self.cbxProfiles.resize(profileselect_pos[2], profileselect_pos[3])
        for profile in self.profiles:
            self.cbxProfiles.addItem(profile.name)
        self.cbxProfiles.activated.connect(self.select_profile)

        # create profile button
        profilecreate_pos = [325, 460, 250, 25]
        self.btnCreate = QPushButton('create new profile', self)
        self.btnCreate.move(profilecreate_pos[0], profilecreate_pos[1])
        self.btnCreate.resize(profilecreate_pos[2], profilecreate_pos[3])
        self.btnCreate.clicked.connect(self.create_profile)

        # rename profile button
        profilerename_pos = [325, 490, 250, 25]
        self.btnRename = QPushButton('rename profile', self)
        self.btnRename.move(profilerename_pos[0], profilerename_pos[1])
        self.btnRename.resize(profilerename_pos[2], profilerename_pos[3])
        self.btnRename.clicked.connect(self.rename_profile)

        # cancel rename button
        cancelrename_pos = [325 + 200, 490, 50, 25]
        self.btnCancelRename = QPushButton('cancel', self)
        self.btnCancelRename.move(cancelrename_pos[0], cancelrename_pos[1])
        self.btnCancelRename.resize(cancelrename_pos[2], cancelrename_pos[3])
        self.btnCancelRename.clicked.connect(self.cancel_rename)
        self.btnCancelRename.setVisible(False)

        # rename textbox
        self.txtRename = QLineEdit(self)
        self.txtRename.move(profilerename_pos[0], profilerename_pos[1])
        self.txtRename.resize(profilerename_pos[2] - 35 - 55,
                              profilerename_pos[3])
        self.txtRename.setVisible(False)
        self.txtRename.textChanged.connect(self.check_name_validity)

        # save profile button
        profilesave_pos = [325, 520, 120, 25]
        self.btnSave = QPushButton('save profile', self)
        self.btnSave.move(profilesave_pos[0], profilesave_pos[1])
        self.btnSave.resize(profilesave_pos[2], profilesave_pos[3])
        self.btnSave.clicked.connect(self.save_current_profile_internally)

        # delete profile button
        profiledelete_pos = [325 + 130, 520, 120, 25]
        self.btnDelete = QPushButton('delete profile', self)
        self.btnDelete.move(profiledelete_pos[0], profiledelete_pos[1])
        self.btnDelete.resize(profiledelete_pos[2], profiledelete_pos[3])
        self.btnDelete.clicked.connect(self.delete_current_profile)

    # updates the GUI-elements that indicate the status of the motor (connected/not-connected)
    def LiveGuiTick(self):
        self.lblWheelPos.setText(
            str(int(self.wheel_position_deg_global.value * 10) / 10) + '°')

        self.lblCurrent.resize(
            np.abs(self.motor_current_global.value /
                   (self.actual_max_force_global.value * 2.75) * 128), 25)
        if self.motor_current_global.value < 0.0:
            self.lblCurrent.move(
                25 + 128 -
                np.abs(self.motor_current_global.value /
                       (self.actual_max_force_global.value * 2.75) * 128), 25)

        tf = QTransform()
        tf.rotate(self.wheel_position_deg_global.value)

        if self.motor_connected_global.value:
            self.lblMotorStatus_2.setText('Connected')
            self.lblMotorStatus_2.setStyleSheet(
                'QLabel { color: rgb(0,155,0); }')
            img_rot = self.wheel_image.transformed(tf)
            self.btnCenter.setEnabled(True)
            self.lblWheelPos.setStyleSheet('QLabel { color: rgb(0,0,0); }')
        else:
            self.lblMotorStatus_2.setText('Not Connected')
            self.lblMotorStatus_2.setStyleSheet(
                'QLabel { color: rgb(155,0,0); }')
            img_rot = self.wheel_image_discon.transformed(tf)
            self.btnCenter.setEnabled(False)
            self.lblWheelPos.setStyleSheet(
                'QLabel { color: rgb(155,155,155); }')

        diagonal_overlength = (np.sqrt(np.square(256) * 2) - 256) / 2
        shift = np.abs(
            np.sin(np.deg2rad(self.wheel_position_deg_global.value * 2)) *
            diagonal_overlength)
        crop_rect = QRect(shift, shift, 256, 256)
        self.wheel_pixmap = QPixmap.fromImage(img_rot).copy(crop_rect)
        self.lblWheelImage.setPixmap(self.wheel_pixmap)

        if self.motor_controller_due_for_restart_global.value:
            self.motor_controller_due_for_restart_global.value = False
            print('restarting motor...')
            try:
                self.motor_controller.motor_control_process.terminate()
            except:
                pass
            self.motor_controller.start()

    # helper function to get the index of a profile with a certain name from the profile-list
    def get_profile_index(self, name):
        for i in range(len(self.profiles)):
            if self.profiles[i].name == name:
                return i

    # WHEEL POSITION SETTING FUNCTIONS
    def center_wheel(self):
        print('centering wheel')
        self.motor_controller.set_encoder_offset()

    def change_lock(self):
        val = int(self.sender().value() * 10)
        self.lblLockVal.setText(str(val) + '°')
        self.lock_to_lock_global.value = val
        self.lblLockVal.adjustSize()
        self.lblLockVal.move(
            self.locklock_pos[0] + self.locklock_pos[2] -
            self.lblLockVal.width(), self.locklock_pos[1])

    def change_bump(self):
        val = int(self.sender().value() * 10)
        self.lblBumpVal.setText(str(val) + '°')
        self.bump_to_bump_global.value = val
        self.lblBumpVal.adjustSize()
        self.lblBumpVal.move(
            self.bumpbump_pos[0] + self.bumpbump_pos[2] -
            self.lblBumpVal.width(), self.bumpbump_pos[1])

    # WHEEL FORCE SETTING FUNCTIONS
    def select_game(self, item_index):
        print('selecting', item_index)
        self.game_interfacer.terminate()
        time.sleep(1)
        self.game_interfacer.start(item_index)

    def toggle_invert(self, state):
        if state == Qt.Checked:
            self.invert_force_global.value = True
        else:
            self.invert_force_global.value = False

    def toggle_motor_pause_mode(self, state):
        if state == Qt.Checked:
            self.motor_pause_mode.value = True
        else:
            self.motor_pause_mode.value = False

    def change_max_force(self):
        val = self.sender().value() / 10
        self.lblMaxForceVal.setText(
            str(val) + ' Nm - (' + str(int(val * 2.75 * 100) / 100) + ' Amp)')
        self.actual_max_force_global.value = val
        self.lblMaxForceVal.adjustSize()
        self.lblMaxForceVal.move(
            self.max_force_pos[0] + self.max_force_pos[2] -
            self.lblMaxForceVal.width(), self.max_force_pos[1])
        self.force_graph.setYRange(-val, val)

    def change_friction(self):
        val = self.sender().value() / 100
        self.lblFrictionVal.setText(str(int(val * 100)) + ' %')
        self.friction_global.value = val
        self.lblFrictionVal.adjustSize()
        self.lblFrictionVal.move(
            self.friction_pos[0] + self.friction_pos[2] -
            self.lblFrictionVal.width(), self.friction_pos[1])

    def change_damping(self):
        val = self.sender().value() / 100
        self.lblDampingVal.setText(str(int(val * 100)) + ' %')
        self.damping_global.value = val
        self.lblDampingVal.adjustSize()
        self.lblDampingVal.move(
            self.damping_pos[0] + self.damping_pos[2] -
            self.lblDampingVal.width(), self.damping_pos[1])

    def change_inertia(self):
        val = self.sender().value() / 100
        self.lblInertiaVal.setText(str(int(val * 100)) + ' %')
        self.inertia_global.value = val
        self.lblInertiaVal.adjustSize()
        self.lblInertiaVal.move(
            self.inertia_pos[0] + self.inertia_pos[2] -
            self.lblInertiaVal.width(), self.inertia_pos[1])

    def toggle_reconstruction(self, state):
        if state == Qt.Checked:
            self.data_reconstruction.value = True
        else:
            self.data_reconstruction.value = False

    def change_smoothing(self, item_index):
        self.data_smoothing_level.value = item_index

    def select_profile(self, selected_profile):
        self.sliLock.setValue(
            int(self.profiles[selected_profile].lock_to_lock / 10))
        self.sliBump.setValue(
            int(self.profiles[selected_profile].bump_to_bump / 10))
        self.cbInvert.setChecked(
            bool(self.profiles[selected_profile].invert_force))
        self.sliMaxForce.setValue(
            int(self.profiles[selected_profile].max_force * 10))
        self.cbReconst.setChecked(
            bool(self.profiles[selected_profile].use_reconstruction))
        self.cbxSmoothing.setCurrentIndex(
            int(self.profiles[selected_profile].smoothing_level))
        self.sliFriction.setValue(
            int(self.profiles[selected_profile].friction * 100))
        self.sliDamping.setValue(
            int(self.profiles[selected_profile].damping * 100))
        self.sliInertia.setValue(
            int(self.profiles[selected_profile].inertia * 100))

    def save_current_profile_internally(self):
        current_index = self.cbxProfiles.currentIndex()
        self.profiles[
            current_index].lock_to_lock = self.lock_to_lock_global.value
        self.profiles[
            current_index].bump_to_bump = self.bump_to_bump_global.value
        self.profiles[
            current_index].invert_force = self.invert_force_global.value
        self.profiles[
            current_index].max_force = self.actual_max_force_global.value
        self.profiles[
            current_index].use_reconstruction = self.data_reconstruction.value
        self.profiles[
            current_index].smoothing_level = self.data_smoothing_level.value
        self.profiles[current_index].friction = self.friction_global.value
        self.profiles[current_index].damping = self.damping_global.value
        self.profiles[current_index].inertia = self.inertia_global.value
        self.save_profiles_to_file()

    def save_profiles_to_file(self):
        root = ET.Element('profiles')
        for profile in self.profiles:
            prof_elem = ET.SubElement(root, 'profile', name=profile.name)

            ET.SubElement(prof_elem,
                          'lock_to_lock').text = str(profile.lock_to_lock)
            ET.SubElement(prof_elem,
                          'bump_to_bump').text = str(profile.bump_to_bump)

            ET.SubElement(prof_elem, 'invert_force').text = str(
                bool(profile.invert_force))

            ET.SubElement(prof_elem, 'max_force').text = str(profile.max_force)

            ET.SubElement(prof_elem, 'use_reconstruction').text = str(
                bool(profile.use_reconstruction))
            ET.SubElement(prof_elem, 'smoothing_level').text = str(
                profile.smoothing_level)

            ET.SubElement(prof_elem, 'friction').text = str(profile.friction)
            ET.SubElement(prof_elem, 'damping').text = str(profile.damping)
            ET.SubElement(prof_elem, 'inertia').text = str(profile.inertia)

        tree = ET.ElementTree(root)
        tree.write("profiles.xml")

    def load_profiles_from_file(self):
        self.profiles.clear()
        tree = ET.parse('profiles.xml')
        root = tree.getroot()
        for prof in root:
            profile = Profile(prof.attrib['name'])
            profile.lock_to_lock = float(prof[0].text)
            profile.bump_to_bump = float(prof[1].text)
            profile.invert_force = bool(prof[2].text == 'True')
            profile.max_force = float(prof[3].text)
            profile.use_reconstruction = bool(prof[4].text == 'True')
            profile.smoothing_level = int(prof[5].text)
            profile.friction = float(prof[6].text)
            profile.damping = float(prof[7].text)
            profile.inertia = float(prof[8].text)
            self.profiles.append(profile)

    def delete_current_profile(self):
        current_index = self.cbxProfiles.currentIndex()
        print('deleting profile at index:', current_index)
        self.profiles.pop(current_index)
        self.cbxProfiles.clear()
        for profile in self.profiles:
            self.cbxProfiles.addItem(profile.name)
        self.cbxProfiles.setCurrentIndex(0)
        self.select_profile(0)
        self.save_current_profile_internally()
        if len(self.profiles) == 1:
            self.btnDelete.setEnabled(False)

    def create_profile(self):
        new_profile = Profile('profile #' + str(len(self.profiles) + 1))
        current_index = self.cbxProfiles.currentIndex()

        new_profile.lock_to_lock = self.profiles[current_index].lock_to_lock
        new_profile.bump_to_bump = self.profiles[current_index].bump_to_bump
        new_profile.invert_force = self.profiles[current_index].invert_force
        new_profile.max_force = self.profiles[current_index].max_force
        new_profile.use_reconstruction = self.profiles[
            current_index].use_reconstruction
        new_profile.smoothing_level = self.profiles[
            current_index].smoothing_level
        new_profile.friction = self.profiles[current_index].friction
        new_profile.damping = self.profiles[current_index].damping
        new_profile.inertia = self.profiles[current_index].inertia
        self.profiles.append(new_profile)

        self.cbxProfiles.clear()
        for profile in self.profiles:
            self.cbxProfiles.addItem(profile.name)
        self.cbxProfiles.setCurrentIndex(len(self.profiles) - 1)
        self.select_profile(len(self.profiles) - 1)
        self.save_current_profile_internally()
        if len(self.profiles) > 1:
            self.btnDelete.setEnabled(True)

    def rename_profile(self):
        rename_pos = [325, 490, 250, 25]
        if self.sender().text() == 'rename profile':
            self.sender().setText('OK')
            self.sender().move(rename_pos[0] + 220 - 55, rename_pos[1])
            self.sender().resize(rename_pos[2] - 220, rename_pos[3])
            self.cbxProfiles.setEnabled(False)
            self.btnCreate.setEnabled(False)
            self.btnSave.setEnabled(False)
            self.btnDelete.setEnabled(False)
            self.btnCancelRename.setVisible(True)
            self.txtRename.setVisible(True)
            current_index = self.cbxProfiles.currentIndex()
            self.txtRename.setText(self.profiles[current_index].name)
        else:
            self.sender().setText('rename profile')
            self.sender().move(rename_pos[0], rename_pos[1])
            self.sender().resize(rename_pos[2], rename_pos[3])
            self.cbxProfiles.setEnabled(True)
            self.btnCreate.setEnabled(True)
            self.btnSave.setEnabled(True)
            self.btnDelete.setEnabled(True)
            self.btnCancelRename.setVisible(False)
            self.txtRename.setVisible(False)
            current_index = self.cbxProfiles.currentIndex()
            self.profiles[current_index].name = self.txtRename.text()

            self.cbxProfiles.clear()
            for profile in self.profiles:
                self.cbxProfiles.addItem(profile.name)
            self.cbxProfiles.setCurrentIndex(current_index)
            self.select_profile(current_index)
            self.save_current_profile_internally()

    def cancel_rename(self):
        rename_pos = [325, 490, 250, 25]
        self.btnRename.setText('rename profile')
        self.btnRename.move(rename_pos[0], rename_pos[1])
        self.btnRename.resize(rename_pos[2], rename_pos[3])
        self.cbxProfiles.setEnabled(True)
        self.btnCreate.setEnabled(True)
        self.btnSave.setEnabled(True)
        self.btnDelete.setEnabled(True)
        self.btnCancelRename.setVisible(False)
        self.txtRename.setVisible(False)

    def check_name_validity(self, text):
        if text == '':
            self.btnRename.setEnabled(False)
        else:
            self.btnRename.setEnabled(True)
Ejemplo n.º 45
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(800, 601)
        MainWindow.setMinimumSize(QtCore.QSize(800, 601))
        MainWindow.setMaximumSize(QtCore.QSize(800, 601))
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.centralwidget)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setContentsMargins(10, 10, 10, 10)
        self.verticalLayout.setSpacing(10)
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.graphWidget = PlotWidget(self.centralwidget)
        self.graphWidget.setObjectName("graphWidget")
        self.horizontalLayout_3.addWidget(self.graphWidget)
        self.verticalLayout.addLayout(self.horizontalLayout_3)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.btn_continue = QtWidgets.QPushButton(self.centralwidget)
        self.btn_continue.setEnabled(False)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.btn_continue.sizePolicy().hasHeightForWidth())
        self.btn_continue.setSizePolicy(sizePolicy)
        self.btn_continue.setMaximumSize(QtCore.QSize(386, 16777215))
        self.btn_continue.setObjectName("btn_continue")
        self.horizontalLayout_2.addWidget(self.btn_continue)
        self.box_pltgrid = QtWidgets.QCheckBox(self.centralwidget)
        self.box_pltgrid.setEnabled(True)
        self.box_pltgrid.setChecked(True)
        self.box_pltgrid.setObjectName("box_pltgrid")
        self.horizontalLayout_2.addWidget(self.box_pltgrid)
        self.progressBar = QtWidgets.QProgressBar(self.centralwidget)
        self.progressBar.setEnabled(True)
        self.progressBar.setMaximum(100)
        self.progressBar.setProperty("value", -1)
        self.progressBar.setTextVisible(False)
        self.progressBar.setObjectName("progressBar")
        self.horizontalLayout_2.addWidget(self.progressBar)
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.box_modelname = QtWidgets.QComboBox(self.centralwidget)
        self.box_modelname.setEnabled(False)
        self.box_modelname.setMinimumSize(QtCore.QSize(100, 0))
        self.box_modelname.setObjectName("box_modelname")
        self.horizontalLayout.addWidget(self.box_modelname)
        self.widget_input_var_name = QtWidgets.QLineEdit(self.centralwidget)
        self.widget_input_var_name.setEnabled(False)
        self.widget_input_var_name.setText("")
        self.widget_input_var_name.setObjectName("widget_input_var_name")
        self.horizontalLayout.addWidget(self.widget_input_var_name)
        self.widget_input_component_name = QtWidgets.QLineEdit(
            self.centralwidget)
        self.widget_input_component_name.setEnabled(False)
        self.widget_input_component_name.setText("")
        self.widget_input_component_name.setObjectName(
            "widget_input_component_name")
        self.horizontalLayout.addWidget(self.widget_input_component_name)
        self.btn_getval = QtWidgets.QPushButton(self.centralwidget)
        self.btn_getval.setEnabled(False)
        self.btn_getval.setObjectName("btn_getval")
        self.horizontalLayout.addWidget(self.btn_getval)
        self.widget_output = QtWidgets.QLineEdit(self.centralwidget)
        self.widget_output.setEnabled(True)
        self.widget_output.setReadOnly(True)
        self.widget_output.setObjectName("widget_output")
        self.horizontalLayout.addWidget(self.widget_output)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.verticalLayout_2.addLayout(self.verticalLayout)
        MainWindow.setCentralWidget(self.centralwidget)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Ejemplo n.º 46
0
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(598, 336)
        self.gridLayout = QtWidgets.QGridLayout(Form)
        self.gridLayout.setObjectName("gridLayout")
        self.splitter = QtWidgets.QSplitter(Form)
        self.splitter.setOrientation(QtCore.Qt.Horizontal)
        self.splitter.setObjectName("splitter")
        self.verticalLayoutWidget = QtWidgets.QWidget(self.splitter)
        self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setSpacing(0)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.Nhistory_sb = QtWidgets.QSpinBox(self.verticalLayoutWidget)
        self.Nhistory_sb.setReadOnly(False)
        self.Nhistory_sb.setMinimum(1)
        self.Nhistory_sb.setMaximum(1000000)
        self.Nhistory_sb.setSingleStep(100)
        self.Nhistory_sb.setProperty("value", 200)
        self.Nhistory_sb.setObjectName("Nhistory_sb")
        self.horizontalLayout_2.addWidget(self.Nhistory_sb)
        self.clear_pb = QtWidgets.QPushButton(self.verticalLayoutWidget)
        self.clear_pb.setText("")
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/icons/Icon_Library/clear2.png"),
                       QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.clear_pb.setIcon(icon)
        self.clear_pb.setCheckable(False)
        self.clear_pb.setObjectName("clear_pb")
        self.horizontalLayout_2.addWidget(self.clear_pb)
        self.show_datalist_pb = QtWidgets.QPushButton(
            self.verticalLayoutWidget)
        self.show_datalist_pb.setText("")
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(":/icons/Icon_Library/ChnNum.png"),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.show_datalist_pb.setIcon(icon1)
        self.show_datalist_pb.setCheckable(True)
        self.show_datalist_pb.setObjectName("show_datalist_pb")
        self.horizontalLayout_2.addWidget(self.show_datalist_pb)
        spacerItem = QtWidgets.QSpacerItem(40, 20,
                                           QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem)
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        self.Graph1D = PlotWidget(self.verticalLayoutWidget)
        self.Graph1D.setObjectName("Graph1D")
        self.verticalLayout.addWidget(self.Graph1D)
        self.values_list = QtWidgets.QListWidget(self.splitter)
        font = QtGui.QFont()
        font.setPointSize(20)
        self.values_list.setFont(font)
        self.values_list.setObjectName("values_list")
        self.gridLayout.addWidget(self.splitter, 0, 0, 1, 1)
        self.StatusBarLayout = QtWidgets.QHBoxLayout()
        self.StatusBarLayout.setObjectName("StatusBarLayout")
        self.gridLayout.addLayout(self.StatusBarLayout, 1, 0, 1, 1)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
Ejemplo n.º 47
0
class View:
    def __init__(self, MainWindow):
        self.main_window = MainWindow
        self.main_frame_init()
        self.create_graph_view()
        self.create_open_meas_butt()
        self.create_clr_scr_butt()
        self.create_signal_list()
        self.create_menu_bar()
        self.create_serial_panel()
        '''
            The show() method shall be called ALWAYS after 
            the backyard is done and ready. 
        '''
        self.retranslateUi()
        self.main_window.show()

    def main_frame_init(self):
        self.main_window.setObjectName("MainWindow")
        self.main_window.resize(1150, 600)

        self.centralwidget = QtWidgets.QWidget(self.main_window)
        self.centralwidget.setObjectName("centralwidget")

        self.central_gridLayout = QtWidgets.QHBoxLayout(self.centralwidget)
        self.central_gridLayout.setObjectName("central_gridLayout")
        '''buttons frame'''
        self.butt_frame = QtWidgets.QFrame(self.centralwidget)
        self.butt_frame.setMinimumSize(QtCore.QSize(231, 521))
        self.butt_frame.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.butt_frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.butt_frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.butt_frame.setObjectName("butt_frame")

        self.central_gridLayout.addWidget(self.butt_frame)
        self.main_window.setCentralWidget(self.centralwidget)

        QtCore.QMetaObject.connectSlotsByName(self.main_window)

    def create_open_meas_butt(self):
        self.open_meas_butt = QtWidgets.QPushButton(self.butt_frame)
        self.open_meas_butt.setGeometry(QtCore.QRect(10, 10, 201, 31))
        self.open_meas_butt.setMinimumSize(QtCore.QSize(201, 31))
        self.open_meas_butt.setMaximumSize(QtCore.QSize(201, 31))
        self.open_meas_butt.setObjectName("open_meas_butt")
        self.open_meas_butt.raise_()

    def create_clr_scr_butt(self):
        self.clr_scr = QtWidgets.QPushButton(self.butt_frame)
        self.clr_scr.setGeometry(QtCore.QRect(10, 50, 201, 31))
        self.clr_scr.setMinimumSize(QtCore.QSize(201, 31))
        self.clr_scr.setMaximumSize(QtCore.QSize(201, 31))
        self.clr_scr.setObjectName("clr_scr")
        self.clr_scr.raise_()

    def create_menu_bar(self):
        self.mainMenu = self.main_window.menuBar()

        self.fileMenu = self.mainMenu.addMenu('&File')

        self.openFileAction_menubar = QtWidgets.QAction(
            "&Open...", self.main_window)
        self.openFileAction_menubar.setShortcut("Ctrl+O")
        self.openFileAction_menubar.setStatusTip('Open a txt file')
        self.fileMenu.addAction(self.openFileAction_menubar)

        self.fileMenu = self.mainMenu.addMenu('&File')
        self.exitAction_menubar = QtWidgets.QAction("&Exit", self.main_window)
        self.exitAction_menubar.setShortcut("Ctrl+Q")
        self.exitAction_menubar.setStatusTip('Leave the app from menu bar')
        self.fileMenu.addAction(self.exitAction_menubar)

    def create_tool_bar(self):
        self.toolBar = self.addToolBar("Another Exit")
        self.extractAction_toolbar = QtWidgets.QAction(QtGui.QIcon("exit.png"),
                                                       "&Another Exit point",
                                                       self)
        self.toolBar.addAction(self.extractAction_toolbar)
        self.extractAction_toolbar.setStatusTip('Leave the app toolbar')

    def create_check_box(self):
        self.check_box = QtWidgets.QCheckBox("Check this to enlarge window",
                                             self)
        self.check_box.setGeometry(100, 25, 250, 40)
        #self.check_box.move(100,25)
        #self.check_box.toggle()
        self.check_box.stateChanged.connect(self.enlarge_window)

    def create_progres_bar(self):
        self.progress = QtWidgets.QProgressBar(self)
        self.progress.setGeometry(250, 55, 250, 20)

    def create_serial_panel(self):
        self.sel_com_combo_box = QtWidgets.QComboBox(self.butt_frame)
        self.sel_com_combo_box.setGeometry(QtCore.QRect(10, 450, 111, 21))
        self.sel_com_combo_box.setMinimumSize(QtCore.QSize(111, 21))
        self.sel_com_combo_box.setMaximumSize(QtCore.QSize(111, 21))
        self.sel_com_combo_box.setObjectName("sel_com_combo_box")

        self.sel_baudR_combo_box = QtWidgets.QComboBox(self.butt_frame)
        self.sel_baudR_combo_box.setGeometry(QtCore.QRect(10, 500, 111, 21))
        self.sel_baudR_combo_box.setMinimumSize(QtCore.QSize(111, 21))
        self.sel_baudR_combo_box.setMaximumSize(QtCore.QSize(111, 21))
        self.sel_baudR_combo_box.setObjectName("sel_baudR_combo_box")

        self.run_meas_butt = QtWidgets.QPushButton(self.butt_frame)
        self.run_meas_butt.setGeometry(QtCore.QRect(10, 530, 201, 41))
        self.run_meas_butt.setMinimumSize(QtCore.QSize(201, 41))
        self.run_meas_butt.setMaximumSize(QtCore.QSize(211, 41))
        self.run_meas_butt.setObjectName("run_meas_butt")

        self.connect_butt = QtWidgets.QPushButton(self.butt_frame)
        self.connect_butt.setGeometry(QtCore.QRect(140, 450, 71, 71))
        self.connect_butt.setMinimumSize(QtCore.QSize(71, 71))
        self.connect_butt.setMaximumSize(QtCore.QSize(71, 71))
        self.connect_butt.setObjectName("connect_butt")

        font = QtGui.QFont()
        font.setPointSize(12)
        font.setBold(False)
        font.setWeight(50)

        self.baudR_com_label = QtWidgets.QLabel(self.butt_frame)
        self.baudR_com_label.setGeometry(QtCore.QRect(10, 470, 111, 29))
        self.baudR_com_label.setMinimumSize(QtCore.QSize(91, 29))
        self.baudR_com_label.setMaximumSize(QtCore.QSize(111, 29))

        self.baudR_com_label.setFont(font)
        self.baudR_com_label.setTextFormat(QtCore.Qt.AutoText)
        self.baudR_com_label.setScaledContents(True)
        self.baudR_com_label.setWordWrap(False)
        self.baudR_com_label.setObjectName("baudR_com_label")

        self.sel_com_label = QtWidgets.QLabel(self.butt_frame)
        self.sel_com_label.setGeometry(QtCore.QRect(10, 420, 111, 29))
        self.sel_com_label.setMinimumSize(QtCore.QSize(91, 29))
        self.sel_com_label.setMaximumSize(QtCore.QSize(111, 29))

        self.sel_com_label.setFont(font)
        self.sel_com_label.setTextFormat(QtCore.Qt.AutoText)
        self.sel_com_label.setScaledContents(True)
        self.sel_com_label.setWordWrap(False)
        self.sel_com_label.setObjectName("sel_com_label")

        self.sel_com_combo_box.raise_()
        self.sel_com_label.raise_()
        self.run_meas_butt.raise_()
        self.connect_butt.raise_()
        self.baudR_com_label.raise_()
        self.sel_baudR_combo_box.raise_()

    def open_file_dialog(self):
        file_name, value = QtWidgets.QFileDialog.getOpenFileName(
            self.main_window, 'Choise a file')
        return file_name

    def create_graph_view(self):
        self.graphicsView = PlotWidget(
            self.centralwidget
        )  #axisItems={'bottom': TimeAxisItem(orientation='bottom')})
        self.graphicsView.setMinimumSize(QtCore.QSize(893, 582))
        self.graphicsView.setObjectName("graphicsView")
        self.central_gridLayout.addWidget(self.graphicsView)

    def create_signal_list(self):
        self.signals_box_label = QtWidgets.QLabel(self.butt_frame)
        self.signals_box_label.setGeometry(QtCore.QRect(11, 85, 60, 29))
        self.signals_box_label.setMinimumSize(QtCore.QSize(60, 29))
        self.signals_box_label.setMaximumSize(QtCore.QSize(60, 29))

        font = QtGui.QFont()
        font.setPointSize(12)
        font.setWeight(50)
        self.signals_box_label.setFont(font)
        self.signals_box_label.setTextFormat(QtCore.Qt.AutoText)
        self.signals_box_label.setScaledContents(True)
        self.signals_box_label.setWordWrap(False)
        self.signals_box_label.setObjectName("signals_box_label")

        self.signal_list_box = QtWidgets.QListWidget(self.butt_frame)
        self.signal_list_box.setGeometry(QtCore.QRect(10, 120, 201, 281))
        self.signal_list_box.setObjectName("listWidget")
        self.signal_list_box.setSelectionMode(
            QtWidgets.QAbstractItemView.ExtendedSelection)
        self.signals_box_label.raise_()

    def fill_up_signal_list(self, signal_name):
        for signal in signal_name[1:]:
            self.signal_list_box.addItem(signal)

    def fill_up_COM_list(self, items):
        self.sel_com_combo_box.addItems(items)

    def fill_up_baud_rate_list(self):
        baud_rates = [
            "9600", "14400", "19200", "38400", "57600", "115200", "128000",
            "256000"
        ]
        self.sel_baudR_combo_box.addItems(baud_rates)

    def pop_up_on_exit(self):
        areYouSure = QtWidgets.QMessageBox.question(
            self, 'Exit', "Get Out?",
            QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No)
        return areYouSure

    def retranslateUi(self):
        _translate = QtCore.QCoreApplication.translate
        self.main_window.setWindowTitle(_translate("MainWindow", "MainWindow"))
        self.open_meas_butt.setText(
            _translate("MainWindow", "Open Measurement"))
        self.clr_scr.setText(_translate("MainWindow", "Clear Screen"))
        self.signals_box_label.setText(_translate("MainWindow", "Signals"))
        self.sel_com_label.setText(_translate("MainWindow", "Select COM"))
        self.run_meas_butt.setText(
            _translate("MainWindow", "Run \n"
                       " Measurement"))
        self.connect_butt.setText(_translate("MainWindow", "Connect"))
        self.baudR_com_label.setText(_translate("MainWindow", "Bauderate"))
Ejemplo n.º 48
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(800, 600)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.gridLayout = QtWidgets.QGridLayout(self.centralwidget)
        self.gridLayout.setObjectName("gridLayout")
        self.chromView = PlotWidget(self.centralwidget)
        self.chromView.setObjectName("chromView")
        self.gridLayout.addWidget(self.chromView, 0, 0, 1, 2)
        self.peakTreeView = QtWidgets.QTreeView(self.centralwidget)
        self.peakTreeView.setEnabled(True)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.peakTreeView.sizePolicy().hasHeightForWidth())
        self.peakTreeView.setSizePolicy(sizePolicy)
        self.peakTreeView.setMaximumSize(QtCore.QSize(16777215, 250))
        self.peakTreeView.setStyleSheet("QTreeWidget {\n"
                                        "   font-size: 24pt;\n"
                                        "}\n"
                                        "\n"
                                        "")
        self.peakTreeView.setObjectName("peakTreeView")
        self.gridLayout.addWidget(self.peakTreeView, 1, 0, 1, 1)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 25))
        self.menubar.setObjectName("menubar")
        self.menuFile = QtWidgets.QMenu(self.menubar)
        self.menuFile.setObjectName("menuFile")
        self.menuSetting = QtWidgets.QMenu(self.menubar)
        self.menuSetting.setObjectName("menuSetting")
        self.menuView = QtWidgets.QMenu(self.menubar)
        self.menuView.setObjectName("menuView")
        self.menuReport = QtWidgets.QMenu(self.menubar)
        self.menuReport.setObjectName("menuReport")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.toolBar = QtWidgets.QToolBar(MainWindow)
        self.toolBar.setObjectName("toolBar")
        MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
        self.reloadAction = QtWidgets.QAction(MainWindow)
        self.reloadAction.setObjectName("reloadAction")
        self.actionOpen = QtWidgets.QAction(MainWindow)
        self.actionOpen.setObjectName("actionOpen")
        self.actionstartAction = QtWidgets.QAction(MainWindow)
        self.actionstartAction.setObjectName("actionstartAction")
        self.actionBaselineView = QtWidgets.QAction(MainWindow)
        self.actionBaselineView.setCheckable(True)
        self.actionBaselineView.setObjectName("actionBaselineView")
        self.actionPeaksView = QtWidgets.QAction(MainWindow)
        self.actionPeaksView.setCheckable(True)
        self.actionPeaksView.setObjectName("actionPeaksView")
        self.actionSetting = QtWidgets.QAction(MainWindow)
        self.actionSetting.setObjectName("actionSetting")
        self.actionView_in_Matplotlib = QtWidgets.QAction(MainWindow)
        self.actionView_in_Matplotlib.setObjectName("actionView_in_Matplotlib")
        self.actionExport_Excel = QtWidgets.QAction(MainWindow)
        self.actionExport_Excel.setObjectName("actionExport_Excel")
        self.menuFile.addAction(self.actionOpen)
        self.menuSetting.addAction(self.actionSetting)
        self.menuView.addAction(self.actionView_in_Matplotlib)
        self.menuReport.addAction(self.actionExport_Excel)
        self.menubar.addAction(self.menuFile.menuAction())
        self.menubar.addAction(self.menuSetting.menuAction())
        self.menubar.addAction(self.menuView.menuAction())
        self.menubar.addAction(self.menuReport.menuAction())
        self.toolBar.addAction(self.actionstartAction)
        self.toolBar.addSeparator()
        self.toolBar.addAction(self.reloadAction)
        self.toolBar.addSeparator()
        self.toolBar.addAction(self.actionBaselineView)
        self.toolBar.addAction(self.actionPeaksView)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Ejemplo n.º 49
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(823, 597)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.graphicsView = PlotWidget(self.centralwidget)
        self.graphicsView.setGeometry(QtCore.QRect(5, 21, 421, 481))
        self.graphicsView.setObjectName("graphicsView")
        self.gridLayoutWidget = QtWidgets.QWidget(self.centralwidget)
        self.gridLayoutWidget.setGeometry(QtCore.QRect(440, 20, 376, 481))
        self.gridLayoutWidget.setObjectName("gridLayoutWidget")
        self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setObjectName("gridLayout")
        self.rectYLeft = QtWidgets.QLineEdit(self.gridLayoutWidget)
        self.rectYLeft.setObjectName("rectYLeft")
        self.gridLayout.addWidget(self.rectYLeft, 7, 1, 1, 1)
        self.pushButton = QtWidgets.QPushButton(self.gridLayoutWidget)
        self.pushButton.setObjectName("pushButton")
        self.gridLayout.addWidget(self.pushButton, 10, 0, 1, 2)
        self.tableWidget = QtWidgets.QTableWidget(self.gridLayoutWidget)
        self.tableWidget.setObjectName("tableWidget")
        self.tableWidget.setColumnCount(0)
        self.tableWidget.setRowCount(0)
        self.gridLayout.addWidget(self.tableWidget, 4, 0, 1, 2)
        self.lengthEdit = QtWidgets.QLineEdit(self.gridLayoutWidget)
        self.lengthEdit.setObjectName("lengthEdit")
        self.gridLayout.addWidget(self.lengthEdit, 9, 0, 1, 1)
        self.label_3 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 6, 1, 1, 1)
        self.label_2 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 6, 0, 1, 1)
        self.sectionButton = QtWidgets.QPushButton(self.gridLayoutWidget)
        self.sectionButton.setObjectName("sectionButton")
        self.gridLayout.addWidget(self.sectionButton, 11, 0, 1, 2)
        self.label_6 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label_6.setObjectName("label_6")
        self.gridLayout.addWidget(self.label_6, 3, 0, 1, 2)
        self.widthEdit = QtWidgets.QLineEdit(self.gridLayoutWidget)
        self.widthEdit.setObjectName("widthEdit")
        self.gridLayout.addWidget(self.widthEdit, 9, 1, 1, 1)
        self.label = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 5, 0, 1, 2)
        self.label_4 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label_4.setObjectName("label_4")
        self.gridLayout.addWidget(self.label_4, 8, 0, 1, 1)
        self.label_5 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label_5.setObjectName("label_5")
        self.gridLayout.addWidget(self.label_5, 8, 1, 1, 1)
        self.rectXLeft = QtWidgets.QLineEdit(self.gridLayoutWidget)
        self.rectXLeft.setObjectName("rectXLeft")
        self.gridLayout.addWidget(self.rectXLeft, 7, 0, 1, 1)
        self.linesEdit = QtWidgets.QLineEdit(self.gridLayoutWidget)
        self.linesEdit.setObjectName("linesEdit")
        self.gridLayout.addWidget(self.linesEdit, 1, 0, 1, 2)
        self.label_7 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label_7.setObjectName("label_7")
        self.gridLayout.addWidget(self.label_7, 0, 0, 1, 2)
        self.linesTableButton = QtWidgets.QPushButton(self.gridLayoutWidget)
        self.linesTableButton.setObjectName("linesTableButton")
        self.gridLayout.addWidget(self.linesTableButton, 2, 0, 1, 2)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 823, 22))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Ejemplo n.º 50
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1053, 718)
        MainWindow.setMouseTracking(False)
        icon = QtGui.QIcon()
        icon.addPixmap(
            QtGui.QPixmap("../../../../../usr/share/pixmaps/cubeview48.png"),
            QtGui.QIcon.Normal, QtGui.QIcon.Off)
        MainWindow.setWindowIcon(icon)
        MainWindow.setWindowOpacity(1.0)
        MainWindow.setToolTip("")
        MainWindow.setAutoFillBackground(False)
        MainWindow.setStyleSheet("")
        MainWindow.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly)
        MainWindow.setTabShape(QtGui.QTabWidget.Rounded)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.init_button = QtGui.QPushButton(self.centralwidget)
        self.init_button.setGeometry(QtCore.QRect(830, 350, 211, 41))
        font = QtGui.QFont()
        font.setFamily("Serif")
        font.setItalic(True)
        self.init_button.setFont(font)
        self.init_button.setObjectName("init_button")
        self.label = QtGui.QLabel(self.centralwidget)
        self.label.setGeometry(QtCore.QRect(15, 9, 270, 21))
        font = QtGui.QFont()
        font.setFamily("URW Chancery L")
        font.setPointSize(12)
        font.setWeight(75)
        font.setItalic(True)
        font.setBold(True)
        self.label.setFont(font)
        self.label.setObjectName("label")
        self.fetch_data = QtGui.QCheckBox(self.centralwidget)
        self.fetch_data.setEnabled(True)
        self.fetch_data.setGeometry(QtCore.QRect(830, 320, 121, 27))
        self.fetch_data.setChecked(True)
        self.fetch_data.setObjectName("fetch_data")
        self.total_readings = QtGui.QLabel(self.centralwidget)
        self.total_readings.setGeometry(QtCore.QRect(990, 390, 51, 16))
        self.total_readings.setFrameShape(QtGui.QFrame.Box)
        self.total_readings.setFrameShadow(QtGui.QFrame.Sunken)
        self.total_readings.setText("")
        self.total_readings.setObjectName("total_readings")
        self.Save_data = QtGui.QPushButton(self.centralwidget)
        self.Save_data.setGeometry(QtCore.QRect(670, 0, 151, 27))
        self.Save_data.setObjectName("Save_data")
        self.dIdVgraph = PlotWidget(self.centralwidget)
        self.dIdVgraph.setGeometry(QtCore.QRect(10, 30, 811, 371))
        self.dIdVgraph.setObjectName("dIdVgraph")
        self.state_dc = QtGui.QPushButton(self.centralwidget)
        self.state_dc.setGeometry(QtCore.QRect(830, 220, 101, 31))
        font = QtGui.QFont()
        font.setFamily("Ubuntu")
        font.setPointSize(12)
        font.setWeight(75)
        font.setItalic(True)
        font.setBold(True)
        self.state_dc.setFont(font)
        self.state_dc.setStyleSheet("border-color: rgb(0, 0, 0);")
        self.state_dc.setObjectName("state_dc")
        self.nvpr = QtGui.QLabel(self.centralwidget)
        self.nvpr.setGeometry(QtCore.QRect(830, 290, 211, 21))
        self.nvpr.setAutoFillBackground(True)
        self.nvpr.setObjectName("nvpr")
        self.dIdVfit = QtGui.QLabel(self.centralwidget)
        self.dIdVfit.setGeometry(QtCore.QRect(490, 410, 281, 17))
        self.dIdVfit.setObjectName("dIdVfit")
        self.instrumenttools = QtGui.QToolBox(self.centralwidget)
        self.instrumenttools.setGeometry(QtCore.QRect(830, 0, 211, 221))
        self.instrumenttools.setFrameShape(QtGui.QFrame.StyledPanel)
        self.instrumenttools.setFrameShadow(QtGui.QFrame.Raised)
        self.instrumenttools.setLineWidth(2)
        self.instrumenttools.setMidLineWidth(1)
        self.instrumenttools.setObjectName("instrumenttools")
        self.page = QtGui.QWidget()
        self.page.setGeometry(QtCore.QRect(0, 0, 209, 157))
        self.page.setObjectName("page")
        self.label_5 = QtGui.QLabel(self.page)
        self.label_5.setGeometry(QtCore.QRect(100, 80, 91, 30))
        font = QtGui.QFont()
        font.setPointSize(8)
        font.setWeight(75)
        font.setItalic(True)
        font.setBold(True)
        self.label_5.setFont(font)
        self.label_5.setObjectName("label_5")
        self.current_start = QtGui.QDoubleSpinBox(self.page)
        self.current_start.setGeometry(QtCore.QRect(0, 0, 101, 31))
        self.current_start.setWrapping(False)
        self.current_start.setButtonSymbols(QtGui.QAbstractSpinBox.PlusMinus)
        self.current_start.setAccelerated(True)
        self.current_start.setCorrectionMode(
            QtGui.QAbstractSpinBox.CorrectToNearestValue)
        self.current_start.setDecimals(3)
        self.current_start.setMinimum(-105.0)
        self.current_start.setMaximum(105.0)
        self.current_start.setSingleStep(0.001)
        self.current_start.setProperty("value", -40.0)
        self.current_start.setObjectName("current_start")
        self.num_points = QtGui.QDoubleSpinBox(self.page)
        self.num_points.setGeometry(QtCore.QRect(0, 80, 101, 30))
        self.num_points.setWrapping(False)
        self.num_points.setButtonSymbols(QtGui.QAbstractSpinBox.PlusMinus)
        self.num_points.setAccelerated(True)
        self.num_points.setCorrectionMode(
            QtGui.QAbstractSpinBox.CorrectToNearestValue)
        self.num_points.setSuffix("")
        self.num_points.setDecimals(0)
        self.num_points.setMinimum(0.0)
        self.num_points.setMaximum(1000.0)
        self.num_points.setSingleStep(1.0)
        self.num_points.setProperty("value", 200.0)
        self.num_points.setObjectName("num_points")
        self.pw_label = QtGui.QLabel(self.page)
        self.pw_label.setGeometry(QtCore.QRect(100, -40, 51, 17))
        self.pw_label.setObjectName("pw_label")
        self.label_3 = QtGui.QLabel(self.page)
        self.label_3.setGeometry(QtCore.QRect(100, 40, 91, 31))
        font = QtGui.QFont()
        font.setPointSize(8)
        font.setWeight(75)
        font.setItalic(True)
        font.setBold(True)
        self.label_3.setFont(font)
        self.label_3.setObjectName("label_3")
        self.current_stop = QtGui.QDoubleSpinBox(self.page)
        self.current_stop.setGeometry(QtCore.QRect(0, 40, 101, 31))
        self.current_stop.setWrapping(False)
        self.current_stop.setButtonSymbols(QtGui.QAbstractSpinBox.PlusMinus)
        self.current_stop.setAccelerated(True)
        self.current_stop.setCorrectionMode(
            QtGui.QAbstractSpinBox.CorrectToNearestValue)
        self.current_stop.setDecimals(3)
        self.current_stop.setMinimum(-105.0)
        self.current_stop.setMaximum(105.0)
        self.current_stop.setSingleStep(0.001)
        self.current_stop.setProperty("value", 40.0)
        self.current_stop.setObjectName("current_stop")
        self.label_4 = QtGui.QLabel(self.page)
        self.label_4.setGeometry(QtCore.QRect(100, 0, 101, 31))
        font = QtGui.QFont()
        font.setPointSize(8)
        font.setWeight(75)
        font.setItalic(True)
        font.setBold(True)
        self.label_4.setFont(font)
        self.label_4.setObjectName("label_4")
        self.pulse_width = QtGui.QDoubleSpinBox(self.page)
        self.pulse_width.setGeometry(QtCore.QRect(0, 120, 101, 30))
        self.pulse_width.setWrapping(False)
        self.pulse_width.setButtonSymbols(QtGui.QAbstractSpinBox.PlusMinus)
        self.pulse_width.setAccelerated(True)
        self.pulse_width.setCorrectionMode(
            QtGui.QAbstractSpinBox.CorrectToNearestValue)
        self.pulse_width.setDecimals(3)
        self.pulse_width.setMinimum(100.0)
        self.pulse_width.setMaximum(2000.0)
        self.pulse_width.setSingleStep(5.0)
        self.pulse_width.setProperty("value", 100.0)
        self.pulse_width.setObjectName("pulse_width")
        self.label_6 = QtGui.QLabel(self.page)
        self.label_6.setGeometry(QtCore.QRect(100, 120, 81, 30))
        font = QtGui.QFont()
        font.setPointSize(8)
        font.setWeight(75)
        font.setItalic(True)
        font.setBold(True)
        self.label_6.setFont(font)
        self.label_6.setObjectName("label_6")
        self.instrumenttools.addItem(self.page, "")
        self.page_2 = QtGui.QWidget()
        self.page_2.setGeometry(QtCore.QRect(0, 0, 209, 157))
        self.page_2.setObjectName("page_2")
        self.v6 = QtGui.QRadioButton(self.page_2)
        self.v6.setGeometry(QtCore.QRect(130, 40, 71, 22))
        self.v6.setObjectName("v6")
        self.v2 = QtGui.QRadioButton(self.page_2)
        self.v2.setGeometry(QtCore.QRect(60, 10, 71, 22))
        self.v2.setChecked(True)
        self.v2.setObjectName("v2")
        self.v3 = QtGui.QRadioButton(self.page_2)
        self.v3.setGeometry(QtCore.QRect(130, 10, 81, 22))
        self.v3.setChecked(False)
        self.v3.setObjectName("v3")
        self.v1 = QtGui.QRadioButton(self.page_2)
        self.v1.setGeometry(QtCore.QRect(0, 10, 60, 22))
        self.v1.setChecked(False)
        self.v1.setObjectName("v1")
        self.v5 = QtGui.QRadioButton(self.page_2)
        self.v5.setGeometry(QtCore.QRect(60, 40, 71, 22))
        self.v5.setChecked(False)
        self.v5.setObjectName("v5")
        self.v4 = QtGui.QRadioButton(self.page_2)
        self.v4.setGeometry(QtCore.QRect(0, 40, 71, 22))
        self.v4.setChecked(False)
        self.v4.setObjectName("v4")
        self.instrumenttools.addItem(self.page_2, "")
        self.messages = QtGui.QTextBrowser(self.centralwidget)
        self.messages.setGeometry(QtCore.QRect(10, 410, 471, 161))
        self.messages.setFrameShape(QtGui.QFrame.StyledPanel)
        self.messages.setObjectName("messages")
        self.pushButton = QtGui.QPushButton(self.centralwidget)
        self.pushButton.setGeometry(QtCore.QRect(920, 440, 121, 21))
        self.pushButton.setObjectName("pushButton")
        self.pushButton_2 = QtGui.QPushButton(self.centralwidget)
        self.pushButton_2.setGeometry(QtCore.QRect(920, 460, 121, 21))
        self.pushButton_2.setObjectName("pushButton_2")
        self.label_2 = QtGui.QLabel(self.centralwidget)
        self.label_2.setGeometry(QtCore.QRect(810, 420, 231, 20))
        font = QtGui.QFont()
        font.setFamily("Ubuntu")
        font.setPointSize(11)
        font.setWeight(75)
        font.setBold(True)
        self.label_2.setFont(font)
        self.label_2.setTextFormat(QtCore.Qt.PlainText)
        self.label_2.setObjectName("label_2")
        self.position = QtGui.QLabel(self.centralwidget)
        self.position.setGeometry(QtCore.QRect(820, 490, 101, 17))
        self.position.setObjectName("position")
        self.pushButton_3 = QtGui.QPushButton(self.centralwidget)
        self.pushButton_3.setGeometry(QtCore.QRect(810, 440, 98, 20))
        self.pushButton_3.setObjectName("pushButton_3")
        self.pushButton_4 = QtGui.QPushButton(self.centralwidget)
        self.pushButton_4.setGeometry(QtCore.QRect(810, 460, 98, 21))
        self.pushButton_4.setObjectName("pushButton_4")
        self.a_1 = QtGui.QLabel(self.centralwidget)
        self.a_1.setGeometry(QtCore.QRect(930, 490, 21, 17))
        self.a_1.setText("")
        self.a_1.setObjectName("a_1")
        self.a_2 = QtGui.QLabel(self.centralwidget)
        self.a_2.setGeometry(QtCore.QRect(960, 490, 21, 17))
        self.a_2.setText("")
        self.a_2.setObjectName("a_2")
        self.a_3 = QtGui.QLabel(self.centralwidget)
        self.a_3.setGeometry(QtCore.QRect(990, 490, 21, 17))
        self.a_3.setText("")
        self.a_3.setObjectName("a_3")
        self.a_4 = QtGui.QLabel(self.centralwidget)
        self.a_4.setGeometry(QtCore.QRect(1020, 490, 21, 17))
        self.a_4.setText("")
        self.a_4.setObjectName("a_4")
        self.temp_graph = PlotWidget(self.centralwidget)
        self.temp_graph.setGeometry(QtCore.QRect(490, 540, 561, 171))
        self.temp_graph.setObjectName("temp_graph")
        self.curvelist = QtGui.QComboBox(self.centralwidget)
        self.curvelist.setGeometry(QtCore.QRect(540, 510, 141, 27))
        self.curvelist.setObjectName("curvelist")
        self.input_list = QtGui.QComboBox(self.centralwidget)
        self.input_list.setGeometry(QtCore.QRect(490, 510, 41, 27))
        self.input_list.setObjectName("input_list")
        self.input_list.addItem("")
        self.input_list.addItem("")
        self.input_list.addItem("")
        self.input_list.addItem("")
        self.label_7 = QtGui.QLabel(self.centralwidget)
        self.label_7.setGeometry(QtCore.QRect(490, 490, 201, 21))
        font = QtGui.QFont()
        font.setFamily("Serif")
        font.setPointSize(9)
        font.setItalic(True)
        self.label_7.setFont(font)
        self.label_7.setObjectName("label_7")
        self.pushButton_5 = QtGui.QPushButton(self.centralwidget)
        self.pushButton_5.setGeometry(QtCore.QRect(690, 500, 121, 41))
        self.pushButton_5.setObjectName("pushButton_5")
        self.update_button = QtGui.QPushButton(self.centralwidget)
        self.update_button.setGeometry(QtCore.QRect(960, 320, 81, 21))
        self.update_button.setObjectName("update_button")
        self.temperature = QtGui.QLabel(self.centralwidget)
        self.temperature.setGeometry(QtCore.QRect(930, 520, 111, 20))
        self.temperature.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.temperature.setAlignment(QtCore.Qt.AlignRight
                                      | QtCore.Qt.AlignTrailing
                                      | QtCore.Qt.AlignVCenter)
        self.temperature.setMargin(2)
        self.temperature.setObjectName("temperature")
        self.progressBar = QtGui.QProgressBar(self.centralwidget)
        self.progressBar.setGeometry(QtCore.QRect(830, 390, 151, 16))
        self.progressBar.setProperty("value", 0)
        self.progressBar.setObjectName("progressBar")
        self.state_pd = QtGui.QPushButton(self.centralwidget)
        self.state_pd.setGeometry(QtCore.QRect(940, 220, 101, 31))
        font = QtGui.QFont()
        font.setFamily("Ubuntu")
        font.setPointSize(12)
        font.setWeight(75)
        font.setItalic(True)
        font.setBold(True)
        self.state_pd.setFont(font)
        self.state_pd.setStyleSheet("border-color: rgb(0, 0, 0);")
        self.state_pd.setObjectName("state_pd")
        self.Save_data_2 = QtGui.QPushButton(self.centralwidget)
        self.Save_data_2.setGeometry(QtCore.QRect(940, 260, 101, 27))
        self.Save_data_2.setObjectName("Save_data_2")
        self.label_9 = QtGui.QLabel(self.centralwidget)
        self.label_9.setGeometry(QtCore.QRect(490, 440, 101, 17))
        self.label_9.setObjectName("label_9")
        self.live_monitor = QtGui.QLCDNumber(self.centralwidget)
        self.live_monitor.setGeometry(QtCore.QRect(590, 440, 131, 20))
        self.live_monitor.setAutoFillBackground(False)
        self.live_monitor.setStyleSheet(
            "QLCDNumber{color:rgb(85, 85, 255);background-color:rgb(0, 170, 255);}"
        )
        self.live_monitor.setFrameShape(QtGui.QFrame.Panel)
        self.live_monitor.setSmallDecimalPoint(False)
        self.live_monitor.setNumDigits(10)
        self.live_monitor.setObjectName("live_monitor")
        self.pushButton_6 = QtGui.QPushButton(self.centralwidget)
        self.pushButton_6.setGeometry(QtCore.QRect(830, 260, 101, 27))
        self.pushButton_6.setObjectName("pushButton_6")
        self.temp_res_graph = PlotWidget(self.centralwidget)
        self.temp_res_graph.setGeometry(QtCore.QRect(10, 580, 471, 131))
        self.temp_res_graph.setObjectName("temp_res_graph")
        self.comments = QtGui.QLineEdit(self.centralwidget)
        self.comments.setGeometry(QtCore.QRect(330, 0, 281, 27))
        self.comments.setObjectName("comments")
        MainWindow.setCentralWidget(self.centralwidget)
        self.actionSave_as = QtGui.QAction(MainWindow)
        self.actionSave_as.setObjectName("actionSave_as")

        self.retranslateUi(MainWindow)
        self.instrumenttools.setCurrentIndex(0)
        self.instrumenttools.layout().setSpacing(6)
        QtCore.QObject.connect(self.init_button, QtCore.SIGNAL("clicked()"),
                               MainWindow.start_measuring)
        QtCore.QObject.connect(self.Save_data, QtCore.SIGNAL("clicked()"),
                               MainWindow.dump_to_file)
        QtCore.QObject.connect(self.v1, QtCore.SIGNAL("clicked()"),
                               MainWindow.set_vc)
        QtCore.QObject.connect(self.v4, QtCore.SIGNAL("clicked()"),
                               MainWindow.set_vc)
        QtCore.QObject.connect(self.v2, QtCore.SIGNAL("clicked()"),
                               MainWindow.set_vc)
        QtCore.QObject.connect(self.v5, QtCore.SIGNAL("clicked()"),
                               MainWindow.set_vc)
        QtCore.QObject.connect(self.v3, QtCore.SIGNAL("clicked()"),
                               MainWindow.set_vc)
        QtCore.QObject.connect(self.v6, QtCore.SIGNAL("clicked()"),
                               MainWindow.set_vc)
        QtCore.QObject.connect(self.state_dc, QtCore.SIGNAL("clicked()"),
                               MainWindow.arm_DC)
        QtCore.QObject.connect(self.current_stop,
                               QtCore.SIGNAL("valueChanged(double)"),
                               MainWindow.set_current_stop)
        QtCore.QObject.connect(self.current_start,
                               QtCore.SIGNAL("valueChanged(double)"),
                               MainWindow.set_current_start)
        QtCore.QObject.connect(self.pushButton, QtCore.SIGNAL("clicked()"),
                               MainWindow.stepper_back)
        QtCore.QObject.connect(self.pushButton_2, QtCore.SIGNAL("clicked()"),
                               MainWindow.stepper_fwd)
        QtCore.QObject.connect(self.pushButton_4, QtCore.SIGNAL("clicked()"),
                               MainWindow.disable_stepper)
        QtCore.QObject.connect(self.pushButton_3, QtCore.SIGNAL("clicked()"),
                               MainWindow.enable_stepper)
        QtCore.QObject.connect(self.curvelist,
                               QtCore.SIGNAL("currentIndexChanged(int)"),
                               MainWindow.select_temperature_curve)
        QtCore.QObject.connect(self.input_list,
                               QtCore.SIGNAL("currentIndexChanged(QString)"),
                               MainWindow.select_temperature_input)
        QtCore.QObject.connect(self.pushButton_5, QtCore.SIGNAL("clicked()"),
                               MainWindow.load_temperature_parameters)
        QtCore.QObject.connect(self.update_button, QtCore.SIGNAL("clicked()"),
                               MainWindow.update_buffer)
        QtCore.QObject.connect(self.num_points,
                               QtCore.SIGNAL("valueChanged(double)"),
                               MainWindow.set_points)
        QtCore.QObject.connect(self.pulse_width,
                               QtCore.SIGNAL("valueChanged(double)"),
                               MainWindow.set_pulse_width)
        QtCore.QObject.connect(self.state_pd, QtCore.SIGNAL("clicked()"),
                               MainWindow.arm_PD)
        QtCore.QObject.connect(self.Save_data_2, QtCore.SIGNAL("clicked()"),
                               MainWindow.abort_all)
        QtCore.QObject.connect(self.pushButton_6, QtCore.SIGNAL("clicked()"),
                               MainWindow.arm_delta)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Ejemplo n.º 51
0
class Ui_Dialog(object):
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.setWindowModality(QtCore.Qt.WindowModal)
        Dialog.resize(800, 600)

        self.gridLayoutWidget = QWidget(Dialog)
        self.gridLayoutWidget.setGeometry(QtCore.QRect(90, 20, 130, 80))
        self.gridLayoutWidget.setObjectName("gridLayoutWidget")

        self.lineGrapth = QLineEdit(Dialog)
        self.lineGrapth.setGeometry(QtCore.QRect(670, 30, 100, 25))
        self.lineGrapth.setObjectName("lineGrapth")
        self.label = QLabel(Dialog)
        self.label.setGeometry(QtCore.QRect(510, 30, 200, 25))
        self.label.setObjectName("label")

        self.label_r = QLabel(Dialog)
        self.label_r.setGeometry(QtCore.QRect(10, 30, 400, 25))
        self.label_r.setObjectName("label")

        self.gridLayout = QGridLayout(self.gridLayoutWidget)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setObjectName("gridLayout")

        self.graphicsView = PlotWidget(Dialog)
        self.graphicsView.setGeometry(QtCore.QRect(30, 80, 740, 440))
        self.graphicsView.setObjectName("graphicsView")

        self.pushBuild = QPushButton(Dialog)
        self.pushBuild.setGeometry(QtCore.QRect(680, 540, 90, 25))
        self.pushBuild.setObjectName("pushBuild")
        self.pushBuild.clicked.connect(self.parsing)

        self.label_2 = QLabel(Dialog)
        self.label_2.setGeometry(QtCore.QRect(10, 10, 111, 21))
        self.label_2.setObjectName("label_2")

        self.lineEdit_xk = QLineEdit(Dialog)
        self.lineEdit_xk.setGeometry(QtCore.QRect(150, 10, 21, 20))
        self.lineEdit_xk.setObjectName("lineEdit_xk")

        self.lineEdit_xn = QLineEdit(Dialog)
        self.lineEdit_xn.setGeometry(QtCore.QRect(120, 10, 21, 20))
        self.lineEdit_xn.setObjectName("lineEdit_xn")

        self.gridLayoutWidget.raise_()
        self.graphicsView.raise_()
        self.pushBuild.raise_()
        self.lineGrapth.raise_()
        self.label.raise_()

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

    def parsing(self):

        self.x = [
            i for i in range(int(self.lineEdit_xn.text()),
                             int(self.lineEdit_xk.text()))
        ]
        self.y = []
        for i in range(int(self.lineEdit_xn.text()),
                       int(self.lineEdit_xk.text())):
            pr = self.calc(
                self.sort(
                    self.parse(self.lineGrapth.text().replace('x', str(i)))))
            self.y.append(pr)
        self.grapth()

    def grapth(self):
        self.graphicsView.clear()
        self.graphWidget = pg.PlotWidget()
        self.graphicsView.plot(self.x, self.y, pen='g')

    def retranslateUi(self, Dialog):
        _translate = QtCore.QCoreApplication.translate
        Dialog.setWindowTitle(_translate("Dialog", "Графики"))
        self.pushBuild.setText(_translate("Dialog", "Построить"))
        self.label.setText(_translate("Dialog", "Добавить формулу y ="))
        self.label_r.setText(
            _translate(
                "Dialog",
                "В написании формулы для возведения в степень используйте '^', \n"
                "а для нахождения корня 'v'"))
        self.label_2.setText(_translate("Dialog", "Введите диапозон х"))

    def parse(self, line):
        num = ''
        for i in line:
            if i in '1234567890.':
                num += i
            elif num:
                yield float(num)
                num = ''
            if i in operators or i in '()':
                yield i
        if num:
            yield float(num)

    def sort(self, parsed):
        cal = []
        for i in parsed:
            if i in operators:
                while cal and cal[-1] != '(' and operators[i][0] <= operators[
                        cal[-1]][0]:
                    yield cal.pop()
                cal.append(i)
            elif i == ')':
                while cal:
                    x = cal.pop()
                    if x == '(':
                        break
                    yield x
            elif i == '(':
                cal.append(i)
            else:
                yield i
        while cal:
            yield cal.pop()

    def calc(self, sort):
        cal = []
        for i in sort:
            if i in operators:
                y = cal.pop()
                x = cal.pop()
                cal.append(operators[i][1](x, y))
            else:
                cal.append(i)
        return cal[0]
Ejemplo n.º 52
0
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(566, 433)
        self.gridLayout = QtWidgets.QGridLayout(Form)
        self.gridLayout.setObjectName("gridLayout")
        self.tabWidget = QtWidgets.QTabWidget(Form)
        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.graphicsView_t1 = PlotWidget(self.tab)
        self.graphicsView_t1.setObjectName("graphicsView_t1")
        self.gridLayout_2.addWidget(self.graphicsView_t1, 0, 3, 1, 3)
        self.graphicsView_t2 = PlotWidget(self.tab)
        self.graphicsView_t2.setObjectName("graphicsView_t2")
        self.gridLayout_2.addWidget(self.graphicsView_t2, 1, 3, 1, 3)
        self.pushButton = QtWidgets.QPushButton(self.tab)
        self.pushButton.setObjectName("pushButton")
        self.gridLayout_2.addWidget(self.pushButton, 2, 0, 1, 1)
        self.comboBox_sp = QtWidgets.QComboBox(self.tab)
        self.comboBox_sp.setObjectName("comboBox_sp")
        self.comboBox_sp.addItem("")
        self.comboBox_sp.addItem("")
        self.comboBox_sp.addItem("")
        self.comboBox_sp.addItem("")
        self.gridLayout_2.addWidget(self.comboBox_sp, 2, 1, 1, 1)
        self.spinBox_TR = QtWidgets.QSpinBox(self.tab)
        self.spinBox_TR.setObjectName("spinBox_TR")
        self.gridLayout_2.addWidget(self.spinBox_TR, 2, 2, 1, 1)
        self.spinBox_TE = QtWidgets.QSpinBox(self.tab)
        self.spinBox_TE.setObjectName("spinBox_TE")
        self.gridLayout_2.addWidget(self.spinBox_TE, 2, 3, 1, 1)
        self.spinBox_FA = QtWidgets.QSpinBox(self.tab)
        self.spinBox_FA.setObjectName("spinBox_FA")
        self.gridLayout_2.addWidget(self.spinBox_FA, 2, 4, 1, 1)
        self.spinBox_time = QtWidgets.QSpinBox(self.tab)
        self.spinBox_time.setObjectName("spinBox_time")
        self.gridLayout_2.addWidget(self.spinBox_time, 2, 5, 1, 1)
        self.phantom1 = QtWidgets.QLabel(self.tab)
        self.phantom1.setScaledContents(True)
        self.phantom1.setAlignment(QtCore.Qt.AlignCenter)
        self.phantom1.setObjectName("phantom1")
        self.gridLayout_2.addWidget(self.phantom1, 0, 0, 1, 3)
        self.phantom2 = QtWidgets.QLabel(self.tab)
        self.phantom2.setScaledContents(True)
        self.phantom2.setAlignment(QtCore.Qt.AlignCenter)
        self.phantom2.setObjectName("phantom2")
        self.gridLayout_2.addWidget(self.phantom2, 1, 0, 1, 3)
        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.i = QtWidgets.QLabel(self.tab_2)
        self.i.setScaledContents(True)
        self.i.setAlignment(QtCore.Qt.AlignCenter)
        self.i.setObjectName("i")
        self.gridLayout_3.addWidget(self.i, 0, 0, 1, 1)
        self.kspace = QtWidgets.QLabel(self.tab_2)
        self.kspace.setScaledContents(True)
        self.kspace.setAlignment(QtCore.Qt.AlignCenter)
        self.kspace.setObjectName("kspace")
        self.gridLayout_3.addWidget(self.kspace, 1, 0, 1, 1)
        self.tabWidget.addTab(self.tab_2, "")
        self.gridLayout.addWidget(self.tabWidget, 0, 0, 1, 1)

        self.retranslateUi(Form)
        self.tabWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(Form)
Ejemplo n.º 53
0
class ExampleApp(QtGui.QMainWindow):
    def __init__(self):
        super().__init__()
        pyqtgraph.setConfigOption('background', 'w')
        self.setupUi(self)

    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(350, 350)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")

        self.graphicsView = PlotWidget(self.centralwidget)
        self.graphicsView.setGeometry(QtCore.QRect(20, 20, 300, 300))
        self.graphicsView.setObjectName("graphicsView")

        MainWindow.setCentralWidget(self.centralwidget)

    def analogInput(self, channel):
        spi.max_speed_hz = 1350000
        adc = spi.xfer2([1, (8 + channel) << 4, 0])
        data = ((adc[1] & 3) << 8) + adc[2]
        return data

    def update(self):
        points = 100
        X = np.arange(points)
        n = 0
        dataLst = []
        while n < 100:
            dataPoint = self.analogInput(0)
            dataLst.append(dataPoint)
            n += 1
        Y = dataLst
        penn = pyqtgraph.mkPen('k', width=3, style=QtCore.Qt.SolidLine)
        self.graphicsView.setYRange(0, 1200, padding=0)
        labelStyle = {'color': '#000', 'font-size': '20px'}
        self.graphicsView.setLabel('bottom', 'Number of Points', '',
                                   **labelStyle)
        self.graphicsView.setLabel('left', 'Voltage', '', **labelStyle)
        self.graphicsView.plot(X, Y, pen=penn, clear=True)
        QtCore.QTimer.singleShot(1, self.update)
Ejemplo n.º 54
0
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(450, 370)
        font = QtGui.QFont()
        font.setPointSize(9)
        Dialog.setFont(font)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/control/play.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        Dialog.setWindowIcon(icon)
        Dialog.setAutoFillBackground(True)
        Dialog.setSizeGripEnabled(True)
        Dialog.setModal(False)
        self.gridLayout = QtWidgets.QGridLayout(Dialog)
        self.gridLayout.setContentsMargins(3, 3, 3, 0)
        self.gridLayout.setSpacing(3)
        self.gridLayout.setObjectName("gridLayout")
        self.configLayout = QtWidgets.QHBoxLayout()
        self.configLayout.setObjectName("configLayout")
        self.gridLayout.addLayout(self.configLayout, 1, 0, 1, 4)
        self.switcher = QtWidgets.QPushButton(Dialog)
        self.switcher.setObjectName("switcher")
        self.gridLayout.addWidget(self.switcher, 0, 3, 1, 1)
        self.pushButton = QtWidgets.QPushButton(Dialog)
        self.pushButton.setObjectName("pushButton")
        self.gridLayout.addWidget(self.pushButton, 0, 0, 1, 1)
        self.log_2 = QtWidgets.QCheckBox(Dialog)
        self.log_2.setObjectName("log_2")
        self.gridLayout.addWidget(self.log_2, 0, 1, 1, 1)
        self.monitors = QtWidgets.QStackedWidget(Dialog)
        self.monitors.setObjectName("monitors")
        self.page = QtWidgets.QWidget()
        self.page.setObjectName("page")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.page)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setSpacing(0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.gaugeLayout = QtWidgets.QGridLayout()
        self.gaugeLayout.setSpacing(3)
        self.gaugeLayout.setObjectName("gaugeLayout")
        self.verticalLayout.addLayout(self.gaugeLayout)
        self.monitors.addWidget(self.page)
        self.page_2 = QtWidgets.QWidget()
        self.page_2.setObjectName("page_2")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.page_2)
        self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
        self.gridLayout_2.setHorizontalSpacing(2)
        self.gridLayout_2.setVerticalSpacing(0)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.pushButton_2 = QtWidgets.QPushButton(self.page_2)
        self.pushButton_2.setObjectName("pushButton_2")
        self.gridLayout_2.addWidget(self.pushButton_2, 2, 1, 1, 1)
        self.pauseBox = QtWidgets.QCheckBox(self.page_2)
        self.pauseBox.setMaximumSize(QtCore.QSize(70, 16777215))
        self.pauseBox.setObjectName("pauseBox")
        self.gridLayout_2.addWidget(self.pauseBox, 2, 0, 1, 1)
        self.pushButton_3 = QtWidgets.QPushButton(self.page_2)
        self.pushButton_3.setObjectName("pushButton_3")
        self.gridLayout_2.addWidget(self.pushButton_3, 2, 2, 1, 1)
        self.graph = PlotWidget(self.page_2)
        self.graph.setObjectName("graph")
        self.gridLayout_2.addWidget(self.graph, 1, 0, 1, 3)
        self.monitors.addWidget(self.page_2)
        self.gridLayout.addWidget(self.monitors, 2, 0, 1, 5)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem, 0, 2, 1, 1)

        self.retranslateUi(Dialog)
        self.monitors.setCurrentIndex(0)
        self.log_2.toggled['bool'].connect(Dialog.changeRange)
        self.pushButton.clicked.connect(Dialog.initialize)
        self.switcher.clicked.connect(Dialog.next)
        self.pushButton_2.clicked.connect(Dialog.sineFit)
        self.pauseBox.toggled['bool'].connect(Dialog.pause)
        self.pushButton_3.clicked.connect(Dialog.dampedSineFit)
        QtCore.QMetaObject.connectSlotsByName(Dialog)
Ejemplo n.º 55
0
    def init_ui(self):
        #Window Title
        self.setWindowTitle("NAO-CPWalker TherapyWindow")
        #Window Size
        self.user32 = ctypes.windll.user32
        self.screensize = self.user32.GetSystemMetrics(
            0), self.user32.GetSystemMetrics(1),
        #Resizing MainWindoe to a percentage of the total
        self.winsize_h = int(self.screensize[0])
        self.winsize_v = int(self.screensize[1])
        self.resize(self.winsize_h, self.winsize_v)
        self.setWindowFlags(QtCore.Qt.FramelessWindowHint)

        # Setting the Background Image

        #setting backgroung image
        self.label_background = QtGui.QLabel(self)
        self.label_background.setGeometry(
            QtCore.QRect(0, 0, self.winsize_h, self.winsize_v))
        self.label_background.setScaledContents(True)
        self.label_background.setPixmap(QtGui.QPixmap("gui/img/Back.png"))

        #Setting Close Image
        self.close1 = QtGui.QLabel(self)
        self.close1.setGeometry(
            QtCore.QRect(self.winsize_h * 0.93, self.winsize_v * 0.05,
                         self.winsize_h * 0.045, self.winsize_h * 0.045))
        Icon1 = QtGui.QPixmap("gui/img/closebtn.PNG")
        Icon_resize1 = Icon1.scaled(
            self.winsize_h * 0.045,
            self.winsize_h * 0.045,
            QtCore.Qt.KeepAspectRatio,
            transformMode=QtCore.Qt.SmoothTransformation)
        self.close1.setPixmap(Icon_resize1)

        #Setting Robot conexions Image
        self.robot = QtGui.QLabel(self)
        self.robot.setGeometry(
            QtCore.QRect(self.winsize_h * 0.1, self.winsize_v * 0.57,
                         self.winsize_h * 0.07, self.winsize_h * 0.07))
        robot = QtGui.QPixmap("gui/img/Nao_head.PNG")
        robot = robot.scaled(self.winsize_h * 0.07,
                             self.winsize_h * 0.07,
                             QtCore.Qt.KeepAspectRatio,
                             transformMode=QtCore.Qt.SmoothTransformation)
        self.robot.setPixmap(robot)

        #Setting Sensors conexion Image

        self.Sensors = QtGui.QLabel(self)
        self.Sensors.setGeometry(
            QtCore.QRect(self.winsize_h * 0.1, self.winsize_v * 0.69,
                         self.winsize_h * 0.07, self.winsize_h * 0.07))
        Sensors = QtGui.QPixmap("gui/img/conex.PNG")
        Sensors = Sensors.scaled(self.winsize_h * 0.07,
                                 self.winsize_h * 0.07,
                                 QtCore.Qt.KeepAspectRatio,
                                 transformMode=QtCore.Qt.SmoothTransformation)
        self.Sensors.setPixmap(Sensors)

        self.Sensorsc = {}
        self.Sensorsc['ECG'] = QtGui.QLabel(self)
        self.Sensorsc['ECG'].setText("ECG:")
        self.Sensorsc['ECG'].setStyleSheet("font-size:30px; Arial")
        self.Sensorsc['ECG'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.19, self.winsize_v * 0.7,
                         self.winsize_h * 0.25, self.winsize_h * 0.02))

        self.Sensorsc['IMU'] = QtGui.QLabel(self)
        self.Sensorsc['IMU'].setText("IMU:")
        self.Sensorsc['IMU'].setStyleSheet("font-size:30px; Arial")
        self.Sensorsc['IMU'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.19, self.winsize_v * 0.73,
                         self.winsize_h * 0.25, self.winsize_h * 0.02))

        self.Sensorsc['EMG'] = QtGui.QLabel(self)
        self.Sensorsc['EMG'].setText("EMG:")
        self.Sensorsc['EMG'].setStyleSheet("font-size:30px; Arial")
        self.Sensorsc['EMG'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.19, self.winsize_v * 0.76,
                         self.winsize_h * 0.25, self.winsize_h * 0.02))

        self.Sensorsc['robot'] = QtGui.QLabel(self)
        self.Sensorsc['robot'].setText("Ip:")
        self.Sensorsc['robot'].setStyleSheet("font-size:30px; Arial")
        self.Sensorsc['robot'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.19, self.winsize_v * 0.59,
                         self.winsize_h * 0.25, self.winsize_h * 0.02))

        self.Sensorsc['robot_battery'] = QtGui.QLabel(self)
        self.Sensorsc['robot_battery'].setText("Bateria:")
        self.Sensorsc['robot_battery'].setStyleSheet("font-size:30px; Arial")
        self.Sensorsc['robot_battery'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.19, self.winsize_v * 0.62,
                         self.winsize_h * 0.25, self.winsize_h * 0.02))

        #Setting HR Image

        self.heart = QtGui.QLabel(self)
        self.heart.setGeometry(
            QtCore.QRect(self.winsize_h * 0.05, self.winsize_v * 0.33,
                         self.winsize_h * 0.04, self.winsize_h * 0.04))
        heart = QtGui.QPixmap("gui/img/heart.PNG")
        heart = heart.scaled(self.winsize_h * 0.04,
                             self.winsize_h * 0.04,
                             QtCore.Qt.KeepAspectRatio,
                             transformMode=QtCore.Qt.SmoothTransformation)
        self.heart.setPixmap(heart)

        self.heart_label = QtGui.QLabel(self)
        self.heart_label.setGeometry(
            QtCore.QRect(self.winsize_h * 0.24, self.winsize_v * 0.34,
                         self.winsize_h * 0.25, self.winsize_h * 0.03))
        heart_label = QtGui.QPixmap("gui/img/rect5562.PNG")
        heart_label = heart_label.scaled(
            self.winsize_h * 0.3,
            self.winsize_h * 0.04,
            QtCore.Qt.KeepAspectRatio,
            transformMode=QtCore.Qt.SmoothTransformation)
        self.heart_label.setPixmap(heart_label)

        #Setting posture Image

        self.posture = QtGui.QLabel(self)
        self.posture.setGeometry(
            QtCore.QRect(self.winsize_h * 0.05, self.winsize_v * 0.43,
                         self.winsize_h * 0.04, self.winsize_h * 0.04))
        posture = QtGui.QPixmap("gui/img/posture.PNG")
        posture = posture.scaled(self.winsize_h * 0.04,
                                 self.winsize_h * 0.04,
                                 QtCore.Qt.KeepAspectRatio,
                                 transformMode=QtCore.Qt.SmoothTransformation)
        self.posture.setPixmap(posture)

        #Setting play and stop Images

        self.play = QtGui.QLabel(self)
        self.play.setGeometry(
            QtCore.QRect(self.winsize_h * 0.85, self.winsize_v * 0.8,
                         self.winsize_h * 0.07, self.winsize_h * 0.07))
        play = QtGui.QPixmap("gui/img/begin.PNG")
        play = play.scaled(self.winsize_h * 0.07,
                           self.winsize_h * 0.07,
                           QtCore.Qt.KeepAspectRatio,
                           transformMode=QtCore.Qt.SmoothTransformation)
        self.play.setPixmap(play)

        self.stop = QtGui.QLabel(self)
        self.stop.setGeometry(
            QtCore.QRect(self.winsize_h * 0.75, self.winsize_v * 0.8,
                         self.winsize_h * 0.07, self.winsize_h * 0.07))
        stop = QtGui.QPixmap("gui/img/stop1.PNG")
        stop = stop.scaled(self.winsize_h * 0.07,
                           self.winsize_h * 0.07,
                           QtCore.Qt.KeepAspectRatio,
                           transformMode=QtCore.Qt.SmoothTransformation)
        self.stop.setPixmap(stop)

        self.posture_label = QtGui.QLabel(self)
        self.posture_label.setGeometry(
            QtCore.QRect(self.winsize_h * 0.24, self.winsize_v * 0.44,
                         self.winsize_h * 0.25, self.winsize_h * 0.03))
        posture_label = QtGui.QPixmap("gui/img/rect5562.PNG")
        posture_label = heart_label.scaled(
            self.winsize_h * 0.3,
            self.winsize_h * 0.04,
            QtCore.Qt.KeepAspectRatio,
            transformMode=QtCore.Qt.SmoothTransformation)
        self.posture_label.setPixmap(posture_label)

        # Settings patient name
        self.Patient = {}
        self.Patient['name'] = QtGui.QLabel(self)
        self.Patient['name'].setText("Nombre del paciente :")
        self.Patient['name'].setStyleSheet("font-size:30px; Arial")
        self.Patient['name'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.05, self.winsize_v * 0.90,
                         self.winsize_h * 0.25, self.winsize_h * 0.02))

        self.Patient['id'] = QtGui.QLabel(self)
        self.Patient['id'].setText("ID del paciente :")
        self.Patient['id'].setStyleSheet("font-size:30px; Arial")
        self.Patient['id'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.05, self.winsize_v * 0.93,
                         self.winsize_h * 0.25, self.winsize_h * 0.02))

        self.Patient['start'] = QtGui.QLabel(self)
        self.Patient['start'].setText("Iniciar terapia")
        self.Patient['start'].setStyleSheet("font-size:30px; Arial")
        self.Patient['start'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.85, self.winsize_v * 0.90,
                         self.winsize_h * 0.25, self.winsize_h * 0.02))

        self.Patient['end'] = QtGui.QLabel(self)
        self.Patient['end'].setText("Finalizar terapia")
        self.Patient['end'].setStyleSheet("font-size:30px; Arial")
        self.Patient['end'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.75, self.winsize_v * 0.90,
                         self.winsize_h * 0.25, self.winsize_h * 0.02))

        #Setting priority texts
        self.PriorityText = {}
        self.PriorityText['name'] = QtGui.QLabel(self)
        self.PriorityText['name'].setText(
            "Ingresa prioridad de realimentacion :")
        self.PriorityText['name'].setStyleSheet("font-size:40px; Arial")
        self.PriorityText['name'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.05, self.winsize_v * 0.1,
                         self.winsize_h * 0.25, self.winsize_h * 0.02))

        self.Options = {}
        self.Options['name_first'] = QtGui.QLabel(self)
        self.Options['name_first'].setText("1:")
        self.Options['name_first'].setStyleSheet("font-size:40px; Arial")
        self.Options['name_first'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.05, self.winsize_v * 0.15,
                         self.winsize_h * 0.05, self.winsize_h * 0.02))

        self.Options = {}
        self.Options['name_second'] = QtGui.QLabel(self)
        self.Options['name_second'].setText("2:")
        self.Options['name_second'].setStyleSheet("font-size:40px; Arial")
        self.Options['name_second'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.05, self.winsize_v * 0.20,
                         self.winsize_h * 0.05, self.winsize_h * 0.02))

        #Priority Options
        self.Options['read_first'] = QtGui.QComboBox(self)
        self.Options['read_first'].setStyleSheet("font-size:35px; Arial")
        self.Options['read_first'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.067, self.winsize_v * 0.15,
                         self.winsize_h * 0.15, self.winsize_h * 0.02))
        self.Options['read_first'].addItem("EMG")
        self.Options['read_first'].addItem("Postura")

        self.Options['read_second'] = QtGui.QComboBox(self)
        self.Options['read_second'].setStyleSheet("font-size:35px; Arial")
        self.Options['read_second'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.067, self.winsize_v * 0.20,
                         self.winsize_h * 0.15, self.winsize_h * 0.02))
        self.Options['read_second'].addItem("Postura")
        self.Options['read_second'].addItem("EMG")

        self.Options['EMG_Muscle'] = QtGui.QComboBox(self)
        self.Options['EMG_Muscle'].setStyleSheet("font-size:27px; Arial")
        self.Options['EMG_Muscle'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.23, self.winsize_v * 0.174,
                         self.winsize_h * 0.18, self.winsize_h * 0.02))
        self.Options['EMG_Muscle'].addItem("Gluteo derecho - Gluteo izquierdo")
        self.Options['EMG_Muscle'].addItem(
            "Quadriceps derecho - Quadriceps izquierdo")
        self.Options['EMG_Muscle'].addItem(
            "Triceps derecho - Triceps izquierdo")
        self.Options['EMG_Muscle'].addItem(
            "Hamstring derecho - Hamstring izquierdo")

        # Sensor labels and text

        self.ECG = {}
        self.ECG['name'] = QtGui.QLabel(self)
        self.ECG['name'].setText("Ritmo Cardiaco:")
        self.ECG['name'].setStyleSheet("font-size:40px; Arial")
        self.ECG['name'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.1, self.winsize_v * 0.35,
                         self.winsize_h * 0.3, self.winsize_h * 0.02))

        self.ECG['lcd'] = QtGui.QLCDNumber(self)
        self.ECG['lcd'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.24, self.winsize_v * 0.34,
                         self.winsize_h * 0.168, self.winsize_h * 0.03))

        self.Inclination = {}
        self.Inclination['name'] = QtGui.QLabel(self)
        self.Inclination['name'].setText("Grado de inclinacion:")
        self.Inclination['name'].setStyleSheet("font-size:40px; Arial")
        self.Inclination['name'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.1, self.winsize_v * 0.45,
                         self.winsize_h * 0.3, self.winsize_h * 0.02))

        self.Inclination['lcd'] = QtGui.QLCDNumber(self)
        self.Inclination['lcd'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.24, self.winsize_v * 0.44,
                         self.winsize_h * 0.168, self.winsize_h * 0.03))

        # Setting the buttons of the interface:
        self.controlButtons = {}
        #Close Button
        self.controlButtons['close'] = QtGui.QCommandLinkButton(self)
        self.controlButtons['close'].setIconSize(QSize(0, 0))
        self.controlButtons['close'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.93, self.winsize_v * 0.05,
                         self.winsize_h * 0.045, self.winsize_h * 0.045))

        self.controlButtons['start'] = QtGui.QCommandLinkButton(self)
        self.controlButtons['start'].setIconSize(QSize(0, 0))
        self.controlButtons['start'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.85, self.winsize_v * 0.8,
                         self.winsize_h * 0.07, self.winsize_h * 0.07))

        self.controlButtons['stop'] = QtGui.QCommandLinkButton(self)
        self.controlButtons['stop'].setIconSize(QSize(0, 0))
        self.controlButtons['stop'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.75, self.winsize_v * 0.8,
                         self.winsize_h * 0.07, self.winsize_h * 0.07))

        #Graphic Plot Widget

        self.EMGDisplay = {}
        self.EMGDisplay['name'] = QtGui.QLabel(self)
        self.EMGDisplay['name'].setText("Grafica Electromiografia")
        self.EMGDisplay['name'].setStyleSheet("font-size:35px; Arial")
        self.EMGDisplay['name'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.66, self.winsize_v * 0.1,
                         self.winsize_h * 0.2, self.winsize_h * 0.1))

        self.EMGDisplay['display'] = PlotWidget(self)
        self.EMGDisplay['display'].setGeometry(
            QtCore.QRect(self.winsize_h * 0.58, self.winsize_v * 0.2,
                         self.winsize_h * 0.3, self.winsize_h * 0.3))
        self.EMGDisplay['display'].plotItem.showGrid(True, True, 0.7)

        #self.show()

        self.connectCloseButton()
Ejemplo n.º 56
0
class RTBSA(QMainWindow):
    def __init__(self, parent=None):
        QMainWindow.__init__(self, parent)
        self.help_menu = self.menuBar().addMenu("&Help")
        self.file_menu = self.menuBar().addMenu("&File")
        self.status_text = QLabel()
        self.plot = PlotWidget(alpha=0.75)
        self.ui = Ui_RTBSA()
        self.ui.setupUi(self)
        self.setWindowTitle('Real Time BSA')
        self.loadStyleSheet()
        self.setUpGraph()

        self.bsapvs = [
            'GDET:FEE1:241:ENRC', 'GDET:FEE1:242:ENRC', 'GDET:FEE1:361:ENRC',
            'GDET:FEE1:362:ENRC'
        ]

        self.populateBSAPVs()
        self.connectGuiFunctions()

        # Initial number of points
        self.numPoints = 2800

        # Initial number of standard deviations
        self.stdDevstoKeep = 3.0

        # 20ms polling time
        self.updateTime = 50

        # Set initial polynomial fit to 2
        self.fitOrder = 2

        self.disableInputs()
        self.abort = True

        # Used to update plot
        self.timer = QTimer(self)

        self.ratePV = PV('IOC:IN20:EV01:RG01_ACTRATE')

        self.menuBar().setStyleSheet(
            'QWidget{background-color:grey;color:purple}')
        self.create_menu()
        self.create_status_bar()

        # The PV names
        self.devices = {"A": "", "B": ""}

        self.pvObjects = {"A": None, "B": None}

        # The raw, unsynchronized, unfiltered buffers
        self.rawBuffers = {"A": empty(2800), "B": empty(2800)}

        # The times when each buffer finished its last data acquisition
        self.timeStamps = {"A": None, "B": None}

        self.synchronizedBuffers = {"A": empty(2800), "B": empty(2800)}

        # Versions of data buffers A and B that are filtered by standard
        # deviation. Didn't want to edit those buffers directly so that we could
        # unfilter or refilter with a different number more efficiently
        self.filteredBuffers = {"A": empty(2800), "B": empty(2800)}

        # Text objects that appear on the plot
        self.text = {"avg": None, "std": None, "slope": None, "corr": None}

        # All things plot related!
        self.plotAttributes = {
            "curve": None,
            "fit": None,
            "parab": None,
            "frequencies": None
        }

        # Used for the kill swtich
        self.counter = {"A": 0, "B": 0}

        # Used to implement scrolling for time plots
        self.currIdx = {"A": 0, "B": 0}

    def getRate(self):
        return rtbsaUtils.rateDict[self.ratePV.value]

    def disableInputs(self):
        self.ui.fitOrder.setDisabled(True)
        self.ui.searchInputA.setDisabled(True)
        self.ui.searchInputB.setDisabled(True)
        self.ui.labelFitOrder.setDisabled(True)
        self.ui.bsaListA.setDisabled(True)
        self.ui.bsaListB.setDisabled(True)
        self.statusBar().showMessage('Hi there!  I missed you!')
        self.ui.checkBoxPolyFit.setChecked(False)

    def populateBSAPVs(self):
        # Generate list of BSA PVS
        try:
            BSAPVs = check_output(
                ['eget', '-ts', 'ds', '-a',
                 'tag=LCLS.BSA.rootnames']).splitlines()[1:-1]
            self.bsapvs.extend(BSAPVs)

        # Backup for eget error
        except CalledProcessError:
            print("Unable to pull most recent PV list")
            # bsaPVs is pulled from the Constants file
            self.bsapvs.extend(rtbsaUtils.bsaPVs)

        # TODO un-hardcode machine and add common SPEAR PV's
        except OSError:
            print "Other machines coming soon to an RTBSA near you!"
            pass

        for pv in self.bsapvs:
            self.ui.bsaListA.addItem(pv)
            self.ui.bsaListB.addItem(pv)

    def connectGuiFunctions(self):
        # enter 1 is the text input box for device A, and 2 is for B
        QObject.connect(self.ui.searchInputA,
                        SIGNAL("textChanged(const QString&)"), self.searchA)
        QObject.connect(self.ui.searchInputB,
                        SIGNAL("textChanged(const QString&)"), self.searchB)

        # Changes the text in the input box to match the selection from the list
        self.ui.bsaListA.itemClicked.connect(self.setEnterA)
        self.ui.bsaListB.itemClicked.connect(self.setEnterB)

        # Dropdown menu for device A (add common BSA PV's)
        self.ui.dropdownA.addItems(rtbsaUtils.commonlist)

        # Make bunch length default selection
        index = rtbsaUtils.commonlist.index("BLEN:LI24:886:BIMAX")
        self.ui.dropdownA.setCurrentIndex(index)

        self.ui.dropdownA.activated.connect(self.inputActivated)

        # Dropdown menu for device B
        self.ui.dropdownB.addItems(rtbsaUtils.commonlist)
        self.ui.dropdownB.activated.connect(self.inputActivated)

        # All the checkboxes in the Settings section
        self.ui.checkBoxAvsT.clicked.connect(self.AvsTClick)
        self.ui.checkBoxBvsA.clicked.connect(self.AvsBClick)
        self.ui.checkBoxFFT.clicked.connect(self.AFFTClick)
        self.ui.checkBoxShowAve.clicked.connect(self.avg_click)
        self.ui.checkBoxShowStdDev.clicked.connect(self.std_click)
        self.ui.checkBoxCorrCoeff.clicked.connect(self.corr_click)
        self.ui.checkBoxPolyFit.clicked.connect(self.parab_click)
        self.ui.checkBoxLinFit.clicked.connect(self.line_click)
        self.ui.checkBoxShowGrid.clicked.connect(self.showGrid)

        # All the buttons in the Controls section
        self.ui.startButton.clicked.connect(self.initializePlot)
        self.ui.stopButton.clicked.connect(self.stop)
        self.ui.lclsLogButton.clicked.connect(self.logbook)
        self.ui.mccLogButton.clicked.connect(self.MCCLog)

        # fitedit is the text input box for "Order"
        self.ui.fitOrder.returnPressed.connect(self.fitOrderActivated)

        # The radio buttons that enable the dropdown menus
        self.ui.dropdownButtonA.clicked.connect(self.common_1_click)
        self.ui.dropdownButtonB.clicked.connect(self.common_2_click)

        # The radio buttons that enable the search bars
        self.ui.searchButtonA.clicked.connect(self.enter_1_click)
        self.ui.searchButtonB.clicked.connect(self.enter_2_click)

        # Pressing enter in the text input boxes for points and std dev triggers
        # updating the plot
        self.ui.numPoints.returnPressed.connect(self.points_entered)
        self.ui.numStdDevs.returnPressed.connect(self.stdDevEntered)

        # Triggers a redrawing upon pressing enter in the search bar.
        # Proper usage should be using the search bar to search, and selecting
        # from the results in the list. If it's not in the list, it's an invalid
        # PV with no reason to attempt plotting
        self.ui.searchInputA.returnPressed.connect(self.inputActivated)
        self.ui.searchInputB.returnPressed.connect(self.inputActivated)

    def showGrid(self):
        self.plot.showGrid(self.ui.checkBoxShowGrid.isChecked(),
                           self.ui.checkBoxShowGrid.isChecked())

    def setUpGraph(self):
        layout = QGridLayout()
        self.ui.widgetPlot.setLayout(layout)
        layout.addWidget(self.plot, 0, 0)
        self.plot.showGrid(1, 1)

    def loadStyleSheet(self):
        currDir = path.abspath(path.dirname(__file__))
        cssFile = path.join(currDir, "style.css")
        try:
            with open(cssFile, "r") as f:
                self.setStyleSheet(f.read())
        except IOError:
            print("Error loading style sheet")
            pass

    def create_status_bar(self):
        palette = QPalette()
        palette.setColor(palette.Foreground, Qt.magenta)
        self.statusBar().addWidget(self.status_text, 1)
        self.statusBar().setPalette(palette)

    # Effectively an autocomplete
    def search(self, enter, widget):
        widget.clear()
        query = str(enter.text())
        for pv in self.bsapvs:
            if query.lower() in pv.lower():
                widget.addItem(pv)

    def searchA(self):
        self.search(self.ui.searchInputA, self.ui.bsaListA)

    def searchB(self):
        self.search(self.ui.searchInputB, self.ui.bsaListB)

    def setEnter(self, widget, enter, search, enter_rb):
        selection = widget.currentItem()
        enter.textChanged.disconnect()
        enter.setText(selection.text())
        QObject.connect(enter, SIGNAL("textChanged(const QString&)"), search)

        if not self.abort and enter_rb.isChecked():
            self.stop()
            self.timer.singleShot(250, self.initializePlot)

    def setEnterA(self):
        self.setEnter(self.ui.bsaListA, self.ui.searchInputA, self.searchA,
                      self.ui.searchButtonA)

    def setEnterB(self):
        self.setEnter(self.ui.bsaListB, self.ui.searchInputB, self.searchB,
                      self.ui.searchButtonB)

    def correctInput(self, errorMessage, acceptableTxt, textBox):
        self.statusBar().showMessage(errorMessage, 6000)
        textBox.setText(acceptableTxt)

    def correctNumpoints(self, errorMessage, acceptableValue):
        self.correctInput(errorMessage, str(acceptableValue),
                          self.ui.numPoints)
        self.numPoints = acceptableValue

    def correctStdDevs(self, errorMessage, acceptableValue):
        self.correctInput(errorMessage, str(acceptableValue),
                          self.ui.numStdDevs)
        self.stdDevstoKeep = acceptableValue

    def stdDevEntered(self):
        try:
            self.stdDevstoKeep = float(self.ui.numStdDevs.text())
            if self.stdDevstoKeep <= 0:
                raise ValueError
        except ValueError:
            self.correctStdDevs('Enter a float > 0', 3.0)
            return

    def points_entered(self):
        try:
            self.numPoints = int(self.ui.numPoints.text())
        except ValueError:
            self.correctNumpoints('Enter an integer, 1 to 2800', 120)
            return

        if self.numPoints > 2800:
            self.correctNumpoints('Max # points is 2800', 2800)
            return

        if self.numPoints < 1:
            self.correctNumpoints('Min # points is 1', 1)
            return

        self.reinitialize_plot()

    ############################################################################
    # Where the magic happens (well, where it starts to happen). This
    # initializes the BSA plotting and then starts a timer to update the plot.
    ############################################################################
    def initializePlot(self):
        plotTypeIsValid = (self.ui.checkBoxAvsT.isChecked()
                           or self.ui.checkBoxBvsA.isChecked()
                           or self.ui.checkBoxFFT.isChecked())

        if not plotTypeIsValid:
            self.statusBar().showMessage(
                'Pick a Plot Type (PV vs. time '
                'or B vs A)', 10000)
            return

        self.ui.startButton.setDisabled(True)
        self.abort = False

        self.cleanPlot()
        self.pvObjects["A"], self.pvObjects["B"] = None, None

        # Plot history buffer for one PV
        if self.ui.checkBoxAvsT.isChecked():
            if self.populateDevices(self.ui.dropdownButtonA, self.ui.dropdownA,
                                    self.ui.searchButtonA,
                                    self.ui.searchInputA, "A"):
                self.genPlotAndSetTimer(self.genTimePlotA,
                                        self.updateTimePlotA)

        # Plot for 2 PVs
        elif self.ui.checkBoxBvsA.isChecked():
            if self.updateValsFromInput():
                self.genPlotAndSetTimer(self.genPlotAB, self.updatePlotAB)

        # Plot power spectrum
        else:
            if self.populateDevices(self.ui.dropdownButtonA, self.ui.dropdownA,
                                    self.ui.searchButtonA,
                                    self.ui.searchInputA, "A"):
                self.genPlotAndSetTimer(self.InitializeFFTPlot,
                                        self.updatePlotFFT)

    def populateDevices(self, common_rb, common, enter_rb, enter, device):

        if common_rb.isChecked():
            self.devices[device] = str(common.currentText())

        elif enter_rb.isChecked():
            pv = str(enter.text()).strip()

            # Checks that it's non empty and that it's a BSA pv
            if pv and pv in self.bsapvs:
                self.devices[device] = pv
            else:
                self.printStatus('Device ' + device + ' invalid. Aborting.')
                self.ui.startButton.setEnabled(True)
                return False

        return True

    def printStatus(self, message, printToXterm=True):
        if printToXterm:
            print message

        self.statusBar().showMessage(message)

    def updateValsFromInput(self):

        if not self.populateDevices(self.ui.dropdownButtonA, self.ui.dropdownA,
                                    self.ui.searchButtonA,
                                    self.ui.searchInputA, "A"):
            return False

        if not self.populateDevices(self.ui.dropdownButtonB, self.ui.dropdownB,
                                    self.ui.searchButtonB,
                                    self.ui.searchInputB, "B"):
            return False

        self.printStatus("Initializing/Synchronizing " + self.devices["A"] +
                         " vs. " + self.devices["B"] + " buffers...")

        self.initializeBuffers()

        return True

    def initializeBuffers(self):
        # Initial population of our buffers using the HSTBR PV's in our
        # callback functions
        self.clearAndUpdateCallbacks("HSTBR", resetTime=True)

        while ((not self.timeStamps["A"] or not self.timeStamps["B"])
               and not self.abort):
            QApplication.processEvents()

        self.adjustSynchronizedBuffers(True)

        # Switch to BR PVs to avoid pulling an entire history buffer on every
        # update.
        self.clearAndUpdateCallbacks("BR", resetRawBuffer=True)

    def clearAndUpdateCallbacks(self,
                                suffix,
                                resetTime=False,
                                resetRawBuffer=False):
        self.clearAndUpdateCallback("A", suffix, self.callbackA,
                                    self.devices["A"], resetTime,
                                    resetRawBuffer)
        self.clearAndUpdateCallback("B", suffix, self.callbackB,
                                    self.devices["B"], resetTime,
                                    resetRawBuffer)

    # noinspection PyTypeChecker
    def clearAndUpdateCallback(self,
                               device,
                               suffix,
                               callback,
                               pvName,
                               resetTime=False,
                               resetRawBuffer=False):
        self.clearPV(device)

        # Without the time parameter, we wouldn't get the timestamp
        self.pvObjects[device] = PV(pvName + suffix, form='time')

        if resetTime:
            self.timeStamps[device] = None

        # Make sure that the initial raw buffer is synchronized and pad with
        # nans if it's less than 2800 points long
        if resetRawBuffer:
            nanArray = empty(2800 - self.synchronizedBuffers[device].size)
            nanArray[:] = nan
            self.rawBuffers[device] = \
                concatenate([self.synchronizedBuffers[device], nanArray])

        self.pvObjects[device].add_callback(callback)

    # Callback function for Device A
    # noinspection PyUnusedLocal
    def callbackA(self, pvname=None, value=None, timestamp=None, **kw):
        self.updateTimeAndBuffer("A", pvname, timestamp, value)

    # Callback function for Device B
    # noinspection PyUnusedLocal
    def callbackB(self, pvname=None, value=None, timestamp=None, **kw):
        self.updateTimeAndBuffer("B", pvname, timestamp, value)

    ############################################################################
    # This is where the data is actually acquired and saved to the buffers.
    # Callbacks are effectively listeners that listen for change, so we
    # basically put a callback on the PVs of interest (devices A and/or B) so
    # that every time the value of that PV changes, we get that new value and
    # append it to our raw data buffer for that device.
    # Initialization of the buffer is slightly different in that the listener is
    # put on the history buffer of that PV (denoted by the HSTBR suffix), so
    # that we just immediately write the previous 2800 points to our raw buffer
    ############################################################################
    def updateTimeAndBuffer(self, device, pvname, timestamp, value):
        def padRawBufferWithNans(start, end):
            rtbsaUtils.padWithNans(self.rawBuffers[device], start, end)

        if "HSTBR" in pvname:
            self.timeStamps[device] = timestamp

            # value is the buffer because we're monitoring the HSTBR PV
            self.rawBuffers[device] = value

            # Reset the counter every time we reinitialize the plot
            self.counter[device] = 0

        else:
            if not self.timeStamps[device]:
                return

            rate = self.getRate()
            if rate < 1:
                return

            scalingFactor = 1.0 / rate
            elapsedPulses = round(
                (timestamp - self.timeStamps[device]) / scalingFactor)

            currIdx = int((timestamp / scalingFactor) % self.numPoints)

            if elapsedPulses <= 0:
                return

            # Pad the buffer with nans for missed pulses
            elif elapsedPulses > 1:

                # noinspection PyTypeChecker
                lastIdx = int(
                    (self.timeStamps[device] / scalingFactor) % self.numPoints)

                # Take care of wrap around
                if currIdx < lastIdx:
                    padRawBufferWithNans(lastIdx + 1, self.numPoints)
                    padRawBufferWithNans(0, currIdx)

                else:
                    padRawBufferWithNans(lastIdx + 1, currIdx)

            # Directly index into the raw buffer using the timestamp
            self.rawBuffers[device][currIdx] = value

            self.counter[device] += elapsedPulses
            self.timeStamps[device] = timestamp
            self.currIdx[device] = currIdx

    def clearPV(self, device):
        pv = self.pvObjects[device]
        if pv:
            pv.clear_callbacks()
            pv.disconnect()

    def adjustSynchronizedBuffers(self, syncByTime=False):
        numBadShots = self.populateSynchronizedBuffers(syncByTime)
        blength = 2800 - numBadShots

        # Make sure the buffer size doesn't exceed the desired number of points
        if self.numPoints < blength:
            self.synchronizedBuffers["A"] = \
                self.synchronizedBuffers["A"][:self.numPoints]

            self.synchronizedBuffers["B"] = \
                self.synchronizedBuffers["B"][:self.numPoints]

    # A spin loop that waits until the beam rate is at least 1Hz
    def waitForRate(self):

        start_time = time()
        gotStuckAndNeedToUpdateMessage = False

        # self.rate is a PV, such that .value is shorthand for .getval
        while self.ratePV.value < 2:
            # noinspection PyArgumentList
            QApplication.processEvents()

            if time() - start_time > 0.5:
                gotStuckAndNeedToUpdateMessage = True
                self.printStatus("Waiting for beam rate to be at least 1Hz...",
                                 False)

        if gotStuckAndNeedToUpdateMessage:
            self.printStatus("Running", False)

        return rtbsaUtils.rateDict[self.ratePV.value]

    ############################################################################
    # Time 1 is when Device A started acquiring data, and Time 2 is when Device
    # B started acquiring data. Since they're not guaranteed to start
    # acquisition at the same time, one data buffer might be ahead of the other,
    # meaning that the intersection of the two buffers would not include the
    # first n elements of one and the last n elements of the other. See the
    # diagram below, where the dotted line represents the time axis (one buffer
    # is contained  by square brackets [], the other by curly braces {}, and the
    # times where each starts and ends is indicated right underneath).
    #
    #
    #          [           {                            ]           }
    # <----------------------------------------------------------------------> t
    #       t1_start    t2_start                     t1_end      t2_end
    #
    #
    # Note that both buffers are of the same size (2800) so that:
    # (t1_end - t1_start) = (t2_end - t2_start)
    #
    # From the diagram, we see that only the time between t2_start and t1_end
    # contains data from both buffers (t1_start to t2_start only contains data
    # from buffer 1, and t1_end to t2_end only contains data from buffer 2).
    # Using that, we can chop the beginning of buffer 1 and the end of buffer 2
    # so that we're only left with the overlapping region.
    #
    # In order to figure out how many points we need to chop from each buffer
    # (it's the same number for both since they're both the same size), we
    # multiply the time delta by the beam rate (yay dimensional analysis!):
    # seconds * (shots/second) = (number of shots)
    #
    # That whole rigmarole only applies to the initial population of the buffers
    # (where we're pulling the entire history buffer at once using the HSTBR
    # suffix). From then on, we're indexing into the raw buffers using the
    # pulse ID modulo 2800, so they're inherently synchronized
    ############################################################################
    def populateSynchronizedBuffers(self, syncByTime):
        def padSyncBufferWithNans(device, startIdx, endIdx):
            lag = endIdx - startIdx

            if lag > 20:
                print("Reinitializing buffers due to " + str(lag) +
                      " shot lag for device " + device)
                self.initializeBuffers()

            else:
                rtbsaUtils.padWithNans(self.synchronizedBuffers[device],
                                       startIdx + 1, endIdx + 1)

        def checkIndices(device, startIdx, endIdx):
            # Check for index wraparound
            if endIdx < startIdx:
                padSyncBufferWithNans(device, startIdx, self.numPoints - 1)
                padSyncBufferWithNans(device, 0, endIdx)

            else:
                padSyncBufferWithNans(device, startIdx, endIdx)

        if syncByTime:
            numBadShots = int(
                round((self.timeStamps["B"] - self.timeStamps["A"]) *
                      self.getRate()))

            startA, endA = rtbsaUtils.getIndices(numBadShots, 1)
            startB, endB = rtbsaUtils.getIndices(numBadShots, -1)

            self.synchronizedBuffers["A"] = self.rawBuffers["A"][startA:endA]
            self.synchronizedBuffers["B"] = self.rawBuffers["B"][startB:endB]

            return abs(numBadShots)

        else:

            self.synchronizedBuffers["A"] = self.rawBuffers["A"]
            self.synchronizedBuffers["B"] = self.rawBuffers["B"]

            # The timestamps and indices get updated by the callbacks, so we
            # store the values at the time of buffer-copying
            timeStampA = self.timeStamps["A"]
            timeStampB = self.timeStamps["B"]

            currIdxA = self.currIdx["A"]
            currIdxB = self.currIdx["B"]

            diff = timeStampA - timeStampB

            if diff > 0:
                checkIndices("A", currIdxB, currIdxA)

            elif diff < 0:
                checkIndices("B", currIdxA, currIdxB)

            return 0

    def genPlotAndSetTimer(self, genPlot, updateMethod):
        if self.abort:
            return

        try:
            genPlot()
        except UnboundLocalError:
            self.printStatus('No Data, Aborting Plotting Algorithm')
            return

        self.timer = QTimer(self)

        # Run updateMethod every updatetime milliseconds
        self.timer.singleShot(self.updateTime, updateMethod)

        self.printStatus('Running')

    # noinspection PyTypeChecker
    def genTimePlotA(self):
        newData = self.initializeData()

        if not newData.size:
            self.printStatus('Invalid PV? Unable to get data. Aborting.')
            self.ui.startButton.setEnabled(True)
            return

        data = newData[:self.numPoints]

        self.plotAttributes["curve"] = PlotCurveItem(data, pen=1)
        self.plot.addItem(self.plotAttributes["curve"])

        self.plotFit(arange(self.numPoints), data, self.devices["A"])

    ############################################################################
    # This is the main plotting function for "Plot A vs Time" that gets called
    # every self.updateTime seconds
    # noinspection PyTypeChecker
    ############################################################################
    def updateTimePlotA(self):

        if not self.checkPlotStatus():
            return

        xData, yData = self.filterTimePlotBuffer()

        if yData.size:
            self.plotAttributes["curve"].setData(yData)
            if self.ui.checkBoxAutoscale.isChecked():
                mx = max(yData)
                mn = min(yData)
                if mx - mn > .00001:
                    self.plot.setYRange(mn, mx)
                    self.plot.setXRange(0, len(yData))

            if self.ui.checkBoxShowAve.isChecked():
                rtbsaUtils.setPosAndText(self.text["avg"], mean(yData), 0,
                                         min(yData), 'AVG: ')

            if self.ui.checkBoxShowStdDev.isChecked():
                rtbsaUtils.setPosAndText(self.text["std"],
                                         std(yData), self.numPoints / 4,
                                         min(yData), 'STD: ')

            if self.ui.checkBoxCorrCoeff.isChecked():
                self.text["corr"].setText('')

            if self.ui.checkBoxLinFit.isChecked():
                self.text["slope"].setPos(self.numPoints / 2, min(yData))
                self.getLinearFit(xData, yData, True)

            elif self.ui.checkBoxPolyFit.isChecked():
                self.text["slope"].setPos(self.numPoints / 2, min(yData))
                self.getPolynomialFit(xData, yData, True)

        self.timer.singleShot(self.updateTime, self.updateTimePlotA)

    def checkPlotStatus(self):
        QApplication.processEvents()

        if self.abort:
            return False

        self.waitForRate()

        # kill switch to stop backgrounded, forgetten GUIs. Somewhere in the
        # ballpark of 20 minutes assuming 120Hz
        if self.counter["A"] > 150000:
            self.stop()
            self.printStatus("Stopping due to inactivity")

        return True

    def filterTimePlotBuffer(self):
        currIdx = self.currIdx["A"]
        choppedBuffer = self.rawBuffers["A"][:self.numPoints]

        # All this nonsense to make it scroll :P Thanks to Ben for the
        # inspiration!
        if currIdx > 0:
            choppedBuffer = concatenate(
                [choppedBuffer[currIdx:], choppedBuffer[:currIdx]])

        xData, yData = rtbsaUtils.filterBuffers(choppedBuffer,
                                                lambda x: ~isnan(x),
                                                arange(self.numPoints),
                                                choppedBuffer)

        if self.devices["A"] == "BLEN:LI24:886:BIMAX":
            xData, yData = rtbsaUtils.filterBuffers(
                yData, lambda x: x < rtbsaUtils.IPK_LIMIT, xData, yData)

        if self.ui.checkBoxStdDev.isChecked():
            stdDevFilterFunc = self.StdDevFilterFunc(mean(yData), std(yData))
            xData, yData = rtbsaUtils.filterBuffers(yData, stdDevFilterFunc,
                                                    xData, yData)
        return xData, yData

    def getLinearFit(self, xData, yData, updateExistingPlot):
        # noinspection PyTupleAssignmentBalance
        m, b = polyfit(xData, yData, 1)
        fitData = polyval([m, b], xData)

        self.text["slope"].setText('Slope: ' + str("{:.3e}".format(m)))

        if updateExistingPlot:
            self.plotAttributes["fit"].setData(xData, fitData)
        else:
            # noinspection PyTypeChecker
            self.plotAttributes["fit"] = PlotCurveItem(xData,
                                                       fitData,
                                                       'g-',
                                                       linewidth=1)

    def getPolynomialFit(self, xData, yData, updateExistingPlot):
        co = polyfit(xData, yData, self.fitOrder)
        pol = poly1d(co)
        xDataSorted = sorted(xData)
        fit = pol(xDataSorted)

        if updateExistingPlot:
            self.plotAttributes["parab"].setData(xDataSorted, fit)
        else:
            # noinspection PyTypeChecker
            self.plotAttributes["parab"] = PlotCurveItem(xDataSorted,
                                                         fit,
                                                         pen=3,
                                                         size=2)

        if self.fitOrder == 2:
            self.text["slope"].setText('Peak: ' + str(-co[1] / (2 * co[0])))

        elif self.fitOrder == 3:
            self.text["slope"].setText(
                str("{:.2e}".format(co[0])) + 'x^3' +
                str("+{:.2e}".format(co[1])) + 'x^2' +
                str("+{:.2e}".format(co[2])) + 'x' +
                str("+{:.2e}".format(co[3])))

    def genPlotAB(self):
        if self.ui.checkBoxStdDev.isChecked():
            self.plotCurveAndFit(self.filteredBuffers["A"],
                                 self.filteredBuffers["B"])
        else:
            self.plotCurveAndFit(self.synchronizedBuffers["A"],
                                 self.synchronizedBuffers["B"])

    def plotCurveAndFit(self, xData, yData):
        # noinspection PyTypeChecker
        self.plotAttributes["curve"] = ScatterPlotItem(xData,
                                                       yData,
                                                       pen=1,
                                                       symbol='x',
                                                       size=5)
        self.plot.addItem(self.plotAttributes["curve"])
        self.plotFit(xData, yData,
                     self.devices["B"] + ' vs. ' + self.devices["A"])

    def plotFit(self, xData, yData, title):
        self.plot.addItem(self.plotAttributes["curve"])
        self.plot.setTitle(title)

        # Fit line
        if self.ui.checkBoxLinFit.isChecked():
            self.getLinearFit(xData, yData, False)
            self.plot.addItem(self.plotAttributes["fit"])

        # Fit polynomial
        elif self.ui.checkBoxPolyFit.isChecked():
            self.ui.fitOrder.setDisabled(False)
            try:
                self.getPolynomialFit(xData, yData, False)
                self.plot.addItem(self.plotAttributes["parab"])
            except linalg.linalg.LinAlgError:
                print "Error getting polynomial fit"

    ############################################################################
    # This is the main plotting function for "Plot B vs A" that gets called
    # every self.updateTime milliseconds
    ############################################################################
    def updatePlotAB(self):
        if not self.checkPlotStatus():
            return

        QApplication.processEvents()

        self.adjustSynchronizedBuffers()
        self.filterNans()
        self.filterPeakCurrent()

        if self.ui.checkBoxStdDev.isChecked():
            self.filterStdDev()
            self.updateLabelsAndFit(self.filteredBuffers["A"],
                                    self.filteredBuffers["B"])
        else:
            self.updateLabelsAndFit(self.synchronizedBuffers["A"],
                                    self.synchronizedBuffers["B"])

        self.timer.singleShot(self.updateTime, self.updatePlotAB)

    def filterNans(self):
        def filterFunc(x):
            return ~isnan(x)

        self.filterData(self.synchronizedBuffers["A"], filterFunc, True)
        self.filterData(self.synchronizedBuffers["B"], filterFunc, True)

    # Need to filter out errant indices from both buffers to keep them
    # synchronized
    def filterData(self, dataBuffer, filterFunc, changeOriginal):
        bufferA, bufferB = rtbsaUtils.filterBuffers(
            dataBuffer, filterFunc, self.synchronizedBuffers["A"],
            self.synchronizedBuffers["B"])

        if changeOriginal:
            self.synchronizedBuffers["A"] = bufferA
            self.synchronizedBuffers["B"] = bufferB
        else:
            self.filteredBuffers["A"] = bufferA
            self.filteredBuffers["B"] = bufferB

    # This PV gets insane values, apparently
    def filterPeakCurrent(self):
        def filterFunc(x):
            return x < rtbsaUtils.IPK_LIMIT

        if self.devices["A"] == "BLEN:LI24:886:BIMAX":
            self.filterData(self.synchronizedBuffers["A"], filterFunc, True)
        if self.devices["B"] == "BLEN:LI24:886:BIMAX":
            self.filterData(self.synchronizedBuffers["B"], filterFunc, True)

    def filterStdDev(self):

        bufferA = self.synchronizedBuffers["A"]
        bufferB = self.synchronizedBuffers["B"]

        self.filterData(bufferA,
                        self.StdDevFilterFunc(mean(bufferA), std(bufferA)),
                        False)

        self.filterData(bufferB,
                        self.StdDevFilterFunc(mean(bufferB), std(bufferB)),
                        False)

    def StdDevFilterFunc(self, average, stdDev):
        return lambda x: abs(x - average) < self.stdDevstoKeep * stdDev

    # noinspection PyTypeChecker
    def updateLabelsAndFit(self, bufferA, bufferB):
        self.plotAttributes["curve"].setData(bufferA, bufferB)

        try:
            if self.ui.checkBoxAutoscale.isChecked():
                self.setPlotRanges(bufferA, bufferB)

            minBufferA = nanmin(bufferA)
            minBufferB = nanmin(bufferB)
            maxBufferA = nanmax(bufferA)
            maxBufferB = nanmax(bufferB)

            if self.ui.checkBoxShowAve.isChecked():
                rtbsaUtils.setPosAndText(self.text["avg"], nanmean(bufferB),
                                         minBufferA, minBufferB, 'AVG: ')

            if self.ui.checkBoxShowStdDev.isChecked():
                xPos = (minBufferA + (minBufferA + maxBufferA) / 2) / 2

                rtbsaUtils.setPosAndText(self.text["std"], nanstd(bufferB),
                                         xPos, minBufferB, 'STD: ')

            if self.ui.checkBoxCorrCoeff.isChecked():
                correlation = corrcoef(bufferA, bufferB)
                rtbsaUtils.setPosAndText(self.text["corr"],
                                         correlation.item(1), minBufferA,
                                         maxBufferB, "Corr. Coefficient: ")

            if self.ui.checkBoxLinFit.isChecked():
                self.text["slope"].setPos((minBufferA + maxBufferA) / 2,
                                          minBufferB)
                self.getLinearFit(bufferA, bufferB, True)

            elif self.ui.checkBoxPolyFit.isChecked():
                self.text["slope"].setPos((minBufferA + maxBufferA) / 2,
                                          minBufferB)
                self.getPolynomialFit(bufferA, bufferB, True)

        except ValueError:
            print "Error updating plot range"

    def setPlotRanges(self, bufferA, bufferB):
        mx = nanmax(bufferB)
        mn = nanmin(bufferB)

        if mn != mx:
            self.plot.setYRange(mn, mx)

        mx = nanmax(bufferA)
        mn = nanmin(bufferA)

        if mn != mx:
            self.plot.setXRange(mn, mx)

    def InitializeFFTPlot(self):
        self.genPlotFFT(self.initializeData(), False)

    # TODO I have no idea what's happening here
    def genPlotFFT(self, newdata, updateExistingPlot):

        if not newdata.size:
            return None

        newdata = newdata[:self.numPoints]

        nans, x = isnan(newdata), lambda z: z.nonzero()[0]
        # interpolate nans
        newdata[nans] = interp(x(nans), x(~nans), newdata[~nans])
        # remove DC component
        newdata = newdata - mean(newdata)

        newdata = concatenate([newdata, zeros(self.numPoints * 2)])

        ps = abs(fft.fft(newdata)) / newdata.size

        self.waitForRate()
        frequencies = fft.fftfreq(newdata.size, 1.0 / self.getRate())
        keep = (frequencies >= 0)
        ps = ps[keep]
        frequencies = frequencies[keep]
        idx = argsort(frequencies)

        if updateExistingPlot:
            self.plotAttributes["curve"].setData(x=frequencies[idx], y=ps[idx])
        else:
            # noinspection PyTypeChecker
            self.plotAttributes["curve"] = PlotCurveItem(x=frequencies[idx],
                                                         y=ps[idx],
                                                         pen=1)

        self.plot.addItem(self.plotAttributes["curve"])
        self.plot.setTitle(self.devices["A"])
        self.plotAttributes["frequencies"] = frequencies

        return ps

    # noinspection PyTypeChecker
    def cleanPlot(self):
        self.plot.clear()

        self.text["avg"] = TextItem('', color=(200, 200, 250), anchor=(0, 1))
        self.text["std"] = TextItem('', color=(200, 200, 250), anchor=(0, 1))
        self.text["slope"] = TextItem('', color=(200, 200, 250), anchor=(0, 1))
        self.text["corr"] = TextItem('', color=(200, 200, 250), anchor=(0, 1))

        plotLabels = [
            self.text["avg"], self.text["std"], self.text["slope"],
            self.text["corr"]
        ]

        for plotLabel in plotLabels:
            self.plot.addItem(plotLabel)

    def initializeData(self):
        self.printStatus("Initializing " + self.devices["A"] + " buffer...",
                         True)

        if self.ui.dropdownButtonA.isChecked():
            self.devices["A"] = str(self.ui.dropdownA.currentText())

        elif self.ui.searchButtonA.isChecked():
            pv = str(self.ui.searchInputA.text()).strip()
            if pv and pv in self.bsapvs:
                self.devices["A"] = pv
            else:
                return None
        else:
            return None

        # Initializing our data by putting a callback on the history buffer PV
        self.clearAndUpdateCallback("A", "HSTBR", self.callbackA,
                                    self.devices["A"], True)

        while (not self.timeStamps["A"]) and not self.abort:
            QApplication.processEvents()

        # Removing that callback and manually appending new values to our local
        # data buffer using the usual PV
        # TODO ask Ahmed what the BR is for
        self.clearAndUpdateCallback("A", "BR", self.callbackA,
                                    self.devices["A"])

        # This was populated in the callback function
        return self.rawBuffers["A"]

    ############################################################################
    # This is the main plotting function for "Plot A FFT" that gets called
    # every self.updateTime seconds
    ############################################################################
    def updatePlotFFT(self):
        if not self.checkPlotStatus():
            return

        ps = self.genPlotFFT(self.rawBuffers["A"], True)

        if self.ui.checkBoxAutoscale.isChecked():
            mx = max(ps)
            mn = min(ps)
            if mx - mn > .00001:
                frequencies = self.plotAttributes["frequencies"]
                self.plot.setYRange(mn, mx)
                # noinspection PyTypeChecker
                self.plot.setXRange(min(frequencies), max(frequencies))

        self.timer.singleShot(self.updateTime, self.updatePlotFFT)

    def AvsTClick(self):
        if not self.ui.checkBoxAvsT.isChecked():
            pass
        else:
            self.ui.checkBoxBvsA.setChecked(False)
            self.ui.checkBoxFFT.setChecked(False)
            self.AvsBClick()

    def AvsBClick(self):
        if not self.ui.checkBoxBvsA.isChecked():
            self.ui.groupBoxB.setDisabled(True)
            self.ui.searchButtonB.setChecked(False)
            self.ui.searchButtonB.setDisabled(True)
            self.ui.searchInputB.setDisabled(True)
            self.ui.dropdownB.setDisabled(True)
            self.ui.dropdownButtonB.setChecked(False)
            self.ui.dropdownButtonB.setDisabled(True)
        else:
            self.ui.checkBoxAvsT.setChecked(False)
            self.ui.checkBoxFFT.setChecked(False)
            self.AvsTClick()
            self.ui.groupBoxB.setDisabled(False)
            self.ui.bsaListB.setDisabled(True)
            self.ui.searchButtonB.setDisabled(False)
            self.ui.searchInputB.setDisabled(True)
            self.ui.dropdownButtonB.setDisabled(False)
            self.ui.dropdownButtonB.setChecked(True)
            self.ui.dropdownB.setDisabled(False)

        self.stop()
        self.timer.singleShot(250, self.initializePlot)

    def AFFTClick(self):
        if not self.ui.checkBoxFFT.isChecked():
            pass
        else:
            self.ui.checkBoxBvsA.setChecked(False)
            self.ui.checkBoxAvsT.setChecked(False)
            self.AvsBClick()

    def avg_click(self):
        if not self.ui.checkBoxShowAve.isChecked():
            self.text["avg"].setText('')

    def std_click(self):
        if not self.ui.checkBoxShowStdDev.isChecked():
            self.text["std"].setText('')

    def corr_click(self):
        if not self.ui.checkBoxCorrCoeff.isChecked():
            self.text["corr"].setText('')

    def enter_1_click(self):
        if self.ui.searchButtonA.isChecked():
            self.ui.searchInputA.setDisabled(False)
            self.ui.bsaListA.setDisabled(False)
            self.ui.dropdownButtonA.setChecked(False)
            self.ui.dropdownA.setDisabled(True)
        else:
            self.ui.searchInputA.setDisabled(True)

    def enter_2_click(self):
        if self.ui.searchButtonB.isChecked():
            self.ui.searchInputB.setDisabled(False)
            self.ui.bsaListB.setDisabled(False)
            self.ui.dropdownButtonB.setChecked(False)
            self.ui.dropdownB.setDisabled(True)
        else:
            self.ui.searchInputB.setDisabled(True)

    def common_1_click(self):
        if self.ui.dropdownButtonA.isChecked():
            self.ui.dropdownA.setEnabled(True)
            self.ui.searchButtonA.setChecked(False)
            self.ui.searchInputA.setDisabled(True)
            self.ui.bsaListA.setDisabled(True)
        else:
            self.ui.dropdownA.setEnabled(False)
        self.inputActivated()

    def inputActivated(self):
        if not self.abort:
            self.stop()
            self.timer.singleShot(250, self.initializePlot)

    def common_2_click(self):
        if self.ui.dropdownButtonB.isChecked():
            self.ui.dropdownB.setEnabled(True)
            self.ui.searchButtonB.setChecked(False)
            self.ui.searchInputB.setDisabled(True)
            self.ui.bsaListB.setDisabled(True)
        else:
            self.ui.dropdownB.setEnabled(False)
        self.inputActivated()

    def line_click(self):
        self.ui.checkBoxPolyFit.setChecked(False)
        self.ui.fitOrder.setDisabled(True)
        self.ui.labelFitOrder.setDisabled(True)
        self.reinitialize_plot()

    def fitOrderActivated(self):
        try:
            self.fitOrder = int(self.ui.fitOrder.text())
        except ValueError:
            self.statusBar().showMessage('Enter an integer, 1-10', 6000)
            return

        if self.fitOrder > 10 or self.fitOrder < 1:
            self.statusBar().showMessage(
                'Really?  That is going to be useful' +
                ' to you?  The (already ridiculous)' +
                ' range is 1-10.  Hope you win a ' + 'nobel prize jackass.',
                6000)
            self.ui.fitOrder.setText('2')
            self.fitOrder = 2

        if self.fitOrder != 2:
            try:
                self.text["slope"].setText('')
            except AttributeError:
                pass

    def parab_click(self):
        self.ui.checkBoxLinFit.setChecked(False)

        if not self.ui.checkBoxPolyFit.isChecked():
            self.ui.fitOrder.setDisabled(True)
            self.ui.labelFitOrder.setDisabled(True)
        else:
            self.ui.fitOrder.setEnabled(True)
            self.ui.labelFitOrder.setEnabled(True)

        self.reinitialize_plot()

    # This is a mess, but it works (used if user changes number points,
    # fit type etc.)
    def reinitialize_plot(self):
        self.cleanPlot()

        # Setup for single PV plotting
        if self.ui.checkBoxAvsT.isChecked():
            self.genTimePlotA()

        elif self.ui.checkBoxBvsA.isChecked():
            self.genPlotAB()
        else:
            self.genPlotFFT(self.synchronizedBuffers["A"], False)

    def logbook(self):
        rtbsaUtils.logbook('Python Real-Time BSA', 'BSA Data',
                           str(self.numPoints) + ' points', self.plot.plotItem)
        self.statusBar().showMessage('Sent to LCLS Physics Logbook!', 10000)

    def MCCLog(self):
        rtbsaUtils.MCCLog('/tmp/RTBSA.png', '/tmp/RTBSA.ps',
                          self.plot.plotItem)

    def clearCallbacks(self, device):
        if self.pvObjects[device]:
            self.pvObjects[device].clear_callbacks()
            self.pvObjects[device].disconnect()

    def stop(self):
        self.clearCallbacks("A")

        if self.pvObjects["B"]:
            self.clearCallbacks("B")

        self.abort = True
        self.statusBar().showMessage('Stopped')
        self.ui.startButton.setDisabled(False)
        QApplication.processEvents()

    def create_menu(self):

        load_file_action = self.create_action("&Save plot",
                                              shortcut="Ctrl+S",
                                              slot=self.save_plot,
                                              tip="Save the plot")

        quit_action = self.create_action("&Quit",
                                         slot=self.close,
                                         shortcut="Ctrl+Q",
                                         tip="Close the application")

        rtbsaUtils.add_actions(self.file_menu,
                               (load_file_action, None, quit_action))

        about_action = self.create_action("&About",
                                          shortcut='F1',
                                          slot=self.on_about,
                                          tip='About')

        rtbsaUtils.add_actions(self.help_menu, (about_action, ))

    def create_action(self,
                      text,
                      slot=None,
                      shortcut=None,
                      icon=None,
                      tip=None,
                      checkable=False,
                      signal="triggered()"):

        action = QAction(text, self)

        if icon is not None:
            action.setIcon(QIcon(":/%s.png" % icon))
        if shortcut is not None:
            action.setShortcut(shortcut)
        if tip is not None:
            action.setToolTip(tip)
            action.setStatusTip(tip)
        if slot is not None:
            self.connect(action, SIGNAL(signal), slot)
        if checkable:
            action.setCheckable(True)
        return action

    def save_plot(self):
        file_choices = "PNG (*.png)|*.png"
        # noinspection PyTypeChecker,PyCallByClass
        filePath = unicode(
            QFileDialog.getSaveFileName(self, 'Save file', '', file_choices))
        if filePath:
            self.ui.widgetPlot.canvas.print_figure(filePath, dpi=100)
            self.statusBar().showMessage('Saved to %s' % filePath, 2000)

    def on_about(self):
        msg = (
            "Can you read this?  If so, congratulations. You are a magical, " +
            "marvelous troll.")
        # noinspection PyCallByClass
        QMessageBox.about(self, "About", msg.strip())
Ejemplo n.º 57
0
    def __init__(self):
        super().__init__()
        self.setGeometry(100, 100, 1700, 575)
        self.setWindowTitle('DIY Direct Drive Wheel')

        #self.updater = LiveGuiUpdater()
        #self.updater.ticked.connect(self.LiveGuiTick)
        #self.updater.start()

        self.timer = QTimer()
        self.timer.timeout.connect(self.graph_update)
        self.timer.setInterval(1000 / self.graph_sample_rate)
        self.timer.start()

        self.gui_timer = QTimer()
        self.gui_timer.timeout.connect(self.LiveGuiTick)
        self.gui_timer.setInterval(1000 / 60)
        self.gui_timer.start()

        self.virtual_controller = VirtualController()
        self.virtual_controller.set_frequency(180)
        self.virtual_controller.steering_value_deg = self.wheel_position_deg_global
        self.virtual_controller.lock_to_lock = self.lock_to_lock_global
        self.virtual_controller.start()

        self.game_interfacer = GameInterfacer()
        self.game_interfacer.set_frequency(180)
        self.game_interfacer.wheel_force = self.raw_force_signal_global
        self.game_interfacer.invert_force = self.invert_force_global
        self.game_interfacer.game_status_playing = self.game_status_playing_global

        self.motor_controller = MotorController()
        self.motor_controller.set_frequency(360)
        self.motor_controller.signal_in = self.raw_force_signal_global
        self.motor_controller.game_status_playing = self.game_status_playing_global
        self.motor_controller.motor_pause_mode = self.motor_pause_mode
        self.motor_controller.data_reconstruction = self.data_reconstruction
        self.motor_controller.data_smoothing_level = self.data_smoothing_level
        self.motor_controller.friction = self.friction_global
        self.motor_controller.damping = self.damping_global
        self.motor_controller.inertia = self.inertia_global
        self.motor_controller.encoder_pos = self.encoder_pos_global
        self.motor_controller.wheel_pos_deg = self.wheel_position_deg_global
        self.motor_controller.bump_to_bump = self.bump_to_bump_global
        self.motor_controller.motor_current = self.motor_current_global
        self.motor_controller.actual_max_force = self.actual_max_force_global
        self.motor_controller.motor_connected = self.motor_connected_global
        self.motor_controller.due_for_restart = self.motor_controller_due_for_restart_global
        self.motor_controller.achieved_freq = self.motor_control_rate
        self.motor_controller.start()

        self.lblMotorRate = QLabel('motor control rate:', self)
        self.lblMotorRate.setFont(QFont("Times", 24, QFont.Normal))
        self.lblMotorRate.move(675, 25)

        self.lblMotorRateHz = QLabel('0.00 Hz', self)
        self.lblMotorRateHz.setFont(QFont("Times", 24, QFont.Normal))
        self.lblMotorRateHz.adjustSize()
        self.lblMotorRateHz.move(1125 - self.lblMotorRateHz.width(), 25)

        self.force_graph = PlotWidget(self)
        self.force_graph.move(675, 75)
        self.force_graph.resize(1000, 475)
        self.force_graph.setYRange(-15.0, 15.0)
        self.force_graph.setBackground((255, 255, 255))
        self.force_graph.showGrid(x=False, y=True)
        self.force_graph.addLegend()

        pen_ffb = pg.mkPen(color=(0, 0, 255))
        self.ffb_curve = self.force_graph.getPlotItem().plot(
            pen=pen_ffb, name='Game FFB (Nm)')
        pen_current = pg.mkPen(color=(0, 255, 0))
        self.current_curve = self.force_graph.getPlotItem().plot(
            pen=pen_current, name='Motor Torque (Nm)')
        self.ffb_history = [
            0
        ] * self.graph_sample_rate * self.graph_history_time_sec
        self.current_history = [
            0
        ] * self.graph_sample_rate * self.graph_history_time_sec

        self.load_profiles_from_file()
        self.build_gui()
        self.select_profile(0)
Ejemplo n.º 58
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(1231, 879)
        self.centralWidget = QtGui.QWidget(MainWindow)
        self.centralWidget.setObjectName(_fromUtf8("centralWidget"))
        self.tabWidget = QtGui.QTabWidget(self.centralWidget)
        self.tabWidget.setGeometry(QtCore.QRect(10, 0, 1201, 761))
        self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
        self.tab = QtGui.QWidget()
        self.tab.setObjectName(_fromUtf8("tab"))
        self.kp_slider = QtGui.QSlider(self.tab)
        self.kp_slider.setGeometry(QtCore.QRect(150, 120, 311, 29))
        self.kp_slider.setOrientation(QtCore.Qt.Horizontal)
        self.kp_slider.setObjectName(_fromUtf8("kp_slider"))
        self.ki_slider = QtGui.QSlider(self.tab)
        self.ki_slider.setGeometry(QtCore.QRect(150, 160, 311, 29))
        self.ki_slider.setOrientation(QtCore.Qt.Horizontal)
        self.ki_slider.setObjectName(_fromUtf8("ki_slider"))
        self.kd_slider = QtGui.QSlider(self.tab)
        self.kd_slider.setGeometry(QtCore.QRect(150, 200, 311, 31))
        self.kd_slider.setOrientation(QtCore.Qt.Horizontal)
        self.kd_slider.setObjectName(_fromUtf8("kd_slider"))
        self.setpoint_slider = QtGui.QSlider(self.tab)
        self.setpoint_slider.setGeometry(QtCore.QRect(150, 240, 311, 29))
        self.setpoint_slider.setOrientation(QtCore.Qt.Horizontal)
        self.setpoint_slider.setObjectName(_fromUtf8("setpoint_slider"))
        self.yaw_radioButton = QtGui.QRadioButton(self.tab)
        self.yaw_radioButton.setGeometry(QtCore.QRect(70, 60, 117, 22))
        self.yaw_radioButton.setObjectName(_fromUtf8("yaw_radioButton"))
        self.pitch_radioButton = QtGui.QRadioButton(self.tab)
        self.pitch_radioButton.setGeometry(QtCore.QRect(200, 60, 117, 22))
        self.pitch_radioButton.setObjectName(_fromUtf8("pitch_radioButton"))
        self.depth_radioButton = QtGui.QRadioButton(self.tab)
        self.depth_radioButton.setGeometry(QtCore.QRect(340, 60, 117, 22))
        self.depth_radioButton.setObjectName(_fromUtf8("depth_radioButton"))
        self.forward_radioButton = QtGui.QRadioButton(self.tab)
        self.forward_radioButton.setGeometry(QtCore.QRect(460, 60, 117, 22))
        self.forward_radioButton.setObjectName(
            _fromUtf8("forward_radioButton"))
        self.kp_lineEdit = QtGui.QLineEdit(self.tab)
        self.kp_lineEdit.setGeometry(QtCore.QRect(480, 120, 41, 31))
        self.kp_lineEdit.setReadOnly(False)
        self.kp_lineEdit.setObjectName(_fromUtf8("kp_lineEdit"))
        self.ki_lineEdit = QtGui.QLineEdit(self.tab)
        self.ki_lineEdit.setGeometry(QtCore.QRect(480, 160, 41, 31))
        self.ki_lineEdit.setReadOnly(False)
        self.ki_lineEdit.setObjectName(_fromUtf8("ki_lineEdit"))
        self.kd_lineEdit = QtGui.QLineEdit(self.tab)
        self.kd_lineEdit.setGeometry(QtCore.QRect(480, 200, 41, 31))
        self.kd_lineEdit.setReadOnly(False)
        self.kd_lineEdit.setObjectName(_fromUtf8("kd_lineEdit"))
        self.setpoint_lineEdit = QtGui.QLineEdit(self.tab)
        self.setpoint_lineEdit.setGeometry(QtCore.QRect(480, 240, 41, 31))
        self.setpoint_lineEdit.setReadOnly(False)
        self.setpoint_lineEdit.setObjectName(_fromUtf8("setpoint_lineEdit"))
        self.label = QtGui.QLabel(self.tab)
        self.label.setGeometry(QtCore.QRect(70, 120, 67, 17))
        self.label.setObjectName(_fromUtf8("label"))
        self.label_2 = QtGui.QLabel(self.tab)
        self.label_2.setGeometry(QtCore.QRect(70, 160, 67, 17))
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.label_3 = QtGui.QLabel(self.tab)
        self.label_3.setGeometry(QtCore.QRect(70, 200, 67, 17))
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.label_4 = QtGui.QLabel(self.tab)
        self.label_4.setGeometry(QtCore.QRect(70, 240, 67, 17))
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.label_5 = QtGui.QLabel(self.tab)
        self.label_5.setGeometry(QtCore.QRect(750, 40, 67, 31))
        font = QtGui.QFont()
        font.setPointSize(15)
        font.setBold(True)
        font.setWeight(75)
        self.label_5.setFont(font)
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.speed_up_lineEdit = QtGui.QLineEdit(self.tab)
        self.speed_up_lineEdit.setGeometry(QtCore.QRect(750, 90, 71, 31))
        self.speed_up_lineEdit.setReadOnly(True)
        self.speed_up_lineEdit.setObjectName(_fromUtf8("speed_up_lineEdit"))
        self.speed_left_lineEdit = QtGui.QLineEdit(self.tab)
        self.speed_left_lineEdit.setGeometry(QtCore.QRect(670, 140, 71, 31))
        self.speed_left_lineEdit.setReadOnly(True)
        self.speed_left_lineEdit.setObjectName(
            _fromUtf8("speed_left_lineEdit"))
        self.speed_down_lineEdit = QtGui.QLineEdit(self.tab)
        self.speed_down_lineEdit.setGeometry(QtCore.QRect(750, 190, 71, 31))
        self.speed_down_lineEdit.setReadOnly(True)
        self.speed_down_lineEdit.setObjectName(
            _fromUtf8("speed_down_lineEdit"))
        self.speed_right_lineEdit = QtGui.QLineEdit(self.tab)
        self.speed_right_lineEdit.setGeometry(QtCore.QRect(830, 140, 71, 31))
        self.speed_right_lineEdit.setReadOnly(True)
        self.speed_right_lineEdit.setObjectName(
            _fromUtf8("speed_right_lineEdit"))
        self.tableWidget = QtGui.QTableWidget(self.tab)
        self.tableWidget.setGeometry(QtCore.QRect(150, 360, 421, 151))
        self.tableWidget.setRowCount(4)
        self.tableWidget.setColumnCount(4)
        self.tableWidget.setObjectName(_fromUtf8("tableWidget"))
        self.label_6 = QtGui.QLabel(self.tab)
        self.label_6.setGeometry(QtCore.QRect(180, 330, 67, 17))
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self.label_7 = QtGui.QLabel(self.tab)
        self.label_7.setGeometry(QtCore.QRect(280, 330, 67, 17))
        self.label_7.setObjectName(_fromUtf8("label_7"))
        self.label_8 = QtGui.QLabel(self.tab)
        self.label_8.setGeometry(QtCore.QRect(370, 330, 67, 17))
        self.label_8.setObjectName(_fromUtf8("label_8"))
        self.label_9 = QtGui.QLabel(self.tab)
        self.label_9.setGeometry(QtCore.QRect(470, 330, 67, 17))
        self.label_9.setObjectName(_fromUtf8("label_9"))
        self.label_10 = QtGui.QLabel(self.tab)
        self.label_10.setGeometry(QtCore.QRect(70, 480, 67, 17))
        self.label_10.setObjectName(_fromUtf8("label_10"))
        self.label_11 = QtGui.QLabel(self.tab)
        self.label_11.setGeometry(QtCore.QRect(70, 420, 67, 17))
        self.label_11.setObjectName(_fromUtf8("label_11"))
        self.label_12 = QtGui.QLabel(self.tab)
        self.label_12.setGeometry(QtCore.QRect(70, 390, 67, 17))
        self.label_12.setObjectName(_fromUtf8("label_12"))
        self.label_13 = QtGui.QLabel(self.tab)
        self.label_13.setGeometry(QtCore.QRect(70, 450, 67, 17))
        self.label_13.setObjectName(_fromUtf8("label_13"))
        self.resetButton = QtGui.QPushButton(self.tab)
        self.resetButton.setGeometry(QtCore.QRect(750, 390, 91, 71))
        self.resetButton.setObjectName(_fromUtf8("resetButton"))
        self.lineEdit = QtGui.QLineEdit(self.tab)
        self.lineEdit.setGeometry(QtCore.QRect(530, 120, 51, 31))
        self.lineEdit.setObjectName(_fromUtf8("lineEdit"))
        self.lineEdit_2 = QtGui.QLineEdit(self.tab)
        self.lineEdit_2.setGeometry(QtCore.QRect(530, 160, 51, 31))
        self.lineEdit_2.setObjectName(_fromUtf8("lineEdit_2"))
        self.lineEdit_3 = QtGui.QLineEdit(self.tab)
        self.lineEdit_3.setGeometry(QtCore.QRect(530, 200, 51, 31))
        self.lineEdit_3.setObjectName(_fromUtf8("lineEdit_3"))
        self.lineEdit_4 = QtGui.QLineEdit(self.tab)
        self.lineEdit_4.setGeometry(QtCore.QRect(530, 240, 51, 31))
        self.lineEdit_4.setObjectName(_fromUtf8("lineEdit_4"))
        self.label_18 = QtGui.QLabel(self.tab)
        self.label_18.setGeometry(QtCore.QRect(540, 90, 31, 17))
        font = QtGui.QFont()
        font.setPointSize(13)
        font.setBold(True)
        font.setWeight(75)
        self.label_18.setFont(font)
        self.label_18.setObjectName(_fromUtf8("label_18"))
        self.tabWidget.addTab(self.tab, _fromUtf8(""))
        self.tab_2 = QtGui.QWidget()
        self.tab_2.setObjectName(_fromUtf8("tab_2"))
        self.yaw_graphicsView = PlotWidget(self.tab_2)
        self.yaw_graphicsView.setGeometry(QtCore.QRect(60, 50, 351, 201))
        self.yaw_graphicsView.setObjectName(_fromUtf8("yaw_graphicsView"))
        self.label_14 = QtGui.QLabel(self.tab_2)
        self.label_14.setGeometry(QtCore.QRect(60, 20, 67, 17))
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_14.setFont(font)
        self.label_14.setObjectName(_fromUtf8("label_14"))
        self.label_15 = QtGui.QLabel(self.tab_2)
        self.label_15.setGeometry(QtCore.QRect(460, 20, 67, 17))
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_15.setFont(font)
        self.label_15.setObjectName(_fromUtf8("label_15"))
        self.label_16 = QtGui.QLabel(self.tab_2)
        self.label_16.setGeometry(QtCore.QRect(70, 350, 67, 17))
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_16.setFont(font)
        self.label_16.setObjectName(_fromUtf8("label_16"))
        self.label_17 = QtGui.QLabel(self.tab_2)
        self.label_17.setGeometry(QtCore.QRect(440, 350, 67, 17))
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_17.setFont(font)
        self.label_17.setObjectName(_fromUtf8("label_17"))
        self.pitch_graphicsView = PlotWidget(self.tab_2)
        self.pitch_graphicsView.setGeometry(QtCore.QRect(450, 50, 351, 201))
        self.pitch_graphicsView.setObjectName(_fromUtf8("pitch_graphicsView"))
        self.depth_graphicsView = PlotWidget(self.tab_2)
        self.depth_graphicsView.setGeometry(QtCore.QRect(60, 390, 351, 201))
        self.depth_graphicsView.setObjectName(_fromUtf8("depth_graphicsView"))
        self.forward_graphicsView = PlotWidget(self.tab_2)
        self.forward_graphicsView.setGeometry(QtCore.QRect(440, 390, 351, 201))
        self.forward_graphicsView.setObjectName(
            _fromUtf8("forward_graphicsView"))
        self.comboBox = QtGui.QComboBox(self.tab_2)
        self.comboBox.setGeometry(QtCore.QRect(840, 60, 211, 61))
        self.comboBox.setObjectName(_fromUtf8("comboBox"))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.addItem(_fromUtf8(""))
        self.selective_graph = PlotWidget(self.tab_2)
        self.selective_graph.setGeometry(QtCore.QRect(840, 150, 331, 281))
        self.selective_graph.setObjectName(_fromUtf8("selective_graph"))
        self.val_yaw_lineEdit = QtGui.QLineEdit(self.tab_2)
        self.val_yaw_lineEdit.setGeometry(QtCore.QRect(120, 260, 91, 31))
        self.val_yaw_lineEdit.setObjectName(_fromUtf8("val_yaw_lineEdit"))
        self.setpoint_yaw_lineEdit = QtGui.QLineEdit(self.tab_2)
        self.setpoint_yaw_lineEdit.setGeometry(QtCore.QRect(310, 260, 101, 31))
        self.setpoint_yaw_lineEdit.setObjectName(
            _fromUtf8("setpoint_yaw_lineEdit"))
        self.label_19 = QtGui.QLabel(self.tab_2)
        self.label_19.setGeometry(QtCore.QRect(70, 270, 67, 17))
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_19.setFont(font)
        self.label_19.setObjectName(_fromUtf8("label_19"))
        self.label_20 = QtGui.QLabel(self.tab_2)
        self.label_20.setGeometry(QtCore.QRect(230, 270, 67, 17))
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_20.setFont(font)
        self.label_20.setObjectName(_fromUtf8("label_20"))
        self.setpoint_pitch_lineEdit = QtGui.QLineEdit(self.tab_2)
        self.setpoint_pitch_lineEdit.setGeometry(QtCore.QRect(
            710, 260, 91, 31))
        self.setpoint_pitch_lineEdit.setObjectName(
            _fromUtf8("setpoint_pitch_lineEdit"))
        self.val_pitch_lineEdit = QtGui.QLineEdit(self.tab_2)
        self.val_pitch_lineEdit.setGeometry(QtCore.QRect(530, 260, 91, 31))
        self.val_pitch_lineEdit.setObjectName(_fromUtf8("val_pitch_lineEdit"))
        self.label_21 = QtGui.QLabel(self.tab_2)
        self.label_21.setGeometry(QtCore.QRect(480, 270, 67, 17))
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_21.setFont(font)
        self.label_21.setObjectName(_fromUtf8("label_21"))
        self.label_22 = QtGui.QLabel(self.tab_2)
        self.label_22.setGeometry(QtCore.QRect(640, 270, 67, 17))
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_22.setFont(font)
        self.label_22.setObjectName(_fromUtf8("label_22"))
        self.label_23 = QtGui.QLabel(self.tab_2)
        self.label_23.setGeometry(QtCore.QRect(80, 610, 67, 17))
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_23.setFont(font)
        self.label_23.setObjectName(_fromUtf8("label_23"))
        self.label_24 = QtGui.QLabel(self.tab_2)
        self.label_24.setGeometry(QtCore.QRect(70, 650, 67, 17))
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_24.setFont(font)
        self.label_24.setObjectName(_fromUtf8("label_24"))
        self.setpoint_depth_lineEdit = QtGui.QLineEdit(self.tab_2)
        self.setpoint_depth_lineEdit.setGeometry(
            QtCore.QRect(140, 640, 241, 31))
        self.setpoint_depth_lineEdit.setObjectName(
            _fromUtf8("setpoint_depth_lineEdit"))
        self.val_depth_lineEdit = QtGui.QLineEdit(self.tab_2)
        self.val_depth_lineEdit.setGeometry(QtCore.QRect(130, 600, 251, 31))
        self.val_depth_lineEdit.setObjectName(_fromUtf8("val_depth_lineEdit"))
        self.lineEdit_11 = QtGui.QLineEdit(self.tab_2)
        self.lineEdit_11.setGeometry(QtCore.QRect(700, 610, 91, 31))
        self.lineEdit_11.setObjectName(_fromUtf8("lineEdit_11"))
        self.label_25 = QtGui.QLabel(self.tab_2)
        self.label_25.setGeometry(QtCore.QRect(630, 620, 67, 17))
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_25.setFont(font)
        self.label_25.setObjectName(_fromUtf8("label_25"))
        self.lineEdit_12 = QtGui.QLineEdit(self.tab_2)
        self.lineEdit_12.setGeometry(QtCore.QRect(520, 610, 91, 31))
        self.lineEdit_12.setObjectName(_fromUtf8("lineEdit_12"))
        self.label_26 = QtGui.QLabel(self.tab_2)
        self.label_26.setGeometry(QtCore.QRect(470, 620, 67, 17))
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_26.setFont(font)
        self.label_26.setObjectName(_fromUtf8("label_26"))
        self.tabWidget.addTab(self.tab_2, _fromUtf8(""))
        MainWindow.setCentralWidget(self.centralWidget)
        self.menuBar = QtGui.QMenuBar(MainWindow)
        self.menuBar.setGeometry(QtCore.QRect(0, 0, 1231, 25))
        self.menuBar.setObjectName(_fromUtf8("menuBar"))
        MainWindow.setMenuBar(self.menuBar)
        self.mainToolBar = QtGui.QToolBar(MainWindow)
        self.mainToolBar.setObjectName(_fromUtf8("mainToolBar"))
        MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.mainToolBar)
        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)
Ejemplo n.º 59
0
    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)
Ejemplo n.º 60
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1205, 692)
        MainWindow.setWindowOpacity(1.0)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.centralwidget)
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setSizeConstraint(QtWidgets.QLayout.SetMaximumSize)
        self.verticalLayout.setContentsMargins(-1, -1, -1, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.groupBox_2 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_2.setMaximumSize(QtCore.QSize(16777215, 150))
        self.groupBox_2.setObjectName("groupBox_2")
        self.verticalLayout_7 = QtWidgets.QVBoxLayout(self.groupBox_2)
        self.verticalLayout_7.setObjectName("verticalLayout_7")
        self.gridLayout_2 = QtWidgets.QGridLayout()
        self.gridLayout_2.setSizeConstraint(
            QtWidgets.QLayout.SetDefaultConstraint)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.btnBrowse = QtWidgets.QPushButton(self.groupBox_2)
        self.btnBrowse.setMinimumSize(QtCore.QSize(100, 0))
        self.btnBrowse.setMaximumSize(QtCore.QSize(100, 50))
        self.btnBrowse.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.btnBrowse.setObjectName("btnBrowse")
        self.gridLayout_2.addWidget(self.btnBrowse, 1, 0, 1, 1,
                                    QtCore.Qt.AlignHCenter)
        self.horizontalLayout_8 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_8.setSizeConstraint(
            QtWidgets.QLayout.SetFixedSize)
        self.horizontalLayout_8.setObjectName("horizontalLayout_8")
        spacerItem = QtWidgets.QSpacerItem(25, 20,
                                           QtWidgets.QSizePolicy.Maximum,
                                           QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_8.addItem(spacerItem)
        self.lineEditInputFilename = QtWidgets.QLineEdit(self.groupBox_2)
        self.lineEditInputFilename.setMaximumSize(
            QtCore.QSize(16777215, 16777215))
        font = QtGui.QFont()
        font.setBold(False)
        font.setItalic(False)
        font.setUnderline(False)
        font.setWeight(50)
        font.setKerning(True)
        self.lineEditInputFilename.setFont(font)
        self.lineEditInputFilename.setAutoFillBackground(False)
        self.lineEditInputFilename.setAlignment(QtCore.Qt.AlignCenter)
        self.lineEditInputFilename.setReadOnly(False)
        self.lineEditInputFilename.setObjectName("lineEditInputFilename")
        self.horizontalLayout_8.addWidget(self.lineEditInputFilename)
        spacerItem1 = QtWidgets.QSpacerItem(20, 20,
                                            QtWidgets.QSizePolicy.Maximum,
                                            QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_8.addItem(spacerItem1)
        self.gridLayout_2.addLayout(self.horizontalLayout_8, 0, 0, 1, 1)
        self.verticalLayout_7.addLayout(self.gridLayout_2)
        self.verticalLayout.addWidget(self.groupBox_2)
        self.groupBox = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox.setMaximumSize(QtCore.QSize(16777215, 390))
        self.groupBox.setObjectName("groupBox")
        self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.groupBox)
        self.verticalLayout_6.setObjectName("verticalLayout_6")
        self.scrollArea = QtWidgets.QScrollArea(self.groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.scrollArea.sizePolicy().hasHeightForWidth())
        self.scrollArea.setSizePolicy(sizePolicy)
        self.scrollArea.setMaximumSize(QtCore.QSize(16777215, 240))
        self.scrollArea.setWidgetResizable(True)
        self.scrollArea.setObjectName("scrollArea")
        self.scrollAreaWidgetContents = QtWidgets.QWidget()
        self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 223, 198))
        self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
        self.verticalLayout_4 = QtWidgets.QVBoxLayout(
            self.scrollAreaWidgetContents)
        self.verticalLayout_4.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.verticalLayout_5 = QtWidgets.QVBoxLayout()
        self.verticalLayout_5.setContentsMargins(-1, -1, -1, 5)
        self.verticalLayout_5.setObjectName("verticalLayout_5")
        self.horizontalLayout_13 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_13.setContentsMargins(-1, 0, -1, -1)
        self.horizontalLayout_13.setObjectName("horizontalLayout_13")
        self.checkBoxKnownZ = QtWidgets.QCheckBox(
            self.scrollAreaWidgetContents)
        self.checkBoxKnownZ.setChecked(True)
        self.checkBoxKnownZ.setObjectName("checkBoxKnownZ")
        self.horizontalLayout_13.addWidget(self.checkBoxKnownZ)
        self.lineEditKnownZ = QtWidgets.QLineEdit(
            self.scrollAreaWidgetContents)
        self.lineEditKnownZ.setObjectName("lineEditKnownZ")
        self.horizontalLayout_13.addWidget(self.lineEditKnownZ)
        self.horizontalLayout_13.setStretch(0, 2)
        self.horizontalLayout_13.setStretch(1, 1)
        self.verticalLayout_5.addLayout(self.horizontalLayout_13)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setContentsMargins(-1, 0, -1, -1)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.checkBoxClassifyHost = QtWidgets.QCheckBox(
            self.scrollAreaWidgetContents)
        self.checkBoxClassifyHost.setObjectName("checkBoxClassifyHost")
        self.horizontalLayout.addWidget(self.checkBoxClassifyHost)
        self.verticalLayout_5.addLayout(self.horizontalLayout)
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setContentsMargins(-1, 0, -1, -1)
        self.gridLayout.setObjectName("gridLayout")
        self.label_8 = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.label_8.setObjectName("label_8")
        self.gridLayout.addWidget(self.label_8, 1, 0, 1, 1)
        self.label_7 = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.label_7.setObjectName("label_7")
        self.gridLayout.addWidget(self.label_7, 0, 0, 1, 1)
        self.lineEditMinWave = QtWidgets.QLineEdit(
            self.scrollAreaWidgetContents)
        self.lineEditMinWave.setObjectName("lineEditMinWave")
        self.gridLayout.addWidget(self.lineEditMinWave, 0, 1, 1, 1)
        self.lineEditMaxWave = QtWidgets.QLineEdit(
            self.scrollAreaWidgetContents)
        self.lineEditMaxWave.setObjectName("lineEditMaxWave")
        self.gridLayout.addWidget(self.lineEditMaxWave, 1, 1, 1, 1)
        spacerItem2 = QtWidgets.QSpacerItem(40, 20,
                                            QtWidgets.QSizePolicy.Expanding,
                                            QtWidgets.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem2, 0, 2, 1, 1)
        spacerItem3 = QtWidgets.QSpacerItem(40, 20,
                                            QtWidgets.QSizePolicy.Expanding,
                                            QtWidgets.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem3, 1, 2, 1, 1)
        self.gridLayout.setColumnStretch(0, 1)
        self.gridLayout.setColumnStretch(1, 1)
        self.gridLayout.setColumnStretch(2, 1)
        self.verticalLayout_5.addLayout(self.gridLayout)
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_4.setContentsMargins(-1, -1, -1, 0)
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.label_3 = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.label_3.setObjectName("label_3")
        self.horizontalLayout_4.addWidget(self.label_3)
        self.lineEditSmooth = QtWidgets.QLineEdit(
            self.scrollAreaWidgetContents)
        self.lineEditSmooth.setMaximumSize(QtCore.QSize(40, 16777215))
        self.lineEditSmooth.setObjectName("lineEditSmooth")
        self.horizontalLayout_4.addWidget(self.lineEditSmooth)
        self.horizontalSliderSmooth = QtWidgets.QSlider(
            self.scrollAreaWidgetContents)
        self.horizontalSliderSmooth.setMaximum(20)
        self.horizontalSliderSmooth.setProperty("value", 6)
        self.horizontalSliderSmooth.setOrientation(QtCore.Qt.Horizontal)
        self.horizontalSliderSmooth.setObjectName("horizontalSliderSmooth")
        self.horizontalLayout_4.addWidget(self.horizontalSliderSmooth)
        self.verticalLayout_5.addLayout(self.horizontalLayout_4)
        self.verticalLayout_3 = QtWidgets.QVBoxLayout()
        self.verticalLayout_3.setContentsMargins(-1, -1, -1, 10)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.checkBoxRlap = QtWidgets.QCheckBox(self.scrollAreaWidgetContents)
        self.checkBoxRlap.setObjectName("checkBoxRlap")
        self.verticalLayout_3.addWidget(self.checkBoxRlap)
        self.verticalLayout_5.addLayout(self.verticalLayout_3)
        self.verticalLayout_5.setStretch(0, 1)
        self.verticalLayout_5.setStretch(1, 1)
        self.verticalLayout_5.setStretch(2, 2)
        self.verticalLayout_5.setStretch(3, 1)
        self.verticalLayout_4.addLayout(self.verticalLayout_5)
        self.scrollArea.setWidget(self.scrollAreaWidgetContents)
        self.verticalLayout_6.addWidget(self.scrollArea)
        self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_6.setContentsMargins(-1, 0, -1, -1)
        self.horizontalLayout_6.setObjectName("horizontalLayout_6")
        self.btnRefit = QtWidgets.QPushButton(self.groupBox)
        self.btnRefit.setMaximumSize(QtCore.QSize(150, 16777215))
        self.btnRefit.setObjectName("btnRefit")
        self.horizontalLayout_6.addWidget(self.btnRefit)
        self.verticalLayout_6.addLayout(self.horizontalLayout_6)
        self.horizontalLayout_7 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_7.setContentsMargins(-1, 0, -1, -1)
        self.horizontalLayout_7.setObjectName("horizontalLayout_7")
        self.btnCancel = QtWidgets.QPushButton(self.groupBox)
        self.btnCancel.setMinimumSize(QtCore.QSize(0, 0))
        self.btnCancel.setMaximumSize(QtCore.QSize(100, 16777215))
        self.btnCancel.setObjectName("btnCancel")
        self.horizontalLayout_7.addWidget(self.btnCancel)
        self.verticalLayout_6.addLayout(self.horizontalLayout_7)
        self.verticalLayout.addWidget(self.groupBox)
        self.progressBar = QtWidgets.QProgressBar(self.centralwidget)
        self.progressBar.setProperty("value", 24)
        self.progressBar.setObjectName("progressBar")
        self.verticalLayout.addWidget(self.progressBar)
        self.horizontalLayout_15 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_15.setContentsMargins(-1, 0, -1, -1)
        self.horizontalLayout_15.setObjectName("horizontalLayout_15")
        self.btnQuit = QtWidgets.QPushButton(self.centralwidget)
        self.btnQuit.setMaximumSize(QtCore.QSize(120, 16777215))
        self.btnQuit.setObjectName("btnQuit")
        self.horizontalLayout_15.addWidget(self.btnQuit)
        self.verticalLayout.addLayout(self.horizontalLayout_15)
        spacerItem4 = QtWidgets.QSpacerItem(20, 40,
                                            QtWidgets.QSizePolicy.Minimum,
                                            QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem4)
        self.verticalLayout.setStretch(0, 1)
        self.verticalLayout.setStretch(1, 6)
        self.verticalLayout.setStretch(4, 2)
        self.horizontalLayout_3.addLayout(self.verticalLayout)
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.verticalLayout_2.setSizeConstraint(
            QtWidgets.QLayout.SetDefaultConstraint)
        self.verticalLayout_2.setContentsMargins(-1, -1, 0, -1)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.groupBox_3 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_3.setObjectName("groupBox_3")
        self.verticalLayout_8 = QtWidgets.QVBoxLayout(self.groupBox_3)
        self.verticalLayout_8.setObjectName("verticalLayout_8")
        self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
        self.listWidget = QtWidgets.QListWidget(self.groupBox_3)
        self.listWidget.setObjectName("listWidget")
        item = QtWidgets.QListWidgetItem()
        self.listWidget.addItem(item)
        self.horizontalLayout_5.addWidget(self.listWidget)
        self.verticalLayout_10 = QtWidgets.QVBoxLayout()
        self.verticalLayout_10.setContentsMargins(-1, -1, 0, 0)
        self.verticalLayout_10.setObjectName("verticalLayout_10")
        self.label_6 = QtWidgets.QLabel(self.groupBox_3)
        font = QtGui.QFont()
        font.setFamily(".SF NS Text")
        font.setPointSize(13)
        font.setBold(True)
        font.setUnderline(True)
        font.setWeight(75)
        self.label_6.setFont(font)
        self.label_6.setAlignment(QtCore.Qt.AlignCenter)
        self.label_6.setObjectName("label_6")
        self.verticalLayout_10.addWidget(self.label_6)
        self.horizontalLayout_10 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_10.setContentsMargins(-1, -1, -1, 0)
        self.horizontalLayout_10.setObjectName("horizontalLayout_10")
        self.labelBestHostType = QtWidgets.QLabel(self.groupBox_3)
        self.labelBestHostType.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.labelBestHostType.setScaledContents(False)
        self.labelBestHostType.setAlignment(QtCore.Qt.AlignCenter)
        self.labelBestHostType.setWordWrap(False)
        self.labelBestHostType.setObjectName("labelBestHostType")
        self.horizontalLayout_10.addWidget(self.labelBestHostType)
        self.labelBestSnType = QtWidgets.QLabel(self.groupBox_3)
        self.labelBestSnType.setAlignment(QtCore.Qt.AlignCenter)
        self.labelBestSnType.setObjectName("labelBestSnType")
        self.horizontalLayout_10.addWidget(self.labelBestSnType)
        self.labelBestAgeRange = QtWidgets.QLabel(self.groupBox_3)
        self.labelBestAgeRange.setAlignment(QtCore.Qt.AlignCenter)
        self.labelBestAgeRange.setObjectName("labelBestAgeRange")
        self.horizontalLayout_10.addWidget(self.labelBestAgeRange)
        self.verticalLayout_10.addLayout(self.horizontalLayout_10)
        self.horizontalLayout_14 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_14.setObjectName("horizontalLayout_14")
        self.label = QtWidgets.QLabel(self.groupBox_3)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label.setFont(font)
        self.label.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing
                                | QtCore.Qt.AlignVCenter)
        self.label.setObjectName("label")
        self.horizontalLayout_14.addWidget(self.label)
        self.labelBestRedshift = QtWidgets.QLabel(self.groupBox_3)
        self.labelBestRedshift.setObjectName("labelBestRedshift")
        self.horizontalLayout_14.addWidget(self.labelBestRedshift)
        self.verticalLayout_10.addLayout(self.horizontalLayout_14)
        self.horizontalLayout_11 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_11.setContentsMargins(-1, -1, -1, 0)
        self.horizontalLayout_11.setObjectName("horizontalLayout_11")
        self.label_2 = QtWidgets.QLabel(self.groupBox_3)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_2.setFont(font)
        self.label_2.setAlignment(QtCore.Qt.AlignRight
                                  | QtCore.Qt.AlignTrailing
                                  | QtCore.Qt.AlignVCenter)
        self.label_2.setObjectName("label_2")
        self.horizontalLayout_11.addWidget(self.label_2)
        self.labelBestRelProb = QtWidgets.QLabel(self.groupBox_3)
        font = QtGui.QFont()
        font.setPointSize(13)
        font.setBold(False)
        font.setWeight(50)
        self.labelBestRelProb.setFont(font)
        self.labelBestRelProb.setAlignment(QtCore.Qt.AlignLeading
                                           | QtCore.Qt.AlignLeft
                                           | QtCore.Qt.AlignVCenter)
        self.labelBestRelProb.setObjectName("labelBestRelProb")
        self.horizontalLayout_11.addWidget(self.labelBestRelProb)
        self.verticalLayout_10.addLayout(self.horizontalLayout_11)
        self.horizontalLayout_12 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_12.setContentsMargins(-1, 0, -1, -1)
        self.horizontalLayout_12.setObjectName("horizontalLayout_12")
        self.labelRlapWarning = QtWidgets.QLabel(self.groupBox_3)
        font = QtGui.QFont()
        font.setItalic(True)
        self.labelRlapWarning.setFont(font)
        self.labelRlapWarning.setAlignment(QtCore.Qt.AlignCenter)
        self.labelRlapWarning.setObjectName("labelRlapWarning")
        self.horizontalLayout_12.addWidget(self.labelRlapWarning)
        self.labelInconsistentWarning = QtWidgets.QLabel(self.groupBox_3)
        font = QtGui.QFont()
        font.setItalic(True)
        self.labelInconsistentWarning.setFont(font)
        self.labelInconsistentWarning.setAlignment(QtCore.Qt.AlignCenter)
        self.labelInconsistentWarning.setObjectName("labelInconsistentWarning")
        self.horizontalLayout_12.addWidget(self.labelInconsistentWarning)
        self.verticalLayout_10.addLayout(self.horizontalLayout_12)
        self.horizontalLayout_5.addLayout(self.verticalLayout_10)
        self.verticalLayout_8.addLayout(self.horizontalLayout_5)
        self.verticalLayout_2.addWidget(self.groupBox_3)
        self.groupBox_4 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_4.setObjectName("groupBox_4")
        self.verticalLayout_9 = QtWidgets.QVBoxLayout(self.groupBox_4)
        self.verticalLayout_9.setObjectName("verticalLayout_9")
        self.horizontalLayout_9 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_9.setSizeConstraint(
            QtWidgets.QLayout.SetDefaultConstraint)
        self.horizontalLayout_9.setContentsMargins(-1, -1, -1, 5)
        self.horizontalLayout_9.setObjectName("horizontalLayout_9")
        self.label_9 = QtWidgets.QLabel(self.groupBox_4)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_9.setFont(font)
        self.label_9.setObjectName("label_9")
        self.horizontalLayout_9.addWidget(self.label_9)
        self.comboBoxSNType = QtWidgets.QComboBox(self.groupBox_4)
        self.comboBoxSNType.setEditable(False)
        self.comboBoxSNType.setObjectName("comboBoxSNType")
        self.horizontalLayout_9.addWidget(self.comboBoxSNType)
        self.comboBoxAge = QtWidgets.QComboBox(self.groupBox_4)
        self.comboBoxAge.setObjectName("comboBoxAge")
        self.horizontalLayout_9.addWidget(self.comboBoxAge)
        self.comboBoxHost = QtWidgets.QComboBox(self.groupBox_4)
        self.comboBoxHost.setObjectName("comboBoxHost")
        self.horizontalLayout_9.addWidget(self.comboBoxHost)
        self.label_5 = QtWidgets.QLabel(self.groupBox_4)
        self.label_5.setObjectName("label_5")
        self.horizontalLayout_9.addWidget(self.label_5)
        self.lineEditHostFraction = QtWidgets.QLineEdit(self.groupBox_4)
        self.lineEditHostFraction.setObjectName("lineEditHostFraction")
        self.horizontalLayout_9.addWidget(self.lineEditHostFraction)
        self.horizontalSliderHostFraction = QtWidgets.QSlider(self.groupBox_4)
        self.horizontalSliderHostFraction.setMaximum(100)
        self.horizontalSliderHostFraction.setOrientation(QtCore.Qt.Horizontal)
        self.horizontalSliderHostFraction.setObjectName(
            "horizontalSliderHostFraction")
        self.horizontalLayout_9.addWidget(self.horizontalSliderHostFraction)
        self.horizontalLayout_9.setStretch(0, 2)
        self.horizontalLayout_9.setStretch(1, 10)
        self.horizontalLayout_9.setStretch(2, 10)
        self.horizontalLayout_9.setStretch(3, 10)
        self.horizontalLayout_9.setStretch(4, 1)
        self.horizontalLayout_9.setStretch(5, 2)
        self.horizontalLayout_9.setStretch(6, 3)
        self.verticalLayout_9.addLayout(self.horizontalLayout_9)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setContentsMargins(-1, 3, -1, -1)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.labelTemplateName = QtWidgets.QLabel(self.groupBox_4)
        self.labelTemplateName.setMinimumSize(QtCore.QSize(270, 0))
        font = QtGui.QFont()
        font.setPointSize(14)
        font.setItalic(True)
        self.labelTemplateName.setFont(font)
        self.labelTemplateName.setObjectName("labelTemplateName")
        self.horizontalLayout_2.addWidget(self.labelTemplateName)
        self.labelRlapScore = QtWidgets.QLabel(self.groupBox_4)
        self.labelRlapScore.setObjectName("labelRlapScore")
        self.horizontalLayout_2.addWidget(self.labelRlapScore)
        self.pushButtonLeftTemplate = QtWidgets.QPushButton(self.groupBox_4)
        self.pushButtonLeftTemplate.setObjectName("pushButtonLeftTemplate")
        self.horizontalLayout_2.addWidget(self.pushButtonLeftTemplate)
        self.pushButtonRightTemplate = QtWidgets.QPushButton(self.groupBox_4)
        self.pushButtonRightTemplate.setObjectName("pushButtonRightTemplate")
        self.horizontalLayout_2.addWidget(self.pushButtonRightTemplate)
        spacerItem5 = QtWidgets.QSpacerItem(40, 20,
                                            QtWidgets.QSizePolicy.Expanding,
                                            QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem5)
        self.label_4 = QtWidgets.QLabel(self.groupBox_4)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_4.setFont(font)
        self.label_4.setObjectName("label_4")
        self.horizontalLayout_2.addWidget(self.label_4)
        self.lineEditRedshift = QtWidgets.QLineEdit(self.groupBox_4)
        self.lineEditRedshift.setObjectName("lineEditRedshift")
        self.horizontalLayout_2.addWidget(self.lineEditRedshift)
        self.horizontalSliderRedshift = QtWidgets.QSlider(self.groupBox_4)
        self.horizontalSliderRedshift.setMaximum(10000)
        self.horizontalSliderRedshift.setOrientation(QtCore.Qt.Horizontal)
        self.horizontalSliderRedshift.setObjectName("horizontalSliderRedshift")
        self.horizontalLayout_2.addWidget(self.horizontalSliderRedshift)
        self.horizontalLayout_2.setStretch(6, 1)
        self.horizontalLayout_2.setStretch(7, 6)
        self.verticalLayout_9.addLayout(self.horizontalLayout_2)
        self.graphicsView_2 = PlotWidget(self.groupBox_4)
        self.graphicsView_2.setObjectName("graphicsView_2")
        self.verticalLayout_9.addWidget(self.graphicsView_2)
        self.graphicsView = PlotWidget(self.groupBox_4)
        self.graphicsView.setObjectName("graphicsView")
        self.verticalLayout_9.addWidget(self.graphicsView)
        self.verticalLayout_9.setStretch(2, 1)
        self.verticalLayout_9.setStretch(3, 5)
        self.verticalLayout_2.addWidget(self.groupBox_4)
        self.verticalLayout_2.setStretch(0, 3)
        self.verticalLayout_2.setStretch(1, 11)
        self.horizontalLayout_3.addLayout(self.verticalLayout_2)
        self.horizontalLayout_3.setStretch(0, 9)
        self.horizontalLayout_3.setStretch(1, 32)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1205, 22))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusBar = QtWidgets.QStatusBar(MainWindow)
        self.statusBar.setObjectName("statusBar")
        MainWindow.setStatusBar(self.statusBar)

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