1
.TH "QwtLegendItem" 3 "24 May 2008" "Version 5.1.1" "Qwt User's Guide" \" -*- nroff -*-
9
Inherits \fBQwtTextLabel\fP.
11
.SH "Detailed Description"
15
\fBQwtLegendItem\fP represents a curve on a legend. It displays an curve identifier with an explaining text. The identifier might be a combination of curve symbol and line. In readonly mode it behaves like a label, otherwise like an unstylish push button.
19
\fBQwtLegend\fP, \fBQwtPlotCurve\fP
24
Definition at line 35 of file qwt_legend_item.h.
29
.RI "enum \fBIdentifierMode\fP { \fBNoIdentifier\fP = 0, \fBShowLine\fP = 1, \fBShowSymbol\fP = 2, \fBShowText\fP = 4 }"
36
.RI "void \fBsetChecked\fP (bool on)"
43
.RI "void \fBclicked\fP ()"
46
.RI "void \fBpressed\fP ()"
49
.RI "void \fBreleased\fP ()"
52
.RI "void \fBchecked\fP (bool)"
55
.SS "Public Member Functions"
59
.RI "\fBQwtLegendItem\fP (QWidget *parent=0)"
62
.RI "\fBQwtLegendItem\fP (const \fBQwtSymbol\fP &, const QPen &, const \fBQwtText\fP &, QWidget *parent=0)"
65
.RI "virtual \fB~QwtLegendItem\fP ()"
68
.RI "virtual void \fBsetText\fP (const \fBQwtText\fP &)"
71
.RI "void \fBsetItemMode\fP (\fBQwtLegend::LegendItemMode\fP)"
74
.RI "\fBQwtLegend::LegendItemMode\fP \fBitemMode\fP () const"
77
.RI "void \fBsetIdentifierMode\fP (int)"
80
.RI "int \fBidentifierMode\fP () const"
83
.RI "void \fBsetIdentfierWidth\fP (int width)"
86
.RI "int \fBidentifierWidth\fP () const"
89
.RI "void \fBsetSpacing\fP (int spacing)"
92
.RI "int \fBspacing\fP () const"
95
.RI "void \fBsetSymbol\fP (const \fBQwtSymbol\fP &)"
98
.RI "const \fBQwtSymbol\fP & \fBsymbol\fP () const"
101
.RI "void \fBsetCurvePen\fP (const QPen &)"
104
.RI "const QPen & \fBcurvePen\fP () const"
107
.RI "virtual void \fBdrawIdentifier\fP (QPainter *, const QRect &) const"
110
.RI "virtual void \fBdrawItem\fP (QPainter *p, const QRect &) const"
113
.RI "virtual QSize \fBsizeHint\fP () const"
116
.RI "bool \fBisChecked\fP () const"
119
.SS "Protected Member Functions"
123
.RI "void \fBsetDown\fP (bool)"
126
.RI "bool \fBisDown\fP () const"
129
.RI "virtual void \fBpaintEvent\fP (QPaintEvent *)"
132
.RI "virtual void \fBmousePressEvent\fP (QMouseEvent *)"
135
.RI "virtual void \fBmouseReleaseEvent\fP (QMouseEvent *)"
138
.RI "virtual void \fBkeyPressEvent\fP (QKeyEvent *)"
141
.RI "virtual void \fBkeyReleaseEvent\fP (QKeyEvent *)"
144
.RI "virtual void \fBdrawText\fP (QPainter *, const QRect &)"
147
.SH "Member Enumeration Documentation"
149
.SS "enum \fBQwtLegendItem::IdentifierMode\fP"
153
Default is ShowLine | ShowText
157
\fBQwtLegendItem::identifierMode\fP, \fBQwtLegendItem::setIdentifierMode\fP
162
Definition at line 47 of file qwt_legend_item.h.
163
.SH "Constructor & Destructor Documentation"
165
.SS "QwtLegendItem::QwtLegendItem (QWidget * parent = \fC0\fP)\fC [explicit]\fP"
169
\fIparent\fP Parent widget
174
Definition at line 80 of file qwt_legend_item.cpp.
175
.SS "QwtLegendItem::QwtLegendItem (const \fBQwtSymbol\fP & symbol, const QPen & curvePen, const \fBQwtText\fP & text, QWidget * parent = \fC0\fP)\fC [explicit]\fP"
179
\fIsymbol\fP Curve symbol
181
\fIcurvePen\fP Curve pen
183
\fItext\fP Label text
185
\fIparent\fP Parent widget
190
Definition at line 93 of file qwt_legend_item.cpp.
192
References QwtSymbol::clone(), symbol(), and QwtTextLabel::text().
193
.SS "QwtLegendItem::~QwtLegendItem ()\fC [virtual]\fP"
197
Definition at line 116 of file qwt_legend_item.cpp.
198
.SH "Member Function Documentation"
200
.SS "void QwtLegendItem::setText (const \fBQwtText\fP & text)\fC [virtual]\fP"
202
Set the text to the legend item
206
\fItext\fP Text label
211
\fBQwtTextLabel::text()\fP
216
Reimplemented from \fBQwtTextLabel\fP.
218
Definition at line 128 of file qwt_legend_item.cpp.
220
References QwtText::setRenderFlags(), QwtTextLabel::setText(), and QwtTextLabel::text().
221
.SS "void QwtLegendItem::setItemMode (\fBQwtLegend::LegendItemMode\fP mode)"
223
Set the item mode The default is QwtLegend::ReadOnlyItem
237
Definition at line 150 of file qwt_legend_item.cpp.
239
References QwtTextLabel::setMargin().
240
.SS "\fBQwtLegend::LegendItemMode\fP QwtLegendItem::itemMode () const"
251
Definition at line 169 of file qwt_legend_item.cpp.
252
.SS "void QwtLegendItem::setIdentifierMode (int mode)"
254
Set identifier mode. Default is ShowLine | ShowText.
258
\fImode\fP Or'd values of IdentifierMode
263
\fBidentifierMode()\fP
268
Definition at line 181 of file qwt_legend_item.cpp.
269
.SS "int QwtLegendItem::identifierMode () const"
271
Or'd values of IdentifierMode.
275
\fBsetIdentifierMode()\fP, \fBIdentifierMode\fP
280
Definition at line 194 of file qwt_legend_item.cpp.
281
.SS "void QwtLegendItem::setIdentfierWidth (int width)"
283
Set the width for the identifier Default is 8 pixels
287
\fIwidth\fP New width
292
\fBidentifierMode()\fP, \fBidentifierWidth\fP
297
Definition at line 207 of file qwt_legend_item.cpp.
299
References QwtTextLabel::margin(), and QwtTextLabel::setIndent().
300
.SS "int QwtLegendItem::identifierWidth () const"
302
Return the width of the identifier
306
\fBsetIdentfierWidth\fP
311
Definition at line 222 of file qwt_legend_item.cpp.
313
Referenced by drawItem().
314
.SS "void QwtLegendItem::setSpacing (int spacing)"
320
\fIspacing\fP Spacing
325
\fBspacing()\fP, \fBidentifierWidth()\fP, \fBQwtTextLabel::margin()\fP
330
Definition at line 232 of file qwt_legend_item.cpp.
332
References QwtTextLabel::margin(), and QwtTextLabel::setIndent().
333
.SS "int QwtLegendItem::spacing () const"
339
\fBsetSpacing()\fP, \fBidentifierWidth()\fP, \fBQwtTextLabel::margin()\fP
344
Definition at line 247 of file qwt_legend_item.cpp.
346
Referenced by drawItem().
347
.SS "void QwtLegendItem::setSymbol (const \fBQwtSymbol\fP & symbol)"
363
Definition at line 258 of file qwt_legend_item.cpp.
365
References QwtSymbol::clone(), and symbol().
366
.SS "const \fBQwtSymbol\fP & QwtLegendItem::symbol () const"
380
Definition at line 269 of file qwt_legend_item.cpp.
382
Referenced by QwtLegendItem(), and setSymbol().
383
.SS "void QwtLegendItem::setCurvePen (const QPen & pen)"
399
Definition at line 281 of file qwt_legend_item.cpp.
400
.SS "const QPen & QwtLegendItem::curvePen () const"
414
Definition at line 294 of file qwt_legend_item.cpp.
415
.SS "void QwtLegendItem::drawIdentifier (QPainter * painter, const QRect & rect) const\fC [virtual]\fP"
417
Paint the identifier to a given rect.
421
\fIpainter\fP Painter
423
\fIrect\fP Rect where to paint
428
Definition at line 304 of file qwt_legend_item.cpp.
430
References QwtPainter::drawLine(), QwtPainter::metricsMap(), and QwtMetricsMap::screenToLayout().
432
Referenced by drawItem(), and paintEvent().
433
.SS "void QwtLegendItem::drawItem (QPainter * painter, const QRect & rect) const\fC [virtual]\fP"
435
Draw the legend item to a given rect.
439
\fIpainter\fP Painter
441
\fIrect\fP Rect where to paint the button
446
Definition at line 360 of file qwt_legend_item.cpp.
448
References QwtText::draw(), drawIdentifier(), identifierWidth(), QwtTextLabel::margin(), QwtPainter::metricsMap(), QwtMetricsMap::screenToLayoutX(), spacing(), and QwtTextLabel::text().
449
.SS "QSize QwtLegendItem::sizeHint () const\fC [virtual]\fP"
453
Reimplemented from \fBQwtTextLabel\fP.
455
Definition at line 578 of file qwt_legend_item.cpp.
457
References QwtTextLabel::sizeHint().
458
.SS "bool QwtLegendItem::isChecked () const"
460
Return true, if the item is checked.
462
Definition at line 542 of file qwt_legend_item.cpp.
465
.SS "void QwtLegendItem::setChecked (bool on)\fC [slot]\fP"
467
Check/Uncheck a the item
471
\fIon\fP check/uncheck
481
Definition at line 528 of file qwt_legend_item.cpp.
483
References setDown().
484
.SS "void QwtLegendItem::clicked ()\fC [signal]\fP"
486
Signal, when the legend item has been clicked.
488
Referenced by setDown().
489
.SS "void QwtLegendItem::pressed ()\fC [signal]\fP"
491
Signal, when the legend item has been pressed.
493
Referenced by setDown().
494
.SS "void QwtLegendItem::released ()\fC [signal]\fP"
496
Signal, when the legend item has been relased.
498
Referenced by setDown().
499
.SS "void QwtLegendItem::checked (bool)\fC [signal]\fP"
501
Signal, when the legend item has been toggled.
503
Referenced by setDown().
504
.SS "void QwtLegendItem::setDown (bool)\fC [protected]\fP"
506
Set the item being down.
508
Definition at line 548 of file qwt_legend_item.cpp.
510
References checked(), clicked(), pressed(), and released().
512
Referenced by keyPressEvent(), keyReleaseEvent(), mousePressEvent(), mouseReleaseEvent(), and setChecked().
513
.SS "bool QwtLegendItem::isDown () const\fC [protected]\fP"
515
Return true, if the item is down.
517
Definition at line 572 of file qwt_legend_item.cpp.
519
Referenced by isChecked(), keyPressEvent(), and mousePressEvent().
520
.SS "void QwtLegendItem::paintEvent (QPaintEvent *)\fC [protected, virtual]\fP"
524
Reimplemented from \fBQwtTextLabel\fP.
526
Definition at line 385 of file qwt_legend_item.cpp.
528
References QwtTextLabel::drawContents(), drawIdentifier(), and QwtTextLabel::margin().
529
.SS "void QwtLegendItem::mousePressEvent (QMouseEvent *)\fC [protected, virtual]\fP"
531
Handle mouse press events.
533
Definition at line 428 of file qwt_legend_item.cpp.
535
References isDown(), and setDown().
536
.SS "void QwtLegendItem::mouseReleaseEvent (QMouseEvent *)\fC [protected, virtual]\fP"
538
Handle mouse release events.
540
Definition at line 451 of file qwt_legend_item.cpp.
542
References setDown().
543
.SS "void QwtLegendItem::keyPressEvent (QKeyEvent *)\fC [protected, virtual]\fP"
545
Handle key press events.
547
Definition at line 473 of file qwt_legend_item.cpp.
549
References isDown(), and setDown().
550
.SS "void QwtLegendItem::keyReleaseEvent (QKeyEvent *)\fC [protected, virtual]\fP"
552
Handle key release events.
554
Definition at line 499 of file qwt_legend_item.cpp.
556
References setDown().
557
.SS "void QwtLegendItem::drawText (QPainter *, const QRect &)\fC [protected, virtual]\fP"
561
Reimplemented from \fBQwtTextLabel\fP.
563
Definition at line 587 of file qwt_legend_item.cpp.
565
References QwtTextLabel::drawText().
569
Generated automatically by Doxygen for Qwt User's Guide from the source code.