Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_plot_textlabel.h
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (3 weeks ago)
- File:
-
- 1 edited
-
trunk/BNC/qwt/qwt_plot_textlabel.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_plot_textlabel.h
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 #ifndef QWT_PLOT_TEXT_LABEL_H 11 #define QWT_PLOT_TEXT_LABEL_H 111 #define QWT_PLOT_TEXT_LABEL_H 12 12 13 13 #include "qwt_global.h" 14 14 #include "qwt_plot_item.h" 15 #include "qwt_text.h" 15 16 class QwtText; 16 17 17 18 /*! 18 \brief A plot item, which displays a text label 19 \brief A plot item, which displays a text label 19 20 20 QwtPlotTextLabel displays a text label aligned to the plot canvas. 21 QwtPlotTextLabel displays a text label aligned to the plot canvas. 21 22 22 In opposite to QwtPlotMarker the position of the label is unrelated to 23 plot coordinates. 23 In opposite to QwtPlotMarker the position of the label is unrelated to 24 plot coordinates. 24 25 25 As drawing a text is an expensive operation the label is cached 26 in a pixmap to speed up replots. 26 As drawing a text is an expensive operation the label is cached 27 in a pixmap to speed up replots. 27 28 28 \par Example 29 \par Example 29 30 The following code shows how to add a title. 30 31 \code … … 40 41 titleItem->attach( plot ); 41 42 \endcode 42 \endpar43 43 44 \sa QwtPlotMarker 45 */ 44 \sa QwtPlotMarker 45 */ 46 46 47 class QWT_EXPORT QwtPlotTextLabel: public QwtPlotItem 47 class QWT_EXPORT QwtPlotTextLabel : public QwtPlotItem 48 48 { 49 public: 49 public: 50 50 QwtPlotTextLabel(); 51 51 virtual ~QwtPlotTextLabel(); 52 52 53 virtual int rtti() const; 53 virtual int rtti() const QWT_OVERRIDE; 54 54 55 void setText( const QwtText & );55 void setText( const QwtText& ); 56 56 QwtText text() const; 57 57 … … 59 59 int margin() const; 60 60 61 virtual QRectF textRect( const QRectF &, const QSizeF& ) const;61 virtual QRectF textRect( const QRectF&, const QSizeF& ) const; 62 62 63 protected: 64 virtual void draw( QPainter *,65 const QwtScaleMap &, const QwtScaleMap&,66 const QRectF &) const;63 protected: 64 virtual void draw( QPainter*, 65 const QwtScaleMap&, const QwtScaleMap&, 66 const QRectF&) const QWT_OVERRIDE; 67 67 68 68 void invalidateCache(); 69 69 70 private: 70 private: 71 71 class PrivateData; 72 PrivateData *d_data;72 PrivateData* m_data; 73 73 }; 74 74
Note:
See TracChangeset
for help on using the changeset viewer.
