Logo Search packages:      
Sourcecode: pcp-gui version File versions

QwtLegendItem Class Reference

#include <qwt_legend_item.h>

Inheritance diagram for QwtLegendItem:


List of all members.

Detailed Description

A legend label.

QwtLegendItem 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.

See also:
QwtLegend, QwtPlotCurve

Definition at line 35 of file qwt_legend_item.h.

Public Types

enum  IdentifierMode { NoIdentifier = 0, ShowLine = 1, ShowSymbol = 2, ShowText = 4 }
 Identifier mode. More...

Public Slots

void clear ()
 Clear the text and all QwtText attributes.
void setChecked (bool on)
void setText (const QString &, QwtText::TextFormat textFormat=QwtText::AutoText)


void checked (bool)
 Signal, when the legend item has been toggled.
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 relased.

Public Member Functions

bool active () const
 Return label's text enabled state.
const QPen & curvePen () const
virtual void drawIdentifier (QPainter *, const QRect &) const
virtual void drawItem (QPainter *p, const QRect &) const
virtual int heightForWidth (int) const
int identifierMode () const
int identifierWidth () const
int indent () const
bool isChecked () const
QwtLegend::LegendItemMode itemMode () const
int margin () const
virtual QSize minimumSizeHint () const
 Return a minimum size hint.
 QwtLegendItem (const QwtSymbol &, const QPen &, const QwtText &, QWidget *parent=0)
 QwtLegendItem (QWidget *parent=0)
void setActive (bool)
void setCurvePen (const QPen &)
void setIdentfierWidth (int width)
void setIdentifierMode (int)
void setIndent (int)
void setItemMode (QwtLegend::LegendItemMode)
void setMargin (int)
void setSpacing (int spacing)
void setSymbol (const QwtSymbol &)
virtual void setText (const QwtText &)
virtual QSize sizeHint () const
 Return label's margin in pixels.
int spacing () const
const QwtSymbolsymbol () const
const QwtTexttext () const
 Return the text.
QRect textRect () const
virtual ~QwtLegendItem ()

Protected Member Functions

virtual void drawContents (QPainter *)
 Redraw the text and focus indicator.
virtual void drawText (QPainter *, const QRect &)
 Redraw the text.
bool isDown () const
virtual void keyPressEvent (QKeyEvent *)
virtual void keyReleaseEvent (QKeyEvent *)
virtual void mousePressEvent (QMouseEvent *)
virtual void mouseReleaseEvent (QMouseEvent *)
virtual void paintEvent (QPaintEvent *)
 Qt paint event.
void setDown (bool)


int indent
 Return label's text indent in pixels.
int margin
 Return label's text indent in pixels.

Private Member Functions

void init (const QwtText &)

Private Attributes

PrivateData * d_data


class  PrivateData

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index