madgui.widget.params module¶
Parameter input dialog.
Classes
|
Row info for the TableView [internal]. |
|
Input controls to show and edit key-value pairs. |
|
TableView based editor window for MAD-X commands. |
|
|
|
|
|
TabWidget that manages multiple ParamTables inside. |
Functions
|
Create a dialog to edit parameters of a given Model. |
-
class
madgui.widget.params.
CommandEdit
(fetch, store=None, units=True, model=None, data_key=None, **kwargs)[source]¶ Bases:
madgui.widget.params.ParamTable
TableView based editor window for MAD-X commands. Used for viewing/editing elements.
In addition to the ParamTables features, this class is capable of indicating which parameters were explicitly specified by the user and showing the expression!
Methods
get_comp_unit
(par, i)get_knob_row
(i, p)get_param_row
(i, p)get_vector_row
(parent, i, p)set_comp_value
(par, i, _, value)set_par_value
(i, par, value)vec_rows
(par)
-
class
madgui.widget.params.
GlobalsEdit
(model, **kwargs)[source]¶ Bases:
madgui.widget.params.ParamTable
Attributes
list() -> new empty list
Methods
get_param_row
(i, p)-
exportFilters
= [('Strength file', '*.str'), ('YAML file', '*.yml', '*.yaml')]¶
-
-
class
madgui.widget.params.
MatrixTable
(fetch, shape, get_name, **kwargs)[source]¶ Bases:
madgui.widget.params.ParamTable
Methods
fetch_params
(**fetch_args)get_param_row
(i, row)Attributes
-
property
sections
¶
-
property
-
class
madgui.widget.params.
ParamInfo
(name, value, expr=None, inform=0, mutable=True, dtype=None, var_type=1)[source]¶ Bases:
object
Row info for the TableView [internal].
-
class
madgui.widget.params.
ParamTable
(fetch, store=None, units=True, model=None, data_key=None, **kwargs)[source]¶ Bases:
madgui.widget.tableview.TreeView
Input controls to show and edit key-value pairs.
The parameters are displayed in 3 columns: name / value / unit.
Methods
curRow
()exportTo
(filename)Export parameters to YAML file.
fetch_params
(**fetch_args)get_param_row
(i, p)importFrom
(filename)Import data from JSON/YAML file.
keyPressEvent
(event)<Enter>: open editor; <Delete>/<Backspace>: remove value.
par_rows
(par)setRowValue
(row, value)Set the value of the parameter in the specified row.
set_value
(i, par, value)update
(**kw)Update dialog from the datastore.
Attributes
list() -> new empty list
list() -> new empty list
-
exportFilters
= [('YAML file', '*.yml', '*.yaml')]¶
-
property
exporter
¶
-
importFilters
= [('YAML file', '*.yml', '*.yaml'), ('JSON file', '*.json')]¶
-
property
sections
¶
-