Relacs Widgets Library
0.9.8
|
#include <doublespinbox.h>
Public Member Functions | |
DoubleSpinBox (QWidget *parent=0) | |
char | formatType (void) const |
void | setFormatType (char f) |
void | setFormat (const string &format) |
int | precision (void) const |
void | setPrecision (int p) |
virtual QString | textFromValue (double value) const |
virtual double | valueFromText (const QString &text) const |
Protected Member Functions | |
virtual void | keyPressEvent (QKeyEvent *event) |
A spin-box for editing floating point numbers.
DoubleSpinBox | ( | QWidget * | parent = 0 | ) |
Constructs an empty DoubleSpinBox.
char formatType | ( | void | ) | const |
Returns the format type (g, f, or e).
void setFormatType | ( | char | f | ) |
Set the format type to f. Can be f, g, or e.
void setFormat | ( | const string & | format | ) |
Set the formatType() and the precision() from format. The width of the format is ignored.
References DoubleSpinBox::precision(), and Str::readFormat().
Referenced by NumberItemDelegate::createEditor(), OptWidgetNumber::OptWidgetNumber(), and OptWidgetNumber::update().
int precision | ( | void | ) | const |
The precision used for displaying the floating-point number.
Referenced by DoubleSpinBox::setFormat().
void setPrecision | ( | int | p | ) |
Set the precision used for displaying the floating-point number to p.
|
virtual |
Converts value to the text displayed in the DoubleSpinBox.
|
virtual |
Converts text to a value.
|
protectedvirtual |