QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
QwtInterval Class Reference

A class representing an interval. More...

#include <qwt_interval.h>

Public Types

enum  BorderFlag { IncludeBorders = 0x00 , ExcludeMinimum = 0x01 , ExcludeMaximum = 0x02 , ExcludeBorders = ExcludeMinimum | ExcludeMaximum }
 

Public Member Functions

 QwtInterval ()
 Border flags.
 
 QwtInterval (double minValue, double maxValue, BorderFlags=IncludeBorders)
 Constructor with min/max values.
 
void setInterval (double minValue, double maxValue, BorderFlags=IncludeBorders)
 Assign the limits of the interval.
 
QwtInterval normalized () const
 Normalize the limits of the interval.
 
QwtInterval inverted () const
 Invert the interval.
 
QwtInterval limited (double lowerBound, double upperBound) const
 Limit the interval, keeping the border modes.
 
bool operator== (const QwtInterval &) const
 Compare two intervals.
 
bool operator!= (const QwtInterval &) const
 Compare two intervals.
 
void setBorderFlags (BorderFlags)
 Change the border flags.
 
BorderFlags borderFlags () const
 
double minValue () const
 
double maxValue () const
 
double centerValue () const
 
double width () const
 Return the width of an interval.
 
long double widthL () const
 Return the width of an interval as long double.
 
void setMinValue (double)
 Assign the lower limit of the interval.
 
void setMaxValue (double)
 Assign the upper limit of the interval.
 
bool contains (double value) const
 Test if a value is inside an interval.
 
bool contains (const QwtInterval &) const
 Test if an interval is inside an interval.
 
bool intersects (const QwtInterval &) const
 Test if two intervals overlap.
 
QwtInterval intersect (const QwtInterval &) const
 Intersect two intervals.
 
QwtInterval unite (const QwtInterval &) const
 Unite two intervals.
 
QwtInterval operator| (const QwtInterval &) const
 Union of two intervals.
 
QwtInterval operator& (const QwtInterval &) const
 Intersection of two intervals.
 
QwtIntervaloperator|= (const QwtInterval &)
 Unite this interval with the given interval.
 
QwtIntervaloperator&= (const QwtInterval &)
 Intersect this interval with the given interval.
 
QwtInterval extend (double value) const
 Extend the interval.
 
QwtInterval operator| (double) const
 Extend an interval.
 
QwtIntervaloperator|= (double)
 Extend an interval.
 
bool isValid () const
 Check if the interval is valid.
 
bool isNull () const
 Check if interval is null.
 
void invalidate ()
 Invalidate the interval.
 
QwtInterval symmetrize (double value) const
 Symmetrize the interval around a value.
 

Detailed Description

A class representing an interval.

Member Enumeration Documentation

◆ 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

Constructor & Destructor Documentation

◆ QwtInterval() [1/2]

QwtInterval::QwtInterval ( )
inline

Border flags.

Default Constructor.

◆ QwtInterval() [2/2]

QwtInterval::QwtInterval ( double  minValue,
double  maxValue,
BorderFlags  borderFlags = IncludeBorders 
)
inline

Constructor with min/max values.

Member Function Documentation

◆ borderFlags()

QwtInterval::BorderFlags QwtInterval::borderFlags ( ) const
inline
Returns
Border flags
See also
setBorderFlags()

◆ centerValue()

double QwtInterval::centerValue ( ) const
inline
Returns
Center of the interval
See also
width()

◆ contains() [1/2]

bool QwtInterval::contains ( const QwtInterval interval) const

Test if an interval is inside an interval.

◆ contains() [2/2]

bool QwtInterval::contains ( double  value) const

Test if a value is inside an interval.

◆ extend()

QwtInterval QwtInterval::extend ( double  value) const

Extend the interval.

◆ intersect()

QwtInterval QwtInterval::intersect ( const QwtInterval other) const

Intersect two intervals.

◆ intersects()

bool QwtInterval::intersects ( const QwtInterval other) const

Test if two intervals overlap.

◆ invalidate()

void QwtInterval::invalidate ( )
inline

Invalidate the interval.

◆ inverted()

QwtInterval QwtInterval::inverted ( ) const

Invert the interval.

◆ isNull()

bool QwtInterval::isNull ( ) const
inline

Check if interval is null.

◆ isValid()

bool QwtInterval::isValid ( ) const
inline

Check if the interval is valid.

◆ limited()

QwtInterval QwtInterval::limited ( double  lowerBound,
double  upperBound 
) const

Limit the interval, keeping the border modes.

◆ maxValue()

double QwtInterval::maxValue ( ) const
inline
Returns
Maximum value of the interval
See also
setMaxValue()

◆ minValue()

double QwtInterval::minValue ( ) const
inline
Returns
Minimum value of the interval
See also
setMinValue()

◆ normalized()

QwtInterval QwtInterval::normalized ( ) const

Normalize the limits of the interval.

◆ operator!=()

bool QwtInterval::operator!= ( const QwtInterval other) const
inline

Compare two intervals.

◆ operator&()

QwtInterval QwtInterval::operator& ( const QwtInterval other) const
inline

Intersection of two intervals.

◆ operator&=()

QwtInterval & QwtInterval::operator&= ( const QwtInterval other)

Intersect this interval with the given interval.

◆ operator==()

bool QwtInterval::operator== ( const QwtInterval other) const
inline

Compare two intervals.

◆ operator|() [1/2]

QwtInterval QwtInterval::operator| ( const QwtInterval other) const
inline

Union of two intervals.

◆ operator|() [2/2]

QwtInterval QwtInterval::operator| ( double  value) const
inline

Extend an interval.

◆ operator|=() [1/2]

QwtInterval & QwtInterval::operator|= ( const QwtInterval other)

Unite this interval with the given interval.

◆ operator|=() [2/2]

QwtInterval & QwtInterval::operator|= ( double  value)

Extend an interval.

◆ setBorderFlags()

void QwtInterval::setBorderFlags ( BorderFlags  borderFlags)
inline

Change the border flags.

◆ setInterval()

void QwtInterval::setInterval ( double  minValue,
double  maxValue,
BorderFlags  borderFlags = IncludeBorders 
)
inline

Assign the limits of the interval.

◆ setMaxValue()

void QwtInterval::setMaxValue ( double  maxValue)
inline

Assign the upper limit of the interval.

◆ setMinValue()

void QwtInterval::setMinValue ( double  minValue)
inline

Assign the lower limit of the interval.

◆ symmetrize()

QwtInterval QwtInterval::symmetrize ( double  value) const

Symmetrize the interval around a value.

◆ unite()

QwtInterval QwtInterval::unite ( const QwtInterval other) const

Unite two intervals.

◆ width()

double QwtInterval::width ( ) const
inline

Return the width of an interval.

◆ widthL()

long double QwtInterval::widthL ( ) const
inline

Return the width of an interval as long double.


The documentation for this class was generated from the following files: