Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_plot_marker.h
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (3 weeks ago)
- File:
-
- 1 edited
-
trunk/BNC/qwt/qwt_plot_marker.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_plot_marker.h
r9383 r11158 1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*-*****************************1 /****************************************************************************** 2 2 * Qwt Widget Library 3 3 * Copyright (C) 1997 Josef Wilgen … … 11 11 #define QWT_PLOT_MARKER_H 12 12 13 #include <qpen.h>14 #include <qfont.h>15 #include <qstring.h>16 #include <qbrush.h>17 13 #include "qwt_global.h" 18 14 #include "qwt_plot_item.h" 19 15 16 class QString; 20 17 class QRectF; 21 18 class QwtText; … … 23 20 24 21 /*! 25 \brief A class for drawing markers 22 \brief A class for drawing markers 26 23 27 A marker can be a horizontal line, a vertical line, 28 a symbol, a label or any combination of them, which can 29 be drawn around a center point inside a bounding rectangle. 24 A marker can be a horizontal line, a vertical line, 25 a symbol, a label or any combination of them, which can 26 be drawn around a center point inside a bounding rectangle. 30 27 31 The setSymbol() member assigns a symbol to the marker. 32 The symbol is drawn at the specified point. 28 The setSymbol() member assigns a symbol to the marker. 29 The symbol is drawn at the specified point. 33 30 34 With setLabel(), a label can be assigned to the marker. 35 The setLabelAlignment() member specifies where the label is 36 drawn. All the Align*-constants in Qt::AlignmentFlags (see Qt documentation) 37 are valid. The interpretation of the alignment depends on the marker's 38 line style. The alignment refers to the center point of 39 the marker, which means, for example, that the label would be printed 40 left above the center point if the alignment was set to 41 Qt::AlignLeft | Qt::AlignTop. 31 With setLabel(), a label can be assigned to the marker. 32 The setLabelAlignment() member specifies where the label is 33 drawn. All the Align*-constants in Qt::AlignmentFlags (see Qt documentation) 34 are valid. The interpretation of the alignment depends on the marker's 35 line style. The alignment refers to the center point of 36 the marker, which means, for example, that the label would be printed 37 left above the center point if the alignment was set to 38 Qt::AlignLeft | Qt::AlignTop. 42 39 43 \note QwtPlotTextLabel is intended to align a text label 40 \note QwtPlotTextLabel is intended to align a text label 44 41 according to the geometry of canvas 45 42 ( unrelated to plot coordinates ) 46 */ 43 */ 47 44 48 class QWT_EXPORT QwtPlotMarker: public QwtPlotItem 45 class QWT_EXPORT QwtPlotMarker : public QwtPlotItem 49 46 { 50 public: 47 public: 51 48 52 49 /*! 53 50 Line styles. 54 51 \sa setLineStyle(), lineStyle() 55 */ 52 */ 56 53 enum LineStyle 57 54 { … … 69 66 }; 70 67 71 explicit QwtPlotMarker( const QString &title = QString() ); 72 explicit QwtPlotMarker( const QwtText &title ); 68 explicit QwtPlotMarker(); 69 explicit QwtPlotMarker( const QString& title ); 70 explicit QwtPlotMarker( const QwtText& title ); 73 71 74 72 virtual ~QwtPlotMarker(); 75 73 76 virtual int rtti() const; 74 virtual int rtti() const QWT_OVERRIDE; 77 75 78 76 double xValue() const; … … 83 81 void setYValue( double ); 84 82 void setValue( double, double ); 85 void setValue( const QPointF & );83 void setValue( const QPointF& ); 86 84 87 85 void setLineStyle( LineStyle ); 88 86 LineStyle lineStyle() const; 89 87 90 void setLinePen( const QColor &, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );91 void setLinePen( const QPen & );92 const QPen &linePen() const;88 void setLinePen( const QColor&, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine ); 89 void setLinePen( const QPen& ); 90 const QPen& linePen() const; 93 91 94 void setSymbol( const QwtSymbol * );95 const QwtSymbol *symbol() const;92 void setSymbol( const QwtSymbol* ); 93 const QwtSymbol* symbol() const; 96 94 97 95 void setLabel( const QwtText& ); … … 107 105 int spacing() const; 108 106 109 virtual void draw( QPainter *,110 const QwtScaleMap &xMap, const QwtScaleMap&yMap,111 const QRectF & ) const;107 virtual void draw( QPainter*, 108 const QwtScaleMap& xMap, const QwtScaleMap& yMap, 109 const QRectF& ) const QWT_OVERRIDE; 112 110 113 virtual QRectF boundingRect() const; 111 virtual QRectF boundingRect() const QWT_OVERRIDE; 114 112 115 virtual QwtGraphic legendIcon( int index, const QSizeF & ) const; 113 virtual QwtGraphic legendIcon( 114 int index, const QSizeF& ) const QWT_OVERRIDE; 116 115 117 protected: 118 virtual void drawLines( QPainter *,119 const QRectF &, const QPointF& ) const;116 protected: 117 virtual void drawLines( QPainter*, 118 const QRectF&, const QPointF& ) const; 120 119 121 virtual void draw Label( QPainter*,122 const QRectF &, const QPointF& ) const;120 virtual void drawSymbol( QPainter*, 121 const QRectF&, const QPointF& ) const; 123 122 124 private: 123 virtual void drawLabel( QPainter*, 124 const QRectF&, const QPointF& ) const; 125 126 private: 125 127 126 128 class PrivateData; 127 PrivateData *d_data;129 PrivateData* m_data; 128 130 }; 129 131
Note:
See TracChangeset
for help on using the changeset viewer.
