📄 qwtanalogclock.3
字号:
.TH "QwtAnalogClock" 3 "4 Nov 2003" "Qwt User's Guide" \" -*- nroff -*-.ad l.nh.SH NAMEQwtAnalogClock \- .SH SYNOPSIS.br.PPInherits \fBQwtDial\fP..PP.SH "Detailed Description".PP An analog clock. .PP\fBExample\fP.RS 4.PP.nf #include <qwt_analog_clock.h> QwtAnalogClock *clock = new QwtAnalogClock(...); clock->scaleDraw()->setPenWidth(3); clock->setLineWidth(6); clock->setFrameShadow(QwtDial::Sunken); clock->setTime(); // update the clock every second QTimer *timer = new QTimer(clock); timer->connect(timer, SIGNAL(timeout()), clock, SLOT(setCurrentTime())); timer->start(1000); .PP.RE.PPQwt is missing a set of good looking hands. Contributions are very welcome..PP\fBNote:\fP.RS 4The examples/dials example shows how to use QwtAnalogClock. .RE.PP.PP.SS "Public Types".in +1c.ti -1c.RI "enum \fBHand\fP { \fBSecondHand\fP, \fBMinuteHand\fP, \fBHourHand\fP, \fBNHands\fP }".br.in -1c.SS "Public Member Functions".in +1c.ti -1c.RI "\fBQwtAnalogClock\fP (QWidget *parent=0, const char *name=0)".br.ti -1c.RI "virtual \fB~QwtAnalogClock\fP ()".br.ti -1c.RI "virtual void \fBsetHand\fP (Hand, \fBQwtDialNeedle\fP *)".br.ti -1c.RI "const \fBQwtDialNeedle\fP * \fBhand\fP (Hand) const ".br.ti -1c.RI "\fBQwtDialNeedle\fP * \fBhand\fP (Hand)".br.ti -1c.RI "void \fBsetCurrentTime\fP ()".br.ti -1c.RI "void \fBsetTime\fP (const QTime &=QTime::currentTime())".br.in -1c.SS "Protected Member Functions".in +1c.ti -1c.RI "virtual QString \fBscaleLabel\fP (double) const ".br.ti -1c.RI "virtual void \fBdrawNeedle\fP (QPainter *, const QPoint &, int radius, double direction, QPalette::ColorGroup) const ".br.ti -1c.RI "virtual void \fBdrawHand\fP (QPainter *, Hand, const QPoint &, int radius, double direction, QPalette::ColorGroup) const ".br.in -1c.SH "Constructor & Destructor Documentation".PP .SS "QwtAnalogClock::QwtAnalogClock (QWidget * parent = 0, const char * name = 0)".PPConstructor .PP\fBParameters:\fP.RS 4\fIparent\fP Parent widget .br\fIname\fP Widget name .RE.PP.SS "QwtAnalogClock::~\fBQwtAnalogClock\fP ()\fC [virtual]\fP".PPDestructor. .SH "Member Function Documentation".PP .SS "void QwtAnalogClock::drawHand (QPainter * painter, Hand hd, const QPoint & center, int radius, double direction, QPalette::ColorGroup cg) const\fC [protected, virtual]\fP".PPDraw a clock hand.PP\fBParameters:\fP.RS 4\fIpainter\fP Painter .br\fIhd\fP Specify the type of hand .br\fIcenter\fP Center of the clock .br\fIradius\fP Maximum length for the hands .br\fIdirection\fP Direction of the hand in degrees, counter clockwise .br\fIcg\fP ColorGroup .RE.PP.SS "void QwtAnalogClock::drawNeedle (QPainter * painter, const QPoint & center, int radius, double direction, QPalette::ColorGroup cg) const\fC [protected, virtual]\fP".PPDraw the needle. A clock has no single needle but three hands instead. drawNeedle translates \fBvalue()\fP into directions for the hands and calls \fBdrawHand()\fP..PP\fBParameters:\fP.RS 4\fIpainter\fP Painter .br\fIcenter\fP Center of the clock .br\fIradius\fP Maximum length for the hands .br\fIdirection\fP Dummy, not used. .br\fIcg\fP ColorGroup.RE.PP\fBSee also:\fP.RS 4\fBQwtAnalogClock::drawHand()\fP .RE.PPReimplemented from \fBQwtDial\fP..SS "\fBQwtDialNeedle\fP * QwtAnalogClock::hand (Hand hd)".PP\fBReturns:\fP.RS 4Clock hand .RE.PP\fBParameters:\fP.RS 4\fIhd\fP Specifies the type of hand .RE.PP\fBSee also:\fP.RS 4\fBQwtAnalogClock::setHand\fP .RE.PP.SS "const \fBQwtDialNeedle\fP * QwtAnalogClock::hand (Hand hd) const".PP\fBReturns:\fP.RS 4Clock hand .RE.PP\fBParameters:\fP.RS 4\fIhd\fP Specifies the type of hand .RE.PP\fBSee also:\fP.RS 4\fBQwtAnalogClock::setHand\fP .RE.PP.SS "QString QwtAnalogClock::scaleLabel (double value) const\fC [protected, virtual]\fP".PPFind the scale label for a given value.PP\fBParameters:\fP.RS 4\fIvalue\fP Value .RE.PP\fBReturns:\fP.RS 4Label .RE.PPReimplemented from \fBQwtDial\fP..SS "void QwtAnalogClock::setCurrentTime ()".PPSet the current time. This is the same as \fBQwtAnalogClock::setTime()\fP, but Qt < 3.0 can磘 handle default parameters for slots. .SS "void QwtAnalogClock::setHand (Hand hand, \fBQwtDialNeedle\fP * needle)\fC [virtual]\fP".PPSet a clockhand .PP\fBParameters:\fP.RS 4\fIhand\fP Specifies the type of hand .br\fIneedle\fP Hand .RE.PP\fBSee also:\fP.RS 4\fBQwtAnalogClock::hand()\fP .RE.PP.SS "void QwtAnalogClock::setTime (const QTime & time = QTime::currentTime())".PPSet a time .PP\fBParameters:\fP.RS 4\fItime\fP Time to display .RE.PP.SH "Author".PP Generated automatically by Doxygen for Qwt User's Guide from the source code.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -