-
Notifications
You must be signed in to change notification settings - Fork 18
/
CDoubleProperty.h
36 lines (26 loc) · 973 Bytes
/
CDoubleProperty.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef CDOUBLEPROPERTY_H
#define CDOUBLEPROPERTY_H
#include <float.h>
#include "CBaseProperty.h"
class CDoubleProperty : public CBaseProperty
{
public:
CDoubleProperty(const QByteArray& id, const QString &name, double value, double defaultValue = 0, double min = DBL_MIN, double max = DBL_MAX);
CDoubleProperty(CBaseProperty *top, const QByteArray& id, const QString &name, double value, double defaultValue = 0, double min = DBL_MIN, double max = DBL_MAX);
void setValue(double value);
double getValue() const;
void setRange(double min, double max);
// reimp
virtual QVariant getVariantValue() const;
virtual void displayValue();
virtual void validateValue();
virtual QWidget* createEditor() const;
virtual void valueToEditor();
virtual void valueFromEditor();
virtual void startEdit();
protected:
mutable double m_value;
double m_defaultValue;
double m_min, m_max;
};
#endif // CDOUBLEPROPERTY_H