Parameter Item#

Parameter Item

This code defines classes that inherit from the ParameterItemBase class.

ParameterItemBase(label, value, *, tooltip, ...)

Each parameter to be edited has several pieces of information.

ParameterItemCheckbox(label, value[, tooltip])

Edit a checkbox parameter where the value is either True or False.

ParameterItemChoice(label, value[, choices, ...])

Choose a parameter value from a list of choices.

ParameterItemSpinBox(label, value, hi, lo, ...)

Set a numerical parameter between lo & hi.

ParameterItemText(label, value[, tooltip])

Edit a text parameter where any text can be entered.

class pyQParamWidget.param_item.ParameterItemBase(label: str, value: (<class 'int'>, <class 'str'>), *, tooltip: str = '', choices: ~typing.List[str] = <class 'object'>, hi: int = <class 'object'>, lo: int = <class 'object'>)[source]#

Each parameter to be edited has several pieces of information.

The other ParameterItemXYZ classes inherit from this class. Each subclass specifies the type of widget that should be used in the GUI to capture input for the parameter.

choices#

List of choices for QPW_Choice widget.

alias of object

hi#

Maximum value for QPW_SpinBox widget.

alias of object

label: str#

Form text for this item.

lo#

Minimum value for QPW_SpinBox widget.

alias of object

tooltip: str = ''#

Widget tooltip for this item.

validate()[source]#

Each subclass must define a validate method that performs input validation to ensure the input value matches the expected format.

An instance of one of these subclasses defines a parameter with a label, initial value, tooltip, choices (for ParameterItemChoice), minimum/maximum values (for ParameterItemSpinBox), and widget class/interface that will be used for this parameter in the GUI.

value: (<class 'int'>, <class 'str'>)#

Supplied (or accepted) value.

class pyQParamWidget.param_item.ParameterItemCheckbox(label, value, tooltip='')[source]#

Edit a checkbox parameter where the value is either True or False.

validate()[source]#

Validation not necessary for checkbox.

widget_class#

alias of QPW_CheckBox

class pyQParamWidget.param_item.ParameterItemChoice(label, value, choices=[], tooltip='')[source]#

Choose a parameter value from a list of choices.

validate()[source]#

Must provide a list of choices.

widget_class#

alias of QPW_Choice

class pyQParamWidget.param_item.ParameterItemSpinBox(label: str, value: int, hi: int = <class 'object'>, lo: int = <class 'object'>, tooltip: str = '')[source]#

Set a numerical parameter between lo & hi.

validate()[source]#

Must provide lo <= value <= hi.

widget_class#

alias of QPW_SpinBox

class pyQParamWidget.param_item.ParameterItemText(label, value, tooltip='')[source]#

Edit a text parameter where any text can be entered.

validate()[source]#

Validation not necessary for text.

widget_class#

alias of QPW_Text