mirror of
https://github.com/nqrduck/quackseq.git
synced 2024-11-21 21:42:23 +00:00
Added suffix for FloatSettings.
This commit is contained in:
parent
b0cfd270fe
commit
f3ba749d7c
1 changed files with 7 additions and 0 deletions
|
@ -102,6 +102,7 @@ class FloatSetting(NumericalSetting):
|
||||||
min_value : The minimum value of the setting
|
min_value : The minimum value of the setting
|
||||||
max_value : The maximum value of the setting
|
max_value : The maximum value of the setting
|
||||||
slider : If the setting should be displayed as a slider (only in the GUI not used in this GUI)
|
slider : If the setting should be displayed as a slider (only in the GUI not used in this GUI)
|
||||||
|
suffix : The suffix that is added to the value of the QSpinBox
|
||||||
"""
|
"""
|
||||||
|
|
||||||
DEFAULT_LENGTH = 100
|
DEFAULT_LENGTH = 100
|
||||||
|
@ -115,10 +116,12 @@ class FloatSetting(NumericalSetting):
|
||||||
min_value: float = None,
|
min_value: float = None,
|
||||||
max_value: float = None,
|
max_value: float = None,
|
||||||
slider=False,
|
slider=False,
|
||||||
|
suffix="",
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Create a new float setting."""
|
"""Create a new float setting."""
|
||||||
super().__init__(name, category, description, default, min_value, max_value)
|
super().__init__(name, category, description, default, min_value, max_value)
|
||||||
self.slider = slider
|
self.slider = slider
|
||||||
|
self.suffix = suffix
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def value(self):
|
def value(self):
|
||||||
|
@ -141,6 +144,8 @@ class IntSetting(NumericalSetting):
|
||||||
description (str) : A description of the setting
|
description (str) : A description of the setting
|
||||||
min_value : The minimum value of the setting
|
min_value : The minimum value of the setting
|
||||||
max_value : The maximum value of the setting
|
max_value : The maximum value of the setting
|
||||||
|
slider : If the setting should be displayed as a slider (only in the GUI not used in this GUI)
|
||||||
|
suffix : The suffix that is added to the value of the QSpinBox
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
|
@ -152,10 +157,12 @@ class IntSetting(NumericalSetting):
|
||||||
min_value=None,
|
min_value=None,
|
||||||
max_value=None,
|
max_value=None,
|
||||||
slider=False,
|
slider=False,
|
||||||
|
suffix="",
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Create a new int setting."""
|
"""Create a new int setting."""
|
||||||
super().__init__(name, category, description, default, min_value, max_value)
|
super().__init__(name, category, description, default, min_value, max_value)
|
||||||
self.slider = slider
|
self.slider = slider
|
||||||
|
self.suffix = suffix
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def value(self):
|
def value(self):
|
||||||
|
|
Loading…
Reference in a new issue