QPW Widgets#
QPW Widgets
This Python module provides classes for creating user interface
widgets in PyQt5 for inputting parameters.
The module defines classes such as QPW_CheckBox
,
QPW_Choice
, QPW_SpinBox
, and QPW_Text
that inherit from the``QPW_Mixin`` class.
The QPW_Mixin
class implements common functionality such
as setting and getting widget values, checking if widget
values have changed, and setting up tooltip text.
The methods added by the QPW_Mixin
class are prefixed with
qpw_
to avoid replacing methods from the parent Qt widget
class.
These widgets can be instantiated and used in a PyQt5 GUI to provide a way for users to input values for various parameters.
For comparison with user input, avoids comparison with an explicit value. |
|
|
Widget type for checkbox or boolean parameter. |
|
Widget type for picking from a list. |
|
Widget type for adjusting a number between limits. |
|
Mixin class for all QPW widgets. |
|
Widget type for editing as text. |
Note
The QPW_
prefix: pyQParamWidget
- class pyQParamWidget.qpw_widgets.QPW_CheckBox(*args: Any, **kwargs: Any)[source]#
Widget type for checkbox or boolean parameter.
qpw_get
()Return the value from the widget.
qpw_isChanged
()Is the widget value different than the original?
qpw_set
(value)Set the widget's value.
qpw_setup
(pitem, slot)Widget-specific setup details.
- class pyQParamWidget.qpw_widgets.QPW_Choice(*args: Any, **kwargs: Any)[source]#
Widget type for picking from a list.
qpw_get
()Return the value from the widget.
qpw_isChanged
()Is the widget value different than the original?
qpw_set
(value)Set the widget's value.
qpw_setup
(pitem, slot)Widget-specific setup details.
- class pyQParamWidget.qpw_widgets.QPW_Mixin(*args, parameter=None, **kwargs)[source]#
Mixin class for all QPW widgets.
qpw_get
()Return the value from the widget.
Is the widget value different than the original?
qpw_set
(value)Set the widget's value.
qpw_setup
(pitem, slot)Widget-specific setup details.
- original_type#
Python object type to cast widget values.
alias of
object
- parameters#
ParameterItemBase object (passed by parent).
alias of
object
- class pyQParamWidget.qpw_widgets.QPW_SpinBox(*args: Any, **kwargs: Any)[source]#
Widget type for adjusting a number between limits.
qpw_get
()Return the value from the widget.
qpw_isChanged
()Is the widget value different than the original?
qpw_set
(value)Set the widget's value.
qpw_setup
(pitem, slot)Widget-specific setup details.
- class pyQParamWidget.qpw_widgets.QPW_Text(*args: Any, **kwargs: Any)[source]#
Widget type for editing as text.
qpw_get
()Return the value from the widget.
qpw_isChanged
()Is the widget value different than the original?
qpw_set
(value)Set the widget's value.
qpw_setup
(pitem, slot)Widget-specific setup details.
- pyQParamWidget.qpw_widgets.UNDEFINED_VALUE#
For comparison with user input, avoids comparison with an explicit value.