def build_gui(self): self.sign_plot = self.build_plot("VAr", "W", title=u"Possíveis transições") self.sign_scatter = qt.scatter(unicolor=True) self.sign_plot.addItem(self.sign_scatter) self.next_row() self.power_plot = self.build_plot("VAr", "W", title=u"Tempo real") self.power_scatter = qt.scatter(unicolor=True) self.power_plot.addItem(self.power_scatter) self.reac_power_data = deque(maxlen=self.POWER_SIZE_LEN) self.real_power_data = deque(maxlen=self.POWER_SIZE_LEN) self.power_scatter_brushes = qt.mk_brushes( self.POWER_SIZE_LEN, 255, 255, 255) self.status_text = qt.text("", anchor=(0.0, 1.0)) self.status_text.setPos(0, 0) self.power_plot.addItem(self.status_text)
def build_gui(self): self.power_plot = self.build_plot("VAr", "W", title=u"Potência real vs potência reativa") self.power_scatter = qt.scatter(unicolor=True) self.power_plot.addItem(self.power_scatter) self.reac_power_data = deque() self.real_power_data = deque() # Config window self.button_start = qt.button(text=u"Iniciar") self.button_start.clicked.connect(self.button_start_clicked) self.button_stop = qt.button(text=u"Parar") self.button_stop.clicked.connect(self.button_stop_clicked) self.button_stop.setEnabled(False) self.button_cluster = qt.button(text=u"Cluster") self.button_cluster.clicked.connect( self.button_cluster_clicked) self.button_cluster.setEnabled(False) self.spinbox_cluster = qt.spinbox() self.spinbox_cluster.setValue(1) self.button_tag = qt.button(text=u"Taggear") self.button_tag.clicked.connect(self.button_tag_clicked) self.button_tag.setEnabled(False) self.button_save = qt.button(text=u"Salvar") self.button_save.clicked.connect(self.button_save_clicked) self.button_save.setEnabled(False) self.cfgwin = qt.build_widget() self.cfgwin.layout().addWidget(self.button_start, 0, 0, 1, 2) self.cfgwin.layout().addWidget(self.button_stop, 1, 0, 1, 2) self.cfgwin.layout().addWidget(self.button_cluster, 2, 0) self.cfgwin.layout().addWidget(self.spinbox_cluster, 2, 1) self.cfgwin.layout().addWidget(self.button_tag, 3, 0, 1, 2) self.cfgwin.layout().addWidget(self.button_save, 4, 0, 1, 2) self.cfgwin.show()
def build_gui(self): self.power_plot = self.build_plot("VAr", "W", title=u"Potência real vs potência reativa") self.power_scatter = qt.scatter(unicolor=True) self.power_plot.addItem(self.power_scatter)