diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-08-20 06:05:34 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-08-20 06:05:34 (GMT) |
commit | 3cfba122843d64bb6761808c020b27c231dad8be (patch) | |
tree | b0766e9a5b70e9359ea96ba9fbb0cc312262c815 /src/declarative | |
parent | 74bb6421e618366532e651afbb8790431604657b (diff) | |
parent | 60ab6d5c526051824669da37e7a2850c43ddecbb (diff) | |
download | Qt-3cfba122843d64bb6761808c020b27c231dad8be.zip Qt-3cfba122843d64bb6761808c020b27c231dad8be.tar.gz Qt-3cfba122843d64bb6761808c020b27c231dad8be.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/QmlChanges.txt | 2 | ||||
-rw-r--r-- | src/declarative/util/qmltimer.cpp | 26 | ||||
-rw-r--r-- | src/declarative/util/qmltimer.h | 4 |
3 files changed, 31 insertions, 1 deletions
diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt index b8a9358..0ad9f10 100644 --- a/src/declarative/QmlChanges.txt +++ b/src/declarative/QmlChanges.txt @@ -27,6 +27,7 @@ Text: vAlign -> verticalAlignment Additions: MouseRegion: add "acceptedButtons" property MouseRegion: add "hoverEnabled" property +Timer: add start() and stop() slots Deletions: VerticalPositioner: lost "margins" property @@ -63,4 +64,3 @@ PropertyAction::target (if possible) Additions: MouseRegion: add "pressedButtons" property Connection: add "slot" property -Timer: add start() and stop() slots diff --git a/src/declarative/util/qmltimer.cpp b/src/declarative/util/qmltimer.cpp index 2d3a343..b95d6ad 100644 --- a/src/declarative/util/qmltimer.cpp +++ b/src/declarative/util/qmltimer.cpp @@ -188,6 +188,32 @@ void QmlTimer::setTriggeredOnStart(bool triggeredOnStart) } } +/*! + \qmlmethod Timer::start() + \brief Starts the timer. + + If the timer is already running, calling this method has no effect. The + \c running property will be true following a call to \c start(). +*/ +void QmlTimer::start() +{ + Q_D(QmlTimer); + d->pause.start(); +} + +/*! + \qmlmethod Timer::stop() + \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(). +*/ +void QmlTimer::stop() +{ + Q_D(QmlTimer); + d->pause.stop(); +} + void QmlTimer::update() { Q_D(QmlTimer); diff --git a/src/declarative/util/qmltimer.h b/src/declarative/util/qmltimer.h index d376834..22478cb 100644 --- a/src/declarative/util/qmltimer.h +++ b/src/declarative/util/qmltimer.h @@ -83,6 +83,10 @@ protected: void classBegin(); void componentComplete(); +public Q_SLOTS: + void start(); + void stop(); + Q_SIGNALS: void triggered(); void runningChanged(); |