NAME
QwtDialNeedle -
SYNOPSIS
Inherited by QwtCompassMagnetNeedle, QwtCompassWindArrow, and
QwtDialSimpleNeedle.
Detailed Description
Base class for needles that can be used in a QwtDial.
QwtDialNeedle is a pointer that indicates a value by pointing to a
specific direction.
Qwt is missing a set of good looking needles. Contributions are very
welcome.
See also:
QwtDial, QwtCompass
Definition at line 31 of file qwt_dial_needle.h.
Public Member Functions
QwtDialNeedle ()
virtual ~QwtDialNeedle ()
virtual void draw (QPainter *painter, const QPoint ¢er, int length,
double direction, QPalette::ColorGroup cg=QPalette::Active) const
=0
virtual void setPalette (const QPalette &)
const QPalette & palette () const
Protected Member Functions
const QColorGroup & colorGroup (QPalette::ColorGroup) const
Static Protected Member Functions
void drawKnob (QPainter *, const QPoint &pos, int width, const QBrush
&, bool sunken)
Constructor & Destructor Documentation
QwtDialNeedle::QwtDialNeedle ()
Constructor.
Definition at line 18 of file qwt_dial_needle.cpp.
QwtDialNeedle::~QwtDialNeedle () [virtual]
Destructor.
Definition at line 24 of file qwt_dial_needle.cpp.
Member Function Documentation
const QColorGroup & QwtDialNeedle::colorGroup (QPalette::ColorGroup cg)
const [protected]
Parameters:
cg Identifier of the color group
Returns:
The color group of the palette.
Definition at line 85 of file qwt_dial_needle.cpp.
Referenced by QwtCompassWindArrow::draw(),
QwtCompassMagnetNeedle::draw(), and QwtDialSimpleNeedle::draw().
virtual void QwtDialNeedle::draw (QPainter * painter, const QPoint &
center, int length, double direction, QPalette::ColorGroup cg =
QPalette::Active) const [pure virtual]
Draw the needle
Parameters:
painter Painter
center Center of the dial, start position for the needle
length Length of the needle
direction Direction of the needle, in degrees counter clockwise
cg Color group, used for painting
Implemented in QwtDialSimpleNeedle, QwtCompassMagnetNeedle, and
QwtCompassWindArrow.
Referenced by QwtAnalogClock::drawHand(), and QwtDial::drawNeedle().
void QwtDialNeedle::drawKnob (QPainter *, const QPoint & pos, int width,
const QBrush &, bool sunken) [static, protected]
Draw the knob.
Definition at line 47 of file qwt_dial_needle.cpp.
Referenced by QwtDialSimpleNeedle::drawArrowNeedle(),
QwtDialSimpleNeedle::drawRayNeedle(), and
QwtCompassMagnetNeedle::drawThinNeedle().
const QPalette & QwtDialNeedle::palette () const
Returns:
the palette of the needle.
Definition at line 41 of file qwt_dial_needle.cpp.
void QwtDialNeedle::setPalette (const QPalette & palette) [virtual]
Sets the palette for the needle.
Parameters:
palette New Palette
Definition at line 33 of file qwt_dial_needle.cpp.
Referenced by QwtCompassMagnetNeedle::QwtCompassMagnetNeedle(),
QwtCompassWindArrow::QwtCompassWindArrow(), and
QwtDialSimpleNeedle::QwtDialSimpleNeedle().
Author
Generated automatically by Doxygen for Qwt User’s Guide from the source
code.