QwtDoubleInterval Class Reference
A class representing an interval.
More...
#include <qwt_double_interval.h>
List of all members.
Detailed Description
A class representing an interval.
The interval is represented by 2 doubles, the lower and the upper limit.
Member Enumeration Documentation
Flag indicating if a border is included/excluded from an interval
- 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
- See also:
- setBorderMode(), testBorderMode()
Constructor & Destructor Documentation
QwtDoubleInterval::QwtDoubleInterval |
( |
|
) |
[inline] |
QwtDoubleInterval::QwtDoubleInterval |
( |
double |
minValue, |
|
|
double |
maxValue, |
|
|
int |
borderFlags = IncludeBorders | |
|
) |
| | [inline] |
Constructor
Build an interval with from min/max values
- Parameters:
-
| minValue | Minimum value |
| maxValue | Maximum value |
| borderFlags | Include/Exclude borders |
Member Function Documentation
int QwtDoubleInterval::borderFlags |
( |
|
) |
const [inline] |
bool QwtDoubleInterval::contains |
( |
double |
value |
) |
const |
Test if a value is inside an interval
- Parameters:
-
- Returns:
- true, if value >= minValue() && value <= maxValue()
Extend the interval
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:
-
- See also:
- isValid()
Test if two intervals overlap
void QwtDoubleInterval::invalidate |
( |
|
) |
[inline] |
Invalidate the interval
The limits are set to interval [0.0, -1.0]
- See also:
- isValid()
Invert the limits of the interval
- Returns:
- Inverted interval
- See also:
- normalized()
bool QwtDoubleInterval::isNull |
( |
|
) |
const [inline] |
bool QwtDoubleInterval::isValid |
( |
|
) |
const [inline] |
QwtDoubleInterval QwtDoubleInterval::limited |
( |
double |
lowerBound, |
|
|
double |
upperBound | |
|
) |
| | const |
Limit the interval, keeping the border modes
- Parameters:
-
| lowerBound | Lower limit |
| upperBound | Upper limit |
- Returns:
- Limited interval
double QwtDoubleInterval::maxValue |
( |
|
) |
const [inline] |
- Returns:
- Upper limit of the interval
double QwtDoubleInterval::minValue |
( |
|
) |
const [inline] |
- Returns:
- Lower limit of the interval
Intersects this interval with the given interval.
Union of two intervals
- See also:
- unite()
Unites this interval with the given interval.
void QwtDoubleInterval::setBorderFlags |
( |
int |
borderFlags |
) |
[inline] |
Change the border flags
- Parameters:
-
| borderFlags | Or'd BorderMode flags |
- See also:
- borderFlags()
void QwtDoubleInterval::setInterval |
( |
double |
minValue, |
|
|
double |
maxValue, |
|
|
int |
borderFlags = IncludeBorders | |
|
) |
| | [inline] |
Assign the limits of the interval
- Parameters:
-
| minValue | Minimum value |
| maxValue | Maximum value |
| borderFlags | Include/Exclude borders |
void QwtDoubleInterval::setMaxValue |
( |
double |
maxValue |
) |
[inline] |
Assign the upper limit of the interval
- Parameters:
-
void QwtDoubleInterval::setMinValue |
( |
double |
minValue |
) |
[inline] |
Assign the lower limit of the interval
- Parameters:
-
Adjust the limit that is closer to value, so that value becomes the center of the interval.
- Parameters:
-
- Returns:
- Interval with value as center
double QwtDoubleInterval::width |
( |
|
) |
const [inline] |