man QwtLegendItem (Fonctions bibliothèques) -

NAME

QwtLegendItem -

SYNOPSIS



Inherited by QwtLegendButton, and QwtLegendLabel.

Detailed Description

A legend item

See also: QwtLegend, QwtCurve

Definition at line 41 of file qwt_legend.h.

Public Types

enum IdentifierMode { NoIdentifier = 0, ShowLine = 1, ShowSymbol = 2, ShowText = 4 }

Public Member Functions

QwtLegendItem ()

QwtLegendItem (const QwtSymbol &, const QPen &)

virtual ~QwtLegendItem ()

void setIdentifierMode (int)

int identifierMode () const

void setSymbol (const QwtSymbol &)

const QwtSymbol & symbol () const

void setCurvePen (const QPen &)

const QPen & curvePen () const

virtual void drawIdentifier (QPainter *, const QRect &) const

virtual void drawItem (QPainter *p, const QRect &) const

virtual void setTitle (const QString &)=0

virtual QString title () const =0

Protected Member Functions

virtual QwtText * titleText () const =0

virtual void updateItem ()

Member Enumeration Documentation

enum QwtLegendItem::IdentifierMode

Identifier mode.

Default is ShowLine | ShowText

See also: QwtLegendItem::identifierMode, QwtLegendItem::setIdentifierMode

Definition at line 51 of file qwt_legend.h.

Constructor & Destructor Documentation

QwtLegendItem::QwtLegendItem ()

Create an item with mode = ShowLine|ShowText and no pen.

Definition at line 25 of file qwt_legend.cpp.

QwtLegendItem::QwtLegendItem (const QwtSymbol & symbol, const QPen & curvePen)

Constructor with mode = ShowLine|ShowText

Parameters: symbol Symbol

curvePen Curve pen

Definition at line 36 of file qwt_legend.cpp.

QwtLegendItem::~QwtLegendItem () [virtual]

Destructor.

Definition at line 44 of file qwt_legend.cpp.

Member Function Documentation

const QPen & QwtLegendItem::curvePen () const

Returns: The curve pen.

See also: QwtLegendButton::setCurvePen()

Definition at line 117 of file qwt_legend.cpp.

Referenced by QwtPlotPrintFilter::apply(), and QwtPlotPrintFilter::reset().

void QwtLegendItem::drawIdentifier (QPainter * painter, const QRect & rect) const [virtual]

Paint the identifier to a given rect.

Parameters: painter Painter

rect Rect where to paint

Definition at line 132 of file qwt_legend.cpp.

References QwtSymbol::brush(), QwtSymbol::draw(), QwtPainter::drawLine(), QwtPainter::metricsMap(), QwtSymbol::pen(), QwtSymbol::size(), and QwtSymbol::style().

Referenced by QwtLegendLabel::drawContents(), drawItem(), and QwtLegendButton::updateIconset().

void QwtLegendItem::drawItem (QPainter * painter, const QRect & rect) const [virtual]

Draw the legend item to a given rect.

Parameters: painter Painter

rect Rect where to paint the button

Definition at line 188 of file qwt_legend.cpp.

References QwtText::draw(), drawIdentifier(), and QwtPainter::metricsMap().

Referenced by QwtPlot::printLegendItem().

int QwtLegendItem::identifierMode () const

Or'd values of IdentifierMode.

See also: QwtLegendButton::setIdentifierMode(), QwtLegendItem::IdentifierMode

Definition at line 68 of file qwt_legend.cpp.

void QwtLegendItem::setCurvePen (const QPen & pen)

Set curve pen.

Parameters: pen Curve pen

See also: QwtLegendItem::curvePen()

Definition at line 104 of file qwt_legend.cpp.

References updateItem().

Referenced by QwtPlotPrintFilter::apply(), QwtPlotPrintFilter::reset(), and QwtPlot::updateLegendItem().

void QwtLegendItem::setIdentifierMode (int mode)

Set identifier mode. Default is ShowLine | ShowText.

Parameters: mode Or'd values of IdentifierMode

See also: QwtLegendItem::identifierMode()

Definition at line 55 of file qwt_legend.cpp.

References updateItem().

Referenced by QwtPlot::updateLegendItem().

void QwtLegendItem::setSymbol (const QwtSymbol & symbol)

Set curve symbol.

Parameters: symbol Symbol

See also: QwtLegendItem::symbol()

Definition at line 79 of file qwt_legend.cpp.

References updateItem().

Referenced by QwtPlotPrintFilter::apply(), QwtPlotPrintFilter::reset(), and QwtPlot::updateLegendItem().

const QwtSymbol & QwtLegendItem::symbol () const

Returns: The curve symbol.

See also: QwtLegendButton::setSymbol()

Definition at line 92 of file qwt_legend.cpp.

Referenced by QwtPlotPrintFilter::apply(), and QwtPlotPrintFilter::reset().

void QwtLegendItem::updateItem () [protected, virtual]

Update the item.

Reimplemented in QwtLegendButton, and QwtLegendLabel.

Definition at line 123 of file qwt_legend.cpp.

Referenced by setCurvePen(), setIdentifierMode(), and setSymbol().

Author

Generated automatically by Doxygen for Qwt User's Guide from the source code.