logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

QwtInterval - A class representing an interval.

Author

       Generated automatically by Doxygen for Qwt User's Guide from the source code.

Version 6.1.4                                    Wed Jan 2 2019                                   QwtInterval(3)

Constructor & Destructor Documentation

QwtInterval::QwtInterval()[inline]
       Default Constructor. Creates an invalid interval [0.0, -1.0]

       Seealso:setInterval(), isValid()QwtInterval::QwtInterval(doubleminValue,doublemaxValue,BorderFlagsborderFlags=IncludeBorders)[inline]
       Constructor

       Build an interval with from min/max values

       Parameters:minValue Minimum value
           maxValue Maximum value
           borderFlags Include/Exclude borders

Detailed Description

       A class representing an interval.

       The interval is represented by 2 doubles, the lower and the upper limit.

Member Enumeration Documentation

enumQwtInterval::BorderFlag
       Flag indicating if a border is included or excluded

       Seealso:setBorderFlags(), borderFlags()EnumeratorIncludeBorders
              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.

Member Function Documentation

QwtInterval::BorderFlagsQwtInterval::borderFlags()const[inline]Returns:
           Border flags

       Seealso:setBorderFlags()boolQwtInterval::contains(doublevalue)const
       Test if a value is inside an interval

       Parameters:value Value

       Returns:
           true, if value >= minValue() && value <= maxValue()QwtIntervalQwtInterval::extend(doublevalue)const
       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:value Value

       Returns:
           extended interval

       Seealso:isValid()QwtIntervalQwtInterval::intersect(constQwtInterval&other)const
       Intersect 2 intervals.

       Parameters:other Interval to be intersect with

       Returns:
           Intersection

   boolQwtInterval::intersects(constQwtInterval&other)const
       Test if two intervals overlap.

       Parameters:other Interval

       Returns:
           True, when the intervals are intersecting

   voidQwtInterval::invalidate()[inline]
       Invalidate the interval

       The limits are set to interval [0.0, -1.0]

       Seealso:isValid()QwtIntervalQwtInterval::inverted()const
       Invert the limits of the interval

       Returns:
           Inverted interval

       Seealso:normalized()boolQwtInterval::isNull()const[inline]Returns:
           true, if isValid() && (minValue() >= maxValue())

   boolQwtInterval::isValid()const[inline]
       A interval is valid when minValue() <= maxValue(). In case of QwtInterval::ExcludeBorders it is true when
       minValue() < maxValue()Returns:
           True, when the interval is valid

   QwtIntervalQwtInterval::limited(doublelowerBound,doubleupperBound)const
       Limit the interval, keeping the border modes

       Parameters:lowerBound Lower limit
           upperBound Upper limit

       Returns:
           Limited interval

   doubleQwtInterval::maxValue()const[inline]Returns:
           Upper limit of the interval

   doubleQwtInterval::minValue()const[inline]Returns:
           Lower limit of the interval

   QwtIntervalQwtInterval::normalized()const
       Normalize the limits of the interval. If maxValue() < minValue() the limits will be inverted.

       Returns:
           Normalized interval

       Seealso:isValid(), inverted()boolQwtInterval::operator!=(constQwtInterval&other)const[inline]
       Compare two intervals.

       Parameters:other Interval to compare with

       Returns:
           True, when this and other are not equal

   boolQwtInterval::operator==(constQwtInterval&other)const[inline]
       Compare two intervals.

       Parameters:other Interval to compare with

       Returns:
           True, when this and other are equal

   QwtIntervalQwtInterval::operator|(constQwtInterval&other)const[inline]
       Union of two intervals

       Parameters:other Interval to unite with

       Returns:
           Union of this and other

       Seealso:unite()QwtIntervalQwtInterval::operator|(doublevalue)const[inline]
       Extend an interval

       Parameters:value Value

       Returns:
           Extended interval

       Seealso:extend()QwtInterval&QwtInterval::operator|=(constQwtInterval&other)
       Unite this interval with the given interval.

       Parameters:other Interval to be united with

       Returns:
           This interval

   QwtInterval&QwtInterval::operator|=(doublevalue)
       Extend an interval

       Parameters:value Value

       Returns:
           Reference of the extended interval

       Seealso:extend()voidQwtInterval::setBorderFlags(BorderFlagsborderFlags)[inline]
       Change the border flags

       Parameters:borderFlags Or'd BorderMode flags

       Seealso:borderFlags()voidQwtInterval::setInterval(doubleminValue,doublemaxValue,BorderFlagsborderFlags=IncludeBorders)[inline]
       Assign the limits of the interval

       Parameters:minValue Minimum value
           maxValue Maximum value
           borderFlags Include/Exclude borders

   voidQwtInterval::setMaxValue(doublemaxValue)[inline]
       Assign the upper limit of the interval

       Parameters:maxValue Maximum value

   voidQwtInterval::setMinValue(doubleminValue)[inline]
       Assign the lower limit of the interval

       Parameters:minValue Minimum value

   QwtIntervalQwtInterval::symmetrize(doublevalue)const
       Adjust 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

   doubleQwtInterval::width()const[inline]
       Return the width of an interval. The  width  of  invalid  intervals  is  0.0,  otherwise  the  result  is
       maxValue() - minValue().

       Returns:
           Interval width

       Seealso:isValid()

Name

       QwtInterval - A class representing an interval.

Synopsis

       #include <qwt_interval.h>

   PublicTypes
       enum BorderFlag { IncludeBorders = 0x00, ExcludeMinimum = 0x01, ExcludeMaximum = 0x02, ExcludeBorders =
           ExcludeMinimum | ExcludeMaximum }
       typedef QFlags< BorderFlag > BorderFlags
           Border flags.

   PublicMemberFunctionsQwtInterval ()
           Default Constructor.
       QwtInterval (double minValue, double maxValue, BorderFlags=IncludeBorders)
       void setInterval (double minValue, double maxValue, BorderFlags=IncludeBorders)
       QwtIntervalnormalized () const
           Normalize the limits of the interval.
       QwtIntervalinverted () const
       QwtIntervallimited (double lowerBound, double upperBound) const
       bool operator== (const QwtInterval &) const
           Compare two intervals.
       bool operator!= (const QwtInterval &) const
           Compare two intervals.
       void setBorderFlags (BorderFlags)
       BorderFlagsborderFlags () const
       double minValue () const
       double maxValue () const
       double width () const
           Return the width of an interval.
       void setMinValue (double)
       void setMaxValue (double)
       bool contains (double value) const
       bool intersects (const QwtInterval &) const
           Test if two intervals overlap.
       QwtIntervalintersect (const QwtInterval &) const
           Intersect 2 intervals.
       QwtIntervalunite (const QwtInterval &) const
           Unite 2 intervals.
       QwtIntervaloperator| (const QwtInterval &) const
       QwtIntervaloperator& (const QwtInterval &) const
       QwtInterval & operator|= (const QwtInterval &)
           Unite this interval with the given interval.
       QwtInterval & operator&= (const QwtInterval &)
       QwtIntervalextend (double value) const
           Extend the interval.
       QwtIntervaloperator| (double) const
       QwtInterval & operator|= (double)
       bool isValid () const
       bool isNull () const
       void invalidate ()
       QwtIntervalsymmetrize (double value) const

See Also