13#include "qwt_global.h"
14#include "qwt_abstract_legend.h"
15#include "qwt_legend_data.h"
36 explicit QwtLegend( QWidget* parent = NULL );
39 void setMaxColumns( uint numColums );
40 uint maxColumns()
const;
45 QWidget* contentsWidget();
46 const QWidget* contentsWidget()
const;
48 QWidget* legendWidget(
const QVariant& )
const;
51 QVariant itemInfo(
const QWidget* )
const;
53 virtual bool eventFilter( QObject*, QEvent* ) QWT_OVERRIDE;
55 virtual QSize sizeHint()
const QWT_OVERRIDE;
56 virtual int heightForWidth(
int w )
const QWT_OVERRIDE;
58 QScrollBar* horizontalScrollBar()
const;
59 QScrollBar* verticalScrollBar()
const;
62 const QRectF&,
bool fillBackground )
const QWT_OVERRIDE;
64 virtual void renderItem( QPainter*,
65 const QWidget*,
const QRectF&,
bool fillBackground )
const;
67 virtual bool isEmpty()
const QWT_OVERRIDE;
68 virtual int scrollExtent( Qt::Orientation )
const QWT_OVERRIDE;
83 void clicked(
const QVariant& itemInfo,
int index );
98 void checked(
const QVariant& itemInfo,
bool on,
int index );
106 void itemChecked(
bool );
113 void updateTabOrder();
Abstract base class for legend widgets.
virtual void renderLegend(QPainter *painter, const QRectF &rect, bool fillBackground) const =0
virtual int scrollExtent(Qt::Orientation) const
virtual bool isEmpty() const =0
virtual void updateLegend(const QVariant &itemInfo, const QList< QwtLegendData > &data)=0
Update the entries for a plot item.
Attributes of an entry on a legend.
Mode
Mode defining how a legend entry interacts.
void clicked(const QVariant &itemInfo, int index)
void checked(const QVariant &itemInfo, bool on, int index)