summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2009-11-11 02:27:29 (GMT)
committerBea Lam <bea.lam@nokia.com>2009-11-11 02:27:29 (GMT)
commit22fe9474b01c577337e43416666a8f90d0ad6064 (patch)
treef55624c92fc63db9e9fbba43c07ce5f9df59a25b /tools
parentb8b5ad641a5977651e61b5e572918f90248d8851 (diff)
parentb6b0b5d7f211e10beb76711fcecdf068af34fdfd (diff)
downloadQt-22fe9474b01c577337e43416666a8f90d0ad6064.zip
Qt-22fe9474b01c577337e43416666a8f90d0ad6064.tar.gz
Qt-22fe9474b01c577337e43416666a8f90d0ad6064.tar.bz2
Merge branch 'kinetic-declarativeui' of scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlviewer/qmlviewer.cpp15
-rw-r--r--tools/qmlviewer/qmlviewer.h1
2 files changed, 16 insertions, 0 deletions
diff --git a/tools/qmlviewer/qmlviewer.cpp b/tools/qmlviewer/qmlviewer.cpp
index b6a3627..ea0936b 100644
--- a/tools/qmlviewer/qmlviewer.cpp
+++ b/tools/qmlviewer/qmlviewer.cpp
@@ -413,6 +413,16 @@ void QmlViewer::createMenu(QMenuBar *menu, QMenu *flatmenu)
if (flatmenu) flatmenu->addSeparator();
+ QMenu *debugMenu = flatmenu ? flatmenu->addMenu(tr("&Debugging")) : menu->addMenu(tr("&Debugging"));
+
+ QAction *slowAction = new QAction(tr("&Slow Down Animations"), parent);
+ slowAction->setShortcut(QKeySequence("Ctrl+."));
+ slowAction->setCheckable(true);
+ connect(slowAction, SIGNAL(triggered(bool)), this, SLOT(setSlowMode(bool)));
+ debugMenu->addAction(slowAction);
+
+ if (flatmenu) flatmenu->addSeparator();
+
QMenu *skinMenu = flatmenu ? flatmenu->addMenu(tr("&Skin")) : menu->addMenu(tr("&Skin"));
QActionGroup *skinActions;
@@ -627,6 +637,11 @@ void QmlViewer::toggleRecording()
setRecording(recording);
}
+void QmlViewer::setSlowMode(bool enable)
+{
+ QUnifiedTimer::instance()->setSlowModeEnabled(enable);
+}
+
void QmlViewer::addLibraryPath(const QString& lib)
{
canvas->engine()->addImportPath(lib);
diff --git a/tools/qmlviewer/qmlviewer.h b/tools/qmlviewer/qmlviewer.h
index b366401..78512a9 100644
--- a/tools/qmlviewer/qmlviewer.h
+++ b/tools/qmlviewer/qmlviewer.h
@@ -104,6 +104,7 @@ public slots:
void proxySettingsChanged ();
void setScaleView();
void executeErrors();
+ void setSlowMode(bool);
protected:
virtual void keyPressEvent(QKeyEvent *);