Ejemplo n.º 1
0
class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(401, 312)
        self.graphicsView = PlotWidget(Form)
        self.graphicsView.setGeometry(QtCore.QRect(0, 0, 401, 311))
        brush = QtGui.QBrush(QtGui.QColor(203, 242, 255, 10))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.graphicsView.setBackgroundBrush(brush)
        brush = QtGui.QBrush(QtGui.QColor(94, 35, 182))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.graphicsView.setForegroundBrush(brush)
        self.graphicsView.setObjectName("graphicsView")

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

    def retranslateUi(self, Form):
        _translate = QtCore.QCoreApplication.translate
        Form.setWindowTitle(_translate("Form", "Form"))
Ejemplo n.º 2
0
class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1596, 917)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.centralwidget)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.Image1ComboBox = QtWidgets.QComboBox(self.centralwidget)
        self.Image1ComboBox.setObjectName("Image1ComboBox")
        self.gridLayout.addWidget(self.Image1ComboBox, 0, 1, 1, 1)
        self.Browse1 = QtWidgets.QPushButton(self.centralwidget)
        self.Browse1.setObjectName("Browse1")
        self.gridLayout.addWidget(self.Browse1, 0, 0, 1, 1)
        self.Image1Display = PlotWidget(self.centralwidget)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.Image1Display.setBackgroundBrush(brush)
        self.Image1Display.setObjectName("Image1Display")
        self.gridLayout.addWidget(self.Image1Display, 1, 0, 1, 1)
        self.Image1Change = PlotWidget(self.centralwidget)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.Image1Change.setBackgroundBrush(brush)
        self.Image1Change.setObjectName("Image1Change")
        self.gridLayout.addWidget(self.Image1Change, 1, 1, 1, 1)
        self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
        self.gridLayout_4 = QtWidgets.QGridLayout()
        self.gridLayout_4.setObjectName("gridLayout_4")
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.label_9 = QtWidgets.QLabel(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_9.sizePolicy().hasHeightForWidth())
        self.label_9.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setFamily("cmr10")
        font.setPointSize(14)
        self.label_9.setFont(font)
        self.label_9.setAlignment(QtCore.Qt.AlignCenter)
        self.label_9.setObjectName("label_9")
        self.horizontalLayout_3.addWidget(self.label_9)
        self.MixerChoose = QtWidgets.QComboBox(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.MinimumExpanding,
            QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.MixerChoose.sizePolicy().hasHeightForWidth())
        self.MixerChoose.setSizePolicy(sizePolicy)
        self.MixerChoose.setObjectName("MixerChoose")
        self.horizontalLayout_3.addWidget(self.MixerChoose)
        self.gridLayout_4.addLayout(self.horizontalLayout_3, 0, 0, 1, 1)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.label_10 = QtWidgets.QLabel(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_10.sizePolicy().hasHeightForWidth())
        self.label_10.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setFamily("cmr10")
        font.setPointSize(14)
        self.label_10.setFont(font)
        self.label_10.setAlignment(QtCore.Qt.AlignCenter)
        self.label_10.setObjectName("label_10")
        self.horizontalLayout.addWidget(self.label_10)
        self.ImageChoose1 = QtWidgets.QComboBox(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.ImageChoose1.sizePolicy().hasHeightForWidth())
        self.ImageChoose1.setSizePolicy(sizePolicy)
        self.ImageChoose1.setObjectName("ImageChoose1")
        self.horizontalLayout.addWidget(self.ImageChoose1)
        self.Slider1 = QtWidgets.QSlider(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.Slider1.sizePolicy().hasHeightForWidth())
        self.Slider1.setSizePolicy(sizePolicy)
        self.Slider1.setMaximum(100)
        self.Slider1.setOrientation(QtCore.Qt.Horizontal)
        self.Slider1.setObjectName("Slider1")
        self.horizontalLayout.addWidget(self.Slider1)
        self.SliderValue1 = QtWidgets.QLabel(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.SliderValue1.sizePolicy().hasHeightForWidth())
        self.SliderValue1.setSizePolicy(sizePolicy)
        self.SliderValue1.setText("")
        self.SliderValue1.setObjectName("SliderValue1")
        self.horizontalLayout.addWidget(self.SliderValue1)
        self.gridLayout_4.addLayout(self.horizontalLayout, 1, 0, 1, 1)
        self.Component1ComboBox = QtWidgets.QComboBox(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.Component1ComboBox.sizePolicy().hasHeightForWidth())
        self.Component1ComboBox.setSizePolicy(sizePolicy)
        self.Component1ComboBox.setObjectName("Component1ComboBox")
        self.gridLayout_4.addWidget(self.Component1ComboBox, 2, 0, 1, 1)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.label_11 = QtWidgets.QLabel(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_11.sizePolicy().hasHeightForWidth())
        self.label_11.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setFamily("cmr10")
        font.setPointSize(14)
        self.label_11.setFont(font)
        self.label_11.setAlignment(QtCore.Qt.AlignCenter)
        self.label_11.setObjectName("label_11")
        self.horizontalLayout_2.addWidget(self.label_11)
        self.ImageChoose2 = QtWidgets.QComboBox(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.ImageChoose2.sizePolicy().hasHeightForWidth())
        self.ImageChoose2.setSizePolicy(sizePolicy)
        self.ImageChoose2.setObjectName("ImageChoose2")
        self.horizontalLayout_2.addWidget(self.ImageChoose2)
        self.Slider2 = QtWidgets.QSlider(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.Slider2.sizePolicy().hasHeightForWidth())
        self.Slider2.setSizePolicy(sizePolicy)
        self.Slider2.setMaximum(100)
        self.Slider2.setOrientation(QtCore.Qt.Horizontal)
        self.Slider2.setObjectName("Slider2")
        self.horizontalLayout_2.addWidget(self.Slider2)
        self.SliderValue2 = QtWidgets.QLabel(self.centralwidget)
        self.SliderValue2.setText("")
        self.SliderValue2.setObjectName("SliderValue2")
        self.horizontalLayout_2.addWidget(self.SliderValue2)
        self.gridLayout_4.addLayout(self.horizontalLayout_2, 3, 0, 1, 1)
        self.Component2ComboBox = QtWidgets.QComboBox(self.centralwidget)
        self.Component2ComboBox.setObjectName("Component2ComboBox")
        self.gridLayout_4.addWidget(self.Component2ComboBox, 4, 0, 1, 1)
        self.gridLayout_2.addLayout(self.gridLayout_4, 0, 1, 1, 1)
        self.gridLayout_3 = QtWidgets.QGridLayout()
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.Browse2 = QtWidgets.QPushButton(self.centralwidget)
        self.Browse2.setObjectName("Browse2")
        self.gridLayout_3.addWidget(self.Browse2, 0, 0, 1, 1)
        self.Image2ComboBox = QtWidgets.QComboBox(self.centralwidget)
        self.Image2ComboBox.setObjectName("Image2ComboBox")
        self.gridLayout_3.addWidget(self.Image2ComboBox, 0, 1, 1, 1)
        self.Image2Display = PlotWidget(self.centralwidget)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.Image2Display.setBackgroundBrush(brush)
        self.Image2Display.setObjectName("Image2Display")
        self.gridLayout_3.addWidget(self.Image2Display, 1, 0, 1, 1)
        self.Image2Change = PlotWidget(self.centralwidget)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.Image2Change.setBackgroundBrush(brush)
        self.Image2Change.setObjectName("Image2Change")
        self.gridLayout_3.addWidget(self.Image2Change, 1, 1, 1, 1)
        self.gridLayout_2.addLayout(self.gridLayout_3, 1, 0, 1, 1)
        self.gridLayout_5 = QtWidgets.QGridLayout()
        self.gridLayout_5.setObjectName("gridLayout_5")
        self.IgnoreLabel1 = QtWidgets.QLabel(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.IgnoreLabel1.sizePolicy().hasHeightForWidth())
        self.IgnoreLabel1.setSizePolicy(sizePolicy)
        self.IgnoreLabel1.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.IgnoreLabel1.setAlignment(QtCore.Qt.AlignCenter)
        self.IgnoreLabel1.setObjectName("IgnoreLabel1")
        self.gridLayout_5.addWidget(self.IgnoreLabel1, 0, 0, 1, 1)
        self.IgnoreLabel2 = QtWidgets.QLabel(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.IgnoreLabel2.sizePolicy().hasHeightForWidth())
        self.IgnoreLabel2.setSizePolicy(sizePolicy)
        self.IgnoreLabel2.setAlignment(QtCore.Qt.AlignCenter)
        self.IgnoreLabel2.setObjectName("IgnoreLabel2")
        self.gridLayout_5.addWidget(self.IgnoreLabel2, 0, 1, 1, 1)
        self.Output1Image = PlotWidget(self.centralwidget)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.Output1Image.setBackgroundBrush(brush)
        self.Output1Image.setObjectName("Output1Image")
        self.gridLayout_5.addWidget(self.Output1Image, 1, 0, 1, 1)
        self.Output2Image = PlotWidget(self.centralwidget)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.Output2Image.setBackgroundBrush(brush)
        self.Output2Image.setObjectName("Output2Image")
        self.gridLayout_5.addWidget(self.Output2Image, 1, 1, 1, 1)
        self.gridLayout_2.addLayout(self.gridLayout_5, 1, 1, 1, 1)
        self.SizeError = QtWidgets.QLabel(self.centralwidget)
        self.SizeError.setObjectName("SizeError")
        self.gridLayout_2.addWidget(self.SizeError, 2, 0, 1, 1)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1596, 25))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        FourierArr = [
            "Mag,Phase,Real,Imag", "Magnitude", "Phase", "Real", "Imaginary"
        ]
        self.Image2ComboBox.addItems(FourierArr)
        self.Image1ComboBox.addItems(FourierArr)
        OutputCount = ["Output1,Output2", "Output1", "Output2"]
        self.MixerChoose.addItems(OutputCount)
        self.FourierPlusArr = [
            "Mag,Phase,Real,Imag,uniMag,uniPhase", "Magnitude", "Phase",
            "Real", "Imaginary", "UniMagnitude", "UniPhase"
        ]
        self.Component1ComboBox.addItems(self.FourierPlusArr)
        self.Component2ComboBox.addItems(self.FourierPlusArr)
        ImageCount = ["Img1,Img2", "Image1", "Image2"]
        self.ImageChoose1.addItems(ImageCount)
        self.ImageChoose2.addItems(ImageCount)

        self.ImageDisplayArr = [self.Image1Display, self.Image2Display]
        self.SimpleComboBoxArr = [self.Image1ComboBox, self.Image2ComboBox]
        self.SimpleGraphicsViewArr = [self.Image1Change, self.Image2Change]
        self.ComplexComboBoxArr = [
            self.Component1ComboBox, self.Component2ComboBox
        ]
        self.ImageChooseArr = [self.ImageChoose1, self.ImageChoose2]
        self.PhaseArr = ["Phase , UniPhase", "Phase", "UniPhase"]
        self.MagnitudeArr = [
            "Magnitude , UniMagnitude", "Magnitude", "UniMagnitude"
        ]
        self.ChooseRealArr = ["Choose...", "Real"]
        self.ChooseImaginaryArr = ["Choose...", "Imaginary"]
        self.IMG1 = Image()
        self.IMG2 = Image()
        self.ImageArr = [self.IMG1, self.IMG2]
        self.OutputArr = [self.Output1Image, self.Output2Image]
        self.SliderArr = [self.Slider1, self.Slider2]
        self.LabelArr = [self.SliderValue1, self.SliderValue2]

        self.Image1ComboBox.setEnabled(False)
        self.Image2ComboBox.setEnabled(False)
        self.MixerChoose.setEnabled(False)
        self.ImageChoose1.setEnabled(False)
        self.ImageChoose2.setEnabled(False)
        self.Component1ComboBox.setEnabled(False)
        self.Component2ComboBox.setEnabled(False)
        self.Slider1.setEnabled(False)
        self.Slider2.setEnabled(False)

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

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
        self.Browse1.setText(_translate("MainWindow", "Insert Image"))
        self.label_9.setText(_translate("MainWindow", "Mixer Output to"))
        self.label_10.setText(_translate("MainWindow", "Component1"))
        self.SliderValue1.setText(_translate("MainWindow", "%"))
        self.label_11.setText(_translate("MainWindow", "Component2"))
        self.SliderValue2.setText(_translate("MainWindow", "%"))
        self.Browse2.setText(_translate("MainWindow", "Insert Image"))
        self.IgnoreLabel1.setText(_translate("MainWindow", "Output1"))
        self.IgnoreLabel2.setText(_translate("MainWindow", "Output2"))
        self.SizeError.setText(_translate("MainWindow", " "))
        self.Browse1.clicked.connect(lambda: self.InsertImage(0))
        self.Browse2.clicked.connect(lambda: self.InsertImage(1))
        self.Image1ComboBox.activated.connect(lambda: self.ImageComponent(0))
        self.Image2ComboBox.activated.connect(lambda: self.ImageComponent(1))
        self.Component1ComboBox.activated.connect(
            lambda: self.ManageComboBox(0, 1))
        self.Component2ComboBox.activated.connect(
            lambda: self.ManageComboBox(1, 0))
        self.Slider1.valueChanged.connect(lambda: self.SliderDetector(0))
        self.Slider2.valueChanged.connect(lambda: self.SliderDetector(1))
        self.MixerChoose.activated.connect(self.ManageMixing)
        self.ImageChoose1.activated.connect(self.ManageMixing)
        self.ImageChoose2.activated.connect(self.ManageMixing)
        self.Component1ComboBox.activated.connect(self.ManageMixing)
        self.Component2ComboBox.activated.connect(self.ManageMixing)

    def InsertImage(self, i):
        filename = QtWidgets.QFileDialog.getOpenFileName()
        directory = filename[0]
        self.SizeError.setText(" ")
        self.ImageArr[i].SetImage(directory)
        if (self.IMG1.CheckEmpty() or self.IMG2.CheckEmpty()):
            self.SimpleComboBoxArr[i].setEnabled(True)
            self.ImageDisplayArr[i].addItem(self.ImageArr[i].DisplayImage())
            logging.info('Image:{} is added'.format(i + 1))
        else:
            if ((self.IMG1.CheckEqual(self.IMG2))):
                self.SimpleComboBoxArr[i].setEnabled(True)
                self.MixerChoose.setEnabled(True)
                self.ImageChoose1.setEnabled(True)
                self.ImageChoose2.setEnabled(True)
                self.Component1ComboBox.setEnabled(True)
                self.Component2ComboBox.setEnabled(True)
                self.Slider1.setEnabled(True)
                self.Slider2.setEnabled(True)
                self.ImageDisplayArr[i].addItem(
                    self.ImageArr[i].DisplayImage())
                logging.info('Image:{} is added'.format(i + 1))
            else:
                self.ImageArr[i].EmptyImage()
                self.SizeError.setText(
                    "     SIZE ERROR!!! insert image of the same size")
                self.SizeError.setStyleSheet('color: red')
                logging.error(
                    'the user did not insert image of the same size ')

    def SliderDetector(self, i):
        val = self.SliderArr[i].value()
        self.LabelArr[i].setText(str(val) + "%")

    def ImageComponent(self, i):
        if (self.SimpleComboBoxArr[i].currentIndex() == 1):
            self.SimpleGraphicsViewArr[i].addItem(
                self.ImageArr[i].DisplayImageMag())
            logging.info(
                'the user choose Magnitude to view of image {} '.format(i + 1))
        elif (self.SimpleComboBoxArr[i].currentIndex() == 2):
            self.SimpleGraphicsViewArr[i].addItem(
                self.ImageArr[i].DisplayImagePhase())
            logging.info(
                'the user choose Phase to view of image {} '.format(i + 1))
        elif (self.SimpleComboBoxArr[i].currentIndex() == 3):
            self.SimpleGraphicsViewArr[i].addItem(
                self.ImageArr[i].DisplayImageReal())
            logging.info('the user choose Real to view of image {} '.format(i +
                                                                            1))
        elif (self.SimpleComboBoxArr[i].currentIndex() == 4):
            self.SimpleGraphicsViewArr[i].addItem(
                self.ImageArr[i].DisplayImageImag())
            logging.info(
                'the user choose Imaginary to view of image {} '.format(i + 1))

    def ManageMixing(self):
        if ((self.ImageChooseArr[0].currentIndex() == 0
             or self.ImageChooseArr[1].currentIndex() == 0)
                or (self.ComplexComboBoxArr[0].currentIndex() == 0
                    or self.ComplexComboBoxArr[1].currentIndex() == 0)
                or (self.MixerChoose.currentIndex() == 0)):
            pass
        else:
            if (self.MixerChoose.currentIndex() == 1):
                if ((self.ImageChoose1.currentIndex() == 1
                     and self.ImageChoose2.currentIndex() == 2)):
                    self.ChooseMixer(0, 0, 1)
                elif ((self.ImageChoose1.currentIndex() == 2
                       and self.ImageChoose2.currentIndex() == 1)):
                    self.ChooseMixer(0, 1, 0)
                elif ((self.ImageChoose1.currentIndex() == 1
                       and self.ImageChoose2.currentIndex() == 1)):
                    self.ChooseMixer(0, 0, 0)
                elif ((self.ImageChoose1.currentIndex() == 2
                       and self.ImageChoose2.currentIndex() == 2)):
                    self.ChooseMixer(0, 1, 1)
            elif (self.MixerChoose.currentIndex() == 2):
                if ((self.ImageChoose1.currentIndex() == 1
                     and self.ImageChoose2.currentIndex() == 2)):
                    self.ChooseMixer(1, 0, 1)
                elif ((self.ImageChoose1.currentIndex() == 2
                       and self.ImageChoose2.currentIndex() == 1)):
                    self.ChooseMixer(1, 1, 0)
                elif ((self.ImageChoose1.currentIndex() == 1
                       and self.ImageChoose2.currentIndex() == 1)):
                    self.ChooseMixer(1, 0, 0)
                elif ((self.ImageChoose1.currentIndex() == 2
                       and self.ImageChoose2.currentIndex() == 2)):
                    self.ChooseMixer(1, 1, 1)

    def ManageComboBox(self, i1, i2):
        if (self.ComplexComboBoxArr[i1].currentIndex() == 0):
            self.ComplexComboBoxArr[i1].clear()
            self.ComplexComboBoxArr[i1].addItems(self.FourierPlusArr)
            self.ComplexComboBoxArr[i2].clear()
            self.ComplexComboBoxArr[i2].addItems(self.FourierPlusArr)
            logging.info(
                'the user returned the two combobox to their intial state')
        else:
            if (self.ComplexComboBoxArr[i2].currentIndex() == 0
                    or self.ComplexComboBoxArr[i2].count() < 7):
                if (self.ComplexComboBoxArr[i1].currentIndex() == 1
                        or self.ComplexComboBoxArr[i1].currentIndex() == 5):
                    self.ComplexComboBoxArr[i2].clear()
                    self.ComplexComboBoxArr[i2].addItems(self.PhaseArr)
                    # logging.info('the user choose Magnitude/UniMagnitue of image {} to mix with Phase/UniPhase of image {}'.format(i1+1,i2+1))
                elif (self.ComplexComboBoxArr[i1].currentIndex() == 2
                      or self.ComplexComboBoxArr[i1].currentIndex() == 6):
                    self.ComplexComboBoxArr[i2].clear()
                    self.ComplexComboBoxArr[i2].addItems(self.MagnitudeArr)
                    # logging.info('the user choose Phase/UniPhase of image {} to mix with Magnitude/UniMagnitue of image {}'.format(i1+1,i2+1))
                elif (self.ComplexComboBoxArr[i1].currentIndex() == 3):
                    self.ComplexComboBoxArr[i2].clear()
                    self.ComplexComboBoxArr[i2].addItems(
                        self.ChooseImaginaryArr)
                    # logging.info('the user choose the real part of image {} to mix with the imaginary part of image {}'.format(i1+1,i2+1))
                elif (self.ComplexComboBoxArr[i1].currentIndex() == 4):
                    self.ComplexComboBoxArr[i2].clear()
                    self.ComplexComboBoxArr[i2].addItems(self.ChooseRealArr)
                    # logging.info('the user choose the imaginary part of image {} to mix with the real part of image {}'.format(i1+1,i2+1))

    def ChooseMixer(self, i, i1, i2):
        W1 = self.Slider1.value()
        W2 = self.Slider2.value()
        W1 = (W1 / 100)
        W2 = (W2 / 100)
        ViewValue = pg.ImageItem()
        if (str(self.Component1ComboBox.currentText()) == "Magnitude"):
            if (str(self.Component2ComboBox.currentText()) == "Phase"):
                ViewValue = self.ImageArr[i1].MixingMagPhase(
                    self.ImageArr[i2], W1, W2)
                logging.info(
                    'the user choose to mix {} %, of the magnitude of image {} with {} %, of the phase of image {}'
                    .format(W1 * 100, i1 + 1, W2 * 100, i2 + 1))
            elif (str(self.Component1ComboBox.currentText()) == "UniPhase"):
                ViewValue = self.ImageArr[i1].MixingMagPhase(
                    self.ImageArr[i2], W1, W2)
                logging.info(
                    'the user choose to mix {} %, of the magnitude of image {} with {} %, of the uniphase of image {}'
                    .format(W1 * 100, i1 + 1, W2 * 100, i2 + 1))
        elif (str(self.Component1ComboBox.currentText()) == "Phase"):
            if (str(self.Component2ComboBox.currentText()) == "Magnitude"):
                ViewValue = self.ImageArr[i2].MixingMagPhase(
                    self.ImageArr[i1], W2, W1)
                logging.info(
                    'the user choose to mix {} %, of the phase of image {} with {} %, of the magnitude of image {}'
                    .format(W1 * 100, i1 + 1, W2 * 100, i2 + 1))
            elif (str(
                    self.Component1ComboBox.currentText()) == "UniMagnitude"):
                ViewValue = self.ImageArr[i2].MixingMagPhase(
                    self.ImageArr[i1], W2, W1)
                logging.info(
                    'the user choose to mix {} %, of the phase of image {} with {} %, of the unimagnitude of image {}'
                    .format(W1 * 100, i1 + 1, W2 * 100, i2 + 1))
        elif (str(self.Component1ComboBox.currentText()) == "UniMagnitude"):
            if (str(self.Component2ComboBox.currentText()) == "Phase"):
                ViewValue = self.ImageArr[i1].MixingMagPhase(
                    self.ImageArr[i2], W1, W2)
                logging.info(
                    'the user choose to mix {} %, of the unimagnitude of image {} with {} %, of the phase of image {}'
                    .format(W1 * 100, i1 + 1, W2 * 100, i2 + 1))
            elif (str(self.Component1ComboBox.currentText()) == "UniPhase"):
                ViewValue = self.ImageArr[i1].MixingMagPhase(
                    self.ImageArr[i2], W1, W2)
                logging.info(
                    'the user choose to mix {} %, of the unimagnitude of image {} with {} %, of the uniphase of image {}'
                    .format(W1 * 100, i1 + 1, W2 * 100, i2 + 1))
        elif (str(self.Component1ComboBox.currentText()) == "UniPhase"):
            if (str(self.Component2ComboBox.currentText()) == "Magnitude"):
                ViewValue = self.ImageArr[i2].MixingMagPhase(
                    self.ImageArr[i1], W2, W1)
                logging.info(
                    'the user choose to mix {} %, of the uniphase of image {} with {} %, of the magnitude of image {}'
                    .format(W1 * 100, i1 + 1, W2 * 100, i2 + 1))
            elif (str(
                    self.Component1ComboBox.currentText()) == "UniMagnitude"):
                ViewValue = self.ImageArr[i2].MixingMagPhase(
                    self.ImageArr[i1], W2, W1)
                logging.info(
                    'the user choose to mix {} %, of the uniphase of image {} with {} %, of the unimagnitude of image {}'
                    .format(W1 * 100, i1 + 1, W2 * 100, i2 + 1))
        elif (str(self.Component1ComboBox.currentText()) == "Real"):
            ViewValue = self.ImageArr[i1].MixingMagPhase(
                self.ImageArr[i2], W1, W2)
            logging.info(
                'the user choose to mix {} %, of the real part of image {} with {} %, of the imaginary part of image {}'
                .format(W1 * 100, i1 + 1, W2 * 100, i2 + 1))
        elif (str(self.Component1ComboBox.currentText()) == "Imaginary"):
            ViewValue = self.ImageArr[i2].MixingMagPhase(
                self.ImageArr[i1], W2, W1)
            logging.info(
                'the user choose to mix {} %, of the imaginary part of image {} with {} %, of the real part of image {}'
                .format(W1 * 100, i1 + 1, W2 * 100, i2 + 1))
        self.OutputArr[i].addItem(ViewValue)
        logging.info('output displayed in output {} port '.format(i + 1))
