1
.TH "QwtLegend" 3 "22 Mar 2009" "Qwt User's Guide" \" -*- nroff -*-
5
QwtLegend \- The legend widget.
11
\fC#include <qwt_legend.h>\fP
17
.RI "enum \fBLegendDisplayPolicy\fP { \fBNoIdentifier\fP = 0, \fBFixedIdentifier\fP = 1, \fBAutoIdentifier\fP = 2 }"
20
.RI "enum \fBLegendItemMode\fP { \fBReadOnlyItem\fP, \fBClickableItem\fP, \fBCheckableItem\fP }"
22
.SS "Public Member Functions"
26
.RI "\fBQwtLegend\fP (QWidget *parent=NULL)"
29
.RI "virtual \fB~QwtLegend\fP ()"
32
.RI "void \fBsetDisplayPolicy\fP (\fBLegendDisplayPolicy\fP policy, int mode)"
35
.RI "\fBLegendDisplayPolicy\fP \fBdisplayPolicy\fP () const "
38
.RI "void \fBsetItemMode\fP (\fBLegendItemMode\fP)"
41
.RI "\fBLegendItemMode\fP \fBitemMode\fP () const "
44
.RI "int \fBidentifierMode\fP () const "
47
.RI "QWidget * \fBcontentsWidget\fP ()"
50
.RI "const QWidget * \fBcontentsWidget\fP () const "
53
.RI "void \fBinsert\fP (const \fBQwtLegendItemManager\fP *, QWidget *)"
56
.RI "void \fBremove\fP (const \fBQwtLegendItemManager\fP *)"
59
.RI "QWidget * \fBfind\fP (const \fBQwtLegendItemManager\fP *) const "
62
.RI "\fBQwtLegendItemManager\fP * \fBfind\fP (const QWidget *) const "
65
.RI "virtual QList< QWidget * > \fBlegendItems\fP () const "
68
.RI "void \fBclear\fP ()"
71
.RI "bool \fBisEmpty\fP () const "
74
.RI "uint \fBitemCount\fP () const "
77
.RI "virtual bool \fBeventFilter\fP (QObject *, QEvent *)"
80
.RI "virtual QSize \fBsizeHint\fP () const "
83
.RI "virtual int \fBheightForWidth\fP (int w) const "
86
.RI "QScrollBar * \fBhorizontalScrollBar\fP () const "
89
.RI "QScrollBar * \fBverticalScrollBar\fP () const "
92
.SS "Protected Member Functions"
96
.RI "virtual void \fBresizeEvent\fP (QResizeEvent *)"
99
.RI "virtual void \fBlayoutContents\fP ()"
102
.SH "Detailed Description"
106
The \fBQwtLegend\fP widget is a tabular arrangement of legend items. Legend items might be any type of widget, but in general they will be a \fBQwtLegendItem\fP.
110
\fBQwtLegendItem\fP, \fBQwtLegendItemManager\fP \fBQwtPlot\fP
114
.SH "Member Enumeration Documentation"
116
.SS "enum \fBQwtLegend::LegendDisplayPolicy\fP"
123
The client code is responsible how to display of each legend item. The Qwt library will not interfere.
129
All legend items are displayed with the \fBQwtLegendItem::IdentifierMode\fP to be passed in 'mode'.
135
Each legend item is displayed with a mode that is a bitwise or of
137
QwtLegendItem::ShowLine (if its curve is drawn with a line) and
139
QwtLegendItem::ShowSymbol (if its curve is drawn with symbols) and
141
QwtLegendItem::ShowText (if the has a title).
146
Default is AutoIdentifier.
150
\fBsetDisplayPolicy()\fP, \fBdisplayPolicy()\fP, \fBQwtLegendItem::IdentifierMode\fP
154
.SS "enum \fBQwtLegend::LegendItemMode\fP"
156
Interaction mode for the legend items.
161
The legend item is not interactive, like a label
167
The legend item is clickable, like a push button
173
The legend item is checkable, like a checkable button
176
Default is ReadOnlyItem.
180
\fBsetItemMode()\fP, \fBitemMode()\fP, \fBQwtLegendItem::IdentifierMode\fP \fBQwtLegendItem::clicked()\fP, \fBQwtLegendItem::checked()\fP, \fBQwtPlot::legendClicked()\fP, \fBQwtPlot::legendChecked()\fP
184
.SH "Constructor & Destructor Documentation"
186
.SS "QwtLegend::QwtLegend (QWidget * parent = \fCNULL\fP)\fC [explicit]\fP"
192
\fIparent\fP Parent widget
196
.SS "QwtLegend::~QwtLegend ()\fC [virtual]\fP"
200
.SH "Member Function Documentation"
202
.SS "void QwtLegend::clear ()"
206
.SS "const QWidget * QwtLegend::contentsWidget () const"
208
The contents widget is the only child of the viewport() and the parent widget of all legend items.
209
.SS "QWidget * QwtLegend::contentsWidget ()"
211
The contents widget is the only child of the viewport() and the parent widget of all legend items.
212
.SS "\fBQwtLegend::LegendDisplayPolicy\fP QwtLegend::displayPolicy () const"
216
the legend display policy. Default is LegendDisplayPolicy::Auto.
221
\fBsetDisplayPolicy()\fP, \fBLegendDisplayPolicy\fP
225
.SS "bool QwtLegend::eventFilter (QObject * o, QEvent * e)\fC [virtual]\fP"
227
Filter layout related events of \fBQwtLegend::contentsWidget()\fP.
231
\fIo\fP Object to be filtered
237
.SS "\fBQwtLegendItemManager\fP * QwtLegend::find (const QWidget * legendItem) const"
239
Find the widget that represents a plot item
243
\fIlegendItem\fP Legend item
248
Widget on the legend, or NULL
252
.SS "QWidget * QwtLegend::find (const \fBQwtLegendItemManager\fP * plotItem) const"
254
Find the widget that represents a plot item
258
\fIplotItem\fP Plot item
263
Widget on the legend, or NULL
267
.SS "int QwtLegend::heightForWidth (int width) const\fC [virtual]\fP"
271
The preferred height, for the width w.
280
.SS "QScrollBar * QwtLegend::horizontalScrollBar () const"
289
\fBverticalScrollBar()\fP
293
.SS "int QwtLegend::identifierMode () const"
297
the IdentifierMode to be used in combination with LegendDisplayPolicy::Fixed.
300
Default is ShowLine | ShowSymbol | ShowText.
301
.SS "void QwtLegend::insert (const \fBQwtLegendItemManager\fP * plotItem, QWidget * legendItem)"
303
Insert a new item for a plot item
307
\fIplotItem\fP Plot item
309
\fIlegendItem\fP New legend item
314
The parent of item will be changed to \fBQwtLegend::contentsWidget()\fP
318
.SS "bool QwtLegend::isEmpty () const"
320
Return true, if there are no legend items.
322
.SS "uint QwtLegend::itemCount () const"
324
Return the number of legend items.
326
.SS "\fBQwtLegend::LegendItemMode\fP QwtLegend::itemMode () const"
334
.SS "void QwtLegend::layoutContents ()\fC [protected, virtual]\fP"
336
Adjust contents widget and item layout to the size of the viewport().
337
.SS "QList< QWidget * > QwtLegend::legendItems () const\fC [virtual]\fP"
339
Return a list of all legend items.
341
.SS "void QwtLegend::remove (const \fBQwtLegendItemManager\fP * plotItem)"
343
Find the corresponding item for a plotItem and remove it from the item list.
347
\fIplotItem\fP Plot item
351
.SS "void QwtLegend::resizeEvent (QResizeEvent * e)\fC [protected, virtual]\fP"
361
.SS "void QwtLegend::setDisplayPolicy (\fBLegendDisplayPolicy\fP policy, int mode)"
363
Set the legend display policy to:
367
\fIpolicy\fP Legend display policy
369
\fImode\fP Identifier mode (or'd ShowLine, ShowSymbol, ShowText)
374
\fBdisplayPolicy()\fP, \fBLegendDisplayPolicy\fP
378
.SS "void QwtLegend::setItemMode (\fBLegendItemMode\fP mode)"
386
.SS "QSize QwtLegend::sizeHint () const\fC [virtual]\fP"
390
.SS "QScrollBar * QwtLegend::verticalScrollBar () const"
399
\fBhorizontalScrollBar()\fP
406
Generated automatically by Doxygen for Qwt User's Guide from the source code.