示例#1
0
    def __init__(self, path_prj, name_prj):

        super().__init__()
        self.tab_name = "estimhab"
        self.tab_position = 7
        self.model_type = "Estimhab"
        self.eq50 = QLineEdit()
        self.esub = QLineEdit()
        self.path_prj = path_prj
        self.name_prj = name_prj
        self.path_bio_estimhab = os.path.join(self.path_bio, 'estimhab')
        self.total_lineedit_number = 1
        self.init_iu()
        self.process_manager = MyProcessManager(
            "estimhab_plot")  # SC (Suitability Curve)
        self.read_estimhab_dict()
        self.fill_input_data()
        self.fill_fish_name()
        self.check_if_ready_to_compute()
        self.eq1.textChanged.connect(self.check_if_ready_to_compute)
        self.eq2.textChanged.connect(self.check_if_ready_to_compute)
        self.ew1.textChanged.connect(self.check_if_ready_to_compute)
        self.ew2.textChanged.connect(self.check_if_ready_to_compute)
        self.eh1.textChanged.connect(self.check_if_ready_to_compute)
        self.eh2.textChanged.connect(self.check_if_ready_to_compute)
        self.eq50.textChanged.connect(self.check_if_ready_to_compute)
        self.eqmin.textChanged.connect(self.check_if_ready_to_compute)
        self.eqmax.textChanged.connect(self.check_if_ready_to_compute)
        self.esub.textChanged.connect(self.check_if_ready_to_compute)
        self.selected_aquatic_animal_qtablewidget.model().rowsInserted.connect(
            self.check_if_ready_to_compute)
        self.selected_aquatic_animal_qtablewidget.model().rowsRemoved.connect(
            self.check_if_ready_to_compute)
示例#2
0
 def __init__(self, path_prj, name_prj, send_log, title):
     super().__init__()
     self.path_prj = path_prj
     self.name_prj = name_prj
     self.send_log = send_log
     self.path_last_file_loaded = self.path_prj
     self.project_properties = load_project_properties(self.path_prj)
     self.setTitle(title)
     self.init_ui()
     # process_manager
     self.process_manager = MyProcessManager("hrr")
示例#3
0
 def __init__(self, path_prj, name_prj, send_log, title):
     super().__init__()
     self.path_prj = path_prj
     self.name_prj = name_prj
     self.send_log = send_log
     self.path_last_file_loaded = self.path_prj
     self.project_properties = load_project_properties(self.path_prj)
     self.setTitle(title)
     self.init_ui()
     self.msg2 = QMessageBox()
     self.mesh_manager_file = self.read_attribute_xml("mesh_manager_file")
     self.read_mesh_manager_file(self.mesh_manager_file)
     # process_manager
     self.process_manager = MyProcessManager("mesh_manager")
示例#4
0
 def __init__(self, path_prj, name_prj, send_log, title):
     super().__init__()
     self.path_prj = path_prj
     self.name_prj = name_prj
     self.send_log = send_log
     self.path_last_file_loaded = self.path_prj
     self.classhv = None
     self.project_properties = load_project_properties(self.path_prj)
     self.setTitle(title)
     self.init_ui()
     self.input_class_file_info = self.read_attribute_xml("HS_input_class")
     self.read_input_class(os.path.join(self.input_class_file_info["path"], self.input_class_file_info["file"]))
     # process_manager
     self.process_manager = MyProcessManager("hs")
示例#5
0
    def __init__(self,
                 run_function,
                 send_log,
                 process_type,
                 send_refresh_filenames=None):
        super().__init__()
        widget_height = QComboBox().minimumSizeHint().height()
        # send_log
        self.send_log = send_log
        # progress_bar
        self.progress_bar = QProgressBar()
        self.progress_bar.setMaximumHeight(widget_height)
        self.progress_bar.setValue(0.0)
        self.progress_bar.setRange(0.0, 100.0)
        self.progress_bar.setTextVisible(False)

        # progress_label
        self.progress_label = QLabel()
        self.progress_label.setText("{0:.0f}/{1:.0f}".format(0, 0))

        # run_stop_button
        self.run_stop_button = QPushButton(self.tr("run"))
        self.run_stop_button.setMaximumHeight(widget_height)
        change_button_color(self.run_stop_button, "#47B5E6")  #47B5E6
        self.run_stop_button.clicked.connect(
            run_function)  # self.collect_data_from_gui_and_plot
        self.run_stop_button.setEnabled(False)

        # layout
        self.addWidget(self.progress_bar)
        self.addWidget(self.progress_label)
        self.addWidget(self.run_stop_button)

        # process_manager
        # app = QCoreApplication([])
        self.process_manager = MyProcessManager(process_type)
        # self.process_manager.finished.connect(app.exit)

        # process_prog_show
        self.process_prog_show = ProcessProgShow(
            send_log=self.send_log,
            send_refresh_filenames=send_refresh_filenames,
            progressbar=self.progress_bar,
            progress_label=self.progress_label,
            computation_pushbutton=self.run_stop_button,
            run_function=run_function)
示例#6
0
 def __init__(self, path_prj, name_prj, send_log):
     super().__init__()
     self.tab_name = "interpolation"
     self.tab_title = "Interpolation"
     self.tooltip_str = self.tr("Interpolation of habitat values")
     self.path_prj = path_prj
     self.name_prj = name_prj
     self.send_log = send_log
     self.mytablemodel = None
     self.path_last_file_loaded = self.path_prj
     self.process_manager = MyProcessManager("interpolation")
     self.init_ui()
     self.process_prog_show = ProcessProgShow(send_log=self.send_log,
                                              # progress_bar=self.nativeParentWidget().progress_bar,
                                              # progress_label=self.progress_label,
                                              run_function=self.plot_chronicle,
                                              computation_pushbutton=self.plot_chronicle_qpushbutton)
示例#7
0
 def __init__(self, path_prj, name_prj, send_log, title):
     super().__init__()
     self.path_prj = path_prj
     self.name_prj = name_prj
     self.send_log = send_log
     self.path_last_file_loaded = self.path_prj
     self.process_manager = MyProcessManager("hs_plot")
     self.axe_mod_choosen = 1
     self.setTitle(title)
     self.init_ui()
     self.process_prog_show_input = ProcessProgShow(send_log=self.send_log,
                                              run_function=self.plot_hs_class,
                                              computation_pushbutton=self.input_class_plot_button)
     self.process_prog_show_area = ProcessProgShow(send_log=self.send_log,
                                              run_function=self.plot_hs_area,
                                              computation_pushbutton=self.result_plot_button_area)
     self.process_prog_show_volume = ProcessProgShow(send_log=self.send_log,
                                              run_function=self.plot_hs_volume,
                                              computation_pushbutton=self.result_plot_button_volume)