summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmltimer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/util/qmltimer.cpp')
-rw-r--r--src/declarative/util/qmltimer.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/declarative/util/qmltimer.cpp b/src/declarative/util/qmltimer.cpp
index 0be62f4..6ac4e32 100644
--- a/src/declarative/util/qmltimer.cpp
+++ b/src/declarative/util/qmltimer.cpp
@@ -72,6 +72,9 @@ public:
A timer can be used to trigger an action either once, or repeatedly
at a given interval.
+ Here is a timer that shows the current date and time, and updates
+ the text every 500 milliseconds:
+
\qml
Timer {
interval: 500; running: true; repeat: true
@@ -101,7 +104,7 @@ QmlTimer::QmlTimer(QObject *parent)
/*!
\qmlproperty int Timer::interval
- Sets the \a interval in milliseconds between triggering.
+ Sets the \a interval between triggers, in milliseconds.
The default interval is 1000 milliseconds.
*/
@@ -124,7 +127,7 @@ int QmlTimer::interval() const
\qmlproperty bool Timer::running
If set to true, starts the timer; otherwise stops the timer.
- For a non-repeating timer, \a running will be set to false after the
+ For a non-repeating timer, \a running is set to false after the
timer has been triggered.
\a running defaults to false.
@@ -150,7 +153,7 @@ void QmlTimer::setRunning(bool running)
/*!
\qmlproperty bool Timer::repeat
- If \a repeat is true the timer will be triggered repeatedly at the
+ If \a repeat is true the timer is triggered repeatedly at the
specified interval; otherwise, the timer will trigger once at the
specified interval and then stop (i.e. running will be set to false).
@@ -176,15 +179,15 @@ void QmlTimer::setRepeating(bool repeating)
/*!
\qmlproperty bool Timer::triggeredOnStart
- When the Timer is started the first trigger is normally after the specified
- interval has elapsed. It is sometimes desireable to trigger immediately
- when the timer is started, for example to establish an initial
+ When a timer is started, the first trigger is usually after the specified
+ interval has elapsed. It is sometimes desirable to trigger immediately
+ when the timer is started; for example, to establish an initial
state.
- If \a triggeredOnStart is true, the timer will be triggered immediately
- when started, and subsequently at the specified interval. Note that for
- a Timer with \e repeat set to false, this will result in the timer being
- triggered twice; once on start, and again at the interval.
+ If \a triggeredOnStart is true, the timer is triggered immediately
+ when started, and subsequently at the specified interval. Note that if
+ \e repeat is set to false, the timer is triggered twice; once on start,
+ and again at the interval.
\a triggeredOnStart defaults to false.
@@ -219,7 +222,7 @@ void QmlTimer::start()
/*!
\qmlmethod Timer::stop()
- \brief stops the timer.
+ \brief Stops the timer.
If the timer is not running, calling this method has no effect. The
\c running property will be false following a call to \c stop().