def cmdOK_Clicked(self): if not self.lstX.currentItem(): QMessageBox.information(None, "Scatter Plot", "X variable not set.", QMessageBox.Ok) elif not self.lstY.currentItem(): QMessageBox.information(None, "Scatter Plot", "Y variable not set.", QMessageBox.Ok) else: start_index = self.cboStart.currentIndex() end_index = self.cboEnd.currentIndex() num_steps = end_index - start_index + 1 title = "Scatter Plot " + self.cboStart.currentText( ) + ' - ' + self.cboEnd.currentText() object_type_label_x = self.cboXCat.currentText() object_name_x = self.lstX.currentItem().text() attribute_name_x = self.cboVarX.currentText() object_type_label_y = self.cboYCat.currentText() object_name_y = self.lstY.currentItem().text() attribute_name_y = self.cboVarY.currentText() graphSWMM.plot_scatter(self.output, title, object_type_label_x, object_name_x, attribute_name_x, object_type_label_y, object_name_y, attribute_name_y, start_index, num_steps) self._main_form.program_settings.setValue( "Geometry/" + "frmScatterPlot_geometry", self.saveGeometry()) self._main_form.program_settings.setValue( "Geometry/" + "frmScatterPlot_state", self.saveState())
def cmdOK_Clicked(self): if not self.lstX.currentItem(): QtGui.QMessageBox.information(None, "Scatter Plot", "X variable not set.", QtGui.QMessageBox.Ok) elif not self.lstY.currentItem(): QtGui.QMessageBox.information(None, "Scatter Plot", "Y variable not set.", QtGui.QMessageBox.Ok) else: start_index = self.cboStart.currentIndex() end_index = self.cboEnd.currentIndex() num_steps = end_index - start_index + 1 title = "Scatter Plot " + self.cboStart.currentText( ) + ' - ' + self.cboEnd.currentText() object_type_label_x = self.cboXCat.currentText() object_id_x = self.lstX.currentItem().text() attribute_name_x = self.cboVarX.currentText() object_type_label_y = self.cboYCat.currentText() object_id_y = self.lstY.currentItem().text() attribute_name_y = self.cboVarY.currentText() graphSWMM.plot_scatter(self.output, title, object_type_label_x, object_id_x, attribute_name_x, object_type_label_y, object_id_y, attribute_name_y, start_index, num_steps)
def cmdOK_Clicked(self): elapsed_flag = self.rbnElapsed.isChecked() start_index = self.cboStart.currentIndex() end_index = self.cboEnd.currentIndex() num_steps = end_index - start_index + 1 lines_list = ui.convenience.all_list_items(self.lstData) graphSWMM.plot_time(self.output, lines_list, elapsed_flag, start_index, num_steps)
def cmdOK_Clicked(self): elapsed_flag = self.rbnElapsed.isChecked() start_index = self.cboStart.currentIndex() end_index = self.cboEnd.currentIndex() num_steps = end_index - start_index + 1 lines_list = ui.convenience.all_list_items(self.lstData) try: graphSWMM.plot_time(self.output, lines_list, elapsed_flag, start_index, num_steps) except Exception as e1: msg = str(e1) + '\n' + str(traceback.print_exc()) print(msg) QMessageBox.information(None, "Plot", "Error plotting:\n" + msg, QMessageBox.Ok)
def cmdOK_Clicked(self): elapsed_flag = self.rbnElapsed.isChecked() start_index = self.cboStart.currentIndex() end_index = self.cboEnd.currentIndex() num_steps = end_index - start_index + 1 lines_list = ui.convenience.all_list_items(self.lstData) try: graphSWMM.plot_time(self.output, lines_list, elapsed_flag, start_index, num_steps) except Exception as e1: msg = str(e1) + '\n' + str(traceback.print_exc()) print(msg) QMessageBox.information(None, "Plot", "Error plotting:\n" + msg, QMessageBox.Ok) self._main_form.program_settings.setValue( "Geometry/" + "frmTimeSeriesPlot_geometry", self.saveGeometry()) self._main_form.program_settings.setValue( "Geometry/" + "frmTimeSeriesPlot_state", self.saveState())
def cmdOK_Clicked(self): if not self.lstX.currentItem(): QtGui.QMessageBox.information(None, "Scatter Plot", "X variable not set.", QtGui.QMessageBox.Ok) elif not self.lstY.currentItem(): QtGui.QMessageBox.information(None, "Scatter Plot", "Y variable not set.", QtGui.QMessageBox.Ok) else: start_index = self.cboStart.currentIndex() end_index = self.cboEnd.currentIndex() num_steps = end_index - start_index + 1 title = "Scatter Plot " + self.cboStart.currentText() + ' - ' + self.cboEnd.currentText() object_type_label_x = self.cboXCat.currentText() object_id_x = self.lstX.currentItem().text() attribute_name_x = self.cboVarX.currentText() object_type_label_y = self.cboYCat.currentText() object_id_y = self.lstY.currentItem().text() attribute_name_y = self.cboVarY.currentText() graphSWMM.plot_scatter(self.output, title, object_type_label_x, object_id_x, attribute_name_x, object_type_label_y, object_id_y, attribute_name_y, start_index, num_steps)