# control.gui_dict:GuiDict


Custom dictionary representing elements and commands of the control GUI.


Usage

``` python
control.gui_dict:GuiDict()
```


Additionally a System object with related devices can be stored in this class as object variable.

Important class variables which shall be overwritten are:


## Attributes


`cmds: dict`  
List of commands for this device. e.g.: cmds = {":v1": Command(int, "setV1", "V1"), "\*idn": Get(str, "id-string")}

`data: dict`  
GUI dictionary elements. e.g. data = {"Example": var(None, columns=\["Readout", "Setpoint"\]), "V1": var(int, columns=\[go.combobox, go.combobox\], log=True, init=("i1", "i2")), "V2": var(float, columns=\[go.lineedit, go.lineedit\], unit="mT"), "Set": var(None, columns=\[go.button, go.button\], init=\["Set", "Copy"\]), }

`refresh_period: float`  
Period (in seconds) in which the timer attempts to run the refresh method once. If the refresh method takes more execution time than this period it's called without further delay. It will never be called more often than once per this period. (default: 1 sec)

`allow_disabling: bool`  
Flag to decide if the GuiDict can be disabled. If this is set to True the underlying devices should all provide a `close` method or be a pymeasure Instrument. Otherwise likely reenabling will fail.

`S: System`  
System used by this part of the control GUI. If omitted, an empty system named after the GuiDict class is created. Every GuiDict used in one ControlWindow must have a uniquely named System whose name is a valid, non-keyword Python identifier.

`menu_actions: list`  
Custom menu actions appended by the subclass, e.g. in [create_GUI](control.gui_dict.GuiDict.create_GUI.md#matr1x.control.gui_dict.GuiDict.create_GUI). The ControlWindow attaches them to the custom menu and enables/disables them with the GuiDict.

`refresh_worker: object`  
Background worker running [refresh](control.gui_dict.GuiDict.refresh.md#matr1x.control.gui_dict.GuiDict.refresh). Subclasses can trigger a panic from the refresh thread via `self.refresh_worker.panic.emit(True, "message")`.

`name: str`  
Name of the GuiDict, taken from the first key of [data](control.gui_dict.GuiDict.data.md#matr1x.control.gui_dict.GuiDict.data); used as the dock widget title.
