QwtInterval(3)
π NAME
okay so this is QwtInterval(3) from the Library Functions Manual, and it's giving main character energy for one very specific job: QwtInterval β a class representing an interval. periodt π
β¨ SYNOPSIS
#include <qwt_interval.h>
π Public Types
enum BorderFlag { IncludeBorders = 0x00, ExcludeMinimum = 0x01,
ExcludeMaximum = 0x02, ExcludeBorders = ExcludeMinimum |
ExcludeMaximum }
typedef QFlags< BorderFlag > BorderFlags
BorderFlags is the border-flags typedef, and the original literally calls it βBorder flags.β Itβs an ORed combination of BorderFlag values. iykyk π¦
π Public Member Functions
Hereβs the whole function list, exactly as the page drops it β no missing members, no cutting corners:
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 lowerBound, double upperBound) 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
long double widthL () const
void setMinValue (double)
void setMaxValue (double)
bool contains (double value) const
bool contains (const QwtInterval &) 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
And here are the little synopsis blurbs that came attached β bestie, these are the ones the original felt like explaining:
normalized ()β normalize the limits of the interval.operator==β compare two intervals.operator!=β compare two intervals.width ()β return the width of an interval.widthL ()β return the width of an interval aslong double.intersects ()β test if two intervals overlap.intersect ()β intersect 2 intervals.unite ()β unite 2 intervals.operator&β intersection of two intervals.operator|=β unite this interval with the given interval.operator&=β intersect this interval with the given interval.extend ()β extend the interval.
The rest of the signatures above are just listed in the synopsis with no extra blurb. No cap, thatβs literally whatβs there. πΈ
πΈ Detailed Description
A class representing an interval.
The interval is represented by 2 doubles, the lower and the upper limit.
Definition at line 22 of file qwt_interval.h.
π Member Typedef Documentation
typedef QFlags<BorderFlag > QwtInterval::BorderFlags
Border flags. An ORed combination of BorderFlag values. Itβs giving βflags but make it a typedef.β π
Definition at line 45 of file qwt_interval.h.
π Member Enumeration Documentation
enum QwtInterval::BorderFlag
Flag indicating if a border is included or excluded.
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.
Definition at line 29 of file qwt_interval.h.
π«Ά Constructor & Destructor Documentation
QwtInterval::QwtInterval () [inline]
Default Constructor. Creates an invalid interval [0.0, -1.0].
See also:setInterval(),isValid().
Definition at line 112 of file qwt_interval.h.
QwtInterval::QwtInterval (double minValue, double maxValue, BorderFlags borderFlags = IncludeBorders) [inline]
Constructor. The original says βBuild an interval with from min/max valuesβ β so yeah, build an interval from the min/max values, fr fr. π
Parameters
minValueβ Minimum valuemaxValueβ Maximum valueborderFlagsβ Include/Exclude borders
Definition at line 128 of file qwt_interval.h.
π Member Function Documentation π
Okay bestie, this is the function-by-function era of the page β every method, every return, every βdefinition at line whatever of file whateverβ moment. Letβs go. π
QwtInterval::BorderFlags QwtInterval::borderFlags () const [inline]β hands you the border flags. Returns: Border flags. See also:setBorderFlags(). Definition at line 166 of fileqwt_interval.h.bool QwtInterval::contains (const QwtInterval & interval) constβ tests whether one interval is inside another interval.- Parameters:
intervalβ Interval
- Returns:
true, ifintervallies inside the boundaries - Definition at line 90 of file
qwt_interval.cpp.
- Parameters:
bool QwtInterval::contains (double value) constβ tests whether a value is inside an interval.- Parameters:
valueβ Value
- Returns:
true, ifvaluelies inside the boundaries - Definition at line 67 of file
qwt_interval.cpp.
- Parameters:
QwtInterval QwtInterval::extend (double value) constβ extends the interval. Ifvalueis belowminValue(), thenvaluebecomes the lower limit. Ifvalueis abovemaxValue(), thenvaluebecomes the upper limit.
β οΈ Important: extend() has no effect for invalid intervals.
- Parameters:
valueβ Value
- Returns: extended interval
- See also:
isValid() - Definition at line 363 of file
qwt_interval.cpp.
QwtInterval QwtInterval::intersect (const QwtInterval & other) constβ intersects 2 intervals.- Parameters:
otherβ Interval to be intersect with
- Returns: Intersection
- Definition at line 186 of file
qwt_interval.cpp.
- Parameters:
bool QwtInterval::intersects (const QwtInterval & other) constβ tests if two intervals overlap.- Parameters:
otherβ Interval
- Returns: True, when the intervals are intersecting
- Definition at line 277 of file
qwt_interval.cpp.
- Parameters:
void QwtInterval::invalidate () [inline]β invalidates the interval. The limits are set to interval[0.0, -1.0].- See also:
isValid() - Definition at line 325 of file
qwt_interval.h.
- See also:
QwtInterval QwtInterval::inverted () constβ inverts the limits of the interval.- Returns: Inverted interval
- See also:
normalized() - Definition at line 48 of file
qwt_interval.cpp.
bool QwtInterval::isNull () const [inline]β Returns:true, ifisValid() && (minValue() >= maxValue()). Definition at line 314 of fileqwt_interval.h.bool QwtInterval::isValid () const [inline]β an interval is valid whenminValue() <= maxValue(). In case ofQwtInterval::ExcludeBordersit is true whenminValue() < maxValue().- Returns: True, when the interval is valid
- Definition at line 210 of file
qwt_interval.h.
QwtInterval QwtInterval::limited (double lowerBound, double upperBound) constβ limits the interval while keeping the border modes.- Parameters:
lowerBoundβ Lower limitupperBoundβ Upper limit
- Returns: Limited interval
- Definition at line 336 of file
qwt_interval.cpp.
- Parameters:
double QwtInterval::maxValue () const [inline]β Returns: Upper limit of the interval. Definition at line 198 of fileqwt_interval.h.double QwtInterval::minValue () const [inline]β Returns: Lower limit of the interval. Definition at line 192 of fileqwt_interval.h.QwtInterval QwtInterval::normalized () constβ normalizes the limits of the interval. IfmaxValue() < minValue()the limits will be inverted.- Returns: Normalized interval
- See also:
isValid(),inverted() - Definition at line 29 of file
qwt_interval.cpp.
bool QwtInterval::operator!= (const QwtInterval & other) const [inline]β compares two intervals.- Parameters:
otherβ Interval to compare with
- Returns: True, when this and
otherare not equal - Definition at line 296 of file
qwt_interval.h.
- Parameters:
QwtInterval QwtInterval::operator& (const QwtInterval & other) const [inline]β intersection of two intervals.- Parameters:
otherβ Interval to intersect with
- Returns: Intersection of this and
other - See also:
intersect() - Definition at line 258 of file
qwt_interval.h.
- Parameters:
QwtInterval & QwtInterval::operator&= (const QwtInterval & other)β intersects this interval with the given interval.- Parameters:
otherβ Interval to be intersected with
- Returns: This interval
- Definition at line 265 of file
qwt_interval.cpp.
- Parameters:
bool QwtInterval::operator== (const QwtInterval & other) const [inline]β compares two intervals.- Parameters:
otherβ Interval to compare with
- Returns: True, when this and
otherare equal - Definition at line 284 of file
qwt_interval.h.
- Parameters:
QwtInterval QwtInterval::operator| (const QwtInterval & other) const [inline]β union of two intervals.- Parameters:
otherβ Interval to unite with
- Returns: Union of this and
other - See also:
unite() - Definition at line 272 of file
qwt_interval.h.
- Parameters:
QwtInterval QwtInterval::operator| (double value) const [inline]β extends an interval.- Parameters:
valueβ Value
- Returns: Extended interval
- See also:
extend() - Definition at line 308 of file
qwt_interval.h.
- Parameters:
QwtInterval & QwtInterval::operator|= (const QwtInterval & other)β unites this interval with the given interval.- Parameters:
otherβ Interval to be united with
- Returns: This interval
- Definition at line 253 of file
qwt_interval.cpp.
- Parameters:
QwtInterval & QwtInterval::operator|= (double value)β extends an interval.- Parameters:
valueβ Value
- Returns: Reference of the extended interval
- See also:
extend() - Definition at line 380 of file
qwt_interval.cpp.
- Parameters:
void QwtInterval::setBorderFlags (BorderFlags borderFlags) [inline]β changes the border flags.- Parameters:
borderFlagsβ Or'dBorderModeflags
- See also:
borderFlags() - Definition at line 157 of file
qwt_interval.h.
- Parameters:
void QwtInterval::setInterval (double minValue, double maxValue, BorderFlags borderFlags = IncludeBorders) [inline]β assigns the limits of the interval.- Parameters:
minValueβ Minimum valuemaxValueβ Maximum valueborderFlagsβ Include/Exclude borders
- Definition at line 143 of file
qwt_interval.h.
- Parameters:
void QwtInterval::setMaxValue (double maxValue) [inline]β assigns the upper limit of the interval.- Parameters:
maxValueβ Maximum value
- Definition at line 186 of file
qwt_interval.h.
- Parameters:
void QwtInterval::setMinValue (double minValue) [inline]β assigns the lower limit of the interval.- Parameters:
minValueβ Minimum value
- Definition at line 176 of file
qwt_interval.h.
- Parameters:
QwtInterval QwtInterval::symmetrize (double value) constβ adjusts the limit that is closer tovalue, so thatvaluebecomes the center of the interval.- Parameters:
valueβ Center
- Returns: Interval with
valueas center - Definition at line 317 of file
qwt_interval.cpp.
- Parameters:
QwtInterval QwtInterval::unite (const QwtInterval & other) constβ unites 2 intervals. Definition at line 123 of fileqwt_interval.cpp.double QwtInterval::width () const [inline]β returns the width of an interval. The width of invalid intervals is0.0, otherwise the result ismaxValue() - minValue().- Returns: Interval width
- See also:
isValid() - Definition at line 227 of file
qwt_interval.h.
long double QwtInterval::widthL () const [inline]β returns the width of an interval aslong double. The width of invalid intervals is0.0, otherwise the result ismaxValue() - minValue().- Returns: Interval width
- See also:
isValid() - Definition at line 241 of file
qwt_interval.h.
β¨ Author β¨
Generated automatically by Doxygen for Qwt User's Guide from the source code. π
Footer sign-off: Qwt User's Guide, QwtInterval(3), with the source/version and date footer doing its little bow at the bottom. π
π¦ where this page comes from
- alpine 3.24: qwt-doc 6.3.0-r0 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms