spec_an_widget.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:pyrpl 作者: lneuhaus 项目源码 文件源码
def init_gui(self):
        """
        Sets up the gui.
        """
        self.ch_col = ('magenta', 'blue', 'green')
        self.last_data = None
        self.init_main_layout(orientation="vertical")
        #self.main_layout = QtWidgets.QVBoxLayout()
        self.module.__dict__['curve_name'] = 'pyrpl spectrum'
        self.init_attribute_layout()

        self.other_widget = OtherAttributesWidget(self)
        self.attribute_layout.addWidget(self.other_widget)

        self.iqmode_widget = IqModeAttributesWidget(self)
        self.attribute_layout.addWidget(self.iqmode_widget)

        self.baseband_widget = BasebandAttributesWidget(self)
        self.attribute_layout.addWidget(self.baseband_widget)


        self.button_layout = QtWidgets.QHBoxLayout()
        self.setLayout(self.main_layout)
        # self.setWindowTitle("Spec. An.")
        #self.win = pg.GraphicsWindow(title="PSD")
        #self.main_layout.addWidget(self.win)

        self.win2 = DataWidget(title='Spectrum')
        self.main_layout.addWidget(self.win2)

        #self.plot_item = self.win.addPlot(title="PSD")
        #self.curve = self.plot_item.plot(pen=self.ch_col[0][0])

        #self.curve2 = self.plot_item.plot(pen=self.ch_col[1][0]) # input2
        # spectrum in
        # baseband
        #self.curve_cross = self.plot_item.plot(pen=self.ch_col[2][0]) #
        # curve for


        super(SpecAnWidget, self).init_gui()

        aws = self.attribute_widgets


        aws['display_input1_baseband'].setStyleSheet("color: %s" %
                                                   self.ch_col[0])
        aws['display_input2_baseband'].setStyleSheet("color: %s" %
                                                   self.ch_col[1])
        aws['display_cross_amplitude'].setStyleSheet("color: %s" %
                                                   self.ch_col[2])
        # Not sure why the stretch factors in button_layout are not good by
        # default...

        self.attribute_layout.addStretch(1)
        self.update_baseband_visibility()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号