PerceptualColor::MultiSpinBoxSection
#include <multispinboxsection.h>
Public Member Functions | |
MultiSpinBoxSection () | |
MultiSpinBoxSection (const MultiSpinBoxSection &other) | |
MultiSpinBoxSection (MultiSpinBoxSection &&other) noexcept | |
~MultiSpinBoxSection () noexcept | |
int | decimals () const |
bool | isWrapping () const |
double | maximum () const |
double | minimum () const |
MultiSpinBoxSection & | operator= (const MultiSpinBoxSection &other) |
MultiSpinBoxSection & | operator= (MultiSpinBoxSection &&other) noexcept |
QString | prefix () const |
void | setDecimals (int newDecimals) |
void | setMaximum (double newMaximum) |
void | setMinimum (double newMinimum) |
void | setPrefix (const QString &newPrefix) |
void | setSingleStep (double newSingleStep) |
void | setSuffix (const QString &newSuffix) |
void | setWrapping (bool newIsWrapping) |
double | singleStep () const |
QString | suffix () const |
Detailed Description
The configuration of a single section within a MultiSpinBox.
For a specific section within a MultiSpinBox, this configuration contains various settings.
This data type can be passed to QDebug thanks to operator<<(QDebug dbg, const PerceptualColor::MultiSpinBoxSection &value)
This type is declared as type to Qt’s type system via Q_DECLARE_METATYPE
. Depending on your use case (for example if you want to use for queued signal-slot connections), you might consider calling qRegisterMetaType()
for this type, once you have a QApplication object.
Definition at line 37 of file multispinboxsection.h.
Constructor & Destructor Documentation
◆ MultiSpinBoxSection() [1/3]
PerceptualColor::MultiSpinBoxSection::MultiSpinBoxSection | ( | ) |
Constructor.
The object is initialized with default values.
Definition at line 19 of file multispinboxsection.cpp.
◆ MultiSpinBoxSection() [2/3]
PerceptualColor::MultiSpinBoxSection::MultiSpinBoxSection | ( | const MultiSpinBoxSection & | other | ) |
Copy constructor.
- Parameters
-
other the object to be copied
Definition at line 32 of file multispinboxsection.cpp.
◆ ~MultiSpinBoxSection()
|
noexcept |
Destructor.
Definition at line 25 of file multispinboxsection.cpp.
◆ MultiSpinBoxSection() [3/3]
|
noexcept |
Move constructor.
- Parameters
-
other the object to move
Definition at line 58 of file multispinboxsection.cpp.
Member Function Documentation
◆ decimals()
|
nodiscard |
The number of digits after the decimal point.
This value can also be 0
to get integer-like behavior.
- Returns
- The property value.
- See also
- setDecimals
Definition at line 84 of file multispinboxsection.cpp.
◆ isWrapping()
|
nodiscard |
Holds whether or not MultiSpinBox::sectionValues wrap around when they reaches minimum or maximum.
The default is false
.
If false
, MultiSpinBox::sectionValues shall be bound between minimum and maximum. If true
, MultiSpinBox::sectionValues shall be treated as a circular.
Example: You have a section that displays a value measured in degree. minimum is 0
. maximum is 360
. The following corrections would be applied to input:
Input | isWrapping == false | isWrapping == true |
---|---|---|
-5 | 0 | 355 |
0 | 0 | 0 |
5 | 5 | 5 |
355 | 355 | 355 |
360 | 360 | 0 |
365 | 360 | 5 |
715 | 360 | 355 |
720 | 360 | 0 |
725 | 360 | 5 |
- Returns
- The property value.
- See also
- setWrapping
Definition at line 124 of file multispinboxsection.cpp.
◆ maximum()
|
nodiscard |
The maximum possible value of the section.
- Returns
- The property value.
- See also
- setMaximum
Definition at line 142 of file multispinboxsection.cpp.
◆ minimum()
|
nodiscard |
The minimum possible value of the section.
- Returns
- The property value.
- See also
- setMinimum
Definition at line 163 of file multispinboxsection.cpp.
◆ operator=() [1/2]
MultiSpinBoxSection & PerceptualColor::MultiSpinBoxSection::operator= | ( | const MultiSpinBoxSection & | other | ) |
Copy assignment operator.
- Returns
- By convention, always returns
*this
.
- Parameters
-
other the object to be copied
Definition at line 44 of file multispinboxsection.cpp.
◆ operator=() [2/2]
|
noexcept |
Move assignment operator.
- Returns
- By convention, always returns
*this
.
- Parameters
-
other the object to move-assign
Definition at line 68 of file multispinboxsection.cpp.
◆ prefix()
|
nodiscard |
A prefix to be displayed before the value.
- Returns
- The property value.
- See also
- setPrefix
Definition at line 184 of file multispinboxsection.cpp.
◆ setDecimals()
void PerceptualColor::MultiSpinBoxSection::setDecimals | ( | int | newDecimals | ) |
Setter for decimals property.
- Parameters
-
newDecimals The new decimals values.
Definition at line 92 of file multispinboxsection.cpp.
◆ setMaximum()
void PerceptualColor::MultiSpinBoxSection::setMaximum | ( | double | newMaximum | ) |
Setter for maximum property.
- Parameters
-
newMaximum The new maximum value.
Definition at line 150 of file multispinboxsection.cpp.
◆ setMinimum()
void PerceptualColor::MultiSpinBoxSection::setMinimum | ( | double | newMinimum | ) |
Setter for minimum property.
- Parameters
-
newMinimum The new minimum value.
Definition at line 171 of file multispinboxsection.cpp.
◆ setPrefix()
void PerceptualColor::MultiSpinBoxSection::setPrefix | ( | const QString & | newPrefix | ) |
Setter for prefix property.
- Parameters
-
newPrefix The new prefix value.
Definition at line 192 of file multispinboxsection.cpp.
◆ setSingleStep()
void PerceptualColor::MultiSpinBoxSection::setSingleStep | ( | double | newSingleStep | ) |
Setter for singleStep property.
- Parameters
-
newSingleStep The new single step value.
Definition at line 216 of file multispinboxsection.cpp.
◆ setSuffix()
void PerceptualColor::MultiSpinBoxSection::setSuffix | ( | const QString & | newSuffix | ) |
Setter for suffix property.
- Parameters
-
newSuffix The new suffix value.
Definition at line 234 of file multispinboxsection.cpp.
◆ setWrapping()
void PerceptualColor::MultiSpinBoxSection::setWrapping | ( | bool | newIsWrapping | ) |
Setter for isWrapping property.
- Parameters
-
newIsWrapping The new isWrapping value.
Definition at line 132 of file multispinboxsection.cpp.
◆ singleStep()
|
nodiscard |
A smaller of two natural steps.
Valid range: >= 0
When the user uses the arrows to change the spin box’s value the value will be incremented/decremented by the amount of the singleStep.
- Returns
- The property value.
- See also
- setSingleStep
Definition at line 208 of file multispinboxsection.cpp.
◆ suffix()
|
nodiscard |
The suffix to be displayed behind the value.
- Returns
- The property value.
- See also
- setSuffix
Definition at line 226 of file multispinboxsection.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:45:53 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.