# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'VNA_Gui.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!

from PyQt5 import QtCore, QtGui, QtWidgets

class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1110, 896)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.groupBox = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox.setGeometry(QtCore.QRect(220, 760, 211, 81))
        self.groupBox.setObjectName("groupBox")
        self.centreFreq = QtWidgets.QSpinBox(self.groupBox)
        self.centreFreq.setEnabled(False)
        self.centreFreq.setGeometry(QtCore.QRect(10, 30, 61, 26))
        self.centreFreq.setMinimum(50)
        self.centreFreq.setMaximum(3799)
        self.centreFreq.setProperty("value", 1300)
        self.centreFreq.setObjectName("centreFreq")
        self.label = QtWidgets.QLabel(self.groupBox)
        self.label.setGeometry(QtCore.QRect(10, 50, 51, 31))
        self.label.setObjectName("label")
        self.numPoints = QtWidgets.QSpinBox(self.groupBox)
        self.numPoints.setEnabled(False)
        self.numPoints.setGeometry(QtCore.QRect(150, 30, 49, 26))
        self.numPoints.setMaximum(500)
        self.numPoints.setProperty("value", 25)
        self.numPoints.setObjectName("numPoints")
        self.spanFreq = QtWidgets.QSpinBox(self.groupBox)
        self.spanFreq.setEnabled(False)
        self.spanFreq.setGeometry(QtCore.QRect(80, 30, 51, 26))
        self.spanFreq.setMinimum(2)
        self.spanFreq.setMaximum(500)
        self.spanFreq.setSingleStep(2)
        self.spanFreq.setProperty("value", 100)
        self.spanFreq.setObjectName("spanFreq")
        self.label_6 = QtWidgets.QLabel(self.groupBox)
        self.label_6.setGeometry(QtCore.QRect(80, 50, 41, 31))
        self.label_6.setObjectName("label_6")
        self.groupBox_2 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_2.setGeometry(QtCore.QRect(10, 760, 201, 81))
        self.groupBox_2.setObjectName("groupBox_2")
        self.ConnectButton = QtWidgets.QPushButton(self.groupBox_2)
        self.ConnectButton.setGeometry(QtCore.QRect(10, 30, 101, 25))
        self.ConnectButton.setObjectName("ConnectButton")
        self.InitialisedMessage = QtWidgets.QLabel(self.groupBox_2)
        self.InitialisedMessage.setGeometry(QtCore.QRect(10, 60, 181, 21))
        font = QtGui.QFont()
        font.setItalic(True)
        self.InitialisedMessage.setFont(font)
        self.InitialisedMessage.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.InitialisedMessage.setText("")
        self.InitialisedMessage.setObjectName("InitialisedMessage")
        self.groupBox_3 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_3.setGeometry(QtCore.QRect(1000, 0, 101, 131))
        self.groupBox_3.setObjectName("groupBox_3")
        self.CalShortButton = QtWidgets.QPushButton(self.groupBox_3)
        self.CalShortButton.setEnabled(False)
        self.CalShortButton.setGeometry(QtCore.QRect(10, 30, 81, 31))
        self.CalShortButton.setObjectName("CalShortButton")
        self.MeasureRLButton = QtWidgets.QPushButton(self.groupBox_3)
        self.MeasureRLButton.setEnabled(False)
        self.MeasureRLButton.setGeometry(QtCore.QRect(10, 90, 81, 31))
        self.MeasureRLButton.setObjectName("MeasureRLButton")
        self.calShortProgress = QtWidgets.QProgressBar(self.groupBox_3)
        self.calShortProgress.setGeometry(QtCore.QRect(10, 70, 81, 8))
        palette = QtGui.QPalette()
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Highlight, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 0))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Highlight, brush)
        brush = QtGui.QBrush(QtGui.QColor(159, 160, 161))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Highlight, brush)
        self.calShortProgress.setPalette(palette)
        self.calShortProgress.setProperty("value", 0)
        self.calShortProgress.setTextVisible(False)
        self.calShortProgress.setObjectName("calShortProgress")
        self.groupBox_4 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_4.setGeometry(QtCore.QRect(1000, 130, 101, 131))
        self.groupBox_4.setObjectName("groupBox_4")
        self.CalThroughButton = QtWidgets.QPushButton(self.groupBox_4)
        self.CalThroughButton.setEnabled(False)
        self.CalThroughButton.setGeometry(QtCore.QRect(10, 30, 81, 31))
        self.CalThroughButton.setObjectName("CalThroughButton")
        self.MeasureThroughButton = QtWidgets.QPushButton(self.groupBox_4)
        self.MeasureThroughButton.setEnabled(False)
        self.MeasureThroughButton.setGeometry(QtCore.QRect(10, 90, 81, 31))
        self.MeasureThroughButton.setObjectName("MeasureThroughButton")
        self.calThroughProgress = QtWidgets.QProgressBar(self.groupBox_4)
        self.calThroughProgress.setGeometry(QtCore.QRect(10, 70, 81, 8))
        palette = QtGui.QPalette()
        brush = QtGui.QBrush(QtGui.QColor(0, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Highlight, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Highlight, brush)
        brush = QtGui.QBrush(QtGui.QColor(159, 160, 161))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Highlight, brush)
        self.calThroughProgress.setPalette(palette)
        self.calThroughProgress.setProperty("value", 0)
        self.calThroughProgress.setTextVisible(False)
        self.calThroughProgress.setObjectName("calThroughProgress")
        self.groupBox_5 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_5.setGeometry(QtCore.QRect(1000, 520, 101, 231))
        self.groupBox_5.setObjectName("groupBox_5")
        self.label_2 = QtWidgets.QLabel(self.groupBox_5)
        self.label_2.setGeometry(QtCore.QRect(10, 30, 81, 17))
        self.label_2.setObjectName("label_2")
        self.label_4 = QtWidgets.QLabel(self.groupBox_5)
        self.label_4.setGeometry(QtCore.QRect(10, 140, 81, 17))
        self.label_4.setObjectName("label_4")
        self.Marker4 = QtWidgets.QDoubleSpinBox(self.groupBox_5)
        self.Marker4.setEnabled(False)
        self.Marker4.setGeometry(QtCore.QRect(10, 160, 81, 26))
        self.Marker4.setDecimals(2)
        self.Marker4.setMinimum(-40.0)
        self.Marker4.setMaximum(40.0)
        self.Marker4.setProperty("value", -5.0)
        self.Marker4.setObjectName("Marker4")
        self.Marker1 = QtWidgets.QDoubleSpinBox(self.groupBox_5)
        self.Marker1.setEnabled(False)
        self.Marker1.setGeometry(QtCore.QRect(10, 50, 81, 26))
        self.Marker1.setDecimals(2)
        self.Marker1.setMinimum(0.0)
        self.Marker1.setMaximum(3800.0)
        self.Marker1.setProperty("value", 1260.0)
        self.Marker1.setObjectName("Marker1")
        self.Marker2 = QtWidgets.QDoubleSpinBox(self.groupBox_5)
        self.Marker2.setEnabled(False)
        self.Marker2.setGeometry(QtCore.QRect(10, 80, 81, 26))
        self.Marker2.setMaximum(3800.0)
        self.Marker2.setProperty("value", 1300.0)
        self.Marker2.setObjectName("Marker2")
        self.Marker3 = QtWidgets.QDoubleSpinBox(self.groupBox_5)
        self.Marker3.setEnabled(False)
        self.Marker3.setGeometry(QtCore.QRect(10, 110, 81, 26))
        self.Marker3.setMaximum(3800.0)
        self.Marker3.setProperty("value", 1340.0)
        self.Marker3.setObjectName("Marker3")
        self.Marker5 = QtWidgets.QDoubleSpinBox(self.groupBox_5)
        self.Marker5.setEnabled(False)
        self.Marker5.setGeometry(QtCore.QRect(10, 190, 81, 26))
        self.Marker5.setMinimum(-40.0)
        self.Marker5.setMaximum(40.0)
        self.Marker5.setProperty("value", -15.0)
        self.Marker5.setObjectName("Marker5")
        self.graphWidget = PlotWidget(self.centralwidget)
        self.graphWidget.setGeometry(QtCore.QRect(10, 10, 981, 741))
        self.graphWidget.setObjectName("graphWidget")
        self.TxChanLabel = QtWidgets.QGroupBox(self.centralwidget)
        self.TxChanLabel.setEnabled(True)
        self.TxChanLabel.setGeometry(QtCore.QRect(440, 759, 61, 81))
        self.TxChanLabel.setObjectName("TxChanLabel")
        self.TxAorB = QtWidgets.QSlider(self.TxChanLabel)
        self.TxAorB.setEnabled(True)
        self.TxAorB.setGeometry(QtCore.QRect(10, 40, 41, 16))
        self.TxAorB.setMaximum(1)
        self.TxAorB.setPageStep(1)
        self.TxAorB.setOrientation(QtCore.Qt.Horizontal)
        self.TxAorB.setInvertedAppearance(False)
        self.TxAorB.setTickPosition(QtWidgets.QSlider.TicksBothSides)
        self.TxAorB.setObjectName("TxAorB")
        self.label_3 = QtWidgets.QLabel(self.TxChanLabel)
        self.label_3.setGeometry(QtCore.QRect(0, 60, 62, 17))
        self.label_3.setAlignment(QtCore.Qt.AlignCenter)
        self.label_3.setObjectName("label_3")
        self.groupBox_7 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_7.setGeometry(QtCore.QRect(1000, 390, 101, 121))
        self.groupBox_7.setObjectName("groupBox_7")
        self.SaveBox = QtWidgets.QCheckBox(self.groupBox_7)
        self.SaveBox.setGeometry(QtCore.QRect(10, 90, 94, 24))
        self.SaveBox.setObjectName("SaveBox")
        self.Phase = QtWidgets.QCheckBox(self.groupBox_7)
        self.Phase.setGeometry(QtCore.QRect(10, 30, 90, 23))
        self.Phase.setObjectName("Phase")
        self.Repeat = QtWidgets.QCheckBox(self.groupBox_7)
        self.Repeat.setGeometry(QtCore.QRect(10, 50, 90, 23))
        self.Repeat.setObjectName("Repeat")
        self.setGain = QtWidgets.QCheckBox(self.groupBox_7)
        self.setGain.setGeometry(QtCore.QRect(10, 70, 90, 23))
        self.setGain.setChecked(True)
        self.setGain.setObjectName("setGain")
        self.groupBox_6 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_6.setGeometry(QtCore.QRect(1000, 270, 101, 115))
        self.groupBox_6.setObjectName("groupBox_6")
        self.lnaGain = QtWidgets.QSpinBox(self.groupBox_6)
        self.lnaGain.setGeometry(QtCore.QRect(8, 50, 41, 26))
        self.lnaGain.setMinimum(1)
        self.lnaGain.setMaximum(15)
        self.lnaGain.setObjectName("lnaGain")
        self.pgaGain = QtWidgets.QSpinBox(self.groupBox_6)
        self.pgaGain.setEnabled(False)
        self.pgaGain.setGeometry(QtCore.QRect(54, 50, 41, 26))
        self.pgaGain.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons)
        self.pgaGain.setMinimum(1)
        self.pgaGain.setMaximum(31)
        self.pgaGain.setObjectName("pgaGain")
        self.label_7 = QtWidgets.QLabel(self.groupBox_6)
        self.label_7.setGeometry(QtCore.QRect(10, 30, 31, 17))
        self.label_7.setObjectName("label_7")
        self.label_8 = QtWidgets.QLabel(self.groupBox_6)
        self.label_8.setGeometry(QtCore.QRect(60, 30, 41, 17))
        self.label_8.setObjectName("label_8")
        self.RSSI = QtWidgets.QSpinBox(self.groupBox_6)
        self.RSSI.setEnabled(False)
        self.RSSI.setGeometry(QtCore.QRect(8, 80, 87, 26))
        self.RSSI.setFrame(True)
        self.RSSI.setAlignment(QtCore.Qt.AlignCenter)
        self.RSSI.setReadOnly(True)
        self.RSSI.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons)
        self.RSSI.setMaximum(100000)
        self.RSSI.setObjectName("RSSI")
        self.groupBox_7.raise_()
        self.groupBox.raise_()
        self.groupBox_2.raise_()
        self.groupBox_3.raise_()
        self.groupBox_4.raise_()
        self.groupBox_5.raise_()
        self.graphWidget.raise_()
        self.TxChanLabel.raise_()
        self.groupBox_6.raise_()
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1110, 22))
        self.menubar.setObjectName("menubar")
        self.menu_Preferences = QtWidgets.QMenu(self.menubar)
        self.menu_Preferences.setObjectName("menu_Preferences")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.menubar.addAction(self.menu_Preferences.menuAction())

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

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "LimeSDR network analyser"))
        self.groupBox.setTitle(_translate("MainWindow", "   Frequencies MHz       Points"))
        self.label.setText(_translate("MainWindow", "Centre"))
        self.label_6.setText(_translate("MainWindow", "Span"))
        self.groupBox_2.setTitle(_translate("MainWindow", "Hardware"))
        self.ConnectButton.setText(_translate("MainWindow", "Initialise"))
        self.groupBox_3.setTitle(_translate("MainWindow", "Rx Channel 1"))
        self.CalShortButton.setText(_translate("MainWindow", "Calibrate"))
        self.MeasureRLButton.setText(_translate("MainWindow", "Measure"))
        self.groupBox_4.setTitle(_translate("MainWindow", "Rx Channel 2"))
        self.CalThroughButton.setText(_translate("MainWindow", "Calibrate"))
        self.MeasureThroughButton.setText(_translate("MainWindow", "Measure"))
        self.groupBox_5.setTitle(_translate("MainWindow", "Markers"))
        self.label_2.setText(_translate("MainWindow", "Frequency"))
        self.label_4.setText(_translate("MainWindow", "Amplitude"))
        self.TxChanLabel.setTitle(_translate("MainWindow", "Tx Chan"))
        self.label_3.setText(_translate("MainWindow", "A     B"))
        self.groupBox_7.setTitle(_translate("MainWindow", "Options"))
        self.SaveBox.setText(_translate("MainWindow", "Save"))
        self.Phase.setText(_translate("MainWindow", "Phase"))
        self.Repeat.setText(_translate("MainWindow", "Repeat"))
        self.setGain.setText(_translate("MainWindow", "Auto LNA"))
        self.groupBox_6.setTitle(_translate("MainWindow", "Rx Gain / RSSI"))
        self.label_7.setText(_translate("MainWindow", "LNA"))
        self.label_8.setText(_translate("MainWindow", "PGA"))
        self.menu_Preferences.setTitle(_translate("MainWindow", "&Preferences"))

from pyqtgraph import PlotWidget

if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    MainWindow = QtWidgets.QMainWindow()
    ui = Ui_MainWindow()
    ui.setupUi(MainWindow)
    MainWindow.show()
    sys.exit(app.exec_())