Ejemplo n.º 3
0
class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1017, 825)
        font = QtGui.QFont()
        font.setFamily("Consolas")
        MainWindow.setFont(font)
        MainWindow.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
        self.tabWidget.setGeometry(QtCore.QRect(160, 10, 831, 761))
        font = QtGui.QFont()
        font.setPointSize(12)
        self.tabWidget.setFont(font)
        self.tabWidget.setTabPosition(QtWidgets.QTabWidget.North)
        self.tabWidget.setTabShape(QtWidgets.QTabWidget.Rounded)
        self.tabWidget.setIconSize(QtCore.QSize(16, 16))
        self.tabWidget.setObjectName("tabWidget")
        self.tab = QtWidgets.QWidget()
        self.tab.setObjectName("tab")
        self.toolBox = QtWidgets.QToolBox(self.tab)
        self.toolBox.setGeometry(QtCore.QRect(10, 9, 801, 711))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.toolBox.sizePolicy().hasHeightForWidth())
        self.toolBox.setSizePolicy(sizePolicy)
        self.toolBox.setMinimumSize(QtCore.QSize(801, 0))
        self.toolBox.setLineWidth(1)
        self.toolBox.setObjectName("toolBox")
        self.page = QtWidgets.QWidget()
        self.page.setGeometry(QtCore.QRect(0, 0, 801, 615))
        self.page.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.page.setObjectName("page")
        self.layoutWidget = QtWidgets.QWidget(self.page)
        self.layoutWidget.setGeometry(QtCore.QRect(11, 0, 781, 611))
        self.layoutWidget.setObjectName("layoutWidget")
        self.gridLayout = QtWidgets.QGridLayout(self.layoutWidget)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setObjectName("gridLayout")
        self.CurMean = QtWidgets.QLabel(self.layoutWidget)
        self.CurMean.setEnabled(True)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.CurMean.sizePolicy().hasHeightForWidth())
        self.CurMean.setSizePolicy(sizePolicy)
        self.CurMean.setMinimumSize(QtCore.QSize(10, 10))
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        self.CurMean.setFont(font)
        self.CurMean.setObjectName("CurMean")
        self.gridLayout.addWidget(self.CurMean, 0, 0, 1, 1)
        self.CurMeangraphicsView = PlotWidget(self.layoutWidget)
        self.CurMeangraphicsView.setEnabled(True)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.CurMeangraphicsView.sizePolicy().hasHeightForWidth())
        self.CurMeangraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.CurMeangraphicsView.setBackgroundBrush(brush)
        self.CurMeangraphicsView.setViewportUpdateMode(
            QtWidgets.QGraphicsView.MinimalViewportUpdate)
        self.CurMeangraphicsView.setObjectName("CurMeangraphicsView")
        self.gridLayout.addWidget(self.CurMeangraphicsView, 0, 1, 1, 1)
        self.CurStd = QtWidgets.QLabel(self.layoutWidget)
        self.CurStd.setMinimumSize(QtCore.QSize(41, 0))
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        self.CurStd.setFont(font)
        self.CurStd.setObjectName("CurStd")
        self.gridLayout.addWidget(self.CurStd, 1, 0, 1, 1)
        self.CurStdgraphicsView = PlotWidget(self.layoutWidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.CurStdgraphicsView.sizePolicy().hasHeightForWidth())
        self.CurStdgraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.CurStdgraphicsView.setBackgroundBrush(brush)
        self.CurStdgraphicsView.setObjectName("CurStdgraphicsView")
        self.gridLayout.addWidget(self.CurStdgraphicsView, 1, 1, 1, 1)
        self.CurMax = QtWidgets.QLabel(self.layoutWidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.CurMax.sizePolicy().hasHeightForWidth())
        self.CurMax.setSizePolicy(sizePolicy)
        self.CurMax.setMinimumSize(QtCore.QSize(41, 0))
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        self.CurMax.setFont(font)
        self.CurMax.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft
                                 | QtCore.Qt.AlignVCenter)
        self.CurMax.setObjectName("CurMax")
        self.gridLayout.addWidget(self.CurMax, 2, 0, 1, 1)
        self.CurMaxgraphicsView = PlotWidget(self.layoutWidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.CurMaxgraphicsView.sizePolicy().hasHeightForWidth())
        self.CurMaxgraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.CurMaxgraphicsView.setBackgroundBrush(brush)
        self.CurMaxgraphicsView.setObjectName("CurMaxgraphicsView")
        self.gridLayout.addWidget(self.CurMaxgraphicsView, 2, 1, 1, 1)
        self.CurMin = QtWidgets.QLabel(self.layoutWidget)
        self.CurMin.setMinimumSize(QtCore.QSize(41, 0))
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        self.CurMin.setFont(font)
        self.CurMin.setObjectName("CurMin")
        self.gridLayout.addWidget(self.CurMin, 3, 0, 1, 1)
        self.CurMingraphicsView = PlotWidget(self.layoutWidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.CurMingraphicsView.sizePolicy().hasHeightForWidth())
        self.CurMingraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.CurMingraphicsView.setBackgroundBrush(brush)
        self.CurMingraphicsView.setObjectName("CurMingraphicsView")
        self.gridLayout.addWidget(self.CurMingraphicsView, 3, 1, 1, 1)
        self.toolBox.addItem(self.page, "")
        self.page_2 = QtWidgets.QWidget()
        self.page_2.setGeometry(QtCore.QRect(0, 0, 100, 30))
        self.page_2.setObjectName("page_2")
        self.layoutWidget1 = QtWidgets.QWidget(self.page_2)
        self.layoutWidget1.setGeometry(QtCore.QRect(10, 0, 781, 611))
        self.layoutWidget1.setObjectName("layoutWidget1")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.layoutWidget1)
        self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.CurPeakMean = QtWidgets.QLabel(self.layoutWidget1)
        self.CurPeakMean.setMinimumSize(QtCore.QSize(81, 0))
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        self.CurPeakMean.setFont(font)
        self.CurPeakMean.setObjectName("CurPeakMean")
        self.gridLayout_2.addWidget(self.CurPeakMean, 0, 0, 1, 1)
        self.CurPeakMeangraphicsView = PlotWidget(self.layoutWidget1)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.CurPeakMeangraphicsView.sizePolicy().hasHeightForWidth())
        self.CurPeakMeangraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.CurPeakMeangraphicsView.setBackgroundBrush(brush)
        self.CurPeakMeangraphicsView.setObjectName("CurPeakMeangraphicsView")
        self.gridLayout_2.addWidget(self.CurPeakMeangraphicsView, 0, 1, 1, 1)
        self.CurPeakStd = QtWidgets.QLabel(self.layoutWidget1)
        self.CurPeakStd.setMinimumSize(QtCore.QSize(54, 0))
        self.CurPeakStd.setObjectName("CurPeakStd")
        self.gridLayout_2.addWidget(self.CurPeakStd, 1, 0, 1, 1)
        self.CurPeakStdgraphicsView = PlotWidget(self.layoutWidget1)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.CurPeakStdgraphicsView.sizePolicy().hasHeightForWidth())
        self.CurPeakStdgraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.CurPeakStdgraphicsView.setBackgroundBrush(brush)
        self.CurPeakStdgraphicsView.setObjectName("CurPeakStdgraphicsView")
        self.gridLayout_2.addWidget(self.CurPeakStdgraphicsView, 1, 1, 1, 1)
        self.CurPeakCount = QtWidgets.QLabel(self.layoutWidget1)
        self.CurPeakCount.setMinimumSize(QtCore.QSize(41, 0))
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        self.CurPeakCount.setFont(font)
        self.CurPeakCount.setObjectName("CurPeakCount")
        self.gridLayout_2.addWidget(self.CurPeakCount, 2, 0, 1, 1)
        self.CurPeakCountgraphicsView = PlotWidget(self.layoutWidget1)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.CurPeakCountgraphicsView.sizePolicy().hasHeightForWidth())
        self.CurPeakCountgraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.CurPeakCountgraphicsView.setBackgroundBrush(brush)
        self.CurPeakCountgraphicsView.setObjectName("CurPeakCountgraphicsView")
        self.gridLayout_2.addWidget(self.CurPeakCountgraphicsView, 2, 1, 1, 1)
        self.CurPeakWidthMean = QtWidgets.QLabel(self.layoutWidget1)
        self.CurPeakWidthMean.setMinimumSize(QtCore.QSize(41, 0))
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        self.CurPeakWidthMean.setFont(font)
        self.CurPeakWidthMean.setObjectName("CurPeakWidthMean")
        self.gridLayout_2.addWidget(self.CurPeakWidthMean, 3, 0, 1, 1)
        self.CurPeakWidthMeangraphicsView = PlotWidget(self.layoutWidget1)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.CurPeakWidthMeangraphicsView.sizePolicy().hasHeightForWidth())
        self.CurPeakWidthMeangraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.CurPeakWidthMeangraphicsView.setBackgroundBrush(brush)
        self.CurPeakWidthMeangraphicsView.setObjectName(
            "CurPeakWidthMeangraphicsView")
        self.gridLayout_2.addWidget(self.CurPeakWidthMeangraphicsView, 3, 1, 1,
                                    1)
        self.toolBox.addItem(self.page_2, "")
        self.page_3 = QtWidgets.QWidget()
        self.page_3.setGeometry(QtCore.QRect(0, 0, 100, 30))
        self.page_3.setObjectName("page_3")
        self.layoutWidget2 = QtWidgets.QWidget(self.page_3)
        self.layoutWidget2.setGeometry(QtCore.QRect(10, 0, 781, 601))
        self.layoutWidget2.setObjectName("layoutWidget2")
        self.gridLayout_3 = QtWidgets.QGridLayout(self.layoutWidget2)
        self.gridLayout_3.setContentsMargins(0, 0, 0, 0)
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.CurPeakWidthStd = QtWidgets.QLabel(self.layoutWidget2)
        self.CurPeakWidthStd.setMinimumSize(QtCore.QSize(41, 0))
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        self.CurPeakWidthStd.setFont(font)
        self.CurPeakWidthStd.setObjectName("CurPeakWidthStd")
        self.gridLayout_3.addWidget(self.CurPeakWidthStd, 0, 0, 1, 1)
        self.CurPeakWidthStdgraphicsView = PlotWidget(self.layoutWidget2)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.CurPeakWidthStdgraphicsView.sizePolicy().hasHeightForWidth())
        self.CurPeakWidthStdgraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.CurPeakWidthStdgraphicsView.setBackgroundBrush(brush)
        self.CurPeakWidthStdgraphicsView.setObjectName(
            "CurPeakWidthStdgraphicsView")
        self.gridLayout_3.addWidget(self.CurPeakWidthStdgraphicsView, 0, 1, 1,
                                    1)
        self.CurPeakGapMean = QtWidgets.QLabel(self.layoutWidget2)
        self.CurPeakGapMean.setMinimumSize(QtCore.QSize(41, 0))
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        self.CurPeakGapMean.setFont(font)
        self.CurPeakGapMean.setObjectName("CurPeakGapMean")
        self.gridLayout_3.addWidget(self.CurPeakGapMean, 1, 0, 1, 1)
        self.CurPeakGapMeangraphicsView = PlotWidget(self.layoutWidget2)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.CurPeakGapMeangraphicsView.sizePolicy().hasHeightForWidth())
        self.CurPeakGapMeangraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.CurPeakGapMeangraphicsView.setBackgroundBrush(brush)
        self.CurPeakGapMeangraphicsView.setObjectName(
            "CurPeakGapMeangraphicsView")
        self.gridLayout_3.addWidget(self.CurPeakGapMeangraphicsView, 1, 1, 1,
                                    1)
        self.CurPeakGapStd = QtWidgets.QLabel(self.layoutWidget2)
        self.CurPeakGapStd.setMinimumSize(QtCore.QSize(81, 0))
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        self.CurPeakGapStd.setFont(font)
        self.CurPeakGapStd.setObjectName("CurPeakGapStd")
        self.gridLayout_3.addWidget(self.CurPeakGapStd, 2, 0, 1, 1)
        self.CurPeakGapStdgraphicsView = PlotWidget(self.layoutWidget2)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.CurPeakGapStdgraphicsView.sizePolicy().hasHeightForWidth())
        self.CurPeakGapStdgraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.CurPeakGapStdgraphicsView.setBackgroundBrush(brush)
        self.CurPeakGapStdgraphicsView.setObjectName(
            "CurPeakGapStdgraphicsView")
        self.gridLayout_3.addWidget(self.CurPeakGapStdgraphicsView, 2, 1, 1, 1)
        self.toolBox.addItem(self.page_3, "")
        self.tabWidget.addTab(self.tab, "")
        self.tab_2 = QtWidgets.QWidget()
        self.tab_2.setObjectName("tab_2")
        self.toolBox_2 = QtWidgets.QToolBox(self.tab_2)
        self.toolBox_2.setGeometry(QtCore.QRect(10, 9, 801, 711))
        self.toolBox_2.setMinimumSize(QtCore.QSize(801, 0))
        self.toolBox_2.setObjectName("toolBox_2")
        self.page_4 = QtWidgets.QWidget()
        self.page_4.setGeometry(QtCore.QRect(0, 0, 801, 615))
        self.page_4.setObjectName("page_4")
        self.layoutWidget3 = QtWidgets.QWidget(self.page_4)
        self.layoutWidget3.setGeometry(QtCore.QRect(10, 0, 781, 611))
        self.layoutWidget3.setObjectName("layoutWidget3")
        self.gridLayout_4 = QtWidgets.QGridLayout(self.layoutWidget3)
        self.gridLayout_4.setContentsMargins(0, 0, 0, 0)
        self.gridLayout_4.setObjectName("gridLayout_4")
        self.VolMean = QtWidgets.QLabel(self.layoutWidget3)
        self.VolMean.setMinimumSize(QtCore.QSize(41, 0))
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        self.VolMean.setFont(font)
        self.VolMean.setObjectName("VolMean")
        self.gridLayout_4.addWidget(self.VolMean, 0, 0, 1, 1)
        self.VolMeangraphicsView = PlotWidget(self.layoutWidget3)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.VolMeangraphicsView.sizePolicy().hasHeightForWidth())
        self.VolMeangraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.VolMeangraphicsView.setBackgroundBrush(brush)
        self.VolMeangraphicsView.setObjectName("VolMeangraphicsView")
        self.gridLayout_4.addWidget(self.VolMeangraphicsView, 0, 1, 1, 1)
        self.VolStd = QtWidgets.QLabel(self.layoutWidget3)
        self.VolStd.setMinimumSize(QtCore.QSize(41, 0))
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        self.VolStd.setFont(font)
        self.VolStd.setObjectName("VolStd")
        self.gridLayout_4.addWidget(self.VolStd, 1, 0, 1, 1)
        self.VolStdgraphicsView = PlotWidget(self.layoutWidget3)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.VolStdgraphicsView.sizePolicy().hasHeightForWidth())
        self.VolStdgraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.VolStdgraphicsView.setBackgroundBrush(brush)
        self.VolStdgraphicsView.setObjectName("VolStdgraphicsView")
        self.gridLayout_4.addWidget(self.VolStdgraphicsView, 1, 1, 1, 1)
        self.VolMax = QtWidgets.QLabel(self.layoutWidget3)
        self.VolMax.setMinimumSize(QtCore.QSize(41, 0))
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        self.VolMax.setFont(font)
        self.VolMax.setObjectName("VolMax")
        self.gridLayout_4.addWidget(self.VolMax, 2, 0, 1, 1)
        self.VolMaxgraphicsView = PlotWidget(self.layoutWidget3)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.VolMaxgraphicsView.sizePolicy().hasHeightForWidth())
        self.VolMaxgraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.VolMaxgraphicsView.setBackgroundBrush(brush)
        self.VolMaxgraphicsView.setObjectName("VolMaxgraphicsView")
        self.gridLayout_4.addWidget(self.VolMaxgraphicsView, 2, 1, 1, 1)
        self.VolMin = QtWidgets.QLabel(self.layoutWidget3)
        self.VolMin.setMinimumSize(QtCore.QSize(41, 0))
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        self.VolMin.setFont(font)
        self.VolMin.setObjectName("VolMin")
        self.gridLayout_4.addWidget(self.VolMin, 3, 0, 1, 1)
        self.VolMingraphicsView = PlotWidget(self.layoutWidget3)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.VolMingraphicsView.sizePolicy().hasHeightForWidth())
        self.VolMingraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.VolMingraphicsView.setBackgroundBrush(brush)
        self.VolMingraphicsView.setObjectName("VolMingraphicsView")
        self.gridLayout_4.addWidget(self.VolMingraphicsView, 3, 1, 1, 1)
        self.toolBox_2.addItem(self.page_4, "")
        self.page_5 = QtWidgets.QWidget()
        self.page_5.setGeometry(QtCore.QRect(0, 0, 100, 30))
        self.page_5.setObjectName("page_5")
        self.layoutWidget4 = QtWidgets.QWidget(self.page_5)
        self.layoutWidget4.setGeometry(QtCore.QRect(10, 0, 781, 611))
        self.layoutWidget4.setObjectName("layoutWidget4")
        self.gridLayout_5 = QtWidgets.QGridLayout(self.layoutWidget4)
        self.gridLayout_5.setContentsMargins(0, 0, 0, 0)
        self.gridLayout_5.setObjectName("gridLayout_5")
        self.VolPeakMean = QtWidgets.QLabel(self.layoutWidget4)
        self.VolPeakMean.setMinimumSize(QtCore.QSize(81, 0))
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        self.VolPeakMean.setFont(font)
        self.VolPeakMean.setObjectName("VolPeakMean")
        self.gridLayout_5.addWidget(self.VolPeakMean, 0, 0, 1, 1)
        self.VolPeakMeangraphicsView = PlotWidget(self.layoutWidget4)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.VolPeakMeangraphicsView.sizePolicy().hasHeightForWidth())
        self.VolPeakMeangraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.VolPeakMeangraphicsView.setBackgroundBrush(brush)
        self.VolPeakMeangraphicsView.setObjectName("VolPeakMeangraphicsView")
        self.gridLayout_5.addWidget(self.VolPeakMeangraphicsView, 0, 1, 1, 1)
        self.VolPeakStd = QtWidgets.QLabel(self.layoutWidget4)
        self.VolPeakStd.setMinimumSize(QtCore.QSize(54, 0))
        self.VolPeakStd.setObjectName("VolPeakStd")
        self.gridLayout_5.addWidget(self.VolPeakStd, 1, 0, 1, 1)
        self.VolPeakStdgraphicsView = PlotWidget(self.layoutWidget4)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.VolPeakStdgraphicsView.sizePolicy().hasHeightForWidth())
        self.VolPeakStdgraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.VolPeakStdgraphicsView.setBackgroundBrush(brush)
        self.VolPeakStdgraphicsView.setObjectName("VolPeakStdgraphicsView")
        self.gridLayout_5.addWidget(self.VolPeakStdgraphicsView, 1, 1, 1, 1)
        self.VolPeakCount = QtWidgets.QLabel(self.layoutWidget4)
        self.VolPeakCount.setMinimumSize(QtCore.QSize(41, 0))
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        self.VolPeakCount.setFont(font)
        self.VolPeakCount.setObjectName("VolPeakCount")
        self.gridLayout_5.addWidget(self.VolPeakCount, 2, 0, 1, 1)
        self.VolPeakCountgraphicsView = PlotWidget(self.layoutWidget4)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.VolPeakCountgraphicsView.sizePolicy().hasHeightForWidth())
        self.VolPeakCountgraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.VolPeakCountgraphicsView.setBackgroundBrush(brush)
        self.VolPeakCountgraphicsView.setObjectName("VolPeakCountgraphicsView")
        self.gridLayout_5.addWidget(self.VolPeakCountgraphicsView, 2, 1, 1, 1)
        self.VolPeakWidthMean = QtWidgets.QLabel(self.layoutWidget4)
        self.VolPeakWidthMean.setMinimumSize(QtCore.QSize(41, 0))
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        self.VolPeakWidthMean.setFont(font)
        self.VolPeakWidthMean.setObjectName("VolPeakWidthMean")
        self.gridLayout_5.addWidget(self.VolPeakWidthMean, 3, 0, 1, 1)
        self.VolPeakWidthMeangraphicsView = PlotWidget(self.layoutWidget4)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.VolPeakWidthMeangraphicsView.sizePolicy().hasHeightForWidth())
        self.VolPeakWidthMeangraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.VolPeakWidthMeangraphicsView.setBackgroundBrush(brush)
        self.VolPeakWidthMeangraphicsView.setObjectName(
            "VolPeakWidthMeangraphicsView")
        self.gridLayout_5.addWidget(self.VolPeakWidthMeangraphicsView, 3, 1, 1,
                                    1)
        self.toolBox_2.addItem(self.page_5, "")
        self.page_6 = QtWidgets.QWidget()
        self.page_6.setGeometry(QtCore.QRect(0, 0, 100, 30))
        self.page_6.setObjectName("page_6")
        self.layoutWidget5 = QtWidgets.QWidget(self.page_6)
        self.layoutWidget5.setGeometry(QtCore.QRect(10, 0, 781, 601))
        self.layoutWidget5.setObjectName("layoutWidget5")
        self.gridLayout_6 = QtWidgets.QGridLayout(self.layoutWidget5)
        self.gridLayout_6.setContentsMargins(0, 0, 0, 0)
        self.gridLayout_6.setObjectName("gridLayout_6")
        self.VolPeakWidthStd = QtWidgets.QLabel(self.layoutWidget5)
        self.VolPeakWidthStd.setMinimumSize(QtCore.QSize(41, 0))
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        self.VolPeakWidthStd.setFont(font)
        self.VolPeakWidthStd.setObjectName("VolPeakWidthStd")
        self.gridLayout_6.addWidget(self.VolPeakWidthStd, 0, 0, 1, 1)
        self.VolPeakWidthStdgraphicsView = PlotWidget(self.layoutWidget5)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.VolPeakWidthStdgraphicsView.sizePolicy().hasHeightForWidth())
        self.VolPeakWidthStdgraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.VolPeakWidthStdgraphicsView.setBackgroundBrush(brush)
        self.VolPeakWidthStdgraphicsView.setObjectName(
            "VolPeakWidthStdgraphicsView")
        self.gridLayout_6.addWidget(self.VolPeakWidthStdgraphicsView, 0, 1, 1,
                                    1)
        self.VolPeakGapMean = QtWidgets.QLabel(self.layoutWidget5)
        self.VolPeakGapMean.setMinimumSize(QtCore.QSize(41, 0))
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        self.VolPeakGapMean.setFont(font)
        self.VolPeakGapMean.setObjectName("VolPeakGapMean")
        self.gridLayout_6.addWidget(self.VolPeakGapMean, 1, 0, 1, 1)
        self.VolPeakGapMeangraphicsView = PlotWidget(self.layoutWidget5)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.VolPeakGapMeangraphicsView.sizePolicy().hasHeightForWidth())
        self.VolPeakGapMeangraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.VolPeakGapMeangraphicsView.setBackgroundBrush(brush)
        self.VolPeakGapMeangraphicsView.setObjectName(
            "VolPeakGapMeangraphicsView")
        self.gridLayout_6.addWidget(self.VolPeakGapMeangraphicsView, 1, 1, 1,
                                    1)
        self.VolPeakGapStd = QtWidgets.QLabel(self.layoutWidget5)
        self.VolPeakGapStd.setMinimumSize(QtCore.QSize(81, 0))
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        self.VolPeakGapStd.setFont(font)
        self.VolPeakGapStd.setObjectName("VolPeakGapStd")
        self.gridLayout_6.addWidget(self.VolPeakGapStd, 2, 0, 1, 1)
        self.VolPeakGapStdgraphicsView = PlotWidget(self.layoutWidget5)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.VolPeakGapStdgraphicsView.sizePolicy().hasHeightForWidth())
        self.VolPeakGapStdgraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.VolPeakGapStdgraphicsView.setBackgroundBrush(brush)
        self.VolPeakGapStdgraphicsView.setObjectName(
            "VolPeakGapStdgraphicsView")
        self.gridLayout_6.addWidget(self.VolPeakGapStdgraphicsView, 2, 1, 1, 1)
        self.toolBox_2.addItem(self.page_6, "")
        self.tabWidget.addTab(self.tab_2, "")
        self.tab_3 = QtWidgets.QWidget()
        self.tab_3.setObjectName("tab_3")
        self.layoutWidget6 = QtWidgets.QWidget(self.tab_3)
        self.layoutWidget6.setGeometry(QtCore.QRect(20, 401, 641, 94))
        self.layoutWidget6.setObjectName("layoutWidget6")
        self.gridLayout_7 = QtWidgets.QGridLayout(self.layoutWidget6)
        self.gridLayout_7.setContentsMargins(0, 0, 0, 0)
        self.gridLayout_7.setObjectName("gridLayout_7")
        self.Class1radioButton = QtWidgets.QRadioButton(self.layoutWidget6)
        font = QtGui.QFont()
        font.setPointSize(14)
        self.Class1radioButton.setFont(font)
        self.Class1radioButton.setObjectName("Class1radioButton")
        self.gridLayout_7.addWidget(self.Class1radioButton, 1, 0, 1, 1)
        self.Class2radioButton = QtWidgets.QRadioButton(self.layoutWidget6)
        font = QtGui.QFont()
        font.setPointSize(14)
        self.Class2radioButton.setFont(font)
        self.Class2radioButton.setObjectName("Class2radioButton")
        self.gridLayout_7.addWidget(self.Class2radioButton, 1, 1, 1, 1)
        self.Class3radioButton = QtWidgets.QRadioButton(self.layoutWidget6)
        font = QtGui.QFont()
        font.setPointSize(14)
        self.Class3radioButton.setFont(font)
        self.Class3radioButton.setObjectName("Class3radioButton")
        self.gridLayout_7.addWidget(self.Class3radioButton, 1, 2, 1, 1)
        self.Class4radioButton = QtWidgets.QRadioButton(self.layoutWidget6)
        font = QtGui.QFont()
        font.setPointSize(14)
        self.Class4radioButton.setFont(font)
        self.Class4radioButton.setObjectName("Class4radioButton")
        self.gridLayout_7.addWidget(self.Class4radioButton, 2, 0, 1, 1)
        self.Class5radioButton = QtWidgets.QRadioButton(self.layoutWidget6)
        font = QtGui.QFont()
        font.setPointSize(14)
        self.Class5radioButton.setFont(font)
        self.Class5radioButton.setObjectName("Class5radioButton")
        self.gridLayout_7.addWidget(self.Class5radioButton, 2, 1, 1, 1)
        self.Class6radioButton = QtWidgets.QRadioButton(self.layoutWidget6)
        font = QtGui.QFont()
        font.setPointSize(14)
        self.Class6radioButton.setFont(font)
        self.Class6radioButton.setObjectName("Class6radioButton")
        self.gridLayout_7.addWidget(self.Class6radioButton, 2, 2, 1, 1)
        self.LabelDatacheckBox = QtWidgets.QCheckBox(self.layoutWidget6)
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(16)
        font.setBold(True)
        font.setItalic(True)
        font.setUnderline(False)
        font.setWeight(75)
        self.LabelDatacheckBox.setFont(font)
        self.LabelDatacheckBox.setObjectName("LabelDatacheckBox")
        self.gridLayout_7.addWidget(self.LabelDatacheckBox, 0, 0, 1, 3)
        self.LabelDisplaytextBrowser = QtWidgets.QTextBrowser(self.tab_3)
        self.LabelDisplaytextBrowser.setGeometry(QtCore.QRect(
            20, 690, 791, 31))
        self.LabelDisplaytextBrowser.setObjectName("LabelDisplaytextBrowser")
        self.AddRectpushButton = QtWidgets.QPushButton(self.tab_3)
        self.AddRectpushButton.setGeometry(QtCore.QRect(680, 400, 131, 30))
        font = QtGui.QFont()
        font.setPointSize(12)
        self.AddRectpushButton.setFont(font)
        self.AddRectpushButton.setObjectName("AddRectpushButton")
        self.FinishiButton = QtWidgets.QPushButton(self.tab_3)
        self.FinishiButton.setGeometry(QtCore.QRect(680, 470, 131, 31))
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        font.setBold(True)
        font.setWeight(75)
        self.FinishiButton.setFont(font)
        self.FinishiButton.setObjectName("FinishiButton")
        self.Scores = QtWidgets.QLabel(self.tab_3)
        self.Scores.setGeometry(QtCore.QRect(20, 0, 81, 31))
        self.Scores.setMinimumSize(QtCore.QSize(81, 0))
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        self.Scores.setFont(font)
        self.Scores.setObjectName("Scores")
        self.ScoresgraphicsView = PlotWidget(self.tab_3)
        self.ScoresgraphicsView.setGeometry(QtCore.QRect(20, 200, 791, 191))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.ScoresgraphicsView.sizePolicy().hasHeightForWidth())
        self.ScoresgraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.ScoresgraphicsView.setBackgroundBrush(brush)
        self.ScoresgraphicsView.setObjectName("ScoresgraphicsView")
        self.BadDatatableWidget = QtWidgets.QTableWidget(self.tab_3)
        self.BadDatatableWidget.setGeometry(QtCore.QRect(20, 30, 791, 161))
        self.BadDatatableWidget.setObjectName("BadDatatableWidget")
        self.BadDatatableWidget.setColumnCount(0)
        self.BadDatatableWidget.setRowCount(0)
        self.ScoresAnalysgraphicsView = PlotWidget(self.tab_3)
        self.ScoresAnalysgraphicsView.setGeometry(
            QtCore.QRect(20, 510, 791, 171))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.ScoresAnalysgraphicsView.sizePolicy().hasHeightForWidth())
        self.ScoresAnalysgraphicsView.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.ScoresAnalysgraphicsView.setBackgroundBrush(brush)
        self.ScoresAnalysgraphicsView.setObjectName("ScoresAnalysgraphicsView")
        self.tabWidget.addTab(self.tab_3, "")
        self.OpenFileButton = QtWidgets.QPushButton(self.centralwidget)
        self.OpenFileButton.setGeometry(QtCore.QRect(10, 50, 131, 31))
        self.OpenFileButton.setObjectName("OpenFileButton")
        self.DisplaytextBrowser = QtWidgets.QTextBrowser(self.centralwidget)
        self.DisplaytextBrowser.setGeometry(QtCore.QRect(10, 90, 131, 191))
        self.DisplaytextBrowser.setObjectName("DisplaytextBrowser")
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1017, 20))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        self.tabWidget.setCurrentIndex(2)
        self.toolBox.setCurrentIndex(0)
        self.toolBox.layout().setSpacing(5)
        self.toolBox_2.setCurrentIndex(0)
        self.toolBox_2.layout().setSpacing(5)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
        self.CurMean.setText(_translate("MainWindow", "Mean"))
        self.CurStd.setText(_translate("MainWindow", "Std"))
        self.CurMax.setText(_translate("MainWindow", "Max"))
        self.CurMin.setText(_translate("MainWindow", "Min"))
        self.toolBox.setItemText(
            self.toolBox.indexOf(self.page),
            _translate("MainWindow", "Current Feature Display --1"))
        self.CurPeakMean.setText(_translate("MainWindow", "Peak Mean"))
        self.CurPeakStd.setText(_translate("MainWindow", "Peak Std"))
        self.CurPeakCount.setText(_translate("MainWindow", "Peak Count"))
        self.CurPeakWidthMean.setText(
            _translate("MainWindow", "Peak Width Mean"))
        self.toolBox.setItemText(
            self.toolBox.indexOf(self.page_2),
            _translate("MainWindow", "Current Feature Display --2"))
        self.CurPeakWidthStd.setText(_translate("MainWindow",
                                                "Peak Width Std"))
        self.CurPeakGapMean.setText(_translate("MainWindow", "Peak Gap Mean"))
        self.CurPeakGapStd.setText(_translate("MainWindow", "Peak Gap Std"))
        self.toolBox.setItemText(
            self.toolBox.indexOf(self.page_3),
            _translate("MainWindow", "Current Feature Display --3"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab),
                                  _translate("MainWindow", "Current"))
        self.VolMean.setText(_translate("MainWindow", "Mean"))
        self.VolStd.setText(_translate("MainWindow", "Std"))
        self.VolMax.setText(_translate("MainWindow", "Max"))
        self.VolMin.setText(_translate("MainWindow", "Min"))
        self.toolBox_2.setItemText(
            self.toolBox_2.indexOf(self.page_4),
            _translate("MainWindow", "Voltage Feature Display --1"))
        self.VolPeakMean.setText(_translate("MainWindow", "Peak Mean"))
        self.VolPeakStd.setText(_translate("MainWindow", "Peak Std"))
        self.VolPeakCount.setText(_translate("MainWindow", "Peak Count"))
        self.VolPeakWidthMean.setText(
            _translate("MainWindow", "Peak Width Mean"))
        self.toolBox_2.setItemText(
            self.toolBox_2.indexOf(self.page_5),
            _translate("MainWindow", "Voltage Feature Display --2"))
        self.VolPeakWidthStd.setText(_translate("MainWindow",
                                                "Peak Width Std"))
        self.VolPeakGapMean.setText(_translate("MainWindow", "Peak Gap Mean"))
        self.VolPeakGapStd.setText(_translate("MainWindow", "Peak Gap Std"))
        self.toolBox_2.setItemText(
            self.toolBox_2.indexOf(self.page_6),
            _translate("MainWindow", "Voltage Feature Display --3"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2),
                                  _translate("MainWindow", "Voltage"))
        self.Class1radioButton.setText(_translate("MainWindow", "Class 1"))
        self.Class2radioButton.setText(_translate("MainWindow", "Class 2"))
        self.Class3radioButton.setText(_translate("MainWindow", "Class 3"))
        self.Class4radioButton.setText(_translate("MainWindow", "Class 4"))
        self.Class5radioButton.setText(_translate("MainWindow", "Class 5"))
        self.Class6radioButton.setText(_translate("MainWindow", "Class 6"))
        self.LabelDatacheckBox.setText(_translate("MainWindow", "Label Data"))
        self.LabelDisplaytextBrowser.setHtml(
            _translate(
                "MainWindow",
                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
                "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
                "p, li { white-space: pre-wrap; }\n"
                "</style></head><body style=\" font-family:\'Consolas\'; font-size:12pt; font-weight:400; font-style:normal;\">\n"
                "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Print here</p></body></html>"
            ))
        self.AddRectpushButton.setText(_translate("MainWindow", "Add ROI"))
        self.FinishiButton.setText(_translate("MainWindow", "Done"))
        self.Scores.setText(_translate("MainWindow", "Scores"))
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.tab_3),
            _translate("MainWindow", "Scores(Label here)"))
        self.OpenFileButton.setText(_translate("MainWindow", "Open File"))
        self.DisplaytextBrowser.setHtml(
            _translate(
                "MainWindow",
                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
                "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
                "p, li { white-space: pre-wrap; }\n"
                "</style></head><body style=\" font-family:\'Consolas\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
                "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:12pt;\">Display opened files here</span></p></body></html>"
            ))
