#include <qwt_dial.h>
Inheritance diagram for QwtDial:

Public Types | |
| enum | Shadow { Plain = QFrame::Plain, Raised = QFrame::Raised, Sunken = QFrame::Sunken } |
| 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 |
| void | setWrapping (bool) |
| bool | wrapping () const |
| void | setScale (int maxMajIntv, int maxMinIntv, double step=0.0) |
| void | setScaleArc (double min, double max) |
| double | minScaleArc () const |
| double | maxScaleArc () const |
| void | setOrigin (double) |
| double | origin () const |
| 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 |
Protected Member Functions | |
| virtual void | paintEvent (QPaintEvent *) |
| virtual void | resizeEvent (QResizeEvent *) |
| virtual void | drawFrame (QPainter *p) |
| virtual void | drawContents (QPainter *) const |
| virtual void | drawScale (QPainter *, const QPoint ¢er, int radius, double origin, double arcMin, double arcMax) const |
| virtual void | drawScaleContents (QPainter *, const QPoint ¢er, int radius) const |
| virtual void | drawNeedle (QPainter *, const QPoint &, int radius, double direction, QPalette::ColorGroup) const |
| virtual void | setScaleDraw (QwtDialScaleDraw *) |
| QwtDialScaleDraw * | scaleDraw () |
| const QwtDialScaleDraw * | scaleDraw () 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) |
Private Attributes | |
| Q_OBJECT friend class | QwtDialScaleDraw |
| bool | d_visibleBackground |
| Shadow | d_frameShadow |
| int | d_lineWidth |
| Mode | d_mode |
| bool | d_wrapping |
| double | d_origin |
| double | d_minScaleArc |
| double | d_maxScaleArc |
| QwtDialScaleDraw * | d_scaleDraw |
| int | d_maxMajIntv |
| int | d_maxMinIntv |
| double | d_scaleStep |
| QwtDialNeedle * | d_needle |
|
|
Definition at line 64 of file qwt_dial.h. Referenced by mode(). |
|
|
Definition at line 48 of file qwt_dial.h. Referenced by frameShadow(). |
|
||||||||||||
|
Constructor.
Definition at line 44 of file qwt_dial.cpp. References d_scaleDraw, QwtDialScaleDraw, QwtScaleDraw::Round, QwtScaleDraw::setGeometry(), QwtDblRange::setRange(), and setScaleArc(). |
|
|
Destructor.
Definition at line 84 of file qwt_dial.cpp. References d_needle, and d_scaleDraw. |
|
|
Definition at line 209 of file qwt_dial.cpp. Referenced by contentsRect(), drawFrame(), resizeEvent(), and showBackground(). |
|
|
Definition at line 191 of file qwt_dial.cpp. References boundingRect(), and lineWidth(). Referenced by drawContents(), getScrollMode(), paintEvent(), and scaleContentsRect(). |
|
|
Draw the contents inside of the frame. QColorGroup::Backgound 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.
Definition at line 390 of file qwt_dial.cpp. References contentsRect(), d_maxScaleArc, d_minScaleArc, d_origin, drawNeedle(), drawScale(), drawScaleContents(), QwtDblRange::isValid(), QwtDblRange::maxValue(), QwtDblRange::minValue(), mode(), origin(), RotateScale, scaleContentsRect(), and QwtDblRange::value(). Referenced by paintEvent(). |
|
|
Draw the compass frame
Definition at line 351 of file qwt_dial.cpp. References boundingRect(), d_frameShadow, QwtPainter::drawRoundFrame(), and lineWidth(). Referenced by paintEvent(). |
|
||||||||||||||||||||||||
|
Draw the needle
Definition at line 475 of file qwt_dial.cpp. References d_needle, and QwtDialNeedle::draw(). Referenced by drawContents(). |
|
||||||||||||||||||||||||||||
|
Definition at line 485 of file qwt_dial.cpp. References d_scaleDraw, QwtScaleDraw::draw(), QwtScaleDraw::Round, QwtScaleDraw::setAngleRange(), and QwtScaleDraw::setGeometry(). Referenced by drawContents(). |
|
||||||||||||||||
|
Draw the contents inside the scale
Reimplemented in QwtCompass. Definition at line 527 of file qwt_dial.cpp. Referenced by drawContents(). |
|
|
Definition at line 153 of file qwt_dial.cpp. References d_frameShadow, and Shadow. |
|
||||||||||||||||
|
Determine what to do when the user presses a mouse button. This function is abstract and has to be implemented by derived classes. It is called on a mousePress event. The derived class can determine what should happen next in dependence of the position where the mouse was pressed by returning scrolling mode and direction. QwtSliderBase knows the following modes:
Implements QwtSliderBase. Definition at line 736 of file qwt_dial.cpp. References contentsRect(), QwtSliderBase::ScrMouse, and QwtSliderBase::ScrNone. |
|
|
Determine the value corresponding to a specified poind. This is an abstract virtual function which is called when the user presses or releases a mouse button or moves the mouse. It has to be implemented by the derived class.
Implements QwtSliderBase. Definition at line 703 of file qwt_dial.cpp. References d_maxScaleArc, d_minScaleArc, QwtSliderBase::d_mouseOffset, d_origin, QwtSliderBase::d_scrollMode, line2Radians(), QwtDblRange::maxValue(), QwtDblRange::minValue(), mode(), RotateScale, QwtSliderBase::ScrMouse, and QwtDblRange::value(). |
|
|
TRUE when the area outside of the compass frame is visible
Definition at line 126 of file qwt_dial.cpp. References d_visibleBackground. Referenced by resizeEvent(). |
|
|
Definition at line 181 of file qwt_dial.cpp. References d_lineWidth. Referenced by contentsRect(), drawFrame(), minimumSizeHint(), setFrameShadow(), and sizeHint(). |
|
|
Definition at line 98 of file qwt_dial.h. |
|
|
Return a minimum size hint.
Definition at line 674 of file qwt_dial.cpp. References d_scaleDraw, lineWidth(), and QwtScaleDraw::minHeight(). |
|
|
Definition at line 97 of file qwt_dial.h. |
|
|
Definition at line 284 of file qwt_dial.cpp. Referenced by drawContents(), QwtCompass::drawScaleContents(), getValue(), and QwtCompass::keyPressEvent(). |
|
|
Definition at line 567 of file qwt_dial.cpp. References d_needle. |
|
|
Definition at line 557 of file qwt_dial.cpp. References d_needle. |
|
|
Definition at line 627 of file qwt_dial.cpp. References d_origin. Referenced by drawContents(), QwtCompass::drawScaleContents(), and QwtCompass::keyPressEvent(). |
|
|
Repaint the compass.
Definition at line 316 of file qwt_dial.cpp. References contentsRect(), drawContents(), drawFrame(), and QwtPaintBuffer::painter(). |
|
|
Notify a change of the range. This virtual function is called whenever the range changes. The default implementation does nothing. Reimplemented from QwtDblRange. Definition at line 572 of file qwt_dial.cpp. References updateScale(). |
|
|
Resize the compass.
Definition at line 300 of file qwt_dial.cpp. References boundingRect(), and hasVisibleBackground(). |
|
|
Definition at line 230 of file qwt_dial.cpp. References contentsRect(), d_scaleDraw, QwtScaleDraw::maxHeight(), and QwtScaleDraw::maxWidth(). Referenced by drawContents(). |
|
|
Definition at line 132 of file qwt_dial.h. |
|
|
Definition at line 131 of file qwt_dial.h. Referenced by QwtCompass::QwtCompass(). |
|
|
Reimplemented in QwtCompass. Definition at line 608 of file qwt_dial.cpp. Referenced by QwtDialScaleDraw::label(). |
|
|
Sets the frame shadow value from the frame style.
Definition at line 137 of file qwt_dial.cpp. References d_frameShadow, and lineWidth(). |
|
|
Sets the line width
Definition at line 164 of file qwt_dial.cpp. References d_lineWidth. |
|
|
Change the mode of the meter.
Definition at line 262 of file qwt_dial.cpp. References d_mode. |
|
|
Set a needle for the dial
Definition at line 540 of file qwt_dial.cpp. References d_needle. |
|
|
Definition at line 621 of file qwt_dial.cpp. References d_origin. Referenced by QwtCompass::QwtCompass(). |
|
||||||||||||||||
|
Definition at line 599 of file qwt_dial.cpp. References d_maxMajIntv, d_maxMinIntv, d_scaleStep, and updateScale(). |
|
||||||||||||
|
Definition at line 632 of file qwt_dial.cpp. References d_maxScaleArc, and d_minScaleArc. Referenced by QwtDial(). |
|
|
Definition at line 586 of file qwt_dial.cpp. References d_scaleDraw, and updateScale(). |
|
|
Definition at line 289 of file qwt_dial.cpp. References d_wrapping. Referenced by QwtCompass::QwtCompass(). |
|
|
Show/Hide the area outside of the compass frame
Definition at line 99 of file qwt_dial.cpp. References boundingRect(), and d_visibleBackground. |
|
|
Definition at line 658 of file qwt_dial.cpp. References d_scaleDraw, lineWidth(), and QwtScaleDraw::minHeight(). |
|
|
Definition at line 577 of file qwt_dial.cpp. References d_maxMajIntv, d_maxMinIntv, d_scaleDraw, d_scaleStep, QwtDblRange::maxValue(), QwtDblRange::minValue(), and QwtScaleDraw::setScale(). Referenced by rangeChange(), setScale(), and setScaleDraw(). |
|
|
Notify change of value This function can be reimplemented by derived classes in order to keep track of changes, i.e. repaint the widget. The default implementation emits a valueChanged() signal if tracking is enabled. Reimplemented from QwtSliderBase. Definition at line 649 of file qwt_dial.cpp. References QwtSliderBase::valueChange(). |
|
|
Definition at line 294 of file qwt_dial.cpp. References d_wrapping. |
|
|
Definition at line 146 of file qwt_dial.h. Referenced by drawFrame(), frameShadow(), and setFrameShadow(). |
|
|
Definition at line 147 of file qwt_dial.h. Referenced by lineWidth(), and setLineWidth(). |
|
|
Definition at line 157 of file qwt_dial.h. Referenced by setScale(), and updateScale(). |
|
|
Definition at line 158 of file qwt_dial.h. Referenced by setScale(), and updateScale(). |
|
|
Definition at line 154 of file qwt_dial.h. Referenced by drawContents(), getValue(), and setScaleArc(). |
|
|
Definition at line 153 of file qwt_dial.h. Referenced by drawContents(), getValue(), and setScaleArc(). |
|
|
Definition at line 149 of file qwt_dial.h. |
|
|
Definition at line 161 of file qwt_dial.h. Referenced by drawNeedle(), needle(), setNeedle(), and ~QwtDial(). |
|
|
Definition at line 152 of file qwt_dial.h. Referenced by drawContents(), getValue(), origin(), and setOrigin(). |
|
|
Definition at line 156 of file qwt_dial.h. Referenced by drawScale(), minimumSizeHint(), QwtDial(), scaleContentsRect(), setScaleDraw(), sizeHint(), updateScale(), and ~QwtDial(). |
|
|
Definition at line 159 of file qwt_dial.h. Referenced by setScale(), and updateScale(). |
|
|
Definition at line 145 of file qwt_dial.h. Referenced by hasVisibleBackground(), and showBackground(). |
|
|
Definition at line 150 of file qwt_dial.h. Referenced by setWrapping(), and wrapping(). |
|
|
Definition at line 45 of file qwt_dial.h. Referenced by QwtDial(). |
1.3.2