QwtLegendLabel - A widget representing something on a QwtLegend.
Contents
Constructor & Destructor Documentation
QwtLegendLabel::QwtLegendLabel(QWidget*parent=0)[explicit]Parameters:parent Parent widget
Detailed Description
A widget representing something on a QwtLegend.
Member Function Documentation
constQwtLegendData&QwtLegendLabel::data()constReturns:
Attributes of the label
Seealso:setData(), QwtPlotItem::legendData()QPixmapQwtLegendLabel::icon()constReturns:
Pixmap representing a plot item
Seealso:setIcon()QwtLegendData::ModeQwtLegendLabel::itemMode()constReturns:
Item mode
Seealso:setItemMode()voidQwtLegendLabel::setChecked(boolon)[slot]
Check/Uncheck a the item
Parameters:on check/uncheck
Seealso:setItemMode()voidQwtLegendLabel::setData(constQwtLegendData&legendData)
Set the attributes of the legend label
Parameters:legendData Attributes of the label
Seealso:data()voidQwtLegendLabel::setIcon(constQPixmap&icon)
Assign the icon
Parameters:icon Pixmap representing a plot item
Seealso:icon(), QwtPlotItem::legendIcon()voidQwtLegendLabel::setItemMode(QwtLegendData::Modemode)
Set the item mode The default is QwtLegendData::ReadOnlyParameters:mode Item mode
Seealso:itemMode()voidQwtLegendLabel::setSpacing(intspacing)
Change the spacing between icon and text.
Parameters:spacing Spacing
Seealso:spacing(), QwtTextLabel::margin()voidQwtLegendLabel::setText(constQwtText&text)[virtual]
Set the text to the legend item
Parameters:text Text label
Seealso:QwtTextLabel::text()
Reimplemented from QwtTextLabel.
intQwtLegendLabel::spacing()constReturns:
Spacing between icon and text
Seealso:setSpacing(), QwtTextLabel::margin()Name
QwtLegendLabel - A widget representing something on a QwtLegend.
Synopsis
#include <qwt_legend_label.h>
Inherits QwtTextLabel.
PublicSlots
void setChecked (bool on)
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.
PublicMemberFunctionsQwtLegendLabel (QWidget *parent=0)
virtual ~QwtLegendLabel ()
Destructor.
void setData (const QwtLegendData &)
const QwtLegendData & data () const
void setItemMode (QwtLegendData::Mode)
QwtLegendData::ModeitemMode () const
void setSpacing (int spacing)
Change the spacing between icon and text.
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.
ProtectedMemberFunctions
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.
