params_interfaces#

Bases: object

class UiParameter(tab, src_folder=None, params_dict=None)[source]#

Bases: QObject

This is a class to link the GUI widgets to the config file. This is done automatically from parsing the params_dict attribute. The params_dict attribute is a dictionary of the form:

{'attr_name': ParamLink(keys, widget, attr_name=, default=, connect=)}
or
{'attr_name': keys,}

where:

  • attr_name is the name of the attribute in the class

  • keys is a list of keys (chain) to access the value in the config file.

If None, the attribute is not connected widget is the GUI widget connect is a boolean to indicate whether the widget should be connected to the config file. Set to False to not connect or connect manually. If the value is not a ParamLink, it is assumed that the keys point to the value and the widget connection is done through accessors and mutators.

cfg_to_ui()[source]#
connect()[source]#

Connect GUI slots here

connect_simple_widgets()[source]#
fix_cfg_file(f_path)[source]#

Fix the file if it was copied from defaults, tailor to current sample

handle_widget_changed(value, attr_name)[source]#
is_checked(check_box)[source]#
is_simple_attr(key)[source]#
read_configs(cfg_path)[source]#
reload()[source]#
sanitize_neg_one(val)[source]#
sanitize_nones(val)[source]#
set_check_state(check_box, state)[source]#
ui_to_cfg()[source]#
write_config()[source]#
property config#
property config_path#
property default_config#
property path#
class UiParameterCollection(tab, src_folder=None)[source]#

Bases: object

For multi-section UiParameters that share the same config file. This ensures the file remains consistent.

cfg_to_ui()[source]#
fix_cfg_file(f_path)[source]#

Fix the file if it was copied from defaults, tailor to current sample

read_configs(cfg_path)[source]#
reload()[source]#
ui_to_cfg()[source]#
write_config()[source]#
property config_path#
property params#