def statusTab(self):
        qwidget = QtWidgets.QSplitter(QtCore.Qt.Orientation.Vertical)
        mw1 = mpl()
        fig = mw1.getFigure()
        ax1 = fig.subplots(1, 1)
        # item = mw1.vbox.takeAt(0)
        # del item
        fig.tight_layout()

        mw2 = mpl()
        fig = mw2.getFigure()
        ax2 = fig.subplots(1, 1)
        fig.tight_layout()

        qwidget.addWidget(mw1)
        qwidget.addWidget(mw2)

        # ASSEMBLE ELEMENTS
        # row = -1
        # self.layout.addWidget(QtWidgets.QH)

        # row += 1
        # layout.addItem(QtWidgets.QSpacerItem(10, 10, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding), row, 0)

        return qwidget
Exemple #2
0
    def voltageTab(self):
        qwidget = QtWidgets.QWidget()
        layout = QtWidgets.QGridLayout()
        qwidget.setLayout(layout)

        # ASSEMBLE ELEMENTS
        row = -1
        # self.layout.addWidget(QtWidgets.QH)

        row += 1
        layout.addItem(QtWidgets.QSpacerItem(10, 10, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed),
                       row, 0)

        row += 1
        grid = plt.GridSpec(2, 2, wspace=0.4, hspace=0.3)

        mw = mpl()
        fig = mw.getFigure()
        ax1 = fig.add_subplot(grid[0, :])
        ax2 = fig.add_subplot(grid[1, 0])
        ax3 = fig.add_subplot(grid[1, 1])
        fig.tight_layout()
        # tb = mw.toolbar
        # tb.
        layout.addWidget(mw, row, 0, 1, 4)

        row += 1
        layout.addItem(QtWidgets.QSpacerItem(10, 10, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed),
                       row, 0)

        return qwidget
    def combFilterTab(self):
        qwidget = QtWidgets.QWidget()
        layout = QtWidgets.QGridLayout()
        qwidget.setLayout(layout)

        policy = QtWidgets.QSizePolicy.Expanding

        # ASSEMBLE ELEMENTS
        row = -1
        row += 1
        layout.addItem(QtWidgets.QSpacerItem(10, 10, policy, policy),
                       row, 0)

        row += 1
        layout.addWidget(QtWidgets.QLabel(""), row, 0)
        layout.addWidget(QtWidgets.QLabel("Feedback frev"), row, 1)
        layout.addWidget(QtWidgets.QLabel("Feedback 1 x ws"), row, 2)
        layout.addWidget(QtWidgets.QLabel("Feedback 2 x ws"), row, 3)

        # # row += 1
        # # layout.addWidget(self.parent().parent().parent().parent().hLine(), row, 0, 1, 4)

        row += 1
        layout.addWidget(QtWidgets.QLabel("Gain"), row, 0)
        self.feedback_frev_gain = JapcLineEdit(self.lsa, "TWC800_COMB_FREV_GAIN")
        self.feedback_ws1_gain = JapcLineEdit(self.lsa, "TWC800_COMB_SYSB_GAIN")
        self.feedback_ws2_gain = JapcLineEdit(self.lsa, "TWC800_COMB_SYSB2_GAIN")
        layout.addWidget(self.feedback_frev_gain, row, 1)
        layout.addWidget(self.feedback_ws1_gain, row, 2)
        layout.addWidget(self.feedback_ws2_gain, row, 3)

        row += 1
        layout.addWidget(QtWidgets.QLabel("Bandwidth [Hz]"), row, 0)
        self.feedback_frev_bw = JapcLineEdit(self.lsa, "TWC800_COMB_FREV_BW")
        self.feedback_ws1_bw = JapcLineEdit(self.lsa, "TWC800_COMB_SYSB_BW")
        self.feedback_ws2_bw = JapcLineEdit(self.lsa, "TWC800_COMB_SYSB2_BW")
        layout.addWidget(self.feedback_frev_bw, row, 1)
        layout.addWidget(self.feedback_ws1_bw, row, 2)
        layout.addWidget(self.feedback_ws2_bw, row, 3)

        row += 1
        layout.addItem(QtWidgets.QSpacerItem(10, 10, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding),
                       row, 0)

        row += 1
        mw = mpl()
        fig = mw.getFigure()
        ax1 = fig.subplots(1, 1)
        fig.tight_layout()
        layout.addWidget(mw, row, 0, 1, 4)

        row += 1
        layout.addItem(QtWidgets.QSpacerItem(10, 10, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding),
                       row, 0)

        # FINALIZE LAYOUT
        layout.setHorizontalSpacing(40)
        layout.setVerticalSpacing(10)
        layout.setColumnStretch(0, 1)
        layout.setColumnStretch(1, 1)
        layout.setColumnStretch(2, 1)
        layout.setColumnStretch(3, 1)

        return qwidget