Changeset 9383 in ntrip for trunk/BNC/qwt/qwt_plot.h
- Timestamp:
- Mar 19, 2021, 9:15:03 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_plot.h
r8127 r9383 41 41 can be configured separately for each axis. 42 42 43 The simpleplot example is a good starting point to see how to set up a 43 The simpleplot example is a good starting point to see how to set up a 44 44 plot widget. 45 45 … … 47 47 48 48 \par Example 49 The following example shows (schematically) the most simple 50 way to use QwtPlot. By default, only the left and bottom axes are 51 visible and their scales are computed automatically. 52 \verbatim 53 #include <qwt_plot.h> 54 #include <qwt_plot_curve.h> 55 56 QwtPlot *myPlot = new QwtPlot("Two Curves", parent); 57 58 // add curves 59 QwtPlotCurve *curve1 = new QwtPlotCurve("Curve 1"); 60 QwtPlotCurve *curve2 = new QwtPlotCurve("Curve 2"); 61 62 // connect or copy the data to the curves 63 curve1->setData(...); 64 curve2->setData(...); 65 66 curve1->attach(myPlot); 67 curve2->attach(myPlot); 68 69 // finally, refresh the plot 70 myPlot->replot(); 71 \endverbatim 49 The following example shows (schematically) the most simple 50 way to use QwtPlot. By default, only the left and bottom axes are 51 visible and their scales are computed automatically. 52 \code 53 #include <qwt_plot.h> 54 #include <qwt_plot_curve.h> 55 56 QwtPlot *myPlot = new QwtPlot( "Two Curves", parent ); 57 58 // add curves 59 QwtPlotCurve *curve1 = new QwtPlotCurve( "Curve 1" ); 60 QwtPlotCurve *curve2 = new QwtPlotCurve( "Curve 2" ); 61 62 // connect or copy the data to the curves 63 curve1->setData( ... ); 64 curve2->setData( ... ); 65 66 curve1->attach( myPlot ); 67 curve2->attach( myPlot ); 68 69 // finally, refresh the plot 70 myPlot->replot(); 71 \endcode 72 \endpar 72 73 */ 73 74 … … 76 77 Q_OBJECT 77 78 78 Q_PROPERTY( QBrush canvasBackground 79 Q_PROPERTY( QBrush canvasBackground 79 80 READ canvasBackground WRITE setCanvasBackground ) 80 81 Q_PROPERTY( bool autoReplot READ autoReplot WRITE setAutoReplot ) … … 122 123 RightLegend, 123 124 124 //! The legend will be below the footer 125 //! The legend will be below the footer 125 126 BottomLegend, 126 127 … … 150 151 151 152 void setTitle( const QString & ); 152 void setTitle( const QwtText & t);153 void setTitle( const QwtText & ); 153 154 QwtText title() const; 154 155 … … 159 160 160 161 void setFooter( const QString & ); 161 void setFooter( const QwtText & t);162 void setFooter( const QwtText & ); 162 163 QwtText footer() const; 163 164 … … 192 193 bool axisEnabled( int axisId ) const; 193 194 194 void setAxisFont( int axisId, const QFont & f);195 void setAxisFont( int axisId, const QFont & ); 195 196 QFont axisFont( int axisId ) const; 196 197 197 void setAxisScale( int axisId, double min, double max, double step = 0 );198 void setAxisScale( int axisId, double min, double max, double stepSize = 0 ); 198 199 void setAxisScaleDiv( int axisId, const QwtScaleDiv & ); 199 200 void setAxisScaleDraw( int axisId, QwtScaleDraw * ); … … 225 226 // Legend 226 227 227 void insertLegend( QwtAbstractLegend *, 228 void insertLegend( QwtAbstractLegend *, 228 229 LegendPosition = QwtPlot::RightLegend, double ratio = -1.0 ); 229 230 … … 245 246 void updateCanvasMargins(); 246 247 247 virtual void getCanvasMarginsHint( 248 virtual void getCanvasMarginsHint( 248 249 const QwtScaleMap maps[], const QRectF &canvasRect, 249 250 double &left, double &top, double &right, double &bottom) const; … … 268 269 269 270 /*! 270 A signal with the attributes how to update 271 A signal with the attributes how to update 271 272 the legend entries for a plot item. 272 273 … … 277 278 \sa itemToInfo(), infoToItem(), QwtAbstractLegend::updateLegend() 278 279 */ 279 void legendDataChanged( const QVariant &itemInfo, 280 void legendDataChanged( const QVariant &itemInfo, 280 281 const QList<QwtLegendData> &data ); 281 282 … … 291 292 private Q_SLOTS: 292 293 void updateLegendItems( const QVariant &itemInfo, 293 const QList<QwtLegendData> & data );294 const QList<QwtLegendData> &legendData ); 294 295 295 296 private:
Note:
See TracChangeset
for help on using the changeset viewer.