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

A needle for dial widgets. More...

#include <qwt_dial_needle.h>

Inheritance diagram for QwtDialSimpleNeedle:
QwtDialNeedle

Public Types

enum  Style { Arrow , Ray }
 Style of the needle.
 

Public Member Functions

 QwtDialSimpleNeedle (Style, bool hasKnob=true, const QColor &mid=Qt::gray, const QColor &base=Qt::darkGray)
 Constructor.
 
void setWidth (double width)
 Set the width of the needle.
 
double width () const
 Return the width of the needle.
 
- Public Member Functions inherited from QwtDialNeedle
 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.
 
void setFlatStyle (bool)
 Set flat style.
 
bool flatStyle () const
 Return flat style.
 
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 *, double length, QPalette::ColorGroup) const override
 Draw the needle.
 
- Protected Member Functions inherited from QwtDialNeedle
virtual void drawKnob (QPainter *, double width, const QBrush &, bool sunken) const
 Draw the knob.
 

Additional Inherited Members

- Protected Attributes inherited from QwtDialNeedle
QPalette m_palette
 
bool m_flatStyle
 

Detailed Description

A needle for dial widgets.

The following colors are used:

Constructor & Destructor Documentation

◆ QwtDialSimpleNeedle()

QwtDialSimpleNeedle::QwtDialSimpleNeedle ( Style  style,
bool  hasKnob = true,
const QColor &  mid = Qt::gray,
const QColor &  base = Qt::darkGray 
)

Constructor.

Parameters
[in]styleStyle
[in]hasKnobWith/Without knob
[in]midMiddle color
[in]baseBase color

Member Function Documentation

◆ drawNeedle()

void QwtDialSimpleNeedle::drawNeedle ( QPainter *  painter,
double  length,
QPalette::ColorGroup  colorGroup 
) const
overrideprotectedvirtual

Draw the needle.

Parameters
painterPainter
lengthLength of the needle
colorGroupColor group, used for painting

Implements QwtDialNeedle.

◆ setWidth()

void QwtDialSimpleNeedle::setWidth ( double  width)

Set the width of the needle.

Parameters
[in]widthWidth
See also
width()

◆ width()

double QwtDialSimpleNeedle::width ( ) const

Return the width of the needle.

Returns
Width of the needle
See also
setWidth()

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