def __init__(self): super(Foo, self).__init__() self._action_set = None self._update_current_value_signal.connect(self._update_current_value) self._scene_notification = QDialog(main_window) ui_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'src', 'wrong_scene_dialog.ui') loadUi(ui_file, self._scene_notification) self._scene_notification_timer = QTimer(main_window) self._scene_notification_timer.setInterval(5000) self._scene_notification_timer.setSingleShot(True) self._scene_notification_timer.timeout.connect( self._hide_scene_notification) self._scene_notification.finished.connect( self._hide_scene_notification) self._input_notification = QDialog(main_window) ui_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'src', 'wrong_input_method_dialog.ui') loadUi(ui_file, self._input_notification) self._input_notification_timer = QTimer(main_window) self._input_notification_timer.setInterval(5000) self._input_notification_timer.setSingleShot(True) self._input_notification_timer.timeout.connect( self._hide_input_method_notification) self._input_notification.finished.connect( self._hide_input_method_notification) self._show_input_notification_signal.connect( self._show_input_notification) self._hide_input_notification_signal.connect( self._hide_input_method_notification) self._show_input_notification_signal.connect( self._show_scene_notification) self._hide_input_notification_signal.connect( self._hide_scene_notification) self._update_color_of_line_edit_signal.connect( self._update_color_of_line_edit)
def queue_dialog(): dialog = QDialog() ui_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'src', 'queue_dialog.ui') loadUi(ui_file, dialog) if current_name is not None: dialog.label_lineEdit.setText(current_name) dialog.username_lineEdit.setText(queue_default_username) dialog.password_lineEdit.setText(queue_default_password) rc = dialog.exec_() if rc == QDialog.Rejected: return queue_program(dialog.username_lineEdit.text(), dialog.password_lineEdit.text(), dialog.label_lineEdit.text())
def execute_current_sequence_from_selection(): row = get_selected_row() if row == get_row_count() - 1: row = None execute_sequence(get_current_tab_index(), row) main_window.run_sequence_from_selection_pushButton.clicked.connect( execute_current_sequence_from_selection) select_row_signal = RelaySignalInt() select_row_signal.relay_signal.connect(set_selected_row) collision_notification = QDialog(main_window) ui_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'src', 'collision_dialog.ui') loadUi(ui_file, collision_notification) collision_notification_timer = QTimer(main_window) collision_notification_timer.setInterval(3000) collision_notification_timer.setSingleShot(True) def hide_collision_notification(result=None): collision_notification_timer.stop() collision_notification.hide() collision_notification_timer.timeout.connect(hide_collision_notification) collision_notification.finished.connect(hide_collision_notification)