EditParam

class sofia_redux.pipeline.gui.widgets.EditParam(parent=None, name=None, current=None, default=None, directory=None)[source]

Bases: QDialog, Ui_Dialog

Edit parameters for a reduction step.

Build the dialog.

Parameters:
parentQWidget, optional

Parent widget.

namestr, optional

Reduction step display name.

currentredux.parameters.ParameterSet, optional

Current parameter definitions.

defaultredux.parameters.ParameterSet, optional

Default parameter definitions.

directorystr

Base directory for pick_file and pick_directory widgets.

Methods Summary

addCheckBox(key, param)

Add a check box widget.

addComboBox(key, param)

Add a combo box widget to the form.

addPick(key, param[, pick_type])

Add a pick file/directory button and text widget.

addRadioButtons(key, param)

Add a set of radio buttons to the form.

addTextBox(key, param)

Add a text box widget to the form.

getValue()

Get new parameter values from all the widgets.

pickDirectory(key)

Use a File Dialog to pick a directory.

pickFile(key)

Use a File Dialog to pick a set of files.

reset()

Reset all parameter values to an initial set.

restore()

Restore all parameter values to a default set.

setFormLayout()

Assign a form layout to the current groupBox.

setWidgets()

Add parameter widgets according to their definitions.

Methods Documentation

addCheckBox(key, param)[source]

Add a check box widget.

Parameters:
keystr

Object name for the widget.

paramdict

Parameter dictionary. Must have ‘name’ and ‘value’ defined. If ‘description’ is present, it will be used as a tooltip.

addComboBox(key, param)[source]

Add a combo box widget to the form.

Parameters:
keystr

Object name for the widget.

paramdict

Parameter dictionary. Must have ‘name’, ‘options’, and ‘option_index’ defined. If ‘description’ is present, it will be used as a tooltip.

addPick(key, param, pick_type='file')[source]

Add a pick file/directory button and text widget.

Parameters:
keystr

Object name for the widget.

paramdict

Parameter dictionary. Must have ‘name’ and ‘value’ defined. If ‘description’ is present, it will be used as a tooltip.

pick_type{‘directory’, ‘file’}

Type of file item to select.

addRadioButtons(key, param)[source]

Add a set of radio buttons to the form.

Parameters:
keystr

Object name for the widget.

paramdict

Parameter dictionary. Must have ‘name’, ‘options’, and ‘option_index’ defined. If ‘description’ is present, it will be used as a tooltip.

addTextBox(key, param)[source]

Add a text box widget to the form.

Parameters:
keystr

Object name for the widget.

paramdict

Parameter dictionary. Must have ‘name’ and ‘value’ defined. If ‘description’ is present, it will be used as a tooltip.

getValue()[source]

Get new parameter values from all the widgets.

pickDirectory(key)[source]

Use a File Dialog to pick a directory.

Parameters:
keystr

Object name for the widget.

pickFile(key)[source]

Use a File Dialog to pick a set of files.

Parameters:
keystr

Object name for the widget.

reset()[source]

Reset all parameter values to an initial set.

restore()[source]

Restore all parameter values to a default set.

setFormLayout()[source]

Assign a form layout to the current groupBox.

setWidgets()[source]

Add parameter widgets according to their definitions.