Components¶
Very basic components used by other widgets.
These are relatively sparsely documented because their operation is mostly self-explanatory
Classes:
|
Slider capable of representing floats |
Custom key press handler https://gist.github.com/mfessenden/baa2b87b8addb0b60e54a11c1da48046 |
|
|
Editable label https://gist.github.com/mfessenden/baa2b87b8addb0b60e54a11c1da48046 |
|
with respct to https://stackoverflow.com/a/51057516 |
|
|
|
Simple extension of toggle button with styling for clearer 'ON' vs 'OFF' |
- class pvp.gui.widgets.components.DoubleSlider(decimals=1, *args, **kargs)[source]¶
Slider capable of representing floats
Ripped off from and https://stackoverflow.com/a/50300848 ,
Thank you!!!
Attributes:
doubleValueChanged
(*args, **kwargs)Methods:
setDecimals
(decimals)value
()setMinimum
(value)setMaximum
(value)minimum
()_minimum
()maximum
()_maximum
()setSingleStep
(value)setValue
(value)- doubleValueChanged(*args, **kwargs) = <PySide2.QtCore.Signal object>¶
- staticMetaObject = <PySide2.QtCore.QMetaObject object>¶
- class pvp.gui.widgets.components.KeyPressHandler[source]¶
Custom key press handler https://gist.github.com/mfessenden/baa2b87b8addb0b60e54a11c1da48046
Attributes:
escapePressed
(*args, **kwargs)returnPressed
(*args, **kwargs)Methods:
eventFilter
(obj, event)- escapePressed(*args, **kwargs) = <PySide2.QtCore.Signal object>¶
- returnPressed(*args, **kwargs) = <PySide2.QtCore.Signal object>¶
- staticMetaObject = <PySide2.QtCore.QMetaObject object>¶
- class pvp.gui.widgets.components.EditableLabel(parent=None, **kwargs)[source]¶
Editable label https://gist.github.com/mfessenden/baa2b87b8addb0b60e54a11c1da48046
Attributes:
textChanged
(*args, **kwargs)Methods:
text
()Standard QLabel text getter
setText
(text)Standard QLabel text setter
labelPressedEvent
(event)Set editable if the left mouse button is clicked
Action to make the widget editable
setEditable
(editable)Indicates the widget text has been updated
Return/enter event handler
Escape event handler
- textChanged(*args, **kwargs) = <PySide2.QtCore.Signal object>¶
- staticMetaObject = <PySide2.QtCore.QMetaObject object>¶
- class pvp.gui.widgets.components.QHLine(parent=None, color='#FFFFFF')[source]¶
with respct to https://stackoverflow.com/a/51057516
Methods:
setColor
(color)Attributes:
- staticMetaObject = <PySide2.QtCore.QMetaObject object>¶
- class pvp.gui.widgets.components.QVLine(parent=None, color='#FFFFFF')[source]¶
Methods:
setColor
(color)Attributes:
- staticMetaObject = <PySide2.QtCore.QMetaObject object>¶
- class pvp.gui.widgets.components.OnOffButton(state_labels: Tuple[str, str] = ('ON', 'OFF'), toggled: bool = False, *args, **kwargs)[source]¶
Simple extension of toggle button with styling for clearer ‘ON’ vs ‘OFF’
- Parameters
Methods:
__init__
([state_labels, toggled])- param state_labels
tuple of strings to set when toggled and untoggled
set_state
(state)Attributes:
- __init__(state_labels: Tuple[str, str] = ('ON', 'OFF'), toggled: bool = False, *args, **kwargs)[source]¶
- staticMetaObject = <PySide2.QtCore.QMetaObject object>¶