5. ui¶
-
class
pyIMD.ui.main_ui.
IMDWindow
¶ Bases:
PyQt5.QtWidgets.QMainWindow
Implementation of the pyIMD main user interface window.
-
closeEvent
(event)¶ Application close event override of QMainWindow closeEvent
Parameters: event (QCloseEvent) – A QCloseEvent Returns: O when process finished correctly otherwise >0 Return type: status_code (int)
-
close_application
(event)¶ Opens a message box to handle program exit properly asking the user if the project should be saved first.
Parameters: event (QCloseEvent) – A QCloseEvent Returns: 0 when process finished correctly, otherwise >0 Return type: status_code (int)
-
static
get_logger_object
(name)¶ Gets a logger object to log messages of pyIMD status to the console in a standardized format.
Returns: Returns a logger object with correct string formatting. Return type: logger (object)
-
handle_change_console_text
(text)¶ Implementation of the handle_change_console_text slot.
Parameters: text (str) – String received from Settings instance to print to the console.
-
on_about
()¶ Displays the about window.
-
on_change_log
()¶ Displays the change log window.
-
on_combo_box_changed
(index)¶ Prints the selected item of the data drop down list to the console.
Parameters: index (int) – Index of the selected item from the drop down list.
-
on_concatenation
()¶ Opens concatenation dialog and starts file concatenation in new thread.
-
on_data_list_selection_changed
()¶ Adds the selected data to the PandasDataFrameModel model to be displayed in the results table view.
-
on_quick_instructions
()¶ Displays the quick instructions window.
-
static
on_read_documentation
()¶ Opens the documentation in the default web browser.
-
on_settings_changed
(changed_settings)¶ Update settings from settings dialog to settings configuration as soon as user commits parameter changes.
Parameters: changed_settings (dict) – Settings dictionary Returns: Updates the changed settings on the object directly Return type: Null (void)
-
on_task_finished
(task)¶ Enable the Result tab after the inertial mass determination run is finished.
Args: task: ThreadPoolExecutor task
-
on_update_text
(text)¶ Writes new text to the console at the last text cursor position
Parameters: text (str) – Text to be shown on the console.
-
open_project
()¶ Opens a pyIMD project file (.xml) using the IntertialMassDetermination.load_pyimd_project method
-
print_to_console
(text)¶ Print text to console.
Parameters: text (str) –
-
run_batch_calculation
()¶ Implementation of the pyIMD calculation batch mode based on pyIMD project files.
-
run_calculation
()¶ Implementation of the pyIMD calculation start as new thread.
-
save_project
()¶ Saves a pyIMD project file as .xml using the IntertialMassDetermination.save_pyimd_project method
Returns: Saves pyIMD project as xml file to disk Return type: Null (void)
-
select_batch_files
()¶ Selection of .xml pyIMD project files for batch calculation.
-
select_data_files
()¶ Select data files to create a new pyIMD project
-
send_to_console_signal
¶ pyqtSignal used to send a text to the console.
Parameters: message (str) –
-
setup_console_connection
()¶ Set up the console connection between the settings and the main window.
-
show_console
()¶ Show and hide the console with the program log.
-
show_data
()¶ Display the selected file names om the file viewer.
-
show_settings_dialog
()¶ Show the settings dialog.
-
sync_settings
()¶ Synchronizes the settings of the UI with the pyIMD object settings object.
-
-
class
pyIMD.ui.main_ui.
Stream
¶ Bases:
PyQt5.QtCore.QObject
Implementation of a stream to handle logging messages
-
stream_signal
¶ pyqtsignal to redirect sterr
-
write
(text: object) → object¶ Emits text formatted as string. :param text: :type text: str
-
-
class
pyIMD.ui.settings.
SettingsDialog
(settings_dictionary)¶ Bases:
PyQt5.QtWidgets.QDialog
Settings QDialog user interface implementation.
-
check_state
()¶ Live validation if parameters entered by user are valid.
Returns: Returns color formatter validator state. Return type: sender (obj)
-
close_settings_dialog
()¶ Close the settings UI dialog without saving changes made on parameters
Returns: None. Return type: Null (void)
-
commit_parameters
()¶ Saves changes on parameters.
Returns: Returns the changed parameters as dictionary. Return type: Parameters (dict)
Find the checked radiobutton
Returns: Returns the name of the selected radio button. Return type: selected radio (str)
-
on_frequency_offset_mode_auto
(checked)¶ Enables the auto offset mode fields
Parameters: checked (bool) – Boolean enabling or disabling the frequency offset spin Returns: None Return type: Null (void)
-
on_frequency_offset_mode_manual
(checked)¶ Enables the manual offset mode fields
Parameters: checked (bool) – Boolean enabling or disabling the frequency offset field Returns: None Return type: Null (void)
-
on_toggle_frequency_offset
(state)¶ Enables or disables the frequency offset optional parameters
Parameters: state (int) – State enabling or disabling the frequency offset correction Returns: None Return type: Null (void)
-
print_to_console
(text)¶ Print changes to console
Parameters: text (str) – Text to print to the console Returns: Prints message to console. Return type: Message (str)
-
send_to_console_signal
¶ pyqtSignal sends message to console
Returns: Status message to be send to console. Return type: message (str)
-
set_defaults
()¶ Set parameters default values to user interface.
Returns: None Return type: Null (void)
-
set_values
()¶ Set parameter values to user interface.
Returns: None Return type: Null (void)
-
settings_has_changed_signal
¶ pyqtSignal sends dictionary with all settings
Returns: Dictionary with settings. Return type: settings (dict)
-