summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-08-20 06:05:34 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-08-20 06:05:34 (GMT)
commit3cfba122843d64bb6761808c020b27c231dad8be (patch)
treeb0766e9a5b70e9359ea96ba9fbb0cc312262c815 /src/declarative
parent74bb6421e618366532e651afbb8790431604657b (diff)
parent60ab6d5c526051824669da37e7a2850c43ddecbb (diff)
downloadQt-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.txt2
-rw-r--r--src/declarative/util/qmltimer.cpp26
-rw-r--r--src/declarative/util/qmltimer.h4
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();