madgui.widget.spinbox module¶
Custom spin box widgets.
Classes
|
Base class for custom spinbox controls. |
|
|
|
-
class
madgui.widget.spinbox.
AbstractSpinBox
(*args, **kwargs)[source]¶ Bases:
madgui.widget.quantity.ValueControlBase
,PyQt5.QtWidgets.QAbstractSpinBox
Base class for custom spinbox controls.
Subclassing
QAbstractSpinBox
orQDoubleSpinBox
directly with PyQt is hard, because they do not expose access to several crucial APIs:prefix
andsuffix
(QAbstractSpinBox)no null values,
can’t control round()
NaN is reset to maximum in bound()
no unit editing
rounding is ‘f’-based
Methods
clear
(self)fixup
(self, str)keyPressEvent
(self, QKeyEvent)sizeHint
(self)stepBy
(self, int)stepEnabled
(self)-
step
= None¶
-
typical
= None¶
-
class
madgui.widget.spinbox.
ExpressionSpinBox
(*args, **kwargs)[source]¶ Bases:
madgui.widget.spinbox.QuantitySpinBox
Methods
format
(value)parse
(text)stepEnabled
(self)
-
class
madgui.widget.spinbox.
QuantitySpinBox
(*args, **kwargs)[source]¶ Bases:
madgui.widget.quantity.QuantityControlBase
,madgui.widget.spinbox.AbstractSpinBox
Methods
update_step
(value)Attributes
float(x) -> floating point number
float(x) -> floating point number
Signal<<class ‘object’>>
-
step
= 1.0¶
-
typical
= 3.3333333333333335e-17¶
-
valueChanged
¶ Signal<<class ‘object’>>
-