Qwt User's Guide  5.2.3
Public Member Functions | Static Public Member Functions
QwtSimpleCompassRose Class Reference

#include <qwt_compass_rose.h>

Inheritance diagram for QwtSimpleCompassRose:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 QwtSimpleCompassRose (int numThorns=8, int numThornLevels=-1)
virtual void draw (QPainter *, const QPoint &center, int radius, double north, QPalette::ColorGroup=QPalette::Active) const
int numThornLevels () const
int numThorns () const
void setNumThornLevels (int count)
void setNumThorns (int count)
void setShrinkFactor (double factor)
void setWidth (double w)
double shrinkFactor () const
double width () const
- Public Member Functions inherited from QwtCompassRose
const QPalette & palette () const
virtual void setPalette (const QPalette &p)

Static Public Member Functions

static void drawRose (QPainter *, const QPalette &, const QPoint &center, int radius, double origin, double width, int numThorns, int numThornLevels, double shrinkFactor)

Detailed Description

A simple rose for QwtCompass.


Constructor & Destructor Documentation

QwtSimpleCompassRose::QwtSimpleCompassRose ( int  numThorns = 8,
int  numThornLevels = -1 
)

Constructor

Parameters:
numThornsNumber of thorns
numThornLevelsNumber of thorn levels

Member Function Documentation

void QwtSimpleCompassRose::draw ( QPainter *  painter,
const QPoint &  center,
int  radius,
double  north,
QPalette::ColorGroup  cg = QPalette::Active 
) const
virtual

Draw the rose

Parameters:
painterPainter
centerCenter point
radiusRadius of the rose
northPosition
cgColor group

Implements QwtCompassRose.

void QwtSimpleCompassRose::drawRose ( QPainter *  painter,
const QPalette &  palette,
const QPoint &  center,
int  radius,
double  north,
double  width,
int  numThorns,
int  numThornLevels,
double  shrinkFactor 
)
static

Draw the rose

Parameters:
painterPainter
palettePalette
centerCenter of the rose
radiusRadius of the rose
northPosition pointing to north
widthWidth of the rose
numThornsNumber of thorns
numThornLevelsNumber of thorn levels
shrinkFactorFactor to shrink the thorns with each level
int QwtSimpleCompassRose::numThornLevels ( ) const
Returns:
Number of thorn levels
See also:
setNumThorns(), setNumThornLevels()
int QwtSimpleCompassRose::numThorns ( ) const
Returns:
Number of thorns
See also:
setNumThorns(), setNumThornLevels()
void QwtSimpleCompassRose::setNumThornLevels ( int  numThornLevels)

Set the of thorns levels

Parameters:
numThornLevelsNumber of thorns levels
See also:
setNumThorns(), numThornLevels()
void QwtSimpleCompassRose::setNumThorns ( int  numThorns)

Set the number of thorns on one level The number is aligned to a multiple of 4, with a minimum of 4

Parameters:
numThornsNumber of thorns
See also:
numThorns(), setNumThornLevels()
void QwtSimpleCompassRose::setWidth ( double  width)

Set the width of the rose heads. Lower value make thinner heads. The range is limited from 0.03 to 0.4.

Parameters:
widthWidth
double QwtSimpleCompassRose::width ( ) const
inline
See also:
setWidth()