📄 qwtdial.3
字号:
.TH "QwtDial" 3 "4 Nov 2003" "Qwt User's Guide" \" -*- nroff -*-.ad l.nh.SH NAMEQwtDial \- .SH SYNOPSIS.br.PPInherits \fBQwtSliderBase\fP..PPInherited by \fBQwtAnalogClock\fP, and \fBQwtCompass\fP..PP.SH "Detailed Description".PP QwtDial class provides a rounded range control. QwtDial is intended as base class for dial widgets like speedometers, compass widgets, clocks ....PP 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 \fBisReadOnly()\fP the dial can be rotated by dragging the mouse or using keyboard inputs (see \fBkeyPressEvent()\fP). 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 \fBorigin()\fP of the dial..PPQwt is missing a set of good looking needles (\fBQwtDialNeedle\fP). Contributions are very welcome..PP\fBSee also:\fP.RS 4\fBQwtCompass\fP, \fBQwtAnalogClock\fP, \fBQwtDialNeedle\fP .RE.PP\fBNote:\fP.RS 4The examples/dials example shows different types of dials. .RE.PP.PP.SS "Public Types".in +1c.ti -1c.RI "enum \fBShadow\fP { \fBPlain\fP = QFrame::Plain, \fBRaised\fP = QFrame::Raised, \fBSunken\fP = QFrame::Sunken }".br.ti -1c.RI "enum \fBScaleOptions\fP { \fBScaleBackbone\fP = 1, \fBScaleTicks\fP = 2, \fBScaleLabel\fP = 4 }".br.ti -1c.RI "enum \fBMode\fP { \fBRotateNeedle\fP, \fBRotateScale\fP }".br.in -1c.SS "Public Member Functions".in +1c.ti -1c.RI "\fBQwtDial\fP (QWidget *parent=0, const char *name=0)".br.ti -1c.RI "virtual \fB~QwtDial\fP ()".br.ti -1c.RI "void \fBsetFrameShadow\fP (\fBShadow\fP)".br.ti -1c.RI "\fBShadow\fP \fBframeShadow\fP () const ".br.ti -1c.RI "bool \fBhasVisibleBackground\fP () const ".br.ti -1c.RI "void \fBshowBackground\fP (bool)".br.ti -1c.RI "void \fBsetLineWidth\fP (int)".br.ti -1c.RI "int \fBlineWidth\fP () const ".br.ti -1c.RI "void \fBsetMode\fP (\fBMode\fP)".br.ti -1c.RI "\fBMode\fP \fBmode\fP () const ".br.ti -1c.RI "virtual void \fBsetWrapping\fP (bool)".br.ti -1c.RI "bool \fBwrapping\fP () const ".br.ti -1c.RI "virtual void \fBsetScale\fP (int maxMajIntv, int maxMinIntv, double step=0.0)".br.ti -1c.RI "void \fBsetScaleArc\fP (double min, double max)".br.ti -1c.RI "void \fBsetScaleOptions\fP (int)".br.ti -1c.RI "void \fBsetScaleTicks\fP (int minLen, int medLen, int majLen, int penWidth=1)".br.ti -1c.RI "double \fBminScaleArc\fP () const ".br.ti -1c.RI "double \fBmaxScaleArc\fP () const ".br.ti -1c.RI "virtual void \fBsetOrigin\fP (double)".br.ti -1c.RI "double \fBorigin\fP () const ".br.ti -1c.RI "virtual void \fBsetNeedle\fP (\fBQwtDialNeedle\fP *)".br.ti -1c.RI "const \fBQwtDialNeedle\fP * \fBneedle\fP () const ".br.ti -1c.RI "\fBQwtDialNeedle\fP * \fBneedle\fP ()".br.ti -1c.RI "QRect \fBboundingRect\fP () const ".br.ti -1c.RI "QRect \fBcontentsRect\fP () const ".br.ti -1c.RI "virtual QRect \fBscaleContentsRect\fP () const ".br.ti -1c.RI "virtual QSize \fBsizeHint\fP () const ".br.ti -1c.RI "virtual QSize \fBminimumSizeHint\fP () const ".br.ti -1c.RI "virtual void \fBsetScaleDraw\fP (\fBQwtDialScaleDraw\fP *)".br.ti -1c.RI "\fBQwtDialScaleDraw\fP * \fBscaleDraw\fP ()".br.ti -1c.RI "const \fBQwtDialScaleDraw\fP * \fBscaleDraw\fP () const ".br.in -1c.SS "Protected Member Functions".in +1c.ti -1c.RI "virtual void \fBpaintEvent\fP (QPaintEvent *)".br.ti -1c.RI "virtual void \fBresizeEvent\fP (QResizeEvent *)".br.ti -1c.RI "virtual void \fBkeyPressEvent\fP (QKeyEvent *)".br.ti -1c.RI "virtual void \fBdrawFrame\fP (QPainter *p)".br.ti -1c.RI "virtual void \fBdrawContents\fP (QPainter *) const ".br.ti -1c.RI "virtual void \fBdrawFocusIndicator\fP (QPainter *) const ".br.ti -1c.RI "virtual void \fBdrawScale\fP (QPainter *, const QPoint ¢er, int radius, double origin, double arcMin, double arcMax) const ".br.ti -1c.RI "virtual void \fBdrawScaleContents\fP (QPainter *painter, const QPoint ¢er, int radius) const ".br.ti -1c.RI "virtual void \fBdrawNeedle\fP (QPainter *, const QPoint &, int radius, double direction, QPalette::ColorGroup) const ".br.ti -1c.RI "virtual QString \fBscaleLabel\fP (double) const ".br.ti -1c.RI "void \fBupdateScale\fP ()".br.ti -1c.RI "virtual void \fBrangeChange\fP ()".br.ti -1c.RI "virtual void \fBvalueChange\fP ()".br.ti -1c.RI "virtual double \fBgetValue\fP (const QPoint &)".br.ti -1c.RI "virtual void \fBgetScrollMode\fP (const QPoint &, int &scrollMode, int &direction)".br.in -1c.SS "Friends".in +1c.ti -1c.RI "class \fBQwtDialScaleDraw\fP".br.in -1c.SH "Member Enumeration Documentation".PP .SS "enum \fBQwtDial::Mode\fP".PPIn case of RotateNeedle the needle is rotating, in case of RotateScale, the needle points to \fBorigin()\fP and the scale is rotating. .SS "enum \fBQwtDial::ScaleOptions\fP".PPsee \fBQwtDial::setScaleOptions\fP .SS "enum \fBQwtDial::Shadow\fP".PPFrame 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. .SH "Constructor & Destructor Documentation".PP .SS "QwtDial::QwtDial (QWidget * parent = 0, const char * name = 0)".PPConstructor. \fBParameters:\fP.RS 4\fIparent\fP Parent widget .br\fIname\fP Widget name.RE.PPCreate 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. .SS "QwtDial::~\fBQwtDial\fP ()\fC [virtual]\fP".PPDestructor. .SH "Member Function Documentation".PP .SS "QRect QwtDial::boundingRect () const".PP\fBReturns:\fP.RS 4bounding rect of the dial including the frame .RE.PP\fBSee also:\fP.RS 4\fBQwtDial::setLineWidth\fP, \fBQwtDial::scaleContentsRect\fP, \fBQwtDial::contentsRect\fP .RE.PP.SS "QRect QwtDial::contentsRect () const".PP\fBReturns:\fP.RS 4bounding rect of the circle inside the frame .RE.PP\fBSee also:\fP.RS 4\fBQwtDial::setLineWidth\fP, \fBQwtDial::scaleContentsRect\fP, \fBQwtDial::boundingRect\fP .RE.PP.SS "void QwtDial::drawContents (QPainter * painter) const\fC [protected, virtual]\fP".PPDraw 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..PP\fBParameters:\fP.RS 4\fIpainter\fP Painter .RE.PP\fBSee also:\fP.RS 4\fBQwtDial::boundingRect\fP, \fBQwtDial::contentsRect\fP, \fBQwtDial::scaleContentsRect\fP, QWidget::setPalette .RE.PP.SS "void QwtDial::drawFocusIndicator (QPainter * painter) const\fC [protected, virtual]\fP".PPDraw a dotted round circle, if !isReadOnly().PP\fBParameters:\fP.RS 4\fIpainter\fP Painter .RE.PP.SS "void QwtDial::drawFrame (QPainter * painter)\fC [protected, virtual]\fP".PPDraw the frame around the dial.PP\fBParameters:\fP.RS 4\fIpainter\fP Painter .RE.PP\fBSee also:\fP.RS 4\fBQwtDial::lineWidth\fP, \fBQwtDial::frameShadow\fP .RE.PP.SS "void QwtDial::drawNeedle (QPainter * painter, const QPoint & center, int radius, double direction, QPalette::ColorGroup cg) const\fC [protected, virtual]\fP".PPDraw the needle.PPQwt is missing a set of good looking needles. Contributions are very welcome..PP\fBParameters:\fP.RS 4\fIpainter\fP Painter .br\fIcenter\fP Center of the dial .br\fIradius\fP Length for the needle .br\fIdirection\fP Direction of the needle in degrees, counter clockwise .br\fIcg\fP ColorGroup .RE.PPReimplemented in \fBQwtAnalogClock\fP..SS "void QwtDial::drawScale (QPainter * painter, const QPoint & center, int radius, double origin, double minArc, double maxArc) const\fC [protected, virtual]\fP".PPDraw the scale.PP\fBParameters:\fP.RS 4\fIpainter\fP Painter .br\fIcenter\fP Center of the dial .br\fIradius\fP Radius of the scale .br\fIorigin\fP Origin of the scale .br\fIminArc\fP Minimum of the arc .br\fImaxArc\fP Minimum of the arc.RE.PP\fBSee also:\fP.RS 4\fBQwtScaleDraw::setAngleRange\fP .RE.PP.SS "void QwtDial::drawScaleContents (QPainter * painter, const QPoint & center, int radius) const\fC [protected, virtual]\fP".PPDraw the contents inside the scale.PPPaints nothing..PP\fBParameters:\fP.RS 4\fIpainter\fP Painter .br\fIcenter\fP Center of the contents circle .br\fIradius\fP Radius of the contents circle .RE.PPReimplemented in \fBQwtCompass\fP..SS "\fBQwtDial::Shadow\fP QwtDial::frameShadow () const".PP\fBReturns:\fP.RS 4Frame shadow /sa \fBQwtDial::setFrameShadow\fP, \fBQwtDial::lineWidth\fP, QFrame::frameShadow .RE.PP.SS "void QwtDial::getScrollMode (const QPoint & p, int & scrollMode, int & direction)\fC [protected, virtual]\fP".PP\fBSee also:\fP.RS 4\fBQwtSliderBase::getScrollMode\fP .RE.PPImplements \fBQwtSliderBase\fP..SS "double QwtDial::getValue (const QPoint & pos)\fC [protected, virtual]\fP".PPFind the value for a given position.PP\fBParameters:\fP.RS 4\fIpos\fP .RE.PP\fBReturns:\fP.RS 4Value .RE.PPImplements \fBQwtSliderBase\fP..SS "bool QwtDial::hasVisibleBackground () const".PPTRUE when the area outside of the frame is visible.PP\fBSee also:\fP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -