10 #ifndef QWT_INTERVAL_H 11 #define QWT_INTERVAL_H 14 #include <qmetatype.h> 32 IncludeBorders = 0x00,
35 ExcludeMinimum = 0x01,
38 ExcludeMaximum = 0x02,
41 ExcludeBorders = ExcludeMinimum | ExcludeMaximum
49 BorderFlags = IncludeBorders );
51 void setInterval(
double minValue,
double maxValue,
52 BorderFlags = IncludeBorders );
56 QwtInterval limited(
double lowerBound,
double upperBound )
const;
61 void setBorderFlags( BorderFlags );
62 BorderFlags borderFlags()
const;
64 double minValue()
const;
65 double maxValue()
const;
68 long double widthL()
const;
70 void setMinValue(
double );
71 void setMaxValue(
double );
73 bool contains(
double value )
const;
102 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtInterval::BorderFlags )
115 , m_borderFlags( IncludeBorders )
246 return static_cast< long double >(
m_maxValue )
275 return unite( other );
298 return ( !( *
this == other ) );
331 #ifndef QT_NO_DEBUG_STREAM
constexpr bool operator!=(const optional< T > &lhs, const optional< U > &rhs)
relop
constexpr automagic_flags operator &(automagic_flags left, automagic_flags right) noexcept
bool isValid(int axisPos)
A class representing an interval.
QwtInterval intersect(const QwtInterval &) const
Intersect 2 intervals.
QwtInterval extend(double value) const
Extend the interval.
BorderFlags borderFlags() const
QwtInterval operator|(const QwtInterval &) const
QWT_EXPORT QDebug operator<<(QDebug, const QwtInterval &)
bool operator!=(const QwtInterval &) const
Compare two intervals.
void setInterval(double minValue, double maxValue, BorderFlags=IncludeBorders)
QwtInterval()
Border flags.
constexpr automagic_flags operator|(automagic_flags left, automagic_flags right) noexcept
Q_DECLARE_TYPEINFO(QwtInterval, Q_MOVABLE_TYPE)
void setBorderFlags(BorderFlags)
double width() const
Return the width of an interval.
bool operator==(QwtEventPattern::MousePattern b1, QwtEventPattern::MousePattern b2)
Compare operator.
long double widthL() const
Return the width of an interval as long double.
Q_DECLARE_METATYPE(QwtPoint3D)
constexpr automagic_flags & operator|=(automagic_flags &left, automagic_flags right) noexcept
QwtInterval operator &(const QwtInterval &) const
constexpr automagic_flags & operator &=(automagic_flags &left, automagic_flags right) noexcept
Min/Max values are not included in the interval.
QwtInterval unite(const QwtInterval &) const
Unite 2 intervals.
BorderFlags m_borderFlags
bool operator==(const QwtInterval &) const
Compare two intervals.