diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-11-11 00:17:28 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-11-11 00:17:28 (GMT) |
commit | 509ee4bb6225582366c3ad5e5cfcb86bae3c1c52 (patch) | |
tree | b9fd7a28de6b2c9994b90bcc9e458c72024f523e | |
parent | 4cc540517c2fd3cd603e052f71717d189ca0c7f9 (diff) | |
parent | 24ee7d2fe5481658f350172b9c211bc3b4d89a65 (diff) | |
download | Qt-509ee4bb6225582366c3ad5e5cfcb86bae3c1c52.zip Qt-509ee4bb6225582366c3ad5e5cfcb86bae3c1c52.tar.gz Qt-509ee4bb6225582366c3ad5e5cfcb86bae3c1c52.tar.bz2 |
Merge branch 'kinetic-declarativeui' of scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
-rw-r--r-- | tests/auto/declarative/anchors/data/anchors.qml | 2 | ||||
-rw-r--r-- | tools/qmlviewer/qmlviewer.cpp | 15 | ||||
-rw-r--r-- | tools/qmlviewer/qmlviewer.h | 1 |
3 files changed, 17 insertions, 1 deletions
diff --git a/tests/auto/declarative/anchors/data/anchors.qml b/tests/auto/declarative/anchors/data/anchors.qml index b3fba30..b880762 100644 --- a/tests/auto/declarative/anchors/data/anchors.qml +++ b/tests/auto/declarative/anchors/data/anchors.qml @@ -97,7 +97,7 @@ Rectangle { id: rect18; objectName: "rect18" x: 180; width: 10 anchors.top: masterRect.bottom - anchors.bottom: Rect12.top + anchors.bottom: rect12.top } Rectangle { id: rect19; objectName: "rect19" 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 *); |