|
Qwt User's Guide
6.1.3
|
A widget representing something on a QwtLegend. More...
#include <qwt_legend_label.h>

Public Slots | |
| void | setChecked (bool on) |
Public Slots inherited from QwtTextLabel | |
| void | setText (const QString &, QwtText::TextFormat textFormat=QwtText::AutoText) |
| void | clear () |
| Clear the text and all QwtText attributes. | |
Signals | |
| void | clicked () |
| Signal, when the legend item has been clicked. | |
| void | pressed () |
| Signal, when the legend item has been pressed. | |
| void | released () |
| Signal, when the legend item has been released. | |
| void | checked (bool) |
| Signal, when the legend item has been toggled. | |
Public Member Functions | |
| QwtLegendLabel (QWidget *parent=0) | |
| virtual | ~QwtLegendLabel () |
| Destructor. | |
| void | setData (const QwtLegendData &) |
| const QwtLegendData & | data () const |
| void | setItemMode (QwtLegendData::Mode) |
| QwtLegendData::Mode | itemMode () const |
| void | setSpacing (int spacing) |
| Change the spacing between icon and text. More... | |
| int | spacing () const |
| virtual void | setText (const QwtText &) |
| void | setIcon (const QPixmap &) |
| QPixmap | icon () const |
| virtual QSize | sizeHint () const |
| Return a size hint. | |
| bool | isChecked () const |
| Return true, if the item is checked. | |
Public Member Functions inherited from QwtTextLabel | |
| QwtTextLabel (QWidget *parent=NULL) | |
| QwtTextLabel (const QwtText &, QWidget *parent=NULL) | |
| virtual | ~QwtTextLabel () |
| Destructor. | |
| void | setPlainText (const QString &) |
| QString | plainText () const |
| const QwtText & | text () const |
| Return the text. | |
| int | indent () const |
| Return label's text indent in pixels. | |
| void | setIndent (int) |
| int | margin () const |
| Return label's text margin in pixels. | |
| void | setMargin (int) |
| virtual QSize | minimumSizeHint () const |
| Return a minimum size hint. | |
| virtual int | heightForWidth (int) const |
| QRect | textRect () const |
| virtual void | drawText (QPainter *, const QRectF &) |
| Redraw the text. | |
Protected Member Functions | |
| void | setDown (bool) |
| Set the item being down. | |
| bool | isDown () const |
| Return true, if the item is down. | |
| virtual void | paintEvent (QPaintEvent *) |
| Paint event. | |
| virtual void | mousePressEvent (QMouseEvent *) |
| Handle mouse press events. | |
| virtual void | mouseReleaseEvent (QMouseEvent *) |
| Handle mouse release events. | |
| virtual void | keyPressEvent (QKeyEvent *) |
| Handle key press events. | |
| virtual void | keyReleaseEvent (QKeyEvent *) |
| Handle key release events. | |
Protected Member Functions inherited from QwtTextLabel | |
| virtual void | drawContents (QPainter *) |
| Redraw the text and focus indicator. | |
A widget representing something on a QwtLegend.
|
explicit |
| parent | Parent widget |
| const QwtLegendData & QwtLegendLabel::data | ( | ) | const |
| QPixmap QwtLegendLabel::icon | ( | ) | const |
| QwtLegendData::Mode QwtLegendLabel::itemMode | ( | ) | const |
|
slot |
| void QwtLegendLabel::setData | ( | const QwtLegendData & | legendData | ) |
| void QwtLegendLabel::setIcon | ( | const QPixmap & | icon | ) |
Assign the icon
| icon | Pixmap representing a plot item |
| void QwtLegendLabel::setItemMode | ( | QwtLegendData::Mode | mode | ) |
Set the item mode The default is QwtLegendData::ReadOnly
| mode | Item mode |
| void QwtLegendLabel::setSpacing | ( | int | spacing | ) |
Change the spacing between icon and text.
| spacing | Spacing |
|
virtual |
Set the text to the legend item
| text | Text label |
Reimplemented from QwtTextLabel.
| int QwtLegendLabel::spacing | ( | ) | const |