10 #ifndef QWT_INTERVAL_H 11 #define QWT_INTERVAL_H 14 #include <qmetatype.h> 16 #ifndef QT_NO_DEBUG_STREAM 36 IncludeBorders = 0x00,
39 ExcludeMinimum = 0x01,
42 ExcludeMaximum = 0x02,
45 ExcludeBorders = ExcludeMinimum | ExcludeMaximum
53 BorderFlags = IncludeBorders );
55 void setInterval(
double minValue,
double maxValue,
56 BorderFlags = IncludeBorders );
60 QwtInterval limited(
double minValue,
double maxValue )
const;
65 void setBorderFlags( BorderFlags );
66 BorderFlags borderFlags()
const;
68 double minValue()
const;
69 double maxValue()
const;
72 long double widthL()
const;
74 void setMinValue(
double );
75 void setMaxValue(
double );
77 bool contains(
double value )
const;
116 d_borderFlags( IncludeBorders )
276 return unite( other );
299 return ( !( *
this == other ) );
335 #ifndef QT_NO_DEBUG_STREAM bool operator!=(const QwtInterval &) const
Compare two intervals.
QFlags< BorderFlag > BorderFlags
Border flags.
chars_format & operator|=(chars_format &lhs, chars_format rhs)
constexpr chars_format operator|(chars_format lhs, chars_format rhs)
A class representing an interval.
bool operator==(optional< T > const &x, optional< T > const &y)
long double widthL() const
Return the width of an interval as long double.
QWT_EXPORT QDebug operator<<(QDebug, const QwtInterval &)
QwtInterval unite(const QwtInterval &) const
Unite 2 intervals.
TFSIMD_FORCE_INLINE Vector3 normalized() const
QwtInterval operator|(const QwtInterval &) const
void setInterval(double minValue, double maxValue, BorderFlags=IncludeBorders)
QwtInterval operator&(const QwtInterval &) const
Intersection of two intervals.
QwtInterval intersect(const QwtInterval &) const
Intersect 2 intervals.
QwtInterval()
Default Constructor.
BorderFlags d_borderFlags
Q_DECLARE_TYPEINFO(QwtInterval, Q_MOVABLE_TYPE)
void setBorderFlags(BorderFlags)
BorderFlags borderFlags() const
bool operator==(const QwtInterval &) const
Compare two intervals.
constexpr chars_format operator&(chars_format lhs, chars_format rhs)
QwtInterval extend(double value) const
Extend the interval.
Min/Max values are not included in the interval.
chars_format & operator&=(chars_format &lhs, chars_format rhs)
double width() const
Return the width of an interval.
bool operator!=(optional< T > const &x, optional< T > const &y)