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 |
|
Editable label https://gist.github.com/mfessenden/baa2b87b8addb0b60e54a11c1da48046 |
Custom key press handler https://gist.github.com/mfessenden/baa2b87b8addb0b60e54a11c1da48046 |
|
|
Simple extension of toggle button with styling for clearer ‘ON’ vs ‘OFF’ |
|
with respct to https://stackoverflow.com/a/51057516 |
|
Functions:
|
module function to return a |
-
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!!!
Methods:
_maximum
()_minimum
()maximum
(self)minimum
(self)setDecimals
(decimals)setMaximum
(self, arg__1)setMinimum
(self, arg__1)setSingleStep
(self, arg__1)setValue
(self, arg__1)singleStep
(self)value
(self)Attributes:
doubleValueChanged
(*args, **kwargs)-
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
(self, watched, 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
Methods:
Escape event handler
labelPressedEvent
(event)Set editable if the left mouse button is clicked
Indicates the widget text has been updated
Return/enter event handler
setEditable
(editable)Action to make the widget editable
setText
(text)Standard QLabel text setter
text
()Standard QLabel text getter
Attributes:
textChanged
(*args, **kwargs)-
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>¶