1 #ifndef NUMERICVALUERANGE_H
2 #define NUMERICVALUERANGE_H
35 Range *clone()
const ;
37 bool contains(
double v,
bool inclusive =
true)
const{
42 return v >= _min && v <= _max;
43 return v > _min && v < _max;
47 bool contains(
const QVariant &value,
bool inclusive =
true)
const;
48 bool contains(SPRange rng,
bool inclusive=
true)
const;
49 bool contains(
NumericRange *rng,
bool inclusive=
true)
const;
54 double distance()
const;
56 void resolution(
double resolution);
57 double resolution()
const ;
65 QString toString()
const ;
66 QVariant impliedValue(
const QVariant& v)
const;
68 QVariant ensure(
const QVariant& v,
bool inclusive=
true)
const
70 if ( !contains(v, inclusive))
73 if ( _resolution != 0.0)
74 return (qint64)(v.toDouble() / _resolution) * _resolution;
77 IlwisTypes determineType()
const;
80 static NumericRange *merge(
const QSharedPointer<NumericRange>& nr1,
const QSharedPointer<NumericRange>& nr2,RenumberMap *rnm=0);
88 long significantDigits(
double m1)
const;
91 typedef QSharedPointer<NumericRange> SPNumericRange;
95 #endif // NUMERICVALUERANGE_H