msticpy.config.comp_edit module

Component Edit base and mixin classes.

class msticpy.config.comp_edit.CEItemsBase(mp_controls)

Bases: CompEditItems, ABC

Base class for components containing an item list.

Initialize the class. Set the controls and retrieve settings.

static border_layout(width='95%')

Return border widget layout.

clear_status()

Clear the status text.

static no_border_layout(width='95%')

Return no-border widget layout.

set_status(status, timeout=3.0)

Set the status text.

Parameters:

timeout (float)

testing = False
class msticpy.config.comp_edit.CompEditDisplayMixin

Bases: object

Mixin class with common display methods.

static border_layout(width='95%')

Return border widget layout.

static no_border_layout(width='95%')

Return no-border widget layout.

class msticpy.config.comp_edit.CompEditFrame(description=None)

Bases: CompEditDisplayMixin, CompEditUtilsMixin, CompEditStatusMixin

Edit frame class for components.

Initialize the class. Set a label with description as content.

Parameters:

description (str)

static border_layout(width='95%')

Return border widget layout.

clear_status()

Clear the status text.

static no_border_layout(width='95%')

Return no-border widget layout.

set_status(status, timeout=3.0)

Set the status text.

Parameters:

timeout (float)

testing = False
class msticpy.config.comp_edit.CompEditHelp(help_text='', help_uri=None)

Bases: object

Class to add help control.

Create help sub-component.

Parameters:
  • help_text (str, optional) – The help string (HTML), by default “”

  • help_uri (Dict[str, str], optional) – Dict of named URIs {disp_txt: URI}, by default None

property layout

Return the parent widget.

set_help(help_text='', help_uri=None)

Set the help string (HTML) and URIs.

Parameters:
  • help_text (str)

  • help_uri (dict[str, str])

class msticpy.config.comp_edit.CompEditItemButtons

Bases: object

Component class to add default buttons.

Initialize the class.

class msticpy.config.comp_edit.CompEditItems(description)

Bases: CompEditFrame

Base class for item list and edit controls.

Initialize the class. Set a label with description as content.

Parameters:

description (str)

static border_layout(width='95%')

Return border widget layout.

clear_status()

Clear the status text.

static no_border_layout(width='95%')

Return no-border widget layout.

set_status(status, timeout=3.0)

Set the status text.

Parameters:

timeout (float)

testing = False
class msticpy.config.comp_edit.CompEditSimple(description)

Bases: CompEditFrame

Base class for simple component with only edit controls.

Initialize the class. Set a label with description as content.

Parameters:

description (str)

static border_layout(width='95%')

Return border widget layout.

clear_status()

Clear the status text.

static no_border_layout(width='95%')

Return no-border widget layout.

set_status(status, timeout=3.0)

Set the status text.

Parameters:

timeout (float)

testing = False
class msticpy.config.comp_edit.CompEditStatusMixin

Bases: object

Mixin class with with status label.

clear_status()

Clear the status text.

set_status(status, timeout=3.0)

Set the status text.

Parameters:

timeout (float)

testing = False
class msticpy.config.comp_edit.CompEditTabs(tabs=None)

Bases: object

Tab class.

Initialize the CompEditTabs class.

Parameters:

tabs (Optional[Dict[str, Tuple[type, Union[List[Any], Dict[str, Any]]]]], optional) – Tab definitions or contents, by default None. Each definition can be a Tuple of class and list of args or a Tuple of class and dict of kwargs.

add_tab(tab_name, control)

Add a tab with name tab_name and content control.

Parameters:
controls: dict[str, Any]
set_tab(tab_name, index=0)

Programatically set the tab by name or index.

Parameters:
  • tab_name (str | None)

  • index (int)

property tab_controls: dict[str, Any]

Return a list of current tab names and controls.

property tab_names: list[str]

Return a list of current tabs.

class msticpy.config.comp_edit.CompEditUtilsMixin

Bases: object

Mixin class with common display methods.

class msticpy.config.comp_edit.SettingsControl

Bases: ABC

Abstract base class for settings controls.

abstract property value: str | dict[str, str | None]

Return the current value of the control.