Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_plot_scaleitem.h
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (3 weeks ago)
- File:
-
- 1 edited
-
trunk/BNC/qwt/qwt_plot_scaleitem.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_plot_scaleitem.h
r9383 r11158 1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*-*****************************1 /****************************************************************************** 2 2 * Qwt Widget Library 3 3 * Copyright (C) 1997 Josef Wilgen … … 18 18 19 19 /*! 20 \brief A class which draws a scale inside the plot canvas 20 \brief A class which draws a scale inside the plot canvas 21 21 22 QwtPlotScaleItem can be used to draw an axis inside the plot canvas. 23 It might by synchronized to one of the axis of the plot, but can 24 also display its own ticks and labels. 22 QwtPlotScaleItem can be used to draw an axis inside the plot canvas. 23 It might by synchronized to one of the axis of the plot, but can 24 also display its own ticks and labels. 25 25 26 It is allowed to synchronize the scale item with a disabled axis. 27 In plots with vertical and horizontal scale items, it might be 28 necessary to remove ticks at the intersections, by overloading 29 updateScaleDiv(). 26 It is allowed to synchronize the scale item with a disabled axis. 27 In plots with vertical and horizontal scale items, it might be 28 necessary to remove ticks at the intersections, by overloading 29 updateScaleDiv(). 30 30 31 The scale might be at a specific position (f.e 0.0) or it might be 32 aligned to a canvas border. 31 The scale might be at a specific position (f.e 0.0) or it might be 32 aligned to a canvas border. 33 33 34 \par Example 34 \par Example 35 35 The following example shows how to replace the left axis, by a scale item 36 36 at the x position 0.0. 37 37 \code 38 38 QwtPlotScaleItem *scaleItem = new QwtPlotScaleItem( QwtScaleDraw::RightScale, 0.0 ); 39 scaleItem->setFont( plot->axisWidget( Qwt Plot::yLeft )->font() );39 scaleItem->setFont( plot->axisWidget( QwtAxis::YLeft )->font() ); 40 40 scaleItem->attach(plot); 41 41 42 plot-> enableAxis( QwtPlot::yLeft, false );42 plot->setAxisVisible( QwtAxis::YLeft, false ); 43 43 \endcode 44 \endpar 45 */ 44 */ 46 45 47 class QWT_EXPORT QwtPlotScaleItem: public QwtPlotItem 46 class QWT_EXPORT QwtPlotScaleItem : public QwtPlotItem 48 47 { 49 public: 48 public: 50 49 explicit QwtPlotScaleItem( 51 50 QwtScaleDraw::Alignment = QwtScaleDraw::BottomScale, … … 54 53 virtual ~QwtPlotScaleItem(); 55 54 56 virtual int rtti() const; 55 virtual int rtti() const QWT_OVERRIDE; 57 56 58 57 void setScaleDiv( const QwtScaleDiv& ); … … 62 61 bool isScaleDivFromAxis() const; 63 62 64 void setPalette( const QPalette & );63 void setPalette( const QPalette& ); 65 64 QPalette palette() const; 66 65 … … 68 67 QFont font() const; 69 68 70 void setScaleDraw( QwtScaleDraw * );69 void setScaleDraw( QwtScaleDraw* ); 71 70 72 const QwtScaleDraw *scaleDraw() const;73 QwtScaleDraw *scaleDraw();71 const QwtScaleDraw* scaleDraw() const; 72 QwtScaleDraw* scaleDraw(); 74 73 75 74 void setPosition( double pos ); … … 81 80 void setAlignment( QwtScaleDraw::Alignment ); 82 81 83 virtual void draw( QPainter *,84 const QwtScaleMap &xMap, const QwtScaleMap&yMap,85 const QRectF &canvasRect ) const;82 virtual void draw( QPainter*, 83 const QwtScaleMap& xMap, const QwtScaleMap& yMap, 84 const QRectF& canvasRect ) const QWT_OVERRIDE; 86 85 87 virtual void updateScaleDiv( const QwtScaleDiv &, const QwtScaleDiv & ); 86 virtual void updateScaleDiv( 87 const QwtScaleDiv&, const QwtScaleDiv& ) QWT_OVERRIDE; 88 88 89 private: 89 private: 90 90 class PrivateData; 91 PrivateData *d_data;91 PrivateData* m_data; 92 92 }; 93 93
Note:
See TracChangeset
for help on using the changeset viewer.
