Relacs Widgets Library  0.9.8
Public Member Functions | Protected Member Functions | List of all members
DoubleSpinBox Class Reference

#include <doublespinbox.h>

Inheritance diagram for DoubleSpinBox:
Inheritance graph
[legend]
Collaboration diagram for DoubleSpinBox:
Collaboration graph
[legend]

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)
 

Detailed Description

A spin-box for editing floating point numbers.

Author
Jan Benda

Constructor & Destructor Documentation

DoubleSpinBox ( QWidget *  parent = 0)

Constructs an empty DoubleSpinBox.

Member Function Documentation

char formatType ( void  ) const

Returns the format type (g, f, or e).

See Also
setFormatType(), setFormat(), precision()
void setFormatType ( char  f)

Set the format type to f. Can be f, g, or e.

See Also
formatType(), setFormat(), setPrecision()
void setFormat ( const string &  format)
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.

QString textFromValue ( double  value) const
virtual

Converts value to the text displayed in the DoubleSpinBox.

double valueFromText ( const QString &  text) const
virtual

Converts text to a value.

void keyPressEvent ( QKeyEvent *  event)
protectedvirtual

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