digiKam
Digikam::CustomStepsIntSpinBox Class Reference
+ Inheritance diagram for Digikam::CustomStepsIntSpinBox:

Public Member Functions

 CustomStepsIntSpinBox (QWidget *const parent=nullptr)
 
void enableFractionMagic (const QString &prefix)
 
double fractionMagicValue () const
 
void reset ()
 
void setFractionMagicValue (double value)
 
void setInvertStepping (bool invert)
 
void setSingleSteps (int smaller, int larger)
 
void setSuggestedInitialValue (int initialValue)
 
void setSuggestedValues (const QList< int > &values)
 
void stepBy (int steps) override
 
 ~CustomStepsIntSpinBox () override
 

Protected Member Functions

StepEnabled stepEnabled () const override
 
QString textFromValue (int value) const override
 
int valueFromText (const QString &text) const override
 

Constructor & Destructor Documentation

◆ CustomStepsIntSpinBox()

Digikam::CustomStepsIntSpinBox::CustomStepsIntSpinBox ( QWidget *const  parent = nullptr)
explicit

This is a normal QIntSpinBox which allows to customize the stepping behavior, for cases where linear steps are not applicable

◆ ~CustomStepsIntSpinBox()

Digikam::CustomStepsIntSpinBox::~CustomStepsIntSpinBox ( )
override

Member Function Documentation

◆ enableFractionMagic()

void Digikam::CustomStepsIntSpinBox::enableFractionMagic ( const QString &  prefix)

Call this with a fraction prefix (like "1/") to enable magic handling of the value as fraction denominator.

References prefix.

Referenced by Digikam::SearchFieldRangeInt::enableFractionMagic().

◆ fractionMagicValue()

double Digikam::CustomStepsIntSpinBox::fractionMagicValue ( ) const

value() and setValue() for fraction magic value.

References value.

Referenced by Digikam::SearchFieldRangeInt::write().

◆ reset()

void Digikam::CustomStepsIntSpinBox::reset ( )

Resets to minimum value

Referenced by Digikam::SearchFieldRangeInt::reset().

◆ setFractionMagicValue()

void Digikam::CustomStepsIntSpinBox::setFractionMagicValue ( double  value)

References value.

Referenced by Digikam::SearchFieldRangeInt::read().

◆ setInvertStepping()

void Digikam::CustomStepsIntSpinBox::setInvertStepping ( bool  invert)

◆ setSingleSteps()

void Digikam::CustomStepsIntSpinBox::setSingleSteps ( int  smaller,
int  larger 
)

Allows to set to different default single steps, for the range below m_values, the other for above.

Referenced by Digikam::SearchFieldRangeInt::setSingleSteps().

◆ setSuggestedInitialValue()

void Digikam::CustomStepsIntSpinBox::setSuggestedInitialValue ( int  initialValue)

Sets the value that should be set as first value when first moving away from the minimum value.

Referenced by Digikam::SearchFieldRangeInt::setSuggestedInitialValue().

◆ setSuggestedValues()

void Digikam::CustomStepsIntSpinBox::setSuggestedValues ( const QList< int > &  values)

Set a list of values that are usually applicable for the type of data of the combo box. The user can still type in any other value. Boundaries are not touched. Up or below the min and max values of the list given, default stepping is used.

Referenced by Digikam::SearchFieldRangeInt::setSuggestedValues().

◆ stepBy()

void Digikam::CustomStepsIntSpinBox::stepBy ( int  steps)
override

References value.

◆ stepEnabled()

QAbstractSpinBox::StepEnabled Digikam::CustomStepsIntSpinBox::stepEnabled ( ) const
overrideprotected

References value.

◆ textFromValue()

QString Digikam::CustomStepsIntSpinBox::textFromValue ( int  value) const
overrideprotected

References value.

◆ valueFromText()

int Digikam::CustomStepsIntSpinBox::valueFromText ( const QString &  text) const
overrideprotected

The documentation for this class was generated from the following files: