PerceptualColor::MultiSpinBoxSection
#include <multispinboxsection.h>
Public Member Functions | |
| MultiSpinBoxSection () | |
| MultiSpinBoxSection (const MultiSpinBoxSection &other) | |
| MultiSpinBoxSection (MultiSpinBoxSection &&other) noexcept | |
| ~MultiSpinBoxSection () noexcept | |
| int | decimals () const |
| QString | formatString () 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 | setFormatString (const QString &formatString) |
| void | setMaximum (double newMaximum) |
| void | setMinimum (double newMinimum) |
| void | setSingleStep (double newSingleStep) |
| 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.
◆ formatString()
|
nodiscard |
A string in the format "PREFIX%vSUFFIX".
- Returns
- The property value.
- See also
- setFormatString()
- prefix()
- suffix()
Definition at line 283 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
- setFormatString
Definition at line 185 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.
◆ setFormatString()
| void PerceptualColor::MultiSpinBoxSection::setFormatString | ( | const QString & | formatString | ) |
Setter for the prefix(), suffix() and formatString() properties.
- Parameters
-
formatString A string in the format "prefix%1suffix". It should contain exactly one place marker as described in QString::arg()like%1or%L2. This place marker represents the value. Example: “Prefix%1Suffix”. Prefix and suffix may be empty.
Definition at line 256 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.
◆ setSingleStep()
| void PerceptualColor::MultiSpinBoxSection::setSingleStep | ( | double | newSingleStep | ) |
Setter for singleStep property.
- Parameters
-
newSingleStep The new single step value.
Definition at line 209 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 201 of file multispinboxsection.cpp.
◆ suffix()
|
nodiscard |
The suffix to be displayed behind the value.
- Returns
- The property value.
- See also
- setFormatString
Definition at line 220 of file multispinboxsection.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri May 2 2025 12:04:47 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.