QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
QwtDialNeedle Class Referenceabstract

Base class for needles that can be used in a QwtDial. More...

#include <qwt_dial_needle.h>

Inheritance diagram for QwtDialNeedle:
QwtCompassMagnetNeedle QwtCompassWindArrow QwtDialSimpleNeedle

Public Member Functions

 QwtDialNeedle ()
 Constructor.
 
virtual ~QwtDialNeedle ()
 Destructor.
 
virtual void setPalette (const QPalette &)
 Set the palette for the needle.
 
const QPalette & palette () const
 Return the palette of the needle.
 
virtual void draw (QPainter *, const QPointF &center, double length, double direction, QPalette::ColorGroup=QPalette::Active) const
 Draw the needle.
 

Protected Member Functions

virtual void drawNeedle (QPainter *painter, double length, QPalette::ColorGroup colorGroup) const =0
 Draw the needle.
 
virtual void drawKnob (QPainter *, double width, const QBrush &, bool sunken) const
 Draw the knob.
 

Detailed Description

Base class for needles that can be used in a QwtDial.

Constructor & Destructor Documentation

◆ QwtDialNeedle()

QwtDialNeedle::QwtDialNeedle ( )

Constructor.

Constructor .

◆ ~QwtDialNeedle()

QwtDialNeedle::~QwtDialNeedle ( )
virtual

Destructor.

Destructor .

Member Function Documentation

◆ draw()

void QwtDialNeedle::draw ( QPainter *  painter,
const QPointF &  center,
double  length,
double  direction,
QPalette::ColorGroup  colorGroup = QPalette::Active 
) const
virtual

Draw the needle.

◆ drawNeedle()

virtual void QwtDialNeedle::drawNeedle ( QPainter *  painter,
double  length,
QPalette::ColorGroup  colorGroup 
) const
protectedpure virtual

Draw the needle.

The origin of the needle is at position (0.0, 0.0 ) pointing in direction 0.0 ( = east ).

The painter is already initialized with translation and rotation.

Parameters
painterPainter
lengthLength of the needle
colorGroupColor group, used for painting
See also
setPalette(), palette()

Implemented in QwtDialSimpleNeedle, QwtCompassMagnetNeedle, and QwtCompassWindArrow.

◆ palette()

const QPalette & QwtDialNeedle::palette ( ) const

Return the palette of the needle.

◆ setPalette()

void QwtDialNeedle::setPalette ( const QPalette &  palette)
virtual

Set the palette for the needle.

Sets the palette for the needle.


The documentation for this class was generated from the following files: