A class representing an interval.
#include <qwt_interval.h>
enum BorderFlag { IncludeBorders = 0x00, ExcludeMinimum = 0x01, ExcludeMaximum = 0x02, ExcludeBorders = ExcludeMinimum | ExcludeMaximum }
typedef QFlags< BorderFlag > BorderFlags
QwtInterval ()
QwtInterval (double minValue, double maxValue, BorderFlags=IncludeBorders)
void setInterval (double minValue, double maxValue, BorderFlags=IncludeBorders)
QwtInterval normalized () const
QwtInterval inverted () const
QwtInterval limited (double minValue, double maxValue) const
bool operator== (const QwtInterval &) const
bool operator!= (const QwtInterval &) const
void setBorderFlags (BorderFlags)
BorderFlags borderFlags () const
double minValue () const
double maxValue () const
double width () const
void setMinValue (double)
void setMaxValue (double)
bool contains (double value) const
bool intersects (const QwtInterval &) const
QwtInterval intersect (const QwtInterval &) const
QwtInterval unite (const QwtInterval &) const
QwtInterval operator| (const QwtInterval &) const
QwtInterval operator& (const QwtInterval &) const
QwtInterval & operator|= (const QwtInterval &)
QwtInterval & operator&= (const QwtInterval &)
QwtInterval extend (double value) const
QwtInterval operator| (double) const
QwtInterval & operator|= (double)
bool isValid () const
bool isNull () const
void invalidate ()
QwtInterval symmetrize (double value) const
A class representing an interval.
The interval is represented by 2 doubles, the lower and the upper limit.
Border flags.
See also:
setBorderFlags(), borderFlags()
Enumerator:
IncludeBorders
Min/Max values are inside the interval.
ExcludeMinimum
Min value is not included in the interval.
ExcludeMaximum
Max value is not included in the interval.
ExcludeBorders
Min/Max values are not included in the interval.
Default Constructor. Creates an invalid interval [0.0, -1.0]
See also:
setInterval(), isValid()
Build an interval with from min/max values
Parameters:
minValue Minimum value
maxValue Maximum value
borderFlags Include/Exclude borders
Border flags
See also:
setBorderFlags()
Parameters:
value Value
Returns:
true, if value >= minValue() && value <= maxValue()
If value is below minValue, value becomes the lower limit. If value is above maxValue, value becomes the upper limit.
extend has no effect for invalid intervals
Parameters:
value Value
See also:
isValid()
Intersect 2 intervals.
The limits are set to interval [0.0, -1.0]
See also:
isValid()
Returns:
Inverted interval
See also:
normalized()
true, if isValid() && (minValue() >= maxValue())
Parameters:
lowerBound Lower limit
upperBound Upper limit
Returns:
Limited interval
Upper limit of the interval
Lower limit of the interval
Normalize the limits of the interval. If maxValue() < minValue() the limits will be inverted.
Returns:
Normalized interval
See also:
isValid(), inverted()
Compare two intervals.
See also:
intersect()
Intersects this interval with the given interval.
Compare two intervals.
See also:
unite()
Parameters:
value Value
Returns:
Extended interval
See also:
extend()
Unites this interval with the given interval.
Parameters:
value Value
Returns:
Reference of the extended interval
See also:
extend()
Parameters:
borderFlags Or'd BorderMode flags
See also:
borderFlags()
Parameters:
minValue Minimum value
maxValue Maximum value
borderFlags Include/Exclude borders
Parameters:
maxValue Maximum value
Parameters:
minValue Minimum value
Parameters:
value Center
Returns:
Interval with value as center
Unite 2 intervals.
See also:
isValid()
Generated automatically by Doxygen for Qwt User's Guide from the source code.