ParamMixin

class stginga.plugins.local_plugin_mixin.ParamMixin[source]

Bases: object

Mixin class for Ginga local plugin that enables the feature to save/load parameters.

Methods Summary

build_param_gui(container)

Call this in build_gui() to create 'Load Param' and 'Save Param' buttons.

ingest_params(pardict)

Ingest dictionary containing plugin parameters into plugin GUI and internal variables.

load_params(filename)

Load previously saved parameters from a JSON file.

load_params_cb()

Allow user to select JSON file to load.

params_dict()

Return current parameters as a dictionary.

save_params()

Save parameters to a JSON file.

Methods Documentation

build_param_gui(container)[source]

Call this in build_gui() to create ‘Load Param’ and ‘Save Param’ buttons.

Parameters:
containerwidget

The widget to contain these buttons.

ingest_params(pardict)[source]

Ingest dictionary containing plugin parameters into plugin GUI and internal variables.

load_params(filename)[source]

Load previously saved parameters from a JSON file.

load_params_cb()[source]

Allow user to select JSON file to load.

params_dict()[source]

Return current parameters as a dictionary.

save_params()[source]

Save parameters to a JSON file.