QwtDial(3) | Qwt User's Guide | QwtDial(3) |
QwtDial -
#include <qwt_dial.h>
Inherits QwtAbstractSlider.
Inherited by QwtAnalogClock, and QwtCompass.
enum Direction { Clockwise, CounterClockwise
}
enum Mode { RotateNeedle, RotateScale }
enum ScaleOptions { ScaleBackbone = 1, ScaleTicks = 2,
ScaleLabel = 4 }
enum Shadow { Plain = QFrame::Plain, Raised =
QFrame::Raised, Sunken = QFrame::Sunken }
QwtDial (QWidget *parent=NULL)
virtual ~QwtDial ()
QRect boundingRect () const
QRect contentsRect () const
Direction direction () const
Shadow frameShadow () const
bool hasVisibleBackground () const
int lineWidth () const
double maxScaleArc () const
virtual QSize minimumSizeHint () const
double minScaleArc () const
Mode mode () const
const QwtDialNeedle * needle () const
QwtDialNeedle * needle ()
double origin () const
virtual QRect scaleContentsRect () const
QwtDialScaleDraw * scaleDraw ()
const QwtDialScaleDraw * scaleDraw () const
void setDirection (Direction)
void setFrameShadow (Shadow)
void setLineWidth (int)
void setMode (Mode)
virtual void setNeedle (QwtDialNeedle *)
virtual void setOrigin (double)
virtual void setScale (int maxMajIntv, int maxMinIntv, double
step=0.0)
void setScaleArc (double min, double max)
virtual void setScaleDraw (QwtDialScaleDraw *)
void setScaleOptions (int)
void setScaleTicks (int minLen, int medLen, int majLen, int penWidth=1)
virtual void setWrapping (bool)
void showBackground (bool)
virtual QSize sizeHint () const
bool wrapping () const
virtual void drawContents (QPainter *) const
virtual void drawFocusIndicator (QPainter *) const
virtual void drawFrame (QPainter *p)
virtual void drawNeedle (QPainter *, const QPoint &, int radius,
double direction, QPalette::ColorGroup) 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 getScrollMode (const QPoint &, int &scrollMode,
int &direction)
virtual double getValue (const QPoint &)
virtual void keyPressEvent (QKeyEvent *)
virtual void paintEvent (QPaintEvent *)
virtual void rangeChange ()
virtual void resizeEvent (QResizeEvent *)
virtual QwtText scaleLabel (double) const
virtual void updateMask ()
void updateScale ()
virtual void valueChange ()
class QwtDialScaleDraw
QwtDial class provides a rounded range control.
QwtDial is intended as base class for dial widgets like speedometers, compass widgets, clocks ...
A dial contains a scale and a needle indicating the current value of the dial. Depending on Mode one of them is fixed and the other is rotating. If not isReadOnly() the dial can be rotated by dragging the mouse or using keyboard inputs (see keyPressEvent()). A dial might be wrapping, what means a rotation below/above one limit continues on the other limit (f.e compass). The scale might cover any arc of the dial, its values are related to the origin() of the dial.
Qwt is missing a set of good looking needles (QwtDialNeedle). Contributions are very welcome.
See also:
Note:
Direction of the dial
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. Parameters:
Create a dial widget with no scale and no needle. The default origin is 90.0 with no valid value. It accepts mouse and keyboard inputs and has no step size. The default mode is QwtDial::RotateNeedle.
Returns:
See also:
Returns:
See also:
Returns:
The default direction of a dial is QwtDial::Clockwise
See also:
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.
Parameters:
See also:
Draw a dotted round circle, if !isReadOnly()
Parameters:
Draw the frame around the dial
Parameters:
See also:
Draw the needle
Parameters:
Reimplemented in QwtAnalogClock.
Draw the scale
Parameters:
See also:
Draw the contents inside the scale
Paints nothing.
Parameters:
Reimplemented in QwtCompass.
Returns:
See QwtAbstractSlider::getScrollMode()
Parameters:
Return values:
See also:
Implements QwtAbstractSlider.
Find the value for a given position
Parameters:
Returns:
Implements QwtAbstractSlider.
true when the area outside of the frame is visible
See also:
Handles key events
Parameters:
See also:
Reimplemented from QwtAbstractSlider.
Reimplemented in QwtCompass.
Returns:
See also:
Returns:
Return a minimum size hint. Warning:
Returns:
Returns:
The value of the dial is indicated by the difference between the origin and the direction of the needle. In case of QwtDial::RotateNeedle the scale arc is fixed to the origin() and the needle is rotating, in case of QwtDial::RotateScale, the needle points to origin() and the scale is rotating.
The default mode is QwtDial::RotateNeedle.
See also:
Returns:
See also:
Returns:
See also:
The origin is the angle where scale and needle is relative to.
Returns:
See also:
Paint the dial
Parameters:
Resize the dial widget
Parameters:
Returns:
See also:
Find the label for a value
Parameters:
Returns:
Reimplemented in QwtAnalogClock, and QwtCompass.
Set the direction of the dial (clockwise/counterclockwise)
Direction direction
See also:
Sets the frame shadow value from the frame style.
Parameters:
See also:
Sets the line width
Parameters:
See also:
Change the mode of the meter. Parameters:
The value of the meter is indicated by the difference between north of the scale and the direction of the needle. In case of QwtDial::RotateNeedle north is pointing to the origin() and the needle is rotating, in case of QwtDial::RotateScale, the needle points to origin() and the scale is rotating.
The default mode is QwtDial::RotateNeedle.
See also:
Set a needle for the dial
Qwt is missing a set of good looking needles. Contributions are very welcome.
Parameters:
Warning:
Change the origin. The origin is the angle where scale and needle is relative to.
Parameters:
See also:
Change the intervals of the scale
See also:
Change the arc of the scale
Parameters:
Set an individual scale draw
Parameters:
Warning:
A wrapper method for accessing the scale draw.
See also:
Assign length and width of the ticks
Parameters:
See also:
Sets whether it is possible to step the value from the highest value to the lowest value and vice versa to on.
Parameters:
See also:
Note:
Show/Hide the area outside of the frame
Parameters:
See also:
Warning:
Returns:
Update the mask of the dial. In case of 'hasVisibleBackground() == false', the backgound is transparent by a mask.
See also:
Update the scale with the current attributes
See also:
wrapping() holds whether it is possible to step the value from the highest value to the lowest value and vice versa.
See also:
Note:
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Tue Nov 20 2012 | Version 5.2.3 |