Main Page | Namespace List | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

DoubleParam Class Reference

Represents a parameter of type double, used both by commmands and arrays. More...

#include <doubleparam.h>

Inheritance diagram for DoubleParam:

CmdParam ClampDoubleParam ClampFloatParam FloatParam List of all members.

Public Member Functions

 DoubleParam (const char *formalVarName, const char *defaultValue, const char *exactTypeName="GLdouble", double minValue=DOUBLE_MIN, double maxValue=DOUBLE_MAX, double stepValue=DOUBLE_STEP, int maxWidgetWidth=DOUBLE_MAX_WIDGET_WIDTH)
virtual QWidget * createWidget (QWidget *parent, const char *name, const QObject *slotOwner, const char *member)
virtual void setWidgetValue (QWidget *widget, const QString &value)
virtual QString getWidgetValue (QWidget *widget)
virtual QString getStringRep (const QString &value) const
virtual int maxWidgetWidth () const

Private Attributes

double myMinValue
double myMaxValue
double myStepValue
int myMaxWidgetWidth

Detailed Description

Represents a parameter of type double, used both by commmands and arrays.

This class inherits CmdParam to provide a parameter that has a formal variable name, a default value and an exact type name, among other fields.

As an editor widget, it provides a SuperSpinBox, which is an extension of a standard integer QSpinBox, but instead provides support of doubles and floats.


Constructor & Destructor Documentation

DoubleParam::DoubleParam const char *  formalVarName,
const char *  defaultValue,
const char *  exactTypeName = "GLdouble",
double  minValue = DOUBLE_MIN,
double  maxValue = DOUBLE_MAX,
double  stepValue = DOUBLE_STEP,
int  maxWidgetWidth = DOUBLE_MAX_WIDGET_WIDTH
[inline]
 


Member Function Documentation

virtual QWidget* DoubleParam::createWidget QWidget *  parent,
const char *  name,
const QObject *  slotOwner,
const char *  member
[inline, virtual]
 

Implements CmdParam.

virtual QString DoubleParam::getStringRep const QString &  value  )  const [inline, virtual]
 

This utility method is used to get the string representation of a number of type `double'. It ensures that any number that could be represented exactly by an integer still has a `.0' at the end of it (e.g. `4' -> `4.0').

Reimplemented from CmdParam.

virtual QString DoubleParam::getWidgetValue QWidget *  widget  )  [inline, virtual]
 

Implements CmdParam.

virtual int DoubleParam::maxWidgetWidth  )  const [inline, virtual]
 

Reimplemented from CmdParam.

virtual void DoubleParam::setWidgetValue QWidget *  widget,
const QString &  value
[inline, virtual]
 

Implements CmdParam.


Member Data Documentation

double DoubleParam::myMaxValue [private]
 

int DoubleParam::myMaxWidgetWidth [private]
 

double DoubleParam::myMinValue [private]
 

double DoubleParam::myStepValue [private]
 


The documentation for this class was generated from the following file:
Generated on Fri Feb 27 12:01:40 2004 for Glitch by doxygen 1.3.2