Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef QWT_SCALE_DIV_H
00011 #define QWT_SCALE_DIV_H
00012
00013 #include "qwt_global.h"
00014 #include "qwt_interval.h"
00015 #include <qlist.h>
00016
00017 #ifndef QT_NO_DEBUG_STREAM
00018 #include <qdebug.h>
00019 #endif
00020
00036 class QWT_EXPORT QwtScaleDiv
00037 {
00038 public:
00040 enum TickType
00041 {
00043 NoTick = -1,
00044
00046 MinorTick,
00047
00049 MediumTick,
00050
00052 MajorTick,
00053
00055 NTickTypes
00056 };
00057
00058 explicit QwtScaleDiv( double lowerBound = 0.0,
00059 double upperBound = 0.0 );
00060
00061 explicit QwtScaleDiv( const QwtInterval &, QList<double>[NTickTypes] );
00062
00063 explicit QwtScaleDiv( double lowerBound, double upperBound,
00064 QList<double>[NTickTypes] );
00065
00066 explicit QwtScaleDiv( double lowerBound, double upperBound,
00067 const QList<double> &minorTicks, const QList<double> &mediumTicks,
00068 const QList<double> &majorTicks );
00069
00070 bool operator==( const QwtScaleDiv & ) const;
00071 bool operator!=( const QwtScaleDiv & ) const;
00072
00073 void setInterval( double lowerBound, double upperBound );
00074 void setInterval( const QwtInterval & );
00075 QwtInterval interval() const;
00076
00077 void setLowerBound( double );
00078 double lowerBound() const;
00079
00080 void setUpperBound( double );
00081 double upperBound() const;
00082
00083 double range() const;
00084
00085 bool contains( double value ) const;
00086
00087 void setTicks( int tickType, const QList<double> & );
00088 QList<double> ticks( int tickType ) const;
00089
00090 bool isEmpty() const;
00091 bool isIncreasing() const;
00092
00093 void invert();
00094 QwtScaleDiv inverted() const;
00095
00096 QwtScaleDiv bounded( double lowerBound, double upperBound ) const;
00097
00098 private:
00099 double d_lowerBound;
00100 double d_upperBound;
00101 QList<double> d_ticks[NTickTypes];
00102 };
00103
00104 Q_DECLARE_TYPEINFO( QwtScaleDiv, Q_MOVABLE_TYPE );
00105
00106 #ifndef QT_NO_DEBUG_STREAM
00107 QWT_EXPORT QDebug operator<<( QDebug, const QwtScaleDiv & );
00108 #endif
00109
00110 #endif