Parameter Item#
Parameter Item
This code defines classes that inherit from the
ParameterItemBase
class.
|
Each parameter to be edited has several pieces of information. |
|
Edit a checkbox parameter where the value is either |
|
Choose a parameter value from a list of choices. |
|
Set a numerical parameter between lo & hi. |
|
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
orFalse
.- 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.
- 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.
- widget_class#
alias of
QPW_SpinBox