Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_plot_legenditem.h
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (3 weeks ago)
- File:
-
- 1 edited
-
trunk/BNC/qwt/qwt_plot_legenditem.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_plot_legenditem.h
r9383 r11158 1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*-*****************************1 /****************************************************************************** 2 2 * Qwt Widget Library 3 3 * Copyright (C) 1997 Josef Wilgen … … 13 13 #include "qwt_global.h" 14 14 #include "qwt_plot_item.h" 15 #include "qwt_legend_data.h"16 15 17 16 class QFont; 18 17 19 18 /*! 20 \brief A class which draws a legend inside the plot canvas 19 \brief A class which draws a legend inside the plot canvas 21 20 22 QwtPlotLegendItem can be used to draw a inside the plot canvas. 23 It can be used together with a QwtLegend or instead of it 24 to have more space for the plot canvas. 21 QwtPlotLegendItem can be used to draw a inside the plot canvas. 22 It can be used together with a QwtLegend or instead of it 23 to have more space for the plot canvas. 25 24 26 In opposite to QwtLegend the legend item is not interactive. 27 To identify mouse clicks on a legend item an event filter 28 needs to be installed catching mouse events ob the plot canvas. 29 The geometries of the legend items are available using 30 legendGeometries(). 25 In opposite to QwtLegend the legend item is not interactive. 26 To identify mouse clicks on a legend item an event filter 27 needs to be installed catching mouse events ob the plot canvas. 28 The geometries of the legend items are available using 29 legendGeometries(). 31 30 32 The legend item is aligned to plot canvas according to 33 its alignment() flags. It might have a background for the 34 complete legend ( usually semi transparent ) or for 35 each legend item. 31 The legend item is aligned to plot canvas according to 32 its alignment() flags. It might have a background for the 33 complete legend ( usually semi transparent ) or for 34 each legend item. 36 35 37 \note An external QwtLegend with a transparent background 36 \note An external QwtLegend with a transparent background 38 37 on top the plot canvas might be another option 39 38 with a similar effect. 40 */ 39 */ 41 40 42 class QWT_EXPORT QwtPlotLegendItem: public QwtPlotItem 41 class QWT_EXPORT QwtPlotLegendItem : public QwtPlotItem 43 42 { 44 public: 43 public: 45 44 /*! 46 \brief Background mode 45 \brief Background mode 47 46 48 Depending on the mode the complete legend or each item 49 might have an background. 47 Depending on the mode the complete legend or each item 48 might have an background. 50 49 51 The default setting is LegendBackground. 50 The default setting is LegendBackground. 52 51 53 52 \sa setBackgroundMode(), setBackgroundBrush(), drawBackground() … … 65 64 virtual ~QwtPlotLegendItem(); 66 65 67 virtual int rtti() const; 66 virtual int rtti() const QWT_OVERRIDE; 68 67 69 void setAlignment( Qt::Alignment ); 70 Qt::Alignment alignment() const; 68 void setAlignmentInCanvas( Qt::Alignment ); 69 Qt::Alignment alignmentInCanvas() const; 70 71 void setOffsetInCanvas( Qt::Orientations, int numPixels ); 72 int offsetInCanvas( Qt::Orientation ) const; 71 73 72 74 void setMaxColumns( uint ); … … 88 90 QFont font() const; 89 91 90 void setBorderDistance( int );91 int borderDistance() const;92 93 92 void setBorderRadius( double ); 94 93 double borderRadius() const; 95 94 96 void setBorderPen( const QPen & );95 void setBorderPen( const QPen& ); 97 96 QPen borderPen() const; 98 97 99 void setBackgroundBrush( const QBrush & );98 void setBackgroundBrush( const QBrush& ); 100 99 QBrush backgroundBrush() const; 101 100 … … 103 102 BackgroundMode backgroundMode() const; 104 103 105 void setTextPen( const QPen & );104 void setTextPen( const QPen& ); 106 105 QPen textPen() const; 107 106 108 virtual void draw( QPainter *,109 const QwtScaleMap &xMap, const QwtScaleMap&yMap,110 const QRectF &canvasRect ) const;107 virtual void draw( QPainter*, 108 const QwtScaleMap& xMap, const QwtScaleMap& yMap, 109 const QRectF& canvasRect ) const QWT_OVERRIDE; 111 110 112 111 void clearLegend(); 113 112 114 virtual void updateLegend( const QwtPlotItem *,115 const QList<QwtLegendData > & );113 virtual void updateLegend( const QwtPlotItem*, 114 const QList< QwtLegendData >& ) QWT_OVERRIDE; 116 115 117 virtual QRect geometry( const QRectF &canvasRect ) const;116 virtual QRect geometry( const QRectF& canvasRect ) const; 118 117 119 virtual QSize minimumSize( const QwtLegendData & ) const;120 virtual int heightForWidth( const QwtLegendData &, int width ) const;118 virtual QSize minimumSize( const QwtLegendData& ) const; 119 virtual int heightForWidth( const QwtLegendData&, int width ) const; 121 120 122 QList< const QwtPlotItem * > plotItems() const;123 QList< QRect > legendGeometries( const QwtPlotItem * ) const;121 QList< const QwtPlotItem* > plotItems() const; 122 QList< QRect > legendGeometries( const QwtPlotItem* ) const; 124 123 125 protected: 126 virtual void drawLegendData( QPainter *painter,127 const QwtPlotItem *, const QwtLegendData&, const QRectF& ) const;124 protected: 125 virtual void drawLegendData( QPainter*, 126 const QwtPlotItem*, const QwtLegendData&, const QRectF& ) const; 128 127 129 virtual void drawBackground( QPainter *, const QRectF&rect ) const;128 virtual void drawBackground( QPainter*, const QRectF& rect ) const; 130 129 131 private: 130 private: 132 131 class PrivateData; 133 PrivateData *d_data;132 PrivateData* m_data; 134 133 }; 135 134
Note:
See TracChangeset
for help on using the changeset viewer.
