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 as long 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 value
  • maxValue β€” Maximum value
  • borderFlags β€” 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 file qwt_interval.h.
  • bool QwtInterval::contains (const QwtInterval & interval) const β€” tests whether one interval is inside another interval.
    • Parameters:
      • interval β€” Interval
    • Returns: true, if interval lies inside the boundaries
    • Definition at line 90 of file qwt_interval.cpp.
  • bool QwtInterval::contains (double value) const β€” tests whether a value is inside an interval.
    • Parameters:
      • value β€” Value
    • Returns: true, if value lies inside the boundaries
    • Definition at line 67 of file qwt_interval.cpp.
  • QwtInterval QwtInterval::extend (double value) const β€” extends the interval. If value is below minValue(), then value becomes the lower limit. If value is above maxValue(), then value becomes 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.
  • 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.
  • 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.
  • 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, if isValid() && (minValue() >= maxValue()). Definition at line 314 of file qwt_interval.h.
  • bool QwtInterval::isValid () const [inline] β€” an interval is valid when minValue() <= maxValue(). In case of QwtInterval::ExcludeBorders it is true when minValue() < 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 limit
      • upperBound β€” Upper limit
    • Returns: Limited interval
    • Definition at line 336 of file qwt_interval.cpp.
  • double QwtInterval::maxValue () const [inline] β€” Returns: Upper limit of the interval. Definition at line 198 of file qwt_interval.h.
  • double QwtInterval::minValue () const [inline] β€” Returns: Lower limit of the interval. Definition at line 192 of file qwt_interval.h.
  • QwtInterval QwtInterval::normalized () const β€” normalizes the limits of the interval. If maxValue() < 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 other are not equal
    • Definition at line 296 of file qwt_interval.h.
  • 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.
  • 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.
  • bool QwtInterval::operator== (const QwtInterval & other) const [inline] β€” compares two intervals.
    • Parameters:
      • other β€” Interval to compare with
    • Returns: True, when this and other are equal
    • Definition at line 284 of file qwt_interval.h.
  • 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.
  • 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.
  • 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.
  • 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.
  • void QwtInterval::setBorderFlags (BorderFlags borderFlags) [inline] β€” changes the border flags.
    • Parameters:
      • borderFlags β€” Or'd BorderMode flags
    • See also: borderFlags()
    • Definition at line 157 of file qwt_interval.h.
  • void QwtInterval::setInterval (double minValue, double maxValue, BorderFlags borderFlags = IncludeBorders) [inline] β€” assigns the limits of the interval.
    • Parameters:
      • minValue β€” Minimum value
      • maxValue β€” Maximum value
      • borderFlags β€” Include/Exclude borders
    • Definition at line 143 of file qwt_interval.h.
  • 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.
  • 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.
  • QwtInterval QwtInterval::symmetrize (double value) const β€” adjusts the limit that is closer to value, so that value becomes the center of the interval.
    • Parameters:
      • value β€” Center
    • Returns: Interval with value as center
    • Definition at line 317 of file qwt_interval.cpp.
  • QwtInterval QwtInterval::unite (const QwtInterval & other) const β€” unites 2 intervals. Definition at line 123 of file qwt_interval.cpp.
  • double QwtInterval::width () const [inline] β€” returns the width of an interval. The width of invalid intervals is 0.0, otherwise the result is maxValue() - 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 as long double. The width of invalid intervals is 0.0, otherwise the result is maxValue() - 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