Ejemplo n.º 4
0
class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.setEnabled(True)
        MainWindow.resize(1292, 451)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            MainWindow.sizePolicy().hasHeightForWidth())
        MainWindow.setSizePolicy(sizePolicy)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.graph_MC = PlotWidget(self.centralwidget)
        self.graph_MC.setGeometry(QtCore.QRect(650, 10, 630, 350))
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.graph_MC.sizePolicy().hasHeightForWidth())
        self.graph_MC.setSizePolicy(sizePolicy)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        self.graph_MC.setBackgroundBrush(brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.graph_MC.setForegroundBrush(brush)
        self.graph_MC.setObjectName(_fromUtf8("graph_MC"))
        self.graph_LL = PlotWidget(self.centralwidget)
        self.graph_LL.setGeometry(QtCore.QRect(10, 10, 630, 350))
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.graph_LL.sizePolicy().hasHeightForWidth())
        self.graph_LL.setSizePolicy(sizePolicy)
        self.graph_LL.setFrameShadow(QtGui.QFrame.Sunken)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        self.graph_LL.setBackgroundBrush(brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.graph_LL.setForegroundBrush(brush)
        self.graph_LL.setObjectName(_fromUtf8("graph_LL"))
        self.label_LL = QtGui.QLabel(self.centralwidget)
        self.label_LL.setGeometry(QtCore.QRect(220, 380, 211, 31))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("LM Sans 10"))
        font.setPointSize(16)
        self.label_LL.setFont(font)
        self.label_LL.setTextFormat(QtCore.Qt.PlainText)
        self.label_LL.setObjectName(_fromUtf8("label_LL"))
        self.label_MC = QtGui.QLabel(self.centralwidget)
        self.label_MC.setGeometry(QtCore.QRect(860, 380, 231, 31))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("LM Sans 10"))
        font.setPointSize(16)
        self.label_MC.setFont(font)
        self.label_MC.setTextFormat(QtCore.Qt.PlainText)
        self.label_MC.setObjectName(_fromUtf8("label_MC"))
        self.cb_scale = QtGui.QComboBox(self.centralwidget)
        self.cb_scale.setGeometry(QtCore.QRect(620, 390, 74, 21))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("LM Sans 10"))
        font.setPointSize(11)
        self.cb_scale.setFont(font)
        self.cb_scale.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu)
        self.cb_scale.setObjectName(_fromUtf8("cb_scale"))
        self.cb_scale.addItem(_fromUtf8(""))
        self.cb_scale.addItem(_fromUtf8(""))
        self.cb_scale.addItem(_fromUtf8(""))
        self.cb_scale.addItem(_fromUtf8(""))
        self.label = QtGui.QLabel(self.centralwidget)
        self.label.setGeometry(QtCore.QRect(560, 390, 71, 21))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("LM Sans 10"))
        font.setPointSize(11)
        self.label.setFont(font)
        self.label.setObjectName(_fromUtf8("label"))
        MainWindow.setCentralWidget(self.centralwidget)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setEnabled(True)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        MainWindow.setStatusBar(self.statusbar)
        self.actionQuit = QtGui.QAction(MainWindow)
        self.actionQuit.setObjectName(_fromUtf8("actionQuit"))
        self.actionStart = QtGui.QAction(MainWindow)
        self.actionStart.setObjectName(_fromUtf8("actionStart"))
        self.b_auto = QtGui.QAction(MainWindow)
        self.b_auto.setObjectName(_fromUtf8("b_auto"))
        self.b_24 = QtGui.QAction(MainWindow)
        self.b_24.setObjectName(_fromUtf8("b_24"))
        self.b_12 = QtGui.QAction(MainWindow)
        self.b_12.setObjectName(_fromUtf8("b_12"))
        self.b_6 = QtGui.QAction(MainWindow)
        self.b_6.setObjectName(_fromUtf8("b_6"))
        self.b_2 = QtGui.QAction(MainWindow)
        self.b_2.setObjectName(_fromUtf8("b_2"))
        self.b_1 = QtGui.QAction(MainWindow)
        self.b_1.setObjectName(_fromUtf8("b_1"))
        self.m_poll = QtGui.QAction(MainWindow)
        self.m_poll.setEnabled(False)
        self.m_poll.setObjectName(_fromUtf8("m_poll"))

        self.retranslateUi(MainWindow)
        self.cb_scale.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(
            _translate("MainWindow", "Plasma 1 monitor", None))
        self.label_LL.setText(
            _translate("MainWindow", "LL: 3.85e-8 mbar", None))
        self.label_MC.setText(
            _translate("MainWindow", "MC: 3.45e-9 mbar", None))
        self.cb_scale.setItemText(0, _translate("MainWindow", "today", None))
        self.cb_scale.setItemText(1, _translate("MainWindow", "2h", None))
        self.cb_scale.setItemText(2, _translate("MainWindow", "1h", None))
        self.cb_scale.setItemText(3, _translate("MainWindow", "10min", None))
        self.label.setText(_translate("MainWindow", "Scale:", None))
        self.actionQuit.setText(_translate("MainWindow", "Quit", None))
        self.actionStart.setText(_translate("MainWindow", "Start", None))
        self.b_auto.setText(_translate("MainWindow", "Autoscale", None))
        self.b_24.setText(_translate("MainWindow", "24h", None))
        self.b_12.setText(_translate("MainWindow", "12h", None))
        self.b_6.setText(_translate("MainWindow", "6h", None))
        self.b_2.setText(_translate("MainWindow", "2h", None))
        self.b_1.setText(_translate("MainWindow", "1h", None))
        self.m_poll.setText(
            _translate("MainWindow", "Measure all channels", None))
