10 #ifndef QWT_PLOT_LEGEND_ITEM_H 11 #define QWT_PLOT_LEGEND_ITEM_H 67 virtual int rtti()
const;
69 void setAlignment( Qt::Alignment );
70 Qt::Alignment alignment()
const;
72 void setMaxColumns( uint );
73 uint maxColumns()
const;
75 void setMargin(
int );
78 void setSpacing(
int );
81 void setItemMargin(
int );
82 int itemMargin()
const;
84 void setItemSpacing(
int );
85 int itemSpacing()
const;
87 void setFont(
const QFont& );
90 void setBorderDistance(
int numPixels );
91 int borderDistance()
const;
93 void setBorderRadius(
double );
94 double borderRadius()
const;
96 void setBorderPen(
const QPen & );
97 QPen borderPen()
const;
99 void setBackgroundBrush(
const QBrush & );
100 QBrush backgroundBrush()
const;
105 void setTextPen(
const QPen & );
106 QPen textPen()
const;
108 virtual void draw( QPainter *p,
110 const QRectF &rect )
const;
115 const QList<QwtLegendData> & );
117 virtual QRect geometry(
const QRectF &canvasRect )
const;
120 virtual int heightForWidth(
const QwtLegendData &,
int w )
const;
122 QList< const QwtPlotItem * > plotItems()
const;
123 QList< QRect > legendGeometries(
const QwtPlotItem * )
const;
126 virtual void drawLegendData( QPainter *painter,
129 virtual void drawBackground( QPainter *,
const QRectF &rect )
const;
The legend has a background.
virtual void draw(QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect) const =0
Draw the item.
BackgroundMode
Background mode.
A class which draws a legend inside the plot canvas.
virtual void updateLegend(const QwtPlotItem *, const QList< QwtLegendData > &)
Update the item to changes of the legend info.
Base class for items on the plot canvas.
Attributes of an entry on a legend.