COPASI API  4.16.103
Public Member Functions | Protected Attributes | List of all members
CQValidatorDouble Class Reference

#include <CQValidator.h>

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

Public Member Functions

 CQValidatorDouble (QLineEdit *parent, const char *name=0)
 
void setRange (const C_FLOAT64 &lowerBound, const C_FLOAT64 &upperBound)
 
virtual State validate (QString &input, int &pos) const
 
- Public Member Functions inherited from CQValidator< QLineEdit >
 CQValidator (QLineEdit *parent, QString(QLineEdit::*retrieve)(void) const, const char *name=0)
 
virtual void force (const QString &input) const
 
virtual State revalidate ()
 
virtual void saved () const
 

Protected Attributes

QDoubleValidator * mpDoubleValidator
 
- Protected Attributes inherited from CQValidator< QLineEdit >
QString mLastAccepted
 
QLineEdit * mpContainer
 
QString(QLineEdit::* mRetrieve )(void) const
 

Additional Inherited Members

- Protected Member Functions inherited from CQValidator< QLineEdit >
State setColor (const State &state) const
 

Detailed Description

Definition at line 144 of file CQValidator.h.

Constructor & Destructor Documentation

CQValidatorDouble::CQValidatorDouble ( QLineEdit *  parent,
const char *  name = 0 
)

Definition at line 66 of file CQValidator.cpp.

66  :
67  CQValidator< QLineEdit >(parent, &QLineEdit::text, name),
68  mpDoubleValidator(new QDoubleValidator(-std::numeric_limits< C_FLOAT64 >::max(), std::numeric_limits< C_FLOAT64 >::max(), std::numeric_limits< C_FLOAT64 >::digits10, this))
69 {}
QDoubleValidator * mpDoubleValidator
Definition: CQValidator.h:156
#define max(a, b)
Definition: f2c.h:176

Member Function Documentation

void CQValidatorDouble::setRange ( const C_FLOAT64 lowerBound,
const C_FLOAT64 upperBound 
)

Definition at line 80 of file CQValidator.cpp.

References mpDoubleValidator.

Referenced by CQCrossSectionTaskWidget::init(), CQTSSAWidget::init(), and CQTrajectoryWidget::init().

81 {mpDoubleValidator->setRange(lowerBound, upperBound, std::numeric_limits< C_FLOAT64 >::digits10);}
QDoubleValidator * mpDoubleValidator
Definition: CQValidator.h:156
QValidator::State CQValidatorDouble::validate ( QString &  input,
int &  pos 
) const
virtual

Reimplemented from CQValidator< QLineEdit >.

Definition at line 71 of file CQValidator.cpp.

References mpDoubleValidator, and CQValidator< QLineEdit >::setColor().

72 {
73  if (mpDoubleValidator->validate(input, pos) == Acceptable)
74  return CQValidator< QLineEdit >::validate(input, pos);
75 
76  setColor(Invalid);
77  return Intermediate;
78 }
QDoubleValidator * mpDoubleValidator
Definition: CQValidator.h:156
State setColor(const State &state) const
Definition: CQValidator.h:84

Member Data Documentation

QDoubleValidator* CQValidatorDouble::mpDoubleValidator
protected

Definition at line 156 of file CQValidator.h.

Referenced by setRange(), and validate().


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