Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_plot_seriesitem.cpp
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (3 weeks ago)
- File:
-
- 1 edited
-
trunk/BNC/qwt/qwt_plot_seriesitem.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_plot_seriesitem.cpp
r9383 r11158 1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*-*****************************1 /****************************************************************************** 2 2 * Qwt Widget Library 3 3 * Copyright (C) 1997 Josef Wilgen … … 9 9 10 10 #include "qwt_plot_seriesitem.h" 11 #include "qwt_scale_div.h" 12 #include "qwt_text.h" 11 13 12 14 class QwtPlotSeriesItem::PrivateData 13 15 { 14 public: 15 PrivateData() :16 orientation( Qt::Vertical ) 16 public: 17 PrivateData() 18 : orientation( Qt::Vertical ) 17 19 { 18 20 } … … 22 24 23 25 /*! 24 Constructor 25 \param title Title of the curve 26 */ 27 QwtPlotSeriesItem::QwtPlotSeriesItem( const QwtText &title ):28 QwtPlotItem( title ) 26 Constructor 27 \param title Title of the curve 28 */ 29 QwtPlotSeriesItem::QwtPlotSeriesItem( const QwtText& title ) 30 : QwtPlotItem( title ) 29 31 { 30 d_data = new PrivateData();32 m_data = new PrivateData(); 31 33 setItemInterest( QwtPlotItem::ScaleInterest, true ); 32 34 } 33 35 34 36 /*! 35 Constructor 36 \param title Title of the curve 37 */ 38 QwtPlotSeriesItem::QwtPlotSeriesItem( const QString &title ):39 QwtPlotItem( QwtText( title ) ) 37 Constructor 38 \param title Title of the curve 39 */ 40 QwtPlotSeriesItem::QwtPlotSeriesItem( const QString& title ) 41 : QwtPlotItem( QwtText( title ) ) 40 42 { 41 d_data = new PrivateData();43 m_data = new PrivateData(); 42 44 setItemInterest( QwtPlotItem::ScaleInterest, true ); 43 45 } … … 46 48 QwtPlotSeriesItem::~QwtPlotSeriesItem() 47 49 { 48 delete d_data;50 delete m_data; 49 51 } 50 52 51 53 /*! 52 Set the orientation of the item. 54 Set the orientation of the item. 53 55 54 The orientation() might be used in specific way by a plot item. 55 F.e. a QwtPlotCurve uses it to identify how to display the curve 56 int QwtPlotCurve::Steps or QwtPlotCurve::Sticks style. 56 The orientation() might be used in specific way by a plot item. 57 F.e. a QwtPlotCurve uses it to identify how to display the curve 58 int QwtPlotCurve::Steps or QwtPlotCurve::Sticks style. 57 59 58 \sa orientation() 59 */ 60 \sa orientation() 61 */ 60 62 void QwtPlotSeriesItem::setOrientation( Qt::Orientation orientation ) 61 63 { 62 if ( d_data->orientation != orientation )64 if ( m_data->orientation != orientation ) 63 65 { 64 d_data->orientation = orientation;66 m_data->orientation = orientation; 65 67 66 68 legendChanged(); … … 70 72 71 73 /*! 72 \return Orientation of the plot item 73 \sa setOrientation() 74 */ 74 \return Orientation of the plot item 75 \sa setOrientation() 76 */ 75 77 Qt::Orientation QwtPlotSeriesItem::orientation() const 76 78 { 77 return d_data->orientation;79 return m_data->orientation; 78 80 } 79 81 80 82 /*! 81 \brief Draw the complete series 83 \brief Draw the complete series 82 84 83 \param painter Painter 84 \param xMap Maps x-values into pixel coordinates. 85 \param yMap Maps y-values into pixel coordinates. 86 \param canvasRect Contents rectangle of the canvas 87 */ 88 void QwtPlotSeriesItem::draw( QPainter *painter,89 const QwtScaleMap&xMap, const QwtScaleMap&yMap,90 const QRectF&canvasRect ) const85 \param painter Painter 86 \param xMap Maps x-values into pixel coordinates. 87 \param yMap Maps y-values into pixel coordinates. 88 \param canvasRect Contents rectangle of the canvas 89 */ 90 void QwtPlotSeriesItem::draw( QPainter* painter, 91 const QwtScaleMap& xMap, const QwtScaleMap& yMap, 92 const QRectF& canvasRect ) const 91 93 { 92 94 drawSeries( painter, xMap, yMap, canvasRect, 0, -1 ); … … 99 101 100 102 void QwtPlotSeriesItem::updateScaleDiv( 101 const QwtScaleDiv &xScaleDiv, const QwtScaleDiv&yScaleDiv )103 const QwtScaleDiv& xScaleDiv, const QwtScaleDiv& yScaleDiv ) 102 104 { 103 105 const QRectF rect = QRectF(
Note:
See TracChangeset
for help on using the changeset viewer.
