Beispiel #1
0
    def __init__(self):
        super(mainwind, self).__init__()
        QMainWindow.__init__(self)
        self.setupUi(self)
        self.setGeometry(0, 0, 1350, 690)
        self.create_MenuBar()
        self.sc = pg.PlotWidget()
        self.sc2 = pg.PlotWidget()
        self.timer = QtCore.QTimer()
        # self.timer2 = QtCore.QTimer()
        self.init_UI()
        self.x = []
        self.x2 = []
        self.y = []
        self.y2 = []

        self.l = QVBoxLayout(self.graphicsView)
        self.l.setGeometry(QtCore.QRect(10, 5, 571, 150))
        self.l2 = QVBoxLayout(self.graphicsView_3)
        self.l2.setGeometry(QtCore.QRect(10, 440, 571, 150))

        self.l.addWidget(self.sc)
        self.l2.addWidget(self.sc2)

        self.label = QLabel(self.centralwidget)
        self.label.setGeometry(QtCore.QRect(660, 8, 600, 191))
        self.label.setText("")
        self.label.setStyleSheet("background-color: white")

        self.label2 = QLabel(self.centralwidget)
        self.label2.setGeometry(QtCore.QRect(660, 420, 600, 191))
        self.label2.setText("")
        self.label2.setStyleSheet("background-color: white")
Beispiel #2
0
    def __init__(self):
        super(mainwind, self).__init__()
        QMainWindow.__init__(self)
        self.setupUi(self)
        self.setGeometry(0, 0, 1350, 690)
        self.create_MenuBar()
        self.sc = pg.PlotWidget()
        self.sc2 = pg.PlotWidget()
        self.timer = QtCore.QTimer()
        # self.timer2 = QtCore.QTimer()
        self.init_UI()
        self.x = []
        self.x2 = []
        self.y = []
        self.y2 = []
        self.cmap = None
        self.speed = 100
        self.signal = np.array([])

        self.l = QVBoxLayout(self.graphicsView)
        self.l.setGeometry(QtCore.QRect(10, 5, 571, 150))
        self.l2 = QVBoxLayout(self.graphicsView_3)
        self.l2.setGeometry(QtCore.QRect(10, 500, 571, 150))

        self.l.addWidget(self.sc)
        self.l2.addWidget(self.sc2)

        self.label = QLabel(self.centralwidget)
        self.label.setGeometry(QtCore.QRect(660, 120, 600, 280))
        self.label.setText("")

        self.slider_band1 = self.verticalSlider
        self.slider_band2 = self.verticalSlider_2
        self.slider_band3 = self.verticalSlider_3
        self.slider_band4 = self.verticalSlider_4
        self.slider_band5 = self.verticalSlider_5
        self.slider_band6 = self.verticalSlider_6
        self.slider_band7 = self.verticalSlider_7
        self.slider_band8 = self.verticalSlider_8
        self.slider_band9 = self.verticalSlider_9
        self.slider_band10 = self.verticalSlider_10

        self.min_freq_slider = self.verticalSlider_11
        self.max_freq_slider = self.verticalSlider_12
        self.min_freq_slider.valueChanged.connect(self.changefreq)
        self.max_freq_slider.valueChanged.connect(self.changefreq)

        self.slider_band1.valueChanged.connect(self.valuechange)
        self.slider_band2.valueChanged.connect(self.valuechange)
        self.slider_band3.valueChanged.connect(self.valuechange)
        self.slider_band4.valueChanged.connect(self.valuechange)
        self.slider_band5.valueChanged.connect(self.valuechange)
        self.slider_band6.valueChanged.connect(self.valuechange)
        self.slider_band7.valueChanged.connect(self.valuechange)
        self.slider_band8.valueChanged.connect(self.valuechange)
        self.slider_band9.valueChanged.connect(self.valuechange)
        self.slider_band10.valueChanged.connect(self.valuechange)
Beispiel #3
0
 def dynamicSig(self):
     # self.clear()
     self.timer = QtCore.QTimer()
     self.timer.setInterval(5)
     self.timer.timeout.connect(self.dynamicSig)
     self.timer.start()
     xrange, yrange = self.sc.viewRange()
     scrollvalue = (xrange[1] - xrange[0])/500
     self.sc.setXRange(xrange[0]+scrollvalue, xrange[1]+scrollvalue, padding=0)
Beispiel #4
0
 def __init__(self):
     super(mainwind, self).__init__()
     QMainWindow.__init__(self)
     self.setupUi(self)
     self.ToolBar()
     self.create_MenuBar()
     self.sc = pg.PlotWidget()
     self.timer = QtCore.QTimer()
     self.l = QVBoxLayout(self.graphicsView)
     self.l.addWidget(self.sc)
Beispiel #5
0
 def dynamicSig(self):
     self.timer = QtCore.QTimer()
     self.timer.setInterval(2)
     self.timer.timeout.connect(self.dynamicSig)
     self.timer.start()
     xrange, yrange = self.sc.viewRange()
     scrollvalue = (xrange[1] - xrange[0]) / 500
     if xrange[1] < self.max:
         self.sc.setXRange(xrange[0] + scrollvalue,
                           xrange[1] + scrollvalue,
                           padding=0)
     else:
         pass
Beispiel #6
0
                    def dynamicSig(self):
                        self.clear()
                        self.timer = QtCore.QTimer()
                        self.timer.setInterval(5)
                        self.timer.timeout.connect(self.dynamicSig)
                        self.timer.start()
                        self.x1 = self.x1[1:] 
                        self.x1.append(self.x1[-1] + 1)

                        self.y2 = self.y2[1:]
                    
                        self.y2.append(self.y[self.i]) 
                        self.i = self.i + 1 
                        self.sc.plot(self.x1[0:self.i], self.y2[0:self.i])
Beispiel #7
0
 def dynamicSig2(self):
     # self.clear()
     self.timer2 = QtCore.QTimer()
     self.timer2.setInterval(100)
     self.timer2.timeout.connect(self.dynamicSig2)
     self.timer2.start()
     xrange, yrange = self.sc2.viewRange()
     scrollvalue = (xrange[1] - xrange[0]) / 500
     if xrange[1] < self.max2:
         self.sc2.setXRange(xrange[0] + scrollvalue,
                            xrange[1] + scrollvalue,
                            padding=0)
     else:
         pass