QwtMarker(3)

NAME
QwtMarker - A class for drawing markers.

SYNOPSIS

#include <qwt_marker.h>

Inherited by QwtPlotMarker.

  Public Types
enum LineStyle { NoLine, HLine, VLine, Cross }

  Public Methods
QwtMarker ()
virtual ~QwtMarker ()
const QwtMarker & operator= (const QwtMarker &)
void setLineStyle (LineStyle st)
void setSymbol (const QwtSymbol &s)
void setLabel (const char *txt)
void setLabelAlignment (int align)
void setLabelPen (const QPen &p)
void setLinePen (const QPen &p)
void setFont (const QFont &f)
void draw (QPainter *p, int x, int y, const QRect &r)
LineStyle lineStyle () const
const QwtSymbol & symbol () const
const QPen & labelPen () const
const QPen & linePen () const
const QFont & font () const
int labelAlignment () const
const QString & label () const

  Protected Methods
virtual void markerChanged ()

DETAILED DESCRIPTION

A class for drawing markers.

 A marker can be a horizontal line, a vertical line, a symbol, a label or any combination of them, which can be drawn around a center point inside a bounding rectangle.

The setSymbol member assigns a symbol to the marker. The symbol is drawn at the specified point.

With setLabel, a label can be assigned to the marker. The setAlignment member specifies where the label is drawn. All the Align*-constants in qwindefs.h (see Qt documentation) are valid. The interpretation of the alignment depends on the marker's line style. The alignment refers to the center point of the marker, which means, for example, that the label would be printed left above the center point if the alignment was set to AlignLeft|AlignTop.

CONSTRUCTOR & DESTRUCTOR DOCUMENTATION

  QwtMarker::QwtMarker ()

Ctor.

  QwtMarker::~QwtMarker () [virtual]

Destructor.

MEMBER FUNCTION DOCUMENTATION

  void QwtMarker::draw (QPainter * p, int x, int y, const QRect & r)

Draw the marker.

Parameters:

p   Painter

x   X position

y   Y position

r   Bounding rectangle

  const QFont& QwtMarker::font () const

Returns:
the font used for the label

See also:
QwtMarker::setFont

  const QString& QwtMarker::label () const

Returns:
the label

See also:
QwtMarker::setLabel

  int QwtMarker::labelAlignment () const

Returns:
the label alignment

See also:
QwtMarker::setLabelAlignment

  const QPen& QwtMarker::labelPen () const

Returns:
the label's pen

See also:
QwtMarker::setLabelPen

  const QPen& QwtMarker::linePen () const

Returns:
the line pen

See also:
QwtMarker::setLinePen

  LineStyle QwtMarker::lineStyle () const

Returns:
the line style

See also:
For a description of line styles, see QwtMarker::setLineStyle

  virtual void QwtMarker::markerChanged () [protected, virtual]

Notify a change of parameters.

 This virtual function is called when a marker property has been changed and redrawing is advisable. It can be reimplemented by derived classes. The default implementation does nothing.

See also:
void QwtMarker::markerChanged()

  const QwtMarker & QwtMarker::operator= (const QwtMarker & m)

Assignment operator.

Parameters:

m   Marker

  void QwtMarker::setFont (const QFont & f)

Specify the font for the label.

Parameters:

f   New font

  void QwtMarker::setLabel (const char * txt)

Set the label.

Parameters:

txt label text

  void QwtMarker::setLabelAlignment (int align)

Set the alignment of the label.

 The alignment determines where the label is drawn relative to the marker's position.

Parameters:

align
    Alignment. A combination of AlignTop, AlignBottom, AlignLeft, AlignRight, AlignCenter, AlgnHCenter, AlignVCenter.

  void QwtMarker::setLabelPen (const QPen & p)

Specify a pen for the label.

Parameters:

p   New pen

  void QwtMarker::setLinePen (const QPen & p)

Specify a pen for the line.

Parameters:

p   New pen

  void QwtMarker::setLineStyle (QwtMarker::LineStyle st)

Set the line style.

Parameters:

st  Line style. Can be one of QwtMarker::NoLine, QwtMarker::HLine, QwtMarker::VLine or QwtMarker::Cross

  void QwtMarker::setSymbol (const QwtSymbol & s)

Assign a symbol.

Parameters:

s   New symbol

See also:
QwtSymbol

  const QwtSymbol& QwtMarker::symbol () const

Returns:
the symbol

See also:
QwtMarker::setSymbol, QwtSymbol

AUTHOR

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