Exemplo n.º 1
0
    def on_btn_run_clicked(self):
        if self.paras.select_mode == SelectMode.simple:
            selector = Selector()
            if self.paras.simple_select_file:
                selector.include(self.paras.simple_select_file)
        else:
            selector = self.ctrl.selector
        self.paras.is_saving_sitemaps = not self.chk_trial_run.isChecked()
        self.pte_events1.setPlainText("")
        self.pte_events2.setPlainText("")
        self.pte_events3.setPlainText("")
        self.lbl_processing.setVisible(True)
        self.lbl_processing_file.setVisible(True)

        self.btn_close.setEnabled(False)
        self.btn_run.setEnabled(False)
        self.chk_trial_run.setEnabled(False)
        self.btn_stop.setEnabled(True)
        self.btn_stop.setStyleSheet(Style.alarm())

        self.executor_thread = ExecutorThread(self.paras, selector, self)
        self.executor_thread.signal_exception.connect(self.on_signal_exception)
        self.executor_thread.ask_confirmation.connect(self.on_ask_confirmation)
        self.executor_thread.signal_main_event.connect(
            self.on_signal_main_event)
        self.executor_thread.signal_minor_event.connect(
            self.on_signal_minor_event)
        self.executor_thread.signal_next_file.connect(self.on_signal_next_file)
        self.executor_thread.signal_end_processing.connect(
            self.on_signal_end_processing)
        self.executor_thread.finished.connect(self.on_executor_thread_finished)
        self.executor_thread.start()
        self.update()
Exemplo n.º 2
0
    def on_btn_run_clicked(self):
        self.work_started.emit()
        self.pte_events1.setPlainText("")
        self.pte_events2.setPlainText("")
        self.pte_events3.setPlainText("")
        self.lbl_processing.setVisible(True)
        self.lbl_processing_file.setVisible(True)

        self.btn_close.setEnabled(False)
        self.btn_run.setEnabled(False)
        self.chk_trial_run.setEnabled(False)
        self.btn_stop.setEnabled(True)
        self.btn_stop.setStyleSheet(Style.alarm())
Exemplo n.º 3
0
 def on_btn_play_clicked(self):
     self.pte_output.setPlainText("")
     self.pte_exceptions.setPlainText("")
     selector = self.get_selector()
     self.player = PlayerThread(selector, self)
     self.player.yield_resource.connect(self.on_yield_resource)
     self.player.signal_exception.connect(self.on_signal_exception)
     self.player.signal_excluded_resource.connect(
         self.on_signal_excluded_resource)
     self.player.finished.connect(self.on_player_finished)
     # counters
     self.resource_count = 0
     self.excluded_resource_count = 0
     self.exception_count = 0
     self.lbl_resources_counter.setText(str(self.resource_count))
     self.lbl_excluded_resources_counter.setText(
         str(self.excluded_resource_count))
     # buttons
     self.btn_close.setEnabled(False)
     self.btn_play.setEnabled(False)
     self.btn_stop.setEnabled(True)
     self.btn_stop.setStyleSheet(Style.alarm())
     self.player.start()
     self.update()