12 #include <qalgorithms.h> 23 d_lowerBound( lowerBound ),
24 d_upperBound( upperBound )
73 const QList<double> &minorTicks,
74 const QList<double> &mediumTicks,
75 const QList<double> &majorTicks ):
192 return ( !( *
this == other ) );
218 return value >= min && value <= max;
233 const int size = ticks.count();
234 const int size2 = size / 2;
236 for (
int j = 0; j < size2; j++ )
237 qSwap( ticks[j], ticks[size - 1 - j] );
267 const double min = qMin( lowerBound, upperBound );
268 const double max = qMax( lowerBound, upperBound );
277 QList<double> boundedTicks;
278 for (
int i = 0;
i < ticks.size();
i++ )
280 const double tick = ticks[
i];
281 if ( tick >= min && tick <= max )
282 boundedTicks += tick;
285 sd.
setTicks( tickType, boundedTicks );
315 return QList<double>();
318 #ifndef QT_NO_DEBUG_STREAM QList< double > d_ticks[NTickTypes]
QwtScaleDiv bounded(double lowerBound, double upperBound) const
A class representing an interval.
void setTicks(int tickType, const QList< double > &)
A class representing a scale division.
void setLowerBound(double)
bool operator!=(const QwtScaleDiv &) const
Inequality.
double upperBound() const
void setInterval(double lowerBound, double upperBound)
bool contains(double value) const
double lowerBound() const
void setUpperBound(double)
Number of valid tick types.
bool isIncreasing() const
Check if the scale division is increasing( lowerBound() <= upperBound() )
QDebug operator<<(QDebug debug, const QwtScaleDiv &scaleDiv)
bool operator==(const QwtScaleDiv &) const
Equality operator.
QwtInterval interval() const
bool isEmpty() const
Check if the scale division is empty( lowerBound() == upperBound() )
QList< double > ticks(int tickType) const
QwtScaleDiv(double lowerBound=0.0, double upperBound=0.0)
QwtScaleDiv inverted() const