QwtSymbol(3)

NAME
QwtSymbol - A class for drawing symbols.

SYNOPSIS

#include <qwt_symbol.h>

  Public Types
enum Style { None, Ellipse, Rect, Diamond, Triangle, DTriangle, UTriangle, LTriangle, RTriangle, Cross, XCross, StyleCnt }

  Public Methods
QwtSymbol ()
QwtSymbol (Style st, const QBrush &bd, const QPen &pn, const QSize &s)
virtual ~QwtSymbol ()
void setSize (const QSize &s)
void setSize (int a, int b=-1)
void setBrush (const QBrush &b)
void setPen (const QPen &p)
void setStyle (Style s)
const QBrush & brush () const
const QPen & pen () const
const QSize & size () const
Style style () const
void draw (QPainter *p, const QPoint &pt)
void draw (QPainter *p, int x, int y)
virtual void draw (QPainter *p, const QRect &r)

  Protected Attributes
QBrush d_brush
QPen d_pen
QSize d_size
QPointArray d_pa
Style d_style

DETAILED DESCRIPTION

A class for drawing symbols.

CONSTRUCTOR & DESTRUCTOR DOCUMENTATION

  QwtSymbol::QwtSymbol ()

Default Constructor.

 The symbol is constructed with gray interior, black outline with zero width, no size and style 'None'.

  QwtSymbol::QwtSymbol (QwtSymbol::Style st, const QBrush & br, const QPen & pn, const QSize & s)

Constructor.

Parameters:

st  Symbol Style

bd  brush to fill the interior

pn  outline pen

size
    size

  QwtSymbol::~QwtSymbol () [virtual]

Destructor.

MEMBER FUNCTION DOCUMENTATION

  void QwtSymbol::draw (QPainter * p, const QRect & r) [virtual]

Draw the symbol into a bounding rectangle.

 This function overrides the symbol's size settings, but it doesn't modify them.

Parameters:

p   Painter

r   Bounding rectangle

  void QwtSymbol::draw (QPainter * p, int x, int y)

Draw the symbol at a point (x,y).

 The point (x,y) is the upper left corner of a rectangle with the symbol's size.

  void QwtSymbol::draw (QPainter * p, const QPoint & pt)

Draw the symbol at a specified point.

 The point specifies the upper left corner of a rectangle with the symbol's size.

Parameters:

p   painter

pt  point

  void QwtSymbol::setBrush (const QBrush & br)

Assign a brush.

 The brush is used to draw the interior of the symbol.

Parameters:

br  brush

  void QwtSymbol::setPen (const QPen & pn)

Assign a pen.

 The pen is used to draw the symbol's outline.

Parameters:

pn  pen

  void QwtSymbol::setSize (int w, int h = -1)

Specify the symbol's size.

 If the 'h' parameter is left out or less than 0, and the 'w' parameter is greater than or equal to 0, the symbol size will be set to (w,w).

Parameters:

w   width

h   height (defaults to -1)

  void QwtSymbol::setSize (const QSize & s)

Set the symbol's size.

  void QwtSymbol::setStyle (QwtSymbol::Style s)

Specify the symbol style.

 The following styles are defined:

QwtSymbol::None
    No Style. The symbol cannot be drawn.

QwtSymbol::Ellipse
    Ellipse or circle

QwtSymbol::Rect
    Rectangle

QwtSymbol::Diamond
    Diamond

QwtSymbol::Triangle
    Triangle pointing upwards

QwtSymbol::DTriangle
    Triangle pointing downwards

QwtSymbol::UTriangle
    Triangle pointing upwards

QwtSymbol::LTriangle
    Triangle pointing left

QwtSymbol::RTriangle
    Triangle pointing right

QwtSymbol::Cross
    Cross

QwtSymbol::XCross
    Diagonal cross

Parameters:

s   style

AUTHOR

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