Back to index

salome-gui  6.5.0
QtxDoubleSpinBox Class Reference

Enhanced version of the Qt's double spin box. More...

Inheritance diagram for QtxDoubleSpinBox:
Inheritance graph

Detailed Description

Enhanced version of the Qt's double spin box.

The QtxDoubleSpinBox class represents the widget for entering the floating point values. In addition to the functionality provided by QDoubleSpinBox, this class supports "cleared" state - this is the state corresponding to "None" (or empty) entered value.

To set "cleared" state use setCleared() method. To check if the spin box stores "cleared" state, use isCleared() method. For example:

  if (myDblSpinBox->isCleared()) {
    ... // process "None" state
  else {
    double value = myDblSpinBox->value();
    ... // process entered value

Another useful feature is possibility to use scientific notation (e.g. 1.234e+18) for the widegt text. To enable this, negative precision should be specified either through a constructor or using setPrecision() method.

Note that "decimals" property of QDoubleSpinBox is almost completely substituted by "myPrecision" field of QtxDoubleSpinBox class. "decimals" is still used for proper size hint calculation and for rounding minimum and maximum bounds of the spin box range.

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