QwtInterval Class Reference
A class representing an interval.
More...
#include <qwt_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
QwtInterval::QwtInterval |
( |
|
) |
[inline] |
QwtInterval::QwtInterval |
( |
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 QwtInterval::borderFlags |
( |
|
) |
const [inline] |
bool QwtInterval::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()
bool QwtInterval::intersects |
( |
const QwtInterval & |
other |
) |
const |
Test if two intervals overlap
void QwtInterval::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 QwtInterval::isNull |
( |
|
) |
const [inline] |
bool QwtInterval::isValid |
( |
|
) |
const [inline] |
QwtInterval QwtInterval::limited |
( |
double |
lowerBound, |
|
|
double |
upperBound | |
|
) |
| | const |
Limit the interval, keeping the border modes
- Parameters:
-
| lowerBound | Lower limit |
| upperBound | Upper limit |
- Returns:
- Limited interval
double QwtInterval::maxValue |
( |
|
) |
const [inline] |
- Returns:
- Upper limit of the interval
double QwtInterval::minValue |
( |
|
) |
const [inline] |
- Returns:
- Lower limit of the interval
bool QwtInterval::operator!= |
( |
const QwtInterval & |
other |
) |
const [inline] |
Intersects this interval with the given interval.
bool QwtInterval::operator== |
( |
const QwtInterval & |
other |
) |
const [inline] |
QwtInterval QwtInterval::operator| |
( |
double |
value |
) |
const [inline] |
Extend an interval
- Parameters:
-
- Returns:
- Extended interval
- See also:
- extend()
Union of two intervals
- See also:
- unite()
Extend an interval
- Parameters:
-
- Returns:
- Reference of the extended interval
- See also:
- extend()
Unites this interval with the given interval.
void QwtInterval::setBorderFlags |
( |
int |
borderFlags |
) |
[inline] |
Change the border flags
- Parameters:
-
| borderFlags | Or'd BorderMode flags |
- See also:
- borderFlags()
void QwtInterval::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 QwtInterval::setMaxValue |
( |
double |
maxValue |
) |
[inline] |
Assign the upper limit of the interval
- Parameters:
-
void QwtInterval::setMinValue |
( |
double |
minValue |
) |
[inline] |
Assign the lower limit of the interval
- Parameters:
-
QwtInterval QwtInterval::symmetrize |
( |
double |
value |
) |
const |
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 QwtInterval::width |
( |
|
) |
const [inline] |