itom 2.2.1
DoubleSpinBoxPrivate Class Reference

List of all members.

Public Slots

void editorTextChanged (const QString &text)
void onValueChanged ()
void onValueProxyAboutToBeModified ()
void onValueProxyModified ()

Public Member Functions

 DoubleSpinBoxPrivate (DoubleSpinBox &object)
void init ()
bool compare (double x1, double x2) const
 Compare two double previously rounded according to the number of decimals.
double round (double value, int decimals) const
 Return a value rounded with the number of decimals.
QString stripped (const QString &text, int *pos) const
 Remove prefix and suffix.
int boundDecimals (int decimals) const
int decimalsForValue (double value) const
void setDecimals (int dec)
void setValue (double value, int dec=-1)
double validateAndInterpret (QString &input, int &pos, QValidator::State &state, int &decimals) const
void connectSpinBoxValueChanged ()
void disconnectSpinBoxValueChanged ()

Public Attributes

itomQDoubleSpinBoxSpinBox
DoubleSpinBox::SetMode Mode
int DefaultDecimals
DoubleSpinBox::DecimalsOptions DOption
bool InvertedControls
DoubleSpinBox::SizeHintPolicy SizeHintPolicy
double InputValue
double InputRange [2]
QString CachedText
double CachedValue
QValidator::State CachedState
int CachedDecimals
QSize CachedSizeHint
bool ForceInputValueUpdate
QPointer< ValueProxyProxy

Protected Attributes

DoubleSpinBox *const q_ptr

Private Member Functions

 Q_DECLARE_PUBLIC (DoubleSpinBox)

Member Function Documentation

int DoubleSpinBoxPrivate::boundDecimals ( int  decimals) const

Return the number of decimals bounded by the allowed min and max number of decimals. If -1, returns the current number of decimals.

int DoubleSpinBoxPrivate::decimalsForValue ( double  value) const

Return the number of decimals to use to display the value. Note that if DecimalsByValue is not set, the number of decimals to use is DefaultDecimals.

void DoubleSpinBoxPrivate::setDecimals ( int  dec)

Set the number of decimals of the spinbox and emit the signal No check if they are the same.

void DoubleSpinBoxPrivate::setValue ( double  value,
int  dec = -1 
)

Set value with a specific number of decimals. -1 means the number of decimals stays the same.

double DoubleSpinBoxPrivate::validateAndInterpret ( QString &  input,
int &  pos,
QValidator::State &  state,
int &  decimals 
) const

Ensure the spinbox text is meaningful. It is called multiple times when the spinbox line edit is modified, therefore values are cached.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Friends