Inheritance diagram for QwtDial:
QwtDial is intended as base class for dial widgets like speedometers, compass widgets, clocks ...
Qwt is missing a set of good looking needles (QwtDialNeedle). Contributions are very welcome.
Public Types | |
enum | Shadow { Plain = QFrame::Plain, Raised = QFrame::Raised, Sunken = QFrame::Sunken } |
enum | ScaleOptions { ScaleBackbone = 1, ScaleTicks = 2, ScaleLabel = 4 } |
enum | Mode { RotateNeedle, RotateScale } |
Public Member Functions | |
QwtDial (QWidget *parent=0, const char *name=0) | |
virtual | ~QwtDial () |
void | setFrameShadow (Shadow) |
Shadow | frameShadow () const |
bool | hasVisibleBackground () const |
void | showBackground (bool) |
void | setLineWidth (int) |
int | lineWidth () const |
void | setMode (Mode) |
Mode | mode () const |
virtual void | setWrapping (bool) |
bool | wrapping () const |
virtual void | setScale (int maxMajIntv, int maxMinIntv, double step=0.0) |
void | setScaleArc (double min, double max) |
void | setScaleOptions (int) |
void | setScaleTicks (int minLen, int medLen, int majLen, int penWidth=1) |
double | minScaleArc () const |
double | maxScaleArc () const |
virtual void | setOrigin (double) |
double | origin () const |
virtual void | setNeedle (QwtDialNeedle *) |
const QwtDialNeedle * | needle () const |
QwtDialNeedle * | needle () |
QRect | boundingRect () const |
QRect | contentsRect () const |
virtual QRect | scaleContentsRect () const |
virtual QSize | sizeHint () const |
virtual QSize | minimumSizeHint () const |
virtual void | setScaleDraw (QwtDialScaleDraw *) |
QwtDialScaleDraw * | scaleDraw () |
const QwtDialScaleDraw * | scaleDraw () const |
Protected Member Functions | |
virtual void | paintEvent (QPaintEvent *) |
virtual void | resizeEvent (QResizeEvent *) |
virtual void | keyPressEvent (QKeyEvent *) |
virtual void | drawFrame (QPainter *p) |
virtual void | drawContents (QPainter *) const |
virtual void | drawFocusIndicator (QPainter *) const |
virtual void | drawScale (QPainter *, const QPoint ¢er, int radius, double origin, double arcMin, double arcMax) const |
virtual void | drawScaleContents (QPainter *painter, const QPoint ¢er, int radius) const |
virtual void | drawNeedle (QPainter *, const QPoint &, int radius, double direction, QPalette::ColorGroup) const |
virtual QString | scaleLabel (double) const |
void | updateScale () |
virtual void | rangeChange () |
virtual void | valueChange () |
virtual double | getValue (const QPoint &) |
virtual void | getScrollMode (const QPoint &, int &scrollMode, int &direction) |
Friends | |
class | QwtDialScaleDraw |
|
In case of RotateNeedle the needle is rotating, in case of RotateScale, the needle points to origin() and the scale is rotating. |
|
|
|
Frame shadow. Unfortunately it is not possible to use QFrame::Shadow as a property of a widget that is not derived from QFrame. The following enum is made for the designer only. It is safe to use QFrame::Shadow instead. |
|
Constructor.
|
|
Destructor.
|
|
|
|
|
|
Draw the contents inside the frame. QColorGroup::Background is the background color outside of the frame. QColorGroup::Base is the background color inside the frame. QColorGroup::Foreground is the background color inside the scale.
|
|
Draw a dotted round circle, if !isReadOnly()
|
|
Draw the frame around the dial
|
|
Draw the needle Qwt is missing a set of good looking needles. Contributions are very welcome.
Reimplemented in QwtAnalogClock. |
|
Draw the scale
|
|
Draw the contents inside the scale Paints nothing.
Reimplemented in QwtCompass. |
|
|
|
Implements QwtSliderBase. |
|
Find the value for a given position
Implements QwtSliderBase. |
|
TRUE when the area outside of the frame is visible
|
|
Handles key events
Reimplemented from QwtSliderBase. Reimplemented in QwtCompass. |
|
|
|
Return the upper limit of the scale arc.
|
|
Return a minimum size hint.
|
|
Return the lower limit of the scale arc.
|
|
The default mode is QwtDial::RotateNeedle.
|
|
|
|
|
|
The origin is the angle where scale and needle is relative to.
|
|
Repaint the dial.
|
|
QwtDblRange update hook.
Reimplemented from QwtDblRange. |
|
Resize the dial widget.
|
|
|
|
Return the scale draw.
|
|
Return the scale draw.
|
|
Reimplemented in QwtAnalogClock, and QwtCompass. |
|
Sets the frame shadow value from the frame style.
|
|
Sets the line width
|
|
Change the mode of the meter.
The default mode is QwtDial::RotateNeedle.
|
|
Set a needle for the dial Qwt is missing a set of good looking needles. Contributions are very welcome.
|
|
Change the origin. The origin is the angle where scale and needle is relative to.
|
|
Change the intervals of the scale
|
|
Change the arc of the scale
|
|
Set an individual scale draw
|
|
A wrapper method for accessing the scale draw.
|
|
See: QwtScaleDraw::setTickLength, QwtDialScaleDraw::setPenWidth.
|
|
Sets whether it is possible to step the value from the highest value to the lowest value and vice versa to on.
|
|
Show/Hide the area outside of the frame
|
|
|
|
Update the scale with the current attributes
|
|
QwtDblRange update hook.
Reimplemented from QwtSliderBase. |
|
wrapping() holds whether it is possible to step the value from the highest value to the lowest value and vice versa.
|