Customized SpinBox that allows for 'better' input (not blocking input when its greater than limit), displays special characters for min / max / arbitrary values and set additional custom min / max.
More...
#include <ScmAdvancedSpinBox.hpp>
|
|
void | setMinimum (int min) |
| |
|
void | setMaximum (int max) |
| |
|
|
| ScmAdvancedSpinBox (QWidget *parent=nullptr) |
| |
|
void | fixup (QString &input) const override |
| |
|
QValidator::State | validate (QString &text, int &pos) const override |
| |
|
void | setDisplayCustomStringForValue (bool display) |
| |
| void | addCustomStringForValue (int value, QString text) |
| | Add a custom string that will be displayed where the SpinBox would normally display a specific (int) value. More...
|
| |
| void | removeCustomStringForValue (int value) |
| | Remove a string from the given value. More...
|
| |
| void | setCustomStringForMin (QString text) |
| | Convenience function to add a custom string to the current minimum. More...
|
| |
| void | setCustomStringForMax (QString text) |
| | Convenience function to add a custom string to the current maximum. More...
|
| |
|
void | setUseCustomMinimum (bool useCustomMin) |
| |
|
void | setUseCustomMaximum (bool useCustomMax) |
| |
|
void | setCustomMinimum (int min) |
| |
|
void | setCustomMaximum (int max) |
| |
|
|
QString | textFromValue (int value) const override |
| |
Customized SpinBox that allows for 'better' input (not blocking input when its greater than limit), displays special characters for min / max / arbitrary values and set additional custom min / max.
◆ addCustomStringForValue()
| void ScmAdvancedSpinBox::addCustomStringForValue |
( |
int |
value, |
|
|
QString |
text |
|
) |
| |
Add a custom string that will be displayed where the SpinBox would normally display a specific (int) value.
- Parameters
-
| value | Value at which the string should be displayed. |
| text | String that should be displayed. |
◆ removeCustomStringForValue()
| void ScmAdvancedSpinBox::removeCustomStringForValue |
( |
int |
value | ) |
|
Remove a string from the given value.
- Parameters
-
| value | Value at which the custom string should be removed. |
◆ setCustomStringForMax()
| void ScmAdvancedSpinBox::setCustomStringForMax |
( |
QString |
text | ) |
|
Convenience function to add a custom string to the current maximum.
- Parameters
-
| test | String that should be displayed at the current max. |
◆ setCustomStringForMin()
| void ScmAdvancedSpinBox::setCustomStringForMin |
( |
QString |
text | ) |
|
Convenience function to add a custom string to the current minimum.
- Parameters
-
| test | String that should be displayed at the current min. |