Changeset 8127 in ntrip for trunk/BNC/qwt/qwt_scale_div.h
- Timestamp:
- May 10, 2017, 3:20:54 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_scale_div.h
r4271 r8127 15 15 #include <qlist.h> 16 16 17 class QwtInterval; 17 #ifndef QT_NO_DEBUG_STREAM 18 #include <qdebug.h> 19 #endif 18 20 19 21 /*! 20 22 \brief A class representing a scale division 21 23 22 A scale division consists of its limits and 3 list23 of tick values qualified asmajor, medium and minor ticks.24 A Qwt scale is defined by its boundaries and 3 list 25 for the positions of the major, medium and minor ticks. 24 26 25 In most cases scale divisions are calculated by a QwtScaleEngine. 27 The upperBound() might be smaller than the lowerBound() 28 to indicate inverted scales. 26 29 27 \sa subDivideInto(), subDivide() 30 Scale divisions can be calculated from a QwtScaleEngine. 31 32 \sa QwtScaleEngine::divideScale(), QwtPlot::setAxisScaleDiv(), 33 QwtAbstractSlider::setScaleDiv() 28 34 */ 29 35 … … 50 56 }; 51 57 52 explicit QwtScaleDiv(); 58 explicit QwtScaleDiv( double lowerBound = 0.0, 59 double upperBound = 0.0 ); 60 53 61 explicit QwtScaleDiv( const QwtInterval &, QList<double>[NTickTypes] ); 54 explicit QwtScaleDiv(55 double lowerBound, double upperBound, QList<double>[NTickTypes] );56 62 57 bool operator==( const QwtScaleDiv &s ) const; 58 bool operator!=( const QwtScaleDiv &s ) const; 63 explicit QwtScaleDiv( double lowerBound, double upperBound, 64 QList<double>[NTickTypes] ); 65 66 explicit QwtScaleDiv( double lowerBound, double upperBound, 67 const QList<double> &minorTicks, const QList<double> &mediumTicks, 68 const QList<double> &majorTicks ); 69 70 bool operator==( const QwtScaleDiv & ) const; 71 bool operator!=( const QwtScaleDiv & ) const; 59 72 60 73 void setInterval( double lowerBound, double upperBound ); … … 62 75 QwtInterval interval() const; 63 76 77 void setLowerBound( double ); 64 78 double lowerBound() const; 79 80 void setUpperBound( double ); 65 81 double upperBound() const; 82 66 83 double range() const; 67 84 68 bool contains( double v ) const;85 bool contains( double value ) const; 69 86 70 void setTicks( int t ype, const QList<double> & );71 const QList<double> &ticks( int type ) const;87 void setTicks( int tickType, const QList<double> & ); 88 QList<double> ticks( int tickType ) const; 72 89 73 void invalidate();74 bool is Valid() const;90 bool isEmpty() const; 91 bool isIncreasing() const; 75 92 76 93 void invert(); 94 QwtScaleDiv inverted() const; 95 96 QwtScaleDiv bounded( double lowerBound, double upperBound ) const; 77 97 78 98 private: … … 80 100 double d_upperBound; 81 101 QList<double> d_ticks[NTickTypes]; 82 83 bool d_isValid;84 102 }; 85 103 86 Q_DECLARE_TYPEINFO( QwtScaleDiv, Q_MOVABLE_TYPE);104 Q_DECLARE_TYPEINFO( QwtScaleDiv, Q_MOVABLE_TYPE ); 87 105 88 /*! 89 Change the interval 90 \param lowerBound lower bound 91 \param upperBound upper bound 92 */ 93 inline void QwtScaleDiv::setInterval( double lowerBound, double upperBound ) 94 { 95 d_lowerBound = lowerBound; 96 d_upperBound = upperBound; 97 } 106 #ifndef QT_NO_DEBUG_STREAM 107 QWT_EXPORT QDebug operator<<( QDebug, const QwtScaleDiv & ); 108 #endif 98 109 99 /*!100 \return lowerBound -> upperBound101 */102 inline QwtInterval QwtScaleDiv::interval() const103 {104 return QwtInterval( d_lowerBound, d_upperBound );105 }106 107 /*!108 \return lower bound109 \sa upperBound()110 */111 inline double QwtScaleDiv::lowerBound() const112 {113 return d_lowerBound;114 }115 116 /*!117 \return upper bound118 \sa lowerBound()119 */120 inline double QwtScaleDiv::upperBound() const121 {122 return d_upperBound;123 }124 125 /*!126 \return upperBound() - lowerBound()127 */128 inline double QwtScaleDiv::range() const129 {130 return d_upperBound - d_lowerBound;131 }132 110 #endif
Note:
See TracChangeset
for help on using the changeset viewer.