ConfigTools

class tools.preview.control_panels.ConfigTools(config_file: str | None)

Bases: object

Tools for loading, saving, setting and retrieving configuration file values.

Parameters:

config_file (str | None) – Path to a custom config .ini file or None to load the default config file

tk_vars

Global tkinter variables. Refresh and Busy tkinter.BooleanVar

Type:

dict[str, dict[str, tkinter.Variable]]

Attributes Summary

config_dicts

The convert configuration options in dictionary form.

plugins_dict

Dictionary of configuration option sections as key with a list of containing plugin names as the value

sections

The sorted section names that exist within the convert Configuration options.

Methods Summary

reset_config_to_default([section])

Reset the GUI parameters to their default configuration values.

reset_config_to_saved([section])

Reset the GUI parameters to their saved values within the configuration file.

save_config([section])

Save the configuration .ini file with the currently stored values.

update_config()

Update config with the currently selected values from the GUI.

Attributes Documentation

config_dicts

The convert configuration options in dictionary form.

plugins_dict

Dictionary of configuration option sections as key with a list of containing plugin names as the value

sections

The sorted section names that exist within the convert Configuration options.

Methods Documentation

reset_config_to_default(section: str | None = None) None

Reset the GUI parameters to their default configuration values.

Parameters:

section (str | None) – The configuration section to reset the values for, If None provided then all sections are reset. Default: None

Return type:

None

reset_config_to_saved(section: str | None = None) None

Reset the GUI parameters to their saved values within the configuration file.

Parameters:

section (str | None) – The configuration section to reset the values for, If None provided then all sections are reset. Default: None

Return type:

None

save_config(section: str | None = None) None

Save the configuration .ini file with the currently stored values.

Parameters:

section (str | None) – The configuration section to save, If None provided then all sections are saved. Default: None

Return type:

None

update_config() None

Update config with the currently selected values from the GUI.

Return type:

None

property config_dicts: dict[str, dict[str, ControlPanelOption]]

The convert configuration options in dictionary form.

property plugins_dict: dict[str, list[str]]

Dictionary of configuration option sections as key with a list of containing plugin names as the value

reset_config_to_default(section: str | None = None) None

Reset the GUI parameters to their default configuration values.

Parameters:

section (str | None) – The configuration section to reset the values for, If None provided then all sections are reset. Default: None

Return type:

None

reset_config_to_saved(section: str | None = None) None

Reset the GUI parameters to their saved values within the configuration file.

Parameters:

section (str | None) – The configuration section to reset the values for, If None provided then all sections are reset. Default: None

Return type:

None

save_config(section: str | None = None) None

Save the configuration .ini file with the currently stored values.

Parameters:

section (str | None) – The configuration section to save, If None provided then all sections are saved. Default: None

Return type:

None

property sections: list[str]

The sorted section names that exist within the convert Configuration options.

update_config() None

Update config with the currently selected values from the GUI.

Return type:

None