Ejemplo n.º 5
0
class Ui_sample_list(object):
    def setupUi(self, sample_list):
        sample_list.setObjectName(_fromUtf8("sample_list"))
        sample_list.resize(1259, 920)
        self.verticalLayout = QtGui.QVBoxLayout(sample_list)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.groupBox = QtGui.QGroupBox(sample_list)
        self.groupBox.setMaximumSize(QtCore.QSize(16777215, 40))
        self.groupBox.setObjectName(_fromUtf8("groupBox"))
        self.horizontalLayout_2 = QtGui.QHBoxLayout(self.groupBox)
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.label = QtGui.QLabel(self.groupBox)
        self.label.setEnabled(True)
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Arial Black"))
        font.setBold(True)
        font.setWeight(75)
        self.label.setFont(font)
        self.label.setObjectName(_fromUtf8("label"))
        self.horizontalLayout_2.addWidget(self.label)
        self.checkBox1 = QtGui.QCheckBox(self.groupBox)
        self.checkBox1.setMaximumSize(QtCore.QSize(89, 20))
        self.checkBox1.setChecked(True)
        self.checkBox1.setObjectName(_fromUtf8("checkBox1"))
        self.horizontalLayout_2.addWidget(self.checkBox1)
        self.checkBox2 = QtGui.QCheckBox(self.groupBox)
        self.checkBox2.setMaximumSize(QtCore.QSize(88, 20))
        self.checkBox2.setChecked(True)
        self.checkBox2.setObjectName(_fromUtf8("checkBox2"))
        self.horizontalLayout_2.addWidget(self.checkBox2)
        self.checkBox3 = QtGui.QCheckBox(self.groupBox)
        self.checkBox3.setMaximumSize(QtCore.QSize(88, 20))
        self.checkBox3.setChecked(True)
        self.checkBox3.setObjectName(_fromUtf8("checkBox3"))
        self.horizontalLayout_2.addWidget(self.checkBox3)
        self.verticalLayout.addWidget(self.groupBox)
        self.grPlot = PlotWidget(sample_list)
        self.grPlot.setMaximumSize(QtCore.QSize(16777215, 200))
        self.grPlot.setAutoFillBackground(False)
        brush = QtGui.QBrush(QtGui.QColor(85, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.grPlot.setBackgroundBrush(brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 85, 0))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.grPlot.setForegroundBrush(brush)
        self.grPlot.setObjectName(_fromUtf8("grPlot"))
        self.verticalLayout.addWidget(self.grPlot)
        self.tableWidget = QtGui.QTableWidget(sample_list)
        self.tableWidget.setEnabled(True)
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Arial"))
        font.setPointSize(12)
        font.setBold(False)
        font.setItalic(False)
        font.setWeight(50)
        self.tableWidget.setFont(font)
        self.tableWidget.setStyleSheet(
            _fromUtf8(" text-align : center;\n"
                      "   height : 80px;\n"
                      "   border-style: outset 2px;"))
        self.tableWidget.setLineWidth(1)
        self.tableWidget.setAutoScroll(True)
        self.tableWidget.setDragEnabled(False)
        self.tableWidget.setDragDropOverwriteMode(False)
        self.tableWidget.setDragDropMode(QtGui.QAbstractItemView.NoDragDrop)
        self.tableWidget.setRowCount(11)
        self.tableWidget.setColumnCount(14)
        self.tableWidget.setObjectName(_fromUtf8("tableWidget"))
        item = QtGui.QTableWidgetItem()
        item.setTextAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignVCenter
                              | QtCore.Qt.AlignCenter)
        self.tableWidget.setVerticalHeaderItem(0, item)
        item = QtGui.QTableWidgetItem()
        item.setTextAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignVCenter
                              | QtCore.Qt.AlignCenter)
        self.tableWidget.setVerticalHeaderItem(1, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setVerticalHeaderItem(2, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setVerticalHeaderItem(3, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setVerticalHeaderItem(4, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setVerticalHeaderItem(5, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setVerticalHeaderItem(6, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setVerticalHeaderItem(7, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setVerticalHeaderItem(8, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setVerticalHeaderItem(9, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setVerticalHeaderItem(10, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(0, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(1, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(2, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(3, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(4, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(5, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(6, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(7, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(8, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(9, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(10, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(11, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(12, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(13, item)
        item = QtGui.QTableWidgetItem()
        self.tableWidget.setItem(0, 0, item)
        item = QtGui.QTableWidgetItem()
        item.setTextAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignVCenter
                              | QtCore.Qt.AlignCenter)
        self.tableWidget.setItem(0, 8, item)
        self.verticalLayout.addWidget(self.tableWidget)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setContentsMargins(-1, 20, -1, 20)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.btn_Privious = QtGui.QPushButton(sample_list)
        self.btn_Privious.setMinimumSize(QtCore.QSize(151, 41))
        self.btn_Privious.setMaximumSize(QtCore.QSize(151, 41))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Arial Black"))
        self.btn_Privious.setFont(font)
        self.btn_Privious.setObjectName(_fromUtf8("btn_Privious"))
        self.horizontalLayout.addWidget(self.btn_Privious)
        self.btn_Next = QtGui.QPushButton(sample_list)
        self.btn_Next.setMinimumSize(QtCore.QSize(151, 41))
        self.btn_Next.setMaximumSize(QtCore.QSize(151, 41))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Arial Black"))
        self.btn_Next.setFont(font)
        self.btn_Next.setObjectName(_fromUtf8("btn_Next"))
        self.horizontalLayout.addWidget(self.btn_Next)
        self.btn_Export = QtGui.QPushButton(sample_list)
        self.btn_Export.setMaximumSize(QtCore.QSize(151, 41))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Arial Black"))
        font.setBold(True)
        font.setWeight(75)
        self.btn_Export.setFont(font)
        self.btn_Export.setObjectName(_fromUtf8("btn_Export"))
        self.horizontalLayout.addWidget(self.btn_Export)
        self.verticalLayout.addLayout(self.horizontalLayout)

        self.retranslateUi(sample_list)
        QtCore.QObject.connect(self.btn_Privious,
                               QtCore.SIGNAL(_fromUtf8("clicked()")),
                               sample_list.on_btnPrivStep_clicked)
        QtCore.QObject.connect(self.btn_Privious,
                               QtCore.SIGNAL(_fromUtf8("clicked()")),
                               sample_list.close)
        QtCore.QObject.connect(self.btn_Next,
                               QtCore.SIGNAL(_fromUtf8("clicked()")),
                               sample_list.on_btnNextStep_clicked)
        QtCore.QObject.connect(self.btn_Export,
                               QtCore.SIGNAL(_fromUtf8("clicked()")),
                               sample_list.on_btnExport_clicked)
        QtCore.QMetaObject.connectSlotsByName(sample_list)
        sample_list.setTabOrder(self.tableWidget, self.btn_Privious)

    def retranslateUi(self, sample_list):
        sample_list.setWindowTitle(_translate("sample_list", "Form", None))
        self.label.setText(
            _translate(
                "sample_list",
                "                                                                                                                                    Please select specimen for calculating Average Degradation - DR",
                None))
        self.checkBox1.setText(_translate("sample_list", "specimen1", None))
        self.checkBox2.setText(_translate("sample_list", "specimen2", None))
        self.checkBox3.setText(_translate("sample_list", "specimen3", None))
        item = self.tableWidget.horizontalHeaderItem(0)
        item.setText(_translate("sample_list", "Name", None))
        item = self.tableWidget.horizontalHeaderItem(1)
        item.setText(_translate("sample_list", "Color", None))
        item = self.tableWidget.horizontalHeaderItem(2)
        item.setText(_translate("sample_list", "Materia", None))
        item = self.tableWidget.horizontalHeaderItem(3)
        item.setText(_translate("sample_list", "Chemistry", None))
        item = self.tableWidget.horizontalHeaderItem(4)
        item.setText(_translate("sample_list", "Thickness", None))
        item = self.tableWidget.horizontalHeaderItem(5)
        item.setText(_translate("sample_list", "Standard", None))
        item = self.tableWidget.horizontalHeaderItem(6)
        item.setText(_translate("sample_list", "Exposed Time", None))
        item = self.tableWidget.horizontalHeaderItem(7)
        item.setText(_translate("sample_list", "Specimen", None))
        item = self.tableWidget.horizontalHeaderItem(8)
        item.setText(_translate("sample_list", "OPx", None))
        item = self.tableWidget.horizontalHeaderItem(9)
        item.setText(_translate("sample_list", "OPx-Data", None))
        item = self.tableWidget.horizontalHeaderItem(10)
        item.setText(_translate("sample_list", "RPx", None))
        item = self.tableWidget.horizontalHeaderItem(11)
        item.setText(_translate("sample_list", "RPx-Data", None))
        item = self.tableWidget.horizontalHeaderItem(12)
        item.setText(_translate("sample_list", "DRx", None))
        item = self.tableWidget.horizontalHeaderItem(13)
        item.setText(_translate("sample_list", "DR", None))
        __sortingEnabled = self.tableWidget.isSortingEnabled()
        self.tableWidget.setSortingEnabled(False)
        self.tableWidget.setSortingEnabled(__sortingEnabled)
        self.btn_Privious.setText(
            _translate("sample_list", "Privious Step", None))
        self.btn_Next.setText(_translate("sample_list", "Next Step", None))
        self.btn_Export.setText(
            _translate("sample_list", "Export Result", None))
class Ui_Machine_Learn_Interface(object):
    def setupUi(self, Machine_Learn_Interface):
        Machine_Learn_Interface.setObjectName("Machine_Learn_Interface")
        Machine_Learn_Interface.resize(753, 664)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(Machine_Learn_Interface.sizePolicy().hasHeightForWidth())
        Machine_Learn_Interface.setSizePolicy(sizePolicy)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/images/resource/cropped-Brain-Tool-Icon-2.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        Machine_Learn_Interface.setWindowIcon(icon)
        self.gridLayout_2 = QtWidgets.QGridLayout(Machine_Learn_Interface)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.tabWidget = QtWidgets.QTabWidget(Machine_Learn_Interface)
        self.tabWidget.setTabShape(QtWidgets.QTabWidget.Triangular)
        self.tabWidget.setObjectName("tabWidget")
        self.Tab = QtWidgets.QWidget()
        self.Tab.setObjectName("Tab")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.Tab)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.label = QtWidgets.QLabel(self.Tab)
        font = QtGui.QFont()
        font.setPointSize(9)
        font.setBold(True)
        font.setItalic(False)
        font.setWeight(75)
        self.label.setFont(font)
        self.label.setObjectName("label")
        self.horizontalLayout_2.addWidget(self.label)
        self.pb_openfiles = QtWidgets.QPushButton(self.Tab)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.pb_openfiles.setFont(font)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(":/images/resource/file_add.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pb_openfiles.setIcon(icon1)
        self.pb_openfiles.setObjectName("pb_openfiles")
        self.horizontalLayout_2.addWidget(self.pb_openfiles)
        self.pb_kmeans = QtWidgets.QPushButton(self.Tab)
        self.pb_kmeans.setEnabled(False)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.pb_kmeans.setFont(font)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(":/images/resource/cluster.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pb_kmeans.setIcon(icon2)
        self.pb_kmeans.setObjectName("pb_kmeans")
        self.horizontalLayout_2.addWidget(self.pb_kmeans)
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        self.line = QtWidgets.QFrame(self.Tab)
        self.line.setFrameShape(QtWidgets.QFrame.HLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line.setObjectName("line")
        self.verticalLayout.addWidget(self.line)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.label_2 = QtWidgets.QLabel(self.Tab)
        self.label_2.setAlignment(QtCore.Qt.AlignCenter)
        self.label_2.setObjectName("label_2")
        self.horizontalLayout.addWidget(self.label_2)
        self.pb_cluster_hint = QtWidgets.QPushButton(self.Tab)
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap(":/images/resource/Magic-512.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pb_cluster_hint.setIcon(icon3)
        self.pb_cluster_hint.setIconSize(QtCore.QSize(18, 18))
        self.pb_cluster_hint.setObjectName("pb_cluster_hint")
        self.horizontalLayout.addWidget(self.pb_cluster_hint)
        self.sb_cluster_number = QtWidgets.QSpinBox(self.Tab)
        self.sb_cluster_number.setProperty("value", 3)
        self.sb_cluster_number.setObjectName("sb_cluster_number")
        self.horizontalLayout.addWidget(self.sb_cluster_number)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.verticalLayout_2.addLayout(self.verticalLayout)
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.label_5 = QtWidgets.QLabel(self.Tab)
        self.label_5.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_5.setObjectName("label_5")
        self.gridLayout.addWidget(self.label_5, 0, 3, 1, 1)
        spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem1, 1, 0, 1, 1)
        self.label_6 = QtWidgets.QLabel(self.Tab)
        self.label_6.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_6.setObjectName("label_6")
        self.gridLayout.addWidget(self.label_6, 1, 3, 1, 1)
        self.label_3 = QtWidgets.QLabel(self.Tab)
        self.label_3.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 0, 1, 1, 1)
        self.label_4 = QtWidgets.QLabel(self.Tab)
        self.label_4.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_4.setObjectName("label_4")
        self.gridLayout.addWidget(self.label_4, 1, 1, 1, 1)
        self.lb_magnt_name = QtWidgets.QLabel(self.Tab)
        font = QtGui.QFont()
        font.setPointSize(9)
        font.setBold(True)
        font.setWeight(75)
        self.lb_magnt_name.setFont(font)
        self.lb_magnt_name.setText("")
        self.lb_magnt_name.setObjectName("lb_magnt_name")
        self.gridLayout.addWidget(self.lb_magnt_name, 3, 2, 1, 1)
        spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem2, 0, 0, 1, 1)
        spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
        self.gridLayout.addItem(spacerItem3, 3, 4, 1, 1)
        spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem4, 3, 0, 1, 1)
        self.label_7 = QtWidgets.QLabel(self.Tab)
        self.label_7.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_7.setObjectName("label_7")
        self.gridLayout.addWidget(self.label_7, 3, 1, 1, 1)
        self.cb_y_values = QtWidgets.QComboBox(self.Tab)
        self.cb_y_values.setObjectName("cb_y_values")
        self.gridLayout.addWidget(self.cb_y_values, 0, 2, 1, 1)
        self.cb_x_values = QtWidgets.QComboBox(self.Tab)
        self.cb_x_values.setObjectName("cb_x_values")
        self.gridLayout.addWidget(self.cb_x_values, 1, 2, 1, 1)
        self.cb_y_n_order = QtWidgets.QComboBox(self.Tab)
        self.cb_y_n_order.setEnabled(False)
        self.cb_y_n_order.setObjectName("cb_y_n_order")
        self.cb_y_n_order.addItem("")
        self.cb_y_n_order.addItem("")
        self.cb_y_n_order.addItem("")
        self.cb_y_n_order.addItem("")
        self.cb_y_n_order.addItem("")
        self.cb_y_n_order.addItem("")
        self.cb_y_n_order.addItem("")
        self.cb_y_n_order.addItem("")
        self.cb_y_n_order.addItem("")
        self.cb_y_n_order.addItem("")
        self.cb_y_n_order.addItem("")
        self.cb_y_n_order.addItem("")
        self.cb_y_n_order.addItem("")
        self.cb_y_n_order.addItem("")
        self.cb_y_n_order.addItem("")
        self.gridLayout.addWidget(self.cb_y_n_order, 0, 4, 1, 1)
        self.cb_x_n_order = QtWidgets.QComboBox(self.Tab)
        self.cb_x_n_order.setEnabled(False)
        self.cb_x_n_order.setObjectName("cb_x_n_order")
        self.cb_x_n_order.addItem("")
        self.cb_x_n_order.addItem("")
        self.cb_x_n_order.addItem("")
        self.cb_x_n_order.addItem("")
        self.cb_x_n_order.addItem("")
        self.cb_x_n_order.addItem("")
        self.cb_x_n_order.addItem("")
        self.cb_x_n_order.addItem("")
        self.cb_x_n_order.addItem("")
        self.cb_x_n_order.addItem("")
        self.cb_x_n_order.addItem("")
        self.cb_x_n_order.addItem("")
        self.cb_x_n_order.addItem("")
        self.cb_x_n_order.addItem("")
        self.gridLayout.addWidget(self.cb_x_n_order, 1, 4, 1, 1)
        self.verticalLayout_2.addLayout(self.gridLayout)
        self.pb_viewtable = QtWidgets.QPushButton(self.Tab)
        self.pb_viewtable.setEnabled(False)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.pb_viewtable.sizePolicy().hasHeightForWidth())
        self.pb_viewtable.setSizePolicy(sizePolicy)
        icon4 = QtGui.QIcon()
        icon4.addPixmap(QtGui.QPixmap(":/images/resource/table.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pb_viewtable.setIcon(icon4)
        self.pb_viewtable.setObjectName("pb_viewtable")
        self.verticalLayout_2.addWidget(self.pb_viewtable)
        self.graphicsView = PlotWidget(self.Tab)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.graphicsView.setBackgroundBrush(brush)
        self.graphicsView.setObjectName("graphicsView")
        self.verticalLayout_2.addWidget(self.graphicsView)
        self.verticalLayout_3.addLayout(self.verticalLayout_2)
        self.tabWidget.addTab(self.Tab, "")
        self.tab_2 = QtWidgets.QWidget()
        self.tab_2.setObjectName("tab_2")
        self.tabWidget.addTab(self.tab_2, "")
        self.gridLayout_2.addWidget(self.tabWidget, 1, 0, 1, 1)

        self.retranslateUi(Machine_Learn_Interface)
        self.tabWidget.setCurrentIndex(0)
        self.cb_y_n_order.setCurrentIndex(1)
        self.cb_x_n_order.setCurrentIndex(1)
        QtCore.QMetaObject.connectSlotsByName(Machine_Learn_Interface)

    def retranslateUi(self, Machine_Learn_Interface):
        _translate = QtCore.QCoreApplication.translate
        Machine_Learn_Interface.setWindowTitle(_translate("Machine_Learn_Interface", "Machine Learn Interface"))
        self.label.setText(_translate("Machine_Learn_Interface", "Machine Learning for Magnetic Measurements"))
        self.pb_openfiles.setText(_translate("Machine_Learn_Interface", "Open Files"))
        self.pb_kmeans.setText(_translate("Machine_Learn_Interface", " Process K-Means"))
        self.label_2.setText(_translate("Machine_Learn_Interface", "Type Number of Cluster:"))
        self.pb_cluster_hint.setText(_translate("Machine_Learn_Interface", "Cluster Hint"))
        self.label_5.setText(_translate("Machine_Learn_Interface", "n order:"))
        self.label_6.setText(_translate("Machine_Learn_Interface", "n order:"))
        self.label_3.setText(_translate("Machine_Learn_Interface", "Y Values:"))
        self.label_4.setText(_translate("Machine_Learn_Interface", "X Values:"))
        self.label_7.setText(_translate("Machine_Learn_Interface", "Magnet:"))
        self.cb_y_n_order.setItemText(0, _translate("Machine_Learn_Interface", "1"))
        self.cb_y_n_order.setItemText(1, _translate("Machine_Learn_Interface", "2"))
        self.cb_y_n_order.setItemText(2, _translate("Machine_Learn_Interface", "3"))
        self.cb_y_n_order.setItemText(3, _translate("Machine_Learn_Interface", "4"))
        self.cb_y_n_order.setItemText(4, _translate("Machine_Learn_Interface", "5"))
        self.cb_y_n_order.setItemText(5, _translate("Machine_Learn_Interface", "6"))
        self.cb_y_n_order.setItemText(6, _translate("Machine_Learn_Interface", "7"))
        self.cb_y_n_order.setItemText(7, _translate("Machine_Learn_Interface", "8"))
        self.cb_y_n_order.setItemText(8, _translate("Machine_Learn_Interface", "9"))
        self.cb_y_n_order.setItemText(9, _translate("Machine_Learn_Interface", "10"))
        self.cb_y_n_order.setItemText(10, _translate("Machine_Learn_Interface", "11"))
        self.cb_y_n_order.setItemText(11, _translate("Machine_Learn_Interface", "12"))
        self.cb_y_n_order.setItemText(12, _translate("Machine_Learn_Interface", "13"))
        self.cb_y_n_order.setItemText(13, _translate("Machine_Learn_Interface", "14"))
        self.cb_y_n_order.setItemText(14, _translate("Machine_Learn_Interface", "15"))
        self.cb_x_n_order.setItemText(0, _translate("Machine_Learn_Interface", "1"))
        self.cb_x_n_order.setItemText(1, _translate("Machine_Learn_Interface", "2"))
        self.cb_x_n_order.setItemText(2, _translate("Machine_Learn_Interface", "3"))
        self.cb_x_n_order.setItemText(3, _translate("Machine_Learn_Interface", "4"))
        self.cb_x_n_order.setItemText(4, _translate("Machine_Learn_Interface", "5"))
        self.cb_x_n_order.setItemText(5, _translate("Machine_Learn_Interface", "6"))
        self.cb_x_n_order.setItemText(6, _translate("Machine_Learn_Interface", "7"))
        self.cb_x_n_order.setItemText(7, _translate("Machine_Learn_Interface", "8"))
        self.cb_x_n_order.setItemText(8, _translate("Machine_Learn_Interface", "9"))
        self.cb_x_n_order.setItemText(9, _translate("Machine_Learn_Interface", "10"))
        self.cb_x_n_order.setItemText(10, _translate("Machine_Learn_Interface", "12"))
        self.cb_x_n_order.setItemText(11, _translate("Machine_Learn_Interface", "13"))
        self.cb_x_n_order.setItemText(12, _translate("Machine_Learn_Interface", "14"))
        self.cb_x_n_order.setItemText(13, _translate("Machine_Learn_Interface", "15"))
        self.pb_viewtable.setText(_translate("Machine_Learn_Interface", " View Table"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.Tab), _translate("Machine_Learn_Interface", "Clustering"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("Machine_Learn_Interface", "Predicting"))
Ejemplo n.º 7
0
class ControllerGui(Ui_ControllerGUI, QMainWindow):

    def __init__(self):
        super(ControllerGui, self).__init__()
        self.setupUi(self)
        self.m_clear.clicked.connect(self.clear_plot)
        self.m_send.clicked.connect(self.send_start)
        self.m_stop.clicked.connect(self.send_stop)
        self.interface = SerialInterface()
        self.interface.received.connect(self.show_received)
        self.m_interval.setValidator(QIntValidator(0, 10000))
        self.m_interval.returnPressed.connect(self.send_start)

        brush = QBrush(QColor(255, 255, 255))

        box = QVBoxLayout(self.m_list)

        self.temperature_plot = PlotWidget(self)
        self.temperature_plot.setBackgroundBrush(brush)
        self.temperature_plot.setFixedHeight(300)
        box.addWidget(self.temperature_plot)
        self.temperature_curves = {}

        self.humidity_plot = PlotWidget(self)
        self.humidity_plot.setBackgroundBrush(brush)
        self.humidity_plot.setFixedHeight(300)
        box.addWidget(self.humidity_plot)
        self.humidity_curves = {}

        self.illumination_plot = PlotWidget(self)
        self.illumination_plot.setBackgroundBrush(brush)
        self.illumination_plot.setFixedHeight(300)
        box.addWidget(self.illumination_plot)
        self.illumination_curves = {}
        box.addItem(QSpacerItem(40, 20, QSizePolicy.Maximum, QSizePolicy.Expanding))
        self.m_list.setLayout(box)

        box = QVBoxLayout(self.m_devices)
        box.addItem(QSpacerItem(40, 20, QSizePolicy.Maximum, QSizePolicy.Expanding))
        self.m_devices.setLayout(box)
	self.file = open('result.txt', 'w')

    def closeEvent(self, event):
	self.file.close()
        self.interface.mif.finishAll()

    def show_received(self, node_id, sequence_num, timestamp, temperature, humidity, illumination):
        result = "ID:" + str(node_id) + " SeqNo:" + str(sequence_num) + " temperature:" + str(temperature) + \
              " humidity:" + str(humidity) + " illumination:" + str(illumination) + " time:" + str(timestamp) + "\n"
        self.file.write(result)
        print("ID:" + str(node_id) + " SeqNo:" + str(sequence_num))
        
	try:
            temperature_curve = self.temperature_curves[str(node_id)]
            humidity_curve = self.humidity_curves[str(node_id)]
            illumination_curve = self.illumination_curves[str(node_id)]
        except KeyError:
            temperature_curve = self.temperature_plot.plot([], [])
            humidity_curve = self.humidity_plot.plot([], [])
            illumination_curve = self.illumination_plot.plot([], [])
            self.temperature_curves[str(node_id)] = temperature_curve
            self.humidity_curves[str(node_id)] = humidity_curve
            self.illumination_curves[str(node_id)] = illumination_curve

            box = self.m_devices.layout()

            device_item = DeviceItem(self.m_devices, node_id)
            device_item.colorChanged.connect(self.set_device_color)
            self.set_device_color(node_id, device_item.color)
            device_item.showChanged.connect(self.change_device_show)
            device_item.temperatureChanged.connect(self.change_device_temperature)
            device_item.humidityChanged.connect(self.change_device_humidity)
            device_item.illuminationChanged.connect(self.change_device_illumination)

            box.insertWidget(box.count() - 1, device_item)
            self.m_aside.setFixedWidth(device_item.width())

        data = temperature_curve.getData()
        data_x, temperature_y = list(data[0]), list(data[1])
        data_x.append(timestamp / 1000.0)
        temperature_y.append(temperature)
        temperature_curve.setData(data_x, temperature_y)

        data = humidity_curve.getData()
        data_x, humidity_y = list(data[0]), list(data[1])
        data_x.append(timestamp / 1000.0)
        humidity_y.append(humidity)
        humidity_curve.setData(data_x, humidity_y)

        data = illumination_curve.getData()
        data_x, illumination_y = list(data[0]), list(data[1])
        data_x.append(timestamp / 1000.0)
        illumination_y.append(illumination)
        illumination_curve.setData(data_x, illumination_y)

    def send_start(self):
        self.interface.send(CONTROL_START, int(self.m_interval.text()))

    def send_stop(self):
        self.interface.send(CONTROL_STOP)

    def clear_plot(self):
        for key in self.temperature_curves:
            self.temperature_curves[key].setData([], [])
            self.humidity_curves[key].setData([], [])
            self.illumination_curves[key].setData([], [])

    def set_device_color(self, node_id, color):
        self.temperature_curves[str(node_id)].setPen(color)
        self.humidity_curves[str(node_id)].setPen(color)
        self.illumination_curves[str(node_id)].setPen(color)

    def change_device_show(self, node_id, check, t_check, h_check, i_check):
        if check:
            self.change_device_temperature(node_id, t_check)
            self.change_device_humidity(node_id, h_check)
            self.change_device_illumination(node_id, i_check)
        else:
            self.temperature_curves[str(node_id)].hide()
            self.humidity_curves[str(node_id)].hide()
            self.illumination_curves[str(node_id)].hide()

    def change_device_temperature(self, node_id, check):
        if check:
            self.temperature_curves[str(node_id)].show()
        else:
            self.temperature_curves[str(node_id)].hide()

    def change_device_humidity(self, node_id, check):
        if check:
            self.humidity_curves[str(node_id)].show()
        else:
            self.humidity_curves[str(node_id)].hide()

    def change_device_illumination(self, node_id, check):
        if check:
            self.illumination_curves[str(node_id)].show()
        else:
            self.illumination_curves[str(node_id)].hide()
Ejemplo n.º 8
0
class Plot(QObject, Object):
    """Generic widget to plot data series. The data series have to be added
    first, then one may add plot items using two them as x and y values. The
    series will be automatically updated when the master attribute fires a
    value_changed signal or based on an internal update timer. This master
    series has to be defined while adding it.
    
    .. todo:: Currently only setting both series of a plot item to the same,
        fixed length works. Find a better handling for this.
    """
    TYPE_STATIC = 0
    TYPE_TIME = 1
    TYPE_SCALAR = 2
    TYPE_SPECTRUM = 3

    ROLE_SLAVE = 0
    ROLE_MASTER = 1

    def __init__(self, parent=None):
        """Construct a new Plot instance.
        
        :param parent: Optional, but needed for painting.
        :type parent: QGraphicsItem
        """
        QObject.__init__(self)
        Object.__init__(self)
        self.parent = parent
        self.lines = {}
        self.items = {}  #plot items
        self.data = {}  #data series to the plot items
        self.master = None  #id of the data series which triggers the update
        self.x_range = -1  #id of the data series which range defines the plot range
        self.mutex = QMutex()
        self.update_timer = QTimer(self)
        self.update_timer_start = None
        self.setup_ui()

    def setup_ui(self):
        """Setup the internal widget object. Called by :func:`__init__()`."""
        self.widget = PlotWidget(self.parent)
        self.widget.setBackgroundBrush(QBrush(Qt.NoBrush))
        count = len(self.janus.widgets["mainwindow"].findChildren(PlotWidget))
        self.widget.setObjectName("plotWidgetPlot{0}".format(count))
        self.widget.getAxis("bottom").setPen(QPen(Qt.black))
        self.widget.getAxis("left").setPen(QPen(Qt.black))

    def update_values(self, attribute=None):
        """Update all data of TYPE_TIME, TYPE_SCALAR, TYPE_SPECTRUM and plot it.

        This method is connected to either the the value_changed signal of the
        device instance that the master attribute belongs to or the internal
        update_timer if the master is of TYPE_TIME. 

        :param attribute: Name of the master attribute
            which triggered the update or None if master is of TYPE_TIME.
        :type attribute: str|None
        """
        self.mutex.lock()
        if not ((attribute is None and \
                self.data[self.master]["data_type"] == Plot.TYPE_TIME) or \
                (attribute == self.data[self.master]["name"] and \
                self.data[self.master]["data_type"] in \
                [Plot.TYPE_SCALAR, Plot.TYPE_SPECTRUM])):
            self.mutex.unlock()
            return
        if self.update_timer_start is not None:
            time_stamp = time.time() - self.update_timer_start
        update = len(self.items) * [False]
        #retrieve new data and cycle the buffer if max_length is reached
        for i in range(len(self.data)):
            if self.data[i]["data_type"] == Plot.TYPE_TIME:
                if self.data[i]["data"].shape[0] > self.data[i]["max_length"]:
                    self.data[i]["data"].resize(self.data[i]["max_length"])
                if self.data[i]["data"].shape[0] == self.data[i]["max_length"]:
                    self.data[i]["data"] = numpy.concatenate( \
                            (self.data[i]["data"][1:], self.data[i]["data"][:1]))
                    self.data[i]["data"][-1] = time_stamp
                else:
                    numpy.concatenate(self.data[i]["data"], time_stamp)
            elif self.data[i]["data_type"] == Plot.TYPE_SCALAR:
                if self.data[i]["data"].shape[0] > self.data[i]["max_length"]:
                    self.data[i]["data"].resize(self.data[i]["max_length"])
                if self.data[i]["data"].shape[0] == self.data[i]["max_length"]:
                    self.data[i]["data"] = numpy.concatenate( \
                            (self.data[i]["data"][1:], self.data[i]["data"][:1]))
                    self.data[i]["data"][-1] = self.data[i]["getter"](
                        refresh=True)
                else:
                    numpy.concatenate(self.data[i]["data"], \
                            self.data[i]["getter"](refresh=True))
            elif self.data[i]["data_type"] == Plot.TYPE_SPECTRUM:
                self.data[i]["data"] = numpy.ndarray(
                    self.data[i]["getter"](refresh=True))
                if self.data[i]["data"].shape[0] >= self.data[i]["max_length"] or \
                        self.data[i]["data"].shape[0] < self.data[i]["min_length"]:
                    self.data[i]["data"].resize(self.data[i]["max_length"])
            else:
                continue
            for item in self.data[i]["items"]:
                update[item] = True
        #set view boundaries if tie_x_range is set to a dataset
        if self.x_range > -1:
            if self.data[self.x_range]["data_type"] == Plot.TYPE_TIME:
                self.widget.setLimits( \
                        xMin=self.data[self.x_range]["data"][1], \
                        xMax=self.data[self.x_range]["data"][-1])
            else:
                self.widget.setLimits( \
                        xMin=numpy.amin(self.data[self.x_range]["data"]), \
                        xMax=numpy.amax(self.data[self.x_range]["data"]))
        #replot items
        for i in range(len(self.items)):
            if update[i]:
                self.items[i]["plot"].setData( \
                        self.data[self.items[i]["x"]]["data"], \
                        self.data[self.items[i]["y"]]["data"])
        self.mutex.unlock()

    def add_plot_data(self, i, data=None, attr=None, data_type=TYPE_STATIC, \
                role=ROLE_SLAVE, interval=1.0, \
                min_length=0, length=-1, max_length=-1):
        """Add a data series to the plot.
        
        :param i: Id of the data series. Should be ascending natural numbers 
            from 0 up.
        :type i: int
        :param data: Initial series of values. May be omited if not of
            TYPE_STATIC.
        :type data: numpy.ndarray|None
        :param attr: Reference to the getter function for an attribute of an
            device object. May be omited if not of TYPE_SCALAR or TYPE_SPECTRUM.
        :type attr: Device.method
        :param data_type: How the data is updated. May be one of the following 
            - TYPE_STATIC no update,
            - TYPE_TIME append time stamp at trigger point,
            - TYPE_SCALAR append attribute value at trigger point,
            - or TYPE_SPECTRUM exchange data series by attribute values at
                trigger point.
        :type data_type: int|TYPE_STATIC|TYPE_TIME|TYPE_SCALAR|TYPE_SPECTRUM
        :param role: Should be ROLE_MASTER for data series which triggers the
            plot update.
        :type role: int|ROLE_SLAVE|ROLE_MASTER
        :param interval: Interval, to which the update_timer is set if of
            TYPE_TIME and ROLE_MASTER. May be omited otherwise.
        :type interval: float
        :param min_length: Data series will be extended to this length. May be
            omited.
        :type min_length: int
        :param length: Sets min_length and max_length to this value. -1 will
            will disable this feature. May be omited.
        :type length: int
        :param max_length: Data series will be shortened to this length. -1 will
            will disable this feature. May be omited.
        :type max_length: int
        :return: False on errors, True otherwise.
        :rtype: bool
        """
        if length > -1:
            min_length = length
            max_length = length
        if data is not None and type(data) != numpy.ndarray:
            data = numpy.array(data)
        if data is not None and data.shape[0] < min_length:
            data.resize(min_length)
        if data is not None and max_length > 0 and data.shape[0] > max_length:
            data.resize(max_length)
        datum = { \
                "data": data, \
                "data_type": data_type, \
                "min_length": min_length, \
                "length": length, \
                "max_length": max_length, \
                "items" : []}
        if data_type in [Plot.TYPE_SCALAR, Plot.TYPE_SPECTRUM]:
            try:
                if callable(attr):
                    device = attr.__self__
                    name = attr.__name__
                else:
                    return False
            except:
                return False
            datum["device"] = device  #device instance
            datum["name"] = name  #attribute name
            datum["getter"] = attr  #attribute getter method
            if data is None and data_type == Plot.TYPE_SCALAR:
                start_value = attr(refresh=True)
                datum["data"] = numpy.full(min_length, start_value)
            elif data is None:
                datum["data"] = numpy.array(attr(refresh=True))
                if datum["data"].shape[0] < min_length:
                    datum["data"].resize(min_length)
                if max_length > 0 and datum["data"].shape[0] > max_length:
                    datum["data"].resize(max_length)
        elif data_type == Plot.TYPE_TIME:
            datum["interval"] = interval
            if data is None:
                datum["data"] = numpy.linspace( \
                        -(min_length-1)*interval, 0, min_length)
        elif data_type != Plot.TYPE_STATIC:
            return False
        self.mutex.lock()
        self.data[i] = datum
        self.mutex.unlock()
        if role == Plot.ROLE_MASTER:
            self.set_master(i)
        return True

    def remove_plot_data(self, i):
        if i == self.master:
            self.unset_master()
        items = self.data[i]["items"]
        for item in items:
            self.remove_plot_item(item)
        del self.data[i]

    def add_plot_item(self, i, x, y, colour=Qt.red):
        """Add a plot item representing two already added data series.
        
        :param i: Id of the plot item. Should be ascending natural numbers 
            from 0 up.
        :type i: int
        :param x: Id of the data series holding the x values.
        :type x: int
        :param y: Id of the data series holding the y values.
        :type y: int
        :param colour: Colour of the plot item. The default is red.
        :type colour: str|QRgb|QColor|Qt.GlobalColor
        """
        self.items[i] = {"x": x, "y": y}
        self.data[x]["items"].append(i)
        self.data[y]["items"].append(i)
        self.items[i]["plot"] = PlotDataItem( \
                self.data[x]["data"], \
                self.data[y]["data"], \
                pen=QColor(colour))
        self.widget.addItem(self.items[i]["plot"])

    def remove_plot_item(self, i):
        self.mutex.lock()
        self.data[self.items[i]["x"]]["items"].remove(i)
        self.data[self.items[i]["y"]]["items"].remove(i)
        self.widget.removeItem(self.items[i]["plot"])
        del self.items[i]
        self.mutex.unlock()

    def add_line_item(self, i, **kwargs):
        self.mutex.lock()
        self.lines[i] = InfiniteLine(**kwargs)
        self.widget.addItem(self.lines[i])
        self.mutex.unlock()

    def remove_line_item(self, i):
        self.mutex.lock()
        self.widget.removeItem(self.lines[i])
        del self.lines[i]
        self.mutex.unlock()

    def set_master(self, i):
        """Set which data series will trigger a plot update.
        
        :param data: Id of the data series which triggers the update.
        :type data: int
        """
        self.mutex.lock()
        if self.master is not None and self.master != i:
            self.unset_master()
            self.data[i]["device"].value_changed.disconnect(self.update_values)
        if self.data[i]["data_type"] in [Plot.TYPE_SCALAR, Plot.TYPE_SPECTRUM]:
            self.data[i]["device"].value_changed.connect(self.update_values)
        elif self.data[i]["data_type"] == Plot.TYPE_TIME:
            self.update_timer.timeout.connect(self.update_values)
            self.update_timer_start = time.time()
            self.update_timer.start(self.data[i]["interval"] * 1000.)
        self.master = i
        self.mutex.unlock()

    def unset_master(self):
        self.mutex.lock()
        if self.data[self.master]["data_type"] in \
                [Plot.TYPE_SCALAR, Plot.TYPE_SPECTRUM]:
            self.data[self.master]["device"].value_changed.disconnect( \
                    self.update_values)
        elif self.data[self.master]["data_type"] == Plot.TYPE_TIME:
            self.update_timer.timeout.disconnect(self.update_values)
            self.update_timer.stop()
        self.mutex.unlock()

    def tie_x_range(self, data=-1):
        """Sets the plot x range to be the same as the given data series.
        
        :param data: Id of the data series holding the x values.
        :type data: int
        """
        self.x_range = data

    def clear(self):
        data = list(self.data.keys())
        for datum in data:
            self.remove_plot_data(datum)
        for line in list(self.lines.keys()):
            self.remove_line_item(line)
Ejemplo n.º 9
0
class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(658, 656)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setMinimumSize(QtCore.QSize(600, 400))
        self.centralwidget.setObjectName("centralwidget")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
        self.verticalLayout.setObjectName("verticalLayout")
        self.splitter_2 = QtWidgets.QSplitter(self.centralwidget)
        self.splitter_2.setOrientation(QtCore.Qt.Horizontal)
        self.splitter_2.setObjectName("splitter_2")
        self.layoutWidget = QtWidgets.QWidget(self.splitter_2)
        self.layoutWidget.setObjectName("layoutWidget")
        self.horizontalLayout = QtWidgets.QHBoxLayout(self.layoutWidget)
        self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.image_path = QtWidgets.QLineEdit(self.layoutWidget)
        self.image_path.setText("")
        self.image_path.setObjectName("image_path")
        self.horizontalLayout.addWidget(self.image_path)
        self.find = QtWidgets.QPushButton(self.layoutWidget)
        self.find.setObjectName("find")
        self.horizontalLayout.addWidget(self.find)
        self.load = QtWidgets.QPushButton(self.splitter_2)
        self.load.setMaximumSize(QtCore.QSize(100, 50))
        self.load.setObjectName("load")
        self.verticalLayout.addWidget(self.splitter_2)
        self.image = PlotWidget(self.centralwidget)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.NoBrush)
        self.image.setBackgroundBrush(brush)
        self.image.setObjectName("image")
        self.verticalLayout.addWidget(self.image)
        self.splitter = QtWidgets.QSplitter(self.centralwidget)
        self.splitter.setOrientation(QtCore.Qt.Horizontal)
        self.splitter.setObjectName("splitter")
        self.trash = SpinBox(self.splitter)
        self.trash.setMaximumSize(QtCore.QSize(100, 16777215))
        self.trash.setAlignment(QtCore.Qt.AlignCenter)
        self.trash.setButtonSymbols(QtWidgets.QAbstractSpinBox.UpDownArrows)
        self.trash.setMinimum(0)
        self.trash.setMaximum(1)
        self.trash.setProperty("value", 0)
        self.trash.setObjectName("trash")
        self.go = QtWidgets.QPushButton(self.splitter)
        self.go.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.go.setObjectName("go")
        self.verticalLayout.addWidget(self.splitter)
        self.formula = QtWidgets.QLineEdit(self.centralwidget)
        self.formula.setAlignment(QtCore.Qt.AlignCenter)
        self.formula.setReadOnly(True)
        self.formula.setObjectName("formula")
        self.verticalLayout.addWidget(self.formula)
        MainWindow.setCentralWidget(self.centralwidget)

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

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "ImgToLatex"))
        self.find.setText(_translate("MainWindow", "Обзор"))
        self.load.setText(_translate("MainWindow", "Загрузить"))
        self.go.setToolTip(_translate("MainWindow", "Перевести формулу"))
        self.go.setText(_translate("MainWindow", "Перевести"))
Ejemplo n.º 10
0
class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1145, 753)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
        MainWindow.setSizePolicy(sizePolicy)
        self.centralwidget = QtGui.QWidget(MainWindow)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth())
        self.centralwidget.setSizePolicy(sizePolicy)
        self.centralwidget.setObjectName("centralwidget")
        self.verticalLayout_12 = QtGui.QVBoxLayout(self.centralwidget)
        self.verticalLayout_12.setObjectName("verticalLayout_12")
        self.gridLayout = QtGui.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.group_io = QtGui.QGroupBox(self.centralwidget)
        self.group_io.setObjectName("group_io")
        self.verticalLayout_14 = QtGui.QVBoxLayout(self.group_io)
        self.verticalLayout_14.setObjectName("verticalLayout_14")
        self.layout_samples = QtGui.QHBoxLayout()
        self.layout_samples.setObjectName("layout_samples")
        self.label = QtGui.QLabel(self.group_io)
        self.label.setObjectName("label")
        self.layout_samples.addWidget(self.label)
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Minimum)
        self.layout_samples.addItem(spacerItem)
        self.field_samples = QtGui.QLineEdit(self.group_io)
        self.field_samples.setObjectName("field_samples")
        self.layout_samples.addWidget(self.field_samples)
        self.button_importSamples = QtGui.QToolButton(self.group_io)
        self.button_importSamples.setObjectName("button_importSamples")
        self.layout_samples.addWidget(self.button_importSamples)
        self.verticalLayout_14.addLayout(self.layout_samples)
        self.layout_topology = QtGui.QHBoxLayout()
        self.layout_topology.setObjectName("layout_topology")
        self.label_2 = QtGui.QLabel(self.group_io)
        self.label_2.setObjectName("label_2")
        self.layout_topology.addWidget(self.label_2)
        spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
        self.layout_topology.addItem(spacerItem1)
        self.field_topology = QtGui.QLineEdit(self.group_io)
        self.field_topology.setObjectName("field_topology")
        self.layout_topology.addWidget(self.field_topology)
        spacerItem2 = QtGui.QSpacerItem(26, 20, QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Minimum)
        self.layout_topology.addItem(spacerItem2)
        self.verticalLayout_14.addLayout(self.layout_topology)
        self.layout_properties = QtGui.QHBoxLayout()
        self.layout_properties.setObjectName("layout_properties")
        self.label_3 = QtGui.QLabel(self.group_io)
        self.label_3.setObjectName("label_3")
        self.layout_properties.addWidget(self.label_3)
        self.box_sectors = QtGui.QSpinBox(self.group_io)
        self.box_sectors.setObjectName("box_sectors")
        self.layout_properties.addWidget(self.box_sectors)
        spacerItem3 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.layout_properties.addItem(spacerItem3)
        self.check_discreteIn = QtGui.QCheckBox(self.group_io)
        self.check_discreteIn.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.check_discreteIn.setObjectName("check_discreteIn")
        self.layout_properties.addWidget(self.check_discreteIn)
        self.check_discreteOut = QtGui.QCheckBox(self.group_io)
        self.check_discreteOut.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.check_discreteOut.setObjectName("check_discreteOut")
        self.layout_properties.addWidget(self.check_discreteOut)
        spacerItem4 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.layout_properties.addItem(spacerItem4)
        self.verticalLayout_14.addLayout(self.layout_properties)
        self.gridLayout.addWidget(self.group_io, 0, 0, 1, 1)
        self.group_error = QtGui.QGroupBox(self.centralwidget)
        self.group_error.setObjectName("group_error")
        self.verticalLayout_3 = QtGui.QVBoxLayout(self.group_error)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.layout_stopKeySelect = QtGui.QHBoxLayout()
        self.layout_stopKeySelect.setObjectName("layout_stopKeySelect")
        self.label_stopKey = QtGui.QLabel(self.group_error)
        self.label_stopKey.setObjectName("label_stopKey")
        self.layout_stopKeySelect.addWidget(self.label_stopKey)
        spacerItem5 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Minimum)
        self.layout_stopKeySelect.addItem(spacerItem5)
        self.combo_stopKey = QtGui.QComboBox(self.group_error)
        self.combo_stopKey.setObjectName("combo_stopKey")
        self.combo_stopKey.addItem("")
        self.combo_stopKey.addItem("")
        self.combo_stopKey.addItem("")
        self.combo_stopKey.addItem("")
        self.combo_stopKey.addItem("")
        self.layout_stopKeySelect.addWidget(self.combo_stopKey)
        spacerItem6 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.layout_stopKeySelect.addItem(spacerItem6)
        self.verticalLayout_3.addLayout(self.layout_stopKeySelect)
        self.stacked_stopKey = QtGui.QStackedWidget(self.group_error)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.stacked_stopKey.sizePolicy().hasHeightForWidth())
        self.stacked_stopKey.setSizePolicy(sizePolicy)
        self.stacked_stopKey.setObjectName("stacked_stopKey")
        self.maxError = QtGui.QWidget()
        self.maxError.setObjectName("maxError")
        self.verticalLayout_5 = QtGui.QVBoxLayout(self.maxError)
        self.verticalLayout_5.setObjectName("verticalLayout_5")
        self.layout_maxGlobal = QtGui.QHBoxLayout()
        self.layout_maxGlobal.setObjectName("layout_maxGlobal")
        self.label_10 = QtGui.QLabel(self.maxError)
        self.label_10.setObjectName("label_10")
        self.layout_maxGlobal.addWidget(self.label_10)
        spacerItem7 = QtGui.QSpacerItem(21, 20, QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Minimum)
        self.layout_maxGlobal.addItem(spacerItem7)
        self.box_maxGlobal = QtGui.QSpinBox(self.maxError)
        self.box_maxGlobal.setObjectName("box_maxGlobal")
        self.layout_maxGlobal.addWidget(self.box_maxGlobal)
        spacerItem8 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.layout_maxGlobal.addItem(spacerItem8)
        self.verticalLayout_5.addLayout(self.layout_maxGlobal)
        self.layout_maxLocal = QtGui.QHBoxLayout()
        self.layout_maxLocal.setObjectName("layout_maxLocal")
        self.label_11 = QtGui.QLabel(self.maxError)
        self.label_11.setObjectName("label_11")
        self.layout_maxLocal.addWidget(self.label_11)
        spacerItem9 = QtGui.QSpacerItem(29, 20, QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Minimum)
        self.layout_maxLocal.addItem(spacerItem9)
        self.box_maxLocal = QtGui.QSpinBox(self.maxError)
        self.box_maxLocal.setObjectName("box_maxLocal")
        self.layout_maxLocal.addWidget(self.box_maxLocal)
        spacerItem10 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.layout_maxLocal.addItem(spacerItem10)
        self.verticalLayout_5.addLayout(self.layout_maxLocal)
        self.stacked_stopKey.addWidget(self.maxError)
        self.errorRate = QtGui.QWidget()
        self.errorRate.setObjectName("errorRate")
        self.verticalLayout_7 = QtGui.QVBoxLayout(self.errorRate)
        self.verticalLayout_7.setObjectName("verticalLayout_7")
        self.layout_errorGlobal = QtGui.QHBoxLayout()
        self.layout_errorGlobal.setObjectName("layout_errorGlobal")
        self.label_12 = QtGui.QLabel(self.errorRate)
        self.label_12.setObjectName("label_12")
        self.layout_errorGlobal.addWidget(self.label_12)
        spacerItem11 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Minimum)
        self.layout_errorGlobal.addItem(spacerItem11)
        self.box_errorGlobal = QtGui.QDoubleSpinBox(self.errorRate)
        self.box_errorGlobal.setSuffix("")
        self.box_errorGlobal.setObjectName("box_errorGlobal")
        self.layout_errorGlobal.addWidget(self.box_errorGlobal)
        spacerItem12 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.layout_errorGlobal.addItem(spacerItem12)
        self.verticalLayout_7.addLayout(self.layout_errorGlobal)
        self.layout_errorLocal = QtGui.QHBoxLayout()
        self.layout_errorLocal.setObjectName("layout_errorLocal")
        self.label_13 = QtGui.QLabel(self.errorRate)
        self.label_13.setObjectName("label_13")
        self.layout_errorLocal.addWidget(self.label_13)
        spacerItem13 = QtGui.QSpacerItem(55, 20, QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Minimum)
        self.layout_errorLocal.addItem(spacerItem13)
        self.box_errorLocal = QtGui.QSpinBox(self.errorRate)
        self.box_errorLocal.setObjectName("box_errorLocal")
        self.layout_errorLocal.addWidget(self.box_errorLocal)
        spacerItem14 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.layout_errorLocal.addItem(spacerItem14)
        self.verticalLayout_7.addLayout(self.layout_errorLocal)
        self.stacked_stopKey.addWidget(self.errorRate)
        self.mse = QtGui.QWidget()
        self.mse.setObjectName("mse")
        self.verticalLayout_8 = QtGui.QVBoxLayout(self.mse)
        self.verticalLayout_8.setObjectName("verticalLayout_8")
        self.layout_mseGlobal = QtGui.QHBoxLayout()
        self.layout_mseGlobal.setObjectName("layout_mseGlobal")
        self.label_14 = QtGui.QLabel(self.mse)
        self.label_14.setObjectName("label_14")
        self.layout_mseGlobal.addWidget(self.label_14)
        spacerItem15 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Minimum)
        self.layout_mseGlobal.addItem(spacerItem15)
        self.box_mseGlobal = QtGui.QDoubleSpinBox(self.mse)
        self.box_mseGlobal.setObjectName("box_mseGlobal")
        self.layout_mseGlobal.addWidget(self.box_mseGlobal)
        spacerItem16 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.layout_mseGlobal.addItem(spacerItem16)
        self.verticalLayout_8.addLayout(self.layout_mseGlobal)
        self.layout_mseLocal = QtGui.QHBoxLayout()
        self.layout_mseLocal.setObjectName("layout_mseLocal")
        self.label_15 = QtGui.QLabel(self.mse)
        self.label_15.setObjectName("label_15")
        self.layout_mseLocal.addWidget(self.label_15)
        spacerItem17 = QtGui.QSpacerItem(47, 20, QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Minimum)
        self.layout_mseLocal.addItem(spacerItem17)
        self.box_mseLocal = QtGui.QDoubleSpinBox(self.mse)
        self.box_mseLocal.setObjectName("box_mseLocal")
        self.layout_mseLocal.addWidget(self.box_mseLocal)
        spacerItem18 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.layout_mseLocal.addItem(spacerItem18)
        self.verticalLayout_8.addLayout(self.layout_mseLocal)
        self.stacked_stopKey.addWidget(self.mse)
        self.rmse = QtGui.QWidget()
        self.rmse.setObjectName("rmse")
        self.verticalLayout_4 = QtGui.QVBoxLayout(self.rmse)
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.layout_rmseGlobal = QtGui.QHBoxLayout()
        self.layout_rmseGlobal.setObjectName("layout_rmseGlobal")
        self.label_17 = QtGui.QLabel(self.rmse)
        self.label_17.setObjectName("label_17")
        self.layout_rmseGlobal.addWidget(self.label_17)
        spacerItem19 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Minimum)
        self.layout_rmseGlobal.addItem(spacerItem19)
        self.box_rmseGlobal = QtGui.QDoubleSpinBox(self.rmse)
        self.box_rmseGlobal.setObjectName("box_rmseGlobal")
        self.layout_rmseGlobal.addWidget(self.box_rmseGlobal)
        spacerItem20 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.layout_rmseGlobal.addItem(spacerItem20)
        self.verticalLayout_4.addLayout(self.layout_rmseGlobal)
        self.layout_rmseLocal = QtGui.QHBoxLayout()
        self.layout_rmseLocal.setObjectName("layout_rmseLocal")
        self.label_16 = QtGui.QLabel(self.rmse)
        self.label_16.setObjectName("label_16")
        self.layout_rmseLocal.addWidget(self.label_16)
        spacerItem21 = QtGui.QSpacerItem(47, 20, QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Minimum)
        self.layout_rmseLocal.addItem(spacerItem21)
        self.box_rmseLocal = QtGui.QDoubleSpinBox(self.rmse)
        self.box_rmseLocal.setObjectName("box_rmseLocal")
        self.layout_rmseLocal.addWidget(self.box_rmseLocal)
        spacerItem22 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.layout_rmseLocal.addItem(spacerItem22)
        self.verticalLayout_4.addLayout(self.layout_rmseLocal)
        self.stacked_stopKey.addWidget(self.rmse)
        self.armse = QtGui.QWidget()
        self.armse.setObjectName("armse")
        self.verticalLayout_6 = QtGui.QVBoxLayout(self.armse)
        self.verticalLayout_6.setObjectName("verticalLayout_6")
        self.layout_armseGlobal = QtGui.QHBoxLayout()
        self.layout_armseGlobal.setObjectName("layout_armseGlobal")
        self.label_8 = QtGui.QLabel(self.armse)
        self.label_8.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
        self.label_8.setObjectName("label_8")
        self.layout_armseGlobal.addWidget(self.label_8)
        spacerItem23 = QtGui.QSpacerItem(24, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
        self.layout_armseGlobal.addItem(spacerItem23)
        self.box_armseGlobal = QtGui.QDoubleSpinBox(self.armse)
        self.box_armseGlobal.setObjectName("box_armseGlobal")
        self.layout_armseGlobal.addWidget(self.box_armseGlobal)
        spacerItem24 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.layout_armseGlobal.addItem(spacerItem24)
        self.verticalLayout_6.addLayout(self.layout_armseGlobal)
        self.layout_armseLocal = QtGui.QHBoxLayout()
        self.layout_armseLocal.setObjectName("layout_armseLocal")
        self.label_9 = QtGui.QLabel(self.armse)
        self.label_9.setObjectName("label_9")
        self.layout_armseLocal.addWidget(self.label_9)
        spacerItem25 = QtGui.QSpacerItem(30, 20, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
        self.layout_armseLocal.addItem(spacerItem25)
        self.box_armseLocal = QtGui.QDoubleSpinBox(self.armse)
        self.box_armseLocal.setObjectName("box_armseLocal")
        self.layout_armseLocal.addWidget(self.box_armseLocal)
        spacerItem26 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.layout_armseLocal.addItem(spacerItem26)
        self.verticalLayout_6.addLayout(self.layout_armseLocal)
        self.layout_softMargins = QtGui.QHBoxLayout()
        self.layout_softMargins.setObjectName("layout_softMargins")
        self.check_softMargins = QtGui.QCheckBox(self.armse)
        self.check_softMargins.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.check_softMargins.setObjectName("check_softMargins")
        self.layout_softMargins.addWidget(self.check_softMargins)
        spacerItem27 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.layout_softMargins.addItem(spacerItem27)
        self.verticalLayout_6.addLayout(self.layout_softMargins)
        self.stacked_stopKey.addWidget(self.armse)
        self.verticalLayout_3.addWidget(self.stacked_stopKey)
        self.gridLayout.addWidget(self.group_error, 0, 1, 1, 1)
        self.group_weights = QtGui.QGroupBox(self.centralwidget)
        self.group_weights.setObjectName("group_weights")
        self.verticalLayout_2 = QtGui.QVBoxLayout(self.group_weights)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.layout_initWeights = QtGui.QHBoxLayout()
        self.layout_initWeights.setObjectName("layout_initWeights")
        self.label_4 = QtGui.QLabel(self.group_weights)
        self.label_4.setObjectName("label_4")
        self.layout_initWeights.addWidget(self.label_4)
        spacerItem28 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Minimum)
        self.layout_initWeights.addItem(spacerItem28)
        self.combo_initWeights = QtGui.QComboBox(self.group_weights)
        self.combo_initWeights.setObjectName("combo_initWeights")
        self.combo_initWeights.addItem("")
        self.combo_initWeights.addItem("")
        self.layout_initWeights.addWidget(self.combo_initWeights)
        spacerItem29 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.layout_initWeights.addItem(spacerItem29)
        self.verticalLayout_2.addLayout(self.layout_initWeights)
        self.stacked_initWeights = QtGui.QStackedWidget(self.group_weights)
        self.stacked_initWeights.setObjectName("stacked_initWeights")
        self.random = QtGui.QWidget()
        self.random.setObjectName("random")
        self.verticalLayout_13 = QtGui.QVBoxLayout(self.random)
        self.verticalLayout_13.setObjectName("verticalLayout_13")
        self.horizontalLayout_6 = QtGui.QHBoxLayout()
        self.horizontalLayout_6.setObjectName("horizontalLayout_6")
        self.button_randomWeights = QtGui.QPushButton(self.random)
        self.button_randomWeights.setFlat(False)
        self.button_randomWeights.setObjectName("button_randomWeights")
        self.horizontalLayout_6.addWidget(self.button_randomWeights)
        spacerItem30 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_6.addItem(spacerItem30)
        self.verticalLayout_13.addLayout(self.horizontalLayout_6)
        spacerItem31 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout_13.addItem(spacerItem31)
        self.stacked_initWeights.addWidget(self.random)
        self.user = QtGui.QWidget()
        self.user.setObjectName("user")
        self.verticalLayout_10 = QtGui.QVBoxLayout(self.user)
        self.verticalLayout_10.setObjectName("verticalLayout_10")
        self.horizontalLayout_5 = QtGui.QHBoxLayout()
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
        self.label_5 = QtGui.QLabel(self.user)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_5.sizePolicy().hasHeightForWidth())
        self.label_5.setSizePolicy(sizePolicy)
        self.label_5.setObjectName("label_5")
        self.horizontalLayout_5.addWidget(self.label_5)
        spacerItem32 = QtGui.QSpacerItem(34, 20, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_5.addItem(spacerItem32)
        self.field_weightsFile = QtGui.QLineEdit(self.user)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.field_weightsFile.sizePolicy().hasHeightForWidth())
        self.field_weightsFile.setSizePolicy(sizePolicy)
        self.field_weightsFile.setObjectName("field_weightsFile")
        self.horizontalLayout_5.addWidget(self.field_weightsFile)
        self.button_weightsFile = QtGui.QToolButton(self.user)
        self.button_weightsFile.setObjectName("button_weightsFile")
        self.horizontalLayout_5.addWidget(self.button_weightsFile)
        spacerItem33 = QtGui.QSpacerItem(27, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_5.addItem(spacerItem33)
        self.verticalLayout_10.addLayout(self.horizontalLayout_5)
        spacerItem34 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout_10.addItem(spacerItem34)
        self.stacked_initWeights.addWidget(self.user)
        self.verticalLayout_2.addWidget(self.stacked_initWeights)
        spacerItem35 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem35)
        self.gridLayout.addWidget(self.group_weights, 1, 0, 1, 1)
        self.group_control = QtGui.QGroupBox(self.centralwidget)
        self.group_control.setObjectName("group_control")
        self.verticalLayout_11 = QtGui.QVBoxLayout(self.group_control)
        self.verticalLayout_11.setObjectName("verticalLayout_11")
        self.layout_control = QtGui.QHBoxLayout()
        self.layout_control.setObjectName("layout_control")
        self.layout_timing = QtGui.QVBoxLayout()
        self.layout_timing.setObjectName("layout_timing")
        self.layout_timeLimit = QtGui.QHBoxLayout()
        self.layout_timeLimit.setObjectName("layout_timeLimit")
        self.check_timeLimit = QtGui.QCheckBox(self.group_control)
        self.check_timeLimit.setObjectName("check_timeLimit")
        self.layout_timeLimit.addWidget(self.check_timeLimit)
        spacerItem36 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.layout_timeLimit.addItem(spacerItem36)
        self.box_timeLimit = QtGui.QTimeEdit(self.group_control)
        self.box_timeLimit.setEnabled(False)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.box_timeLimit.sizePolicy().hasHeightForWidth())
        self.box_timeLimit.setSizePolicy(sizePolicy)
        self.box_timeLimit.setFrame(True)
        self.box_timeLimit.setButtonSymbols(QtGui.QAbstractSpinBox.UpDownArrows)
        self.box_timeLimit.setCurrentSection(QtGui.QDateTimeEdit.HourSection)
        self.box_timeLimit.setObjectName("box_timeLimit")
        self.layout_timeLimit.addWidget(self.box_timeLimit)
        self.layout_timing.addLayout(self.layout_timeLimit)
        self.layout_iterLimit = QtGui.QHBoxLayout()
        self.layout_iterLimit.setObjectName("layout_iterLimit")
        self.check_iterLimit = QtGui.QCheckBox(self.group_control)
        self.check_iterLimit.setObjectName("check_iterLimit")
        self.layout_iterLimit.addWidget(self.check_iterLimit)
        spacerItem37 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.layout_iterLimit.addItem(spacerItem37)
        self.box_iterLimit = QtGui.QSpinBox(self.group_control)
        self.box_iterLimit.setEnabled(False)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.box_iterLimit.sizePolicy().hasHeightForWidth())
        self.box_iterLimit.setSizePolicy(sizePolicy)
        self.box_iterLimit.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.box_iterLimit.setMaximum(9999)
        self.box_iterLimit.setObjectName("box_iterLimit")
        self.layout_iterLimit.addWidget(self.box_iterLimit)
        self.layout_timing.addLayout(self.layout_iterLimit)
        self.layout_control.addLayout(self.layout_timing)
        spacerItem38 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Minimum)
        self.layout_control.addItem(spacerItem38)
        self.layout_miscControl = QtGui.QVBoxLayout()
        self.layout_miscControl.setObjectName("layout_miscControl")
        self.check_useCuda = QtGui.QCheckBox(self.group_control)
        self.check_useCuda.setObjectName("check_useCuda")
        self.layout_miscControl.addWidget(self.check_useCuda)
        self.line = QtGui.QFrame(self.group_control)
        self.line.setFrameShape(QtGui.QFrame.HLine)
        self.line.setFrameShadow(QtGui.QFrame.Sunken)
        self.line.setObjectName("line")
        self.layout_miscControl.addWidget(self.line)
        self.check_plotError = QtGui.QCheckBox(self.group_control)
        self.check_plotError.setObjectName("check_plotError")
        self.layout_miscControl.addWidget(self.check_plotError)
        self.check_useConsole = QtGui.QCheckBox(self.group_control)
        self.check_useConsole.setObjectName("check_useConsole")
        self.layout_miscControl.addWidget(self.check_useConsole)
        self.layout_control.addLayout(self.layout_miscControl)
        self.verticalLayout_11.addLayout(self.layout_control)
        self.layout_controlButtons = QtGui.QHBoxLayout()
        self.layout_controlButtons.setObjectName("layout_controlButtons")
        self.button_Learn = QtGui.QPushButton(self.group_control)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.button_Learn.sizePolicy().hasHeightForWidth())
        self.button_Learn.setSizePolicy(sizePolicy)
        self.button_Learn.setObjectName("button_Learn")
        self.layout_controlButtons.addWidget(self.button_Learn)
        self.button_Test = QtGui.QPushButton(self.group_control)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.button_Test.sizePolicy().hasHeightForWidth())
        self.button_Test.setSizePolicy(sizePolicy)
        self.button_Test.setObjectName("button_Test")
        self.layout_controlButtons.addWidget(self.button_Test)
        self.button_Export = QtGui.QPushButton(self.group_control)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.button_Export.sizePolicy().hasHeightForWidth())
        self.button_Export.setSizePolicy(sizePolicy)
        self.button_Export.setObjectName("button_Export")
        self.layout_controlButtons.addWidget(self.button_Export)
        spacerItem39 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.layout_controlButtons.addItem(spacerItem39)
        self.verticalLayout_11.addLayout(self.layout_controlButtons)
        spacerItem40 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout_11.addItem(spacerItem40)
        self.gridLayout.addWidget(self.group_control, 1, 1, 1, 1)
        self.verticalLayout_12.addLayout(self.gridLayout)
        self.group_Select = QtGui.QGroupBox(self.centralwidget)
        self.group_Select.setObjectName("group_Select")
        self.horizontalLayout_8 = QtGui.QHBoxLayout(self.group_Select)
        self.horizontalLayout_8.setObjectName("horizontalLayout_8")
        self.horizontalLayout_3 = QtGui.QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.verticalLayout_9 = QtGui.QVBoxLayout()
        self.verticalLayout_9.setObjectName("verticalLayout_9")
        self.check_lockNet = QtGui.QCheckBox(self.group_Select)
        self.check_lockNet.setObjectName("check_lockNet")
        self.verticalLayout_9.addWidget(self.check_lockNet)
        self.button_Reset = QtGui.QPushButton(self.group_Select)
        self.button_Reset.setObjectName("button_Reset")
        self.verticalLayout_9.addWidget(self.button_Reset)
        self.horizontalLayout_3.addLayout(self.verticalLayout_9)
        self.scroll_netInstance = QtGui.QScrollArea(self.group_Select)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.scroll_netInstance.sizePolicy().hasHeightForWidth())
        self.scroll_netInstance.setSizePolicy(sizePolicy)
        self.scroll_netInstance.setMaximumSize(QtCore.QSize(16777215, 50))
        self.scroll_netInstance.setFrameShape(QtGui.QFrame.Panel)
        self.scroll_netInstance.setFrameShadow(QtGui.QFrame.Plain)
        self.scroll_netInstance.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.scroll_netInstance.setWidgetResizable(True)
        self.scroll_netInstance.setObjectName("scroll_netInstance")
        self.layout_netInstance = QtGui.QWidget()
        self.layout_netInstance.setGeometry(QtCore.QRect(0, 0, 597, 48))
        self.layout_netInstance.setObjectName("layout_netInstance")
        self.horizontalLayout = QtGui.QHBoxLayout(self.layout_netInstance)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.button_addNet = QtGui.QToolButton(self.layout_netInstance)
        self.button_addNet.setObjectName("button_addNet")
        self.horizontalLayout.addWidget(self.button_addNet)
        spacerItem41 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem41)
        self.scroll_netInstance.setWidget(self.layout_netInstance)
        self.horizontalLayout_3.addWidget(self.scroll_netInstance)
        self.horizontalLayout_8.addLayout(self.horizontalLayout_3)
        self.verticalLayout_12.addWidget(self.group_Select)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar()
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1145, 22))
        self.menubar.setObjectName("menubar")
        self.menuFile = QtGui.QMenu(self.menubar)
        self.menuFile.setObjectName("menuFile")
        self.menuEdit = QtGui.QMenu(self.menubar)
        self.menuEdit.setObjectName("menuEdit")
        self.menuTools = QtGui.QMenu(self.menubar)
        self.menuTools.setObjectName("menuTools")
        self.menuView = QtGui.QMenu(self.menubar)
        self.menuView.setObjectName("menuView")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.dock_graphPlot = QtGui.QDockWidget(MainWindow)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.dock_graphPlot.sizePolicy().hasHeightForWidth())
        self.dock_graphPlot.setSizePolicy(sizePolicy)
        self.dock_graphPlot.setMinimumSize(QtCore.QSize(400, 286))
        self.dock_graphPlot.setAllowedAreas(QtCore.Qt.BottomDockWidgetArea|QtCore.Qt.LeftDockWidgetArea|QtCore.Qt.RightDockWidgetArea)
        self.dock_graphPlot.setObjectName("dock_graphPlot")
        self.dockWidgetContents_6 = QtGui.QWidget()
        self.dockWidgetContents_6.setObjectName("dockWidgetContents_6")
        self.verticalLayout = QtGui.QVBoxLayout(self.dockWidgetContents_6)
        self.verticalLayout.setObjectName("verticalLayout")
        self.graph_plotError = PlotWidget(self.dockWidgetContents_6)
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        self.graph_plotError.setBackgroundBrush(brush)
        self.graph_plotError.setObjectName("graph_plotError")
        self.verticalLayout.addWidget(self.graph_plotError)
        self.gridLayout_2 = QtGui.QGridLayout()
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.horizontalLayout_4 = QtGui.QHBoxLayout()
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.label_6 = QtGui.QLabel(self.dockWidgetContents_6)
        self.label_6.setObjectName("label_6")
        self.horizontalLayout_4.addWidget(self.label_6)
        spacerItem42 = QtGui.QSpacerItem(21, 20, QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_4.addItem(spacerItem42)
        self.box_refreshLimit = QtGui.QSpinBox(self.dockWidgetContents_6)
        self.box_refreshLimit.setFrame(True)
        self.box_refreshLimit.setReadOnly(False)
        self.box_refreshLimit.setButtonSymbols(QtGui.QAbstractSpinBox.UpDownArrows)
        self.box_refreshLimit.setMinimum(1)
        self.box_refreshLimit.setObjectName("box_refreshLimit")
        self.horizontalLayout_4.addWidget(self.box_refreshLimit)
        spacerItem43 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_4.addItem(spacerItem43)
        self.gridLayout_2.addLayout(self.horizontalLayout_4, 0, 0, 1, 1)
        self.horizontalLayout_7 = QtGui.QHBoxLayout()
        self.horizontalLayout_7.setObjectName("horizontalLayout_7")
        self.label_7 = QtGui.QLabel(self.dockWidgetContents_6)
        self.label_7.setObjectName("label_7")
        self.horizontalLayout_7.addWidget(self.label_7)
        spacerItem44 = QtGui.QSpacerItem(50, 20, QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_7.addItem(spacerItem44)
        self.box_currentIter = QtGui.QSpinBox(self.dockWidgetContents_6)
        self.box_currentIter.setReadOnly(True)
        self.box_currentIter.setButtonSymbols(QtGui.QAbstractSpinBox.NoButtons)
        self.box_currentIter.setMaximum(9999)
        self.box_currentIter.setObjectName("box_currentIter")
        self.horizontalLayout_7.addWidget(self.box_currentIter)
        spacerItem45 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_7.addItem(spacerItem45)
        self.gridLayout_2.addLayout(self.horizontalLayout_7, 1, 0, 1, 1)
        self.check_showThresh = QtGui.QCheckBox(self.dockWidgetContents_6)
        self.check_showThresh.setObjectName("check_showThresh")
        self.gridLayout_2.addWidget(self.check_showThresh, 0, 1, 1, 1)
        self.verticalLayout.addLayout(self.gridLayout_2)
        self.dock_graphPlot.setWidget(self.dockWidgetContents_6)
        MainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.dock_graphPlot)
        self.dock_graphConsole = QtGui.QDockWidget(MainWindow)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.dock_graphConsole.sizePolicy().hasHeightForWidth())
        self.dock_graphConsole.setSizePolicy(sizePolicy)
        self.dock_graphConsole.setMinimumSize(QtCore.QSize(102, 200))
        self.dock_graphConsole.setAllowedAreas(QtCore.Qt.BottomDockWidgetArea|QtCore.Qt.TopDockWidgetArea)
        self.dock_graphConsole.setObjectName("dock_graphConsole")
        self.dockWidgetContents_7 = QtGui.QWidget()
        self.dockWidgetContents_7.setObjectName("dockWidgetContents_7")
        self.horizontalLayout_2 = QtGui.QHBoxLayout(self.dockWidgetContents_7)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.graph_console = ConsoleWidget(self.dockWidgetContents_7)
        self.graph_console.setObjectName("graph_console")
        self.horizontalLayout_2.addWidget(self.graph_console)
        self.dock_graphConsole.setWidget(self.dockWidgetContents_7)
        MainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(8), self.dock_graphConsole)
        self.actionImportSamples = QtGui.QAction(MainWindow)
        self.actionImportSamples.setObjectName("actionImportSamples")
        self.actionExportWeights = QtGui.QAction(MainWindow)
        self.actionExportWeights.setObjectName("actionExportWeights")
        self.actionLearn = QtGui.QAction(MainWindow)
        self.actionLearn.setObjectName("actionLearn")
        self.actionTest = QtGui.QAction(MainWindow)
        self.actionTest.setObjectName("actionTest")
        self.actionExit = QtGui.QAction(MainWindow)
        self.actionExit.setObjectName("actionExit")
        self.actionReset_Simulator = QtGui.QAction(MainWindow)
        self.actionReset_Simulator.setObjectName("actionReset_Simulator")
        self.actionCut = QtGui.QAction(MainWindow)
        self.actionCut.setObjectName("actionCut")
        self.actionCopy = QtGui.QAction(MainWindow)
        self.actionCopy.setObjectName("actionCopy")
        self.actionPaste = QtGui.QAction(MainWindow)
        self.actionPaste.setObjectName("actionPaste")
        self.action_loadSettings = QtGui.QAction(MainWindow)
        self.action_loadSettings.setObjectName("action_loadSettings")
        self.actionShow_Console = QtGui.QAction(MainWindow)
        self.actionShow_Console.setObjectName("actionShow_Console")
        self.actionShow_Error_Plot = QtGui.QAction(MainWindow)
        self.actionShow_Error_Plot.setObjectName("actionShow_Error_Plot")
        self.actionUse_CUDA = QtGui.QAction(MainWindow)
        self.actionUse_CUDA.setCheckable(True)
        self.actionUse_CUDA.setObjectName("actionUse_CUDA")
        self.menuFile.addAction(self.actionImportSamples)
        self.menuFile.addAction(self.actionExportWeights)
        self.menuFile.addSeparator()
        self.menuFile.addAction(self.actionLearn)
        self.menuFile.addAction(self.actionTest)
        self.menuFile.addSeparator()
        self.menuFile.addAction(self.actionExit)
        self.menuEdit.addAction(self.actionCut)
        self.menuEdit.addAction(self.actionCopy)
        self.menuEdit.addAction(self.actionPaste)
        self.menuEdit.addSeparator()
        self.menuEdit.addAction(self.actionReset_Simulator)
        self.menuTools.addAction(self.action_loadSettings)
        self.menuTools.addSeparator()
        self.menuTools.addAction(self.actionUse_CUDA)
        self.menuView.addAction(self.actionShow_Console)
        self.menuView.addAction(self.actionShow_Error_Plot)
        self.menubar.addAction(self.menuFile.menuAction())
        self.menubar.addAction(self.menuEdit.menuAction())
        self.menubar.addAction(self.menuTools.menuAction())
        self.menubar.addAction(self.menuView.menuAction())

        self.retranslateUi(MainWindow)
        self.stacked_stopKey.setCurrentIndex(0)
        self.stacked_initWeights.setCurrentIndex(0)
        QtCore.QObject.connect(self.combo_initWeights, QtCore.SIGNAL("currentIndexChanged(int)"), self.stacked_initWeights.setCurrentIndex)
        QtCore.QObject.connect(self.combo_stopKey, QtCore.SIGNAL("currentIndexChanged(int)"), self.stacked_stopKey.setCurrentIndex)
        QtCore.QObject.connect(self.dock_graphConsole, QtCore.SIGNAL("visibilityChanged(bool)"), self.check_useConsole.setChecked)
        QtCore.QObject.connect(self.dock_graphPlot, QtCore.SIGNAL("visibilityChanged(bool)"), self.check_plotError.setChecked)
        QtCore.QObject.connect(self.check_lockNet, QtCore.SIGNAL("toggled(bool)"), self.button_addNet.setDisabled)
        QtCore.QObject.connect(self.check_timeLimit, QtCore.SIGNAL("toggled(bool)"), self.box_timeLimit.setEnabled)
        QtCore.QObject.connect(self.check_iterLimit, QtCore.SIGNAL("toggled(bool)"), self.box_iterLimit.setEnabled)
        QtCore.QObject.connect(self.check_plotError, QtCore.SIGNAL("toggled(bool)"), self.dock_graphPlot.setShown)
        QtCore.QObject.connect(self.check_useConsole, QtCore.SIGNAL("toggled(bool)"), self.dock_graphConsole.setShown)
        QtCore.QObject.connect(self.check_lockNet, QtCore.SIGNAL("toggled(bool)"), self.button_Reset.setDisabled)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8))
        self.group_io.setTitle(QtGui.QApplication.translate("MainWindow", "Inputs", None, QtGui.QApplication.UnicodeUTF8))
        self.label.setText(QtGui.QApplication.translate("MainWindow", "Import Samples", None, QtGui.QApplication.UnicodeUTF8))
        self.button_importSamples.setText(QtGui.QApplication.translate("MainWindow", "...", None, QtGui.QApplication.UnicodeUTF8))
        self.label_2.setText(QtGui.QApplication.translate("MainWindow", "Topology", None, QtGui.QApplication.UnicodeUTF8))
        self.label_3.setText(QtGui.QApplication.translate("MainWindow", "Sectors", None, QtGui.QApplication.UnicodeUTF8))
        self.check_discreteIn.setText(QtGui.QApplication.translate("MainWindow", "Discrete In", None, QtGui.QApplication.UnicodeUTF8))
        self.check_discreteOut.setText(QtGui.QApplication.translate("MainWindow", "Discrete Out", None, QtGui.QApplication.UnicodeUTF8))
        self.group_error.setTitle(QtGui.QApplication.translate("MainWindow", "Errors", None, QtGui.QApplication.UnicodeUTF8))
        self.label_stopKey.setText(QtGui.QApplication.translate("MainWindow", "Stopping Criteria", None, QtGui.QApplication.UnicodeUTF8))
        self.combo_stopKey.setItemText(0, QtGui.QApplication.translate("MainWindow", "max", None, QtGui.QApplication.UnicodeUTF8))
        self.combo_stopKey.setItemText(1, QtGui.QApplication.translate("MainWindow", "error", None, QtGui.QApplication.UnicodeUTF8))
        self.combo_stopKey.setItemText(2, QtGui.QApplication.translate("MainWindow", "mse", None, QtGui.QApplication.UnicodeUTF8))
        self.combo_stopKey.setItemText(3, QtGui.QApplication.translate("MainWindow", "rmse", None, QtGui.QApplication.UnicodeUTF8))
        self.combo_stopKey.setItemText(4, QtGui.QApplication.translate("MainWindow", "armse", None, QtGui.QApplication.UnicodeUTF8))
        self.label_10.setText(QtGui.QApplication.translate("MainWindow", "Max Unlearned Samples", None, QtGui.QApplication.UnicodeUTF8))
        self.label_11.setText(QtGui.QApplication.translate("MainWindow", "Max Errors Per Sample", None, QtGui.QApplication.UnicodeUTF8))
        self.label_12.setText(QtGui.QApplication.translate("MainWindow", "Max % Unlearned Samples", None, QtGui.QApplication.UnicodeUTF8))
        self.label_13.setText(QtGui.QApplication.translate("MainWindow", "Max Errors Per Sample", None, QtGui.QApplication.UnicodeUTF8))
        self.label_14.setText(QtGui.QApplication.translate("MainWindow", "Global MSE Threshold", None, QtGui.QApplication.UnicodeUTF8))
        self.label_15.setText(QtGui.QApplication.translate("MainWindow", "Local MSE Threshold", None, QtGui.QApplication.UnicodeUTF8))
        self.label_17.setText(QtGui.QApplication.translate("MainWindow", "Global RMSE Threshold", None, QtGui.QApplication.UnicodeUTF8))
        self.label_16.setText(QtGui.QApplication.translate("MainWindow", "Local RMSE Threshold", None, QtGui.QApplication.UnicodeUTF8))
        self.label_8.setText(QtGui.QApplication.translate("MainWindow", "Global Angular RMSE Threshold", None, QtGui.QApplication.UnicodeUTF8))
        self.label_9.setText(QtGui.QApplication.translate("MainWindow", "Local Angular RMSE Threshold", None, QtGui.QApplication.UnicodeUTF8))
        self.check_softMargins.setText(QtGui.QApplication.translate("MainWindow", "Soft Margins", None, QtGui.QApplication.UnicodeUTF8))
        self.group_weights.setTitle(QtGui.QApplication.translate("MainWindow", "Weights", None, QtGui.QApplication.UnicodeUTF8))
        self.label_4.setText(QtGui.QApplication.translate("MainWindow", "Initial Weights", None, QtGui.QApplication.UnicodeUTF8))
        self.combo_initWeights.setItemText(0, QtGui.QApplication.translate("MainWindow", "random", None, QtGui.QApplication.UnicodeUTF8))
        self.combo_initWeights.setItemText(1, QtGui.QApplication.translate("MainWindow", "user", None, QtGui.QApplication.UnicodeUTF8))
        self.button_randomWeights.setText(QtGui.QApplication.translate("MainWindow", "Randomize Weights", None, QtGui.QApplication.UnicodeUTF8))
        self.label_5.setText(QtGui.QApplication.translate("MainWindow", "Weights File", None, QtGui.QApplication.UnicodeUTF8))
        self.button_weightsFile.setText(QtGui.QApplication.translate("MainWindow", "...", None, QtGui.QApplication.UnicodeUTF8))
        self.group_control.setTitle(QtGui.QApplication.translate("MainWindow", "Control", None, QtGui.QApplication.UnicodeUTF8))
        self.check_timeLimit.setText(QtGui.QApplication.translate("MainWindow", "Time Limit", None, QtGui.QApplication.UnicodeUTF8))
        self.check_iterLimit.setText(QtGui.QApplication.translate("MainWindow", "Iteration Limit", None, QtGui.QApplication.UnicodeUTF8))
        self.check_useCuda.setText(QtGui.QApplication.translate("MainWindow", "Enable CUDA", None, QtGui.QApplication.UnicodeUTF8))
        self.check_plotError.setText(QtGui.QApplication.translate("MainWindow", "Error Plot", None, QtGui.QApplication.UnicodeUTF8))
        self.check_useConsole.setText(QtGui.QApplication.translate("MainWindow", "Console", None, QtGui.QApplication.UnicodeUTF8))
        self.button_Learn.setText(QtGui.QApplication.translate("MainWindow", "Learn", None, QtGui.QApplication.UnicodeUTF8))
        self.button_Test.setText(QtGui.QApplication.translate("MainWindow", "Test", None, QtGui.QApplication.UnicodeUTF8))
        self.button_Export.setText(QtGui.QApplication.translate("MainWindow", "Export", None, QtGui.QApplication.UnicodeUTF8))
        self.group_Select.setTitle(QtGui.QApplication.translate("MainWindow", "Select", None, QtGui.QApplication.UnicodeUTF8))
        self.check_lockNet.setText(QtGui.QApplication.translate("MainWindow", "Lock", None, QtGui.QApplication.UnicodeUTF8))
        self.button_Reset.setText(QtGui.QApplication.translate("MainWindow", "Reset", None, QtGui.QApplication.UnicodeUTF8))
        self.button_addNet.setText(QtGui.QApplication.translate("MainWindow", "+", None, QtGui.QApplication.UnicodeUTF8))
        self.menuFile.setTitle(QtGui.QApplication.translate("MainWindow", "File", None, QtGui.QApplication.UnicodeUTF8))
        self.menuEdit.setTitle(QtGui.QApplication.translate("MainWindow", "Edit", None, QtGui.QApplication.UnicodeUTF8))
        self.menuTools.setTitle(QtGui.QApplication.translate("MainWindow", "Tools", None, QtGui.QApplication.UnicodeUTF8))
        self.menuView.setTitle(QtGui.QApplication.translate("MainWindow", "View", None, QtGui.QApplication.UnicodeUTF8))
        self.dock_graphPlot.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Error Plot", None, QtGui.QApplication.UnicodeUTF8))
        self.label_6.setText(QtGui.QApplication.translate("MainWindow", "Iterations Per Update", None, QtGui.QApplication.UnicodeUTF8))
        self.label_7.setText(QtGui.QApplication.translate("MainWindow", "Current Iteration", None, QtGui.QApplication.UnicodeUTF8))
        self.check_showThresh.setText(QtGui.QApplication.translate("MainWindow", "Global Limit", None, QtGui.QApplication.UnicodeUTF8))
        self.dock_graphConsole.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Console", None, QtGui.QApplication.UnicodeUTF8))
        self.actionImportSamples.setText(QtGui.QApplication.translate("MainWindow", "Import Samples", None, QtGui.QApplication.UnicodeUTF8))
        self.actionExportWeights.setText(QtGui.QApplication.translate("MainWindow", "Export Weights", None, QtGui.QApplication.UnicodeUTF8))
        self.actionLearn.setText(QtGui.QApplication.translate("MainWindow", "Learn", None, QtGui.QApplication.UnicodeUTF8))
        self.actionTest.setText(QtGui.QApplication.translate("MainWindow", "Test", None, QtGui.QApplication.UnicodeUTF8))
        self.actionExit.setText(QtGui.QApplication.translate("MainWindow", "Exit", None, QtGui.QApplication.UnicodeUTF8))
        self.actionExit.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+Q", None, QtGui.QApplication.UnicodeUTF8))
        self.actionReset_Simulator.setText(QtGui.QApplication.translate("MainWindow", "Reset Simulator", None, QtGui.QApplication.UnicodeUTF8))
        self.actionCut.setText(QtGui.QApplication.translate("MainWindow", "Cut", None, QtGui.QApplication.UnicodeUTF8))
        self.actionCopy.setText(QtGui.QApplication.translate("MainWindow", "Copy", None, QtGui.QApplication.UnicodeUTF8))
        self.actionPaste.setText(QtGui.QApplication.translate("MainWindow", "Paste", None, QtGui.QApplication.UnicodeUTF8))
        self.action_loadSettings.setText(QtGui.QApplication.translate("MainWindow", "Import Config. File", None, QtGui.QApplication.UnicodeUTF8))
        self.actionShow_Console.setText(QtGui.QApplication.translate("MainWindow", "Show Console", None, QtGui.QApplication.UnicodeUTF8))
        self.actionShow_Error_Plot.setText(QtGui.QApplication.translate("MainWindow", "Show Error Plot", None, QtGui.QApplication.UnicodeUTF8))
        self.actionUse_CUDA.setText(QtGui.QApplication.translate("MainWindow", "Use CUDA", None, QtGui.QApplication.UnicodeUTF8))