diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-08-18 00:23:21 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-08-18 00:23:21 (GMT) |
commit | 39a2e72700aa481fefc7df7fa64d8dc8c1670d2e (patch) | |
tree | bd3abb779a0e934c9d1905532d1019613703cfd5 /examples | |
parent | c9f4ad424949085209acda6cff07babbe8d29001 (diff) | |
parent | 41335c52ef2844589030cddb4773c68cf38331af (diff) | |
download | Qt-39a2e72700aa481fefc7df7fa64d8dc8c1670d2e.zip Qt-39a2e72700aa481fefc7df7fa64d8dc8c1670d2e.tar.gz Qt-39a2e72700aa481fefc7df7fa64d8dc8c1670d2e.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'examples')
-rw-r--r-- | examples/declarative/clock/Clock.qml | 2 | ||||
-rw-r--r-- | examples/declarative/dial/DialLibrary/Dial.qml | 4 | ||||
-rw-r--r-- | examples/declarative/dial/dial.qml | 4 | ||||
-rw-r--r-- | examples/declarative/follow/pong.qml | 12 | ||||
-rw-r--r-- | examples/multitouch/pinchzoom/graphicsview.cpp | 6 | ||||
-rw-r--r-- | examples/multitouch/pinchzoom/graphicsview.h | 2 | ||||
-rw-r--r-- | examples/phonon/musicplayer/mainwindow.cpp | 2 |
7 files changed, 16 insertions, 16 deletions
diff --git a/examples/declarative/clock/Clock.qml b/examples/declarative/clock/Clock.qml index d73f7ca..30f0940 100644 --- a/examples/declarative/clock/Clock.qml +++ b/examples/declarative/clock/Clock.qml @@ -14,7 +14,7 @@ Item { seconds = date.getSeconds(); } Timer { - interval: 500; running: true; repeat: true; triggeredOnStart: true + interval: 100; running: true; repeat: true; triggeredOnStart: true onTriggered: Clock.time = new Date() } diff --git a/examples/declarative/dial/DialLibrary/Dial.qml b/examples/declarative/dial/DialLibrary/Dial.qml index eb9ed3a..08308fa 100644 --- a/examples/declarative/dial/DialLibrary/Dial.qml +++ b/examples/declarative/dial/DialLibrary/Dial.qml @@ -18,8 +18,8 @@ Item { } Image { id: Needle - x: 95 - y: 33 + x: 95; y: 33 + smooth: true source: "needle.png" transform: Rotation { id: NeedleRotation diff --git a/examples/declarative/dial/dial.qml b/examples/declarative/dial/dial.qml index ab31852..3773bcc 100644 --- a/examples/declarative/dial/dial.qml +++ b/examples/declarative/dial/dial.qml @@ -15,11 +15,11 @@ Rect { GradientStop { position: 0.0; color: "steelblue" } GradientStop { position: 1.0; color: "lightsteelblue" } } - radius: 8; opacity: 0.7 + radius: 8; opacity: 0.7; smooth: true Rect { id: Slider x: 2; y: 2; width: 30; height: 12 - radius: 6 + radius: 6; smooth: true gradient: Gradient { GradientStop { position: 0.0; color: "lightgray" } GradientStop { position: 1.0; color: "gray" } diff --git a/examples/declarative/follow/pong.qml b/examples/declarative/follow/pong.qml index 5a2d0ad..2a430bf 100644 --- a/examples/declarative/follow/pong.qml +++ b/examples/declarative/follow/pong.qml @@ -58,12 +58,12 @@ Rect { } // The rest, to make it look realistic, if neither ever scores... - Rect { color: "#00ee00"; x: 320-80; y: 0; width: 40; height: 60 } - Rect { color: "#000000"; x: 320-70; y: 10; width: 20; height: 40 } - Rect { color: "#00ee00"; x: 320+40; y: 0; width: 40; height: 60 } - Rect { color: "#000000"; x: 320+50; y: 10; width: 20; height: 40 } + Rect { color: "#00ee00"; x: Page.width/2-80; y: 0; width: 40; height: 60 } + Rect { color: "#000000"; x: Page.width/2-70; y: 10; width: 20; height: 40 } + Rect { color: "#00ee00"; x: Page.width/2+40; y: 0; width: 40; height: 60 } + Rect { color: "#000000"; x: Page.width/2+50; y: 10; width: 20; height: 40 } Repeater { - dataSource: 24 - Rect { color: "#00ee00"; x: 320-5; y: index*20; width: 10; height: 10 } + dataSource: Page.height/20 + Rect { color: "#00ee00"; x: Page.width/2-5; y: index*20; width: 10; height: 10 } } } diff --git a/examples/multitouch/pinchzoom/graphicsview.cpp b/examples/multitouch/pinchzoom/graphicsview.cpp index 3d0e49f..969f604 100644 --- a/examples/multitouch/pinchzoom/graphicsview.cpp +++ b/examples/multitouch/pinchzoom/graphicsview.cpp @@ -47,11 +47,11 @@ GraphicsView::GraphicsView(QGraphicsScene *scene, QWidget *parent) : QGraphicsView(scene, parent) { - setAttribute(Qt::WA_AcceptTouchEvents); + viewport()->setAttribute(Qt::WA_AcceptTouchEvents); setDragMode(ScrollHandDrag); } -bool GraphicsView::event(QEvent *event) +bool GraphicsView::viewportEvent(QEvent *event) { switch (event->type()) { case QEvent::TouchBegin: @@ -72,5 +72,5 @@ bool GraphicsView::event(QEvent *event) default: break; } - return QGraphicsView::event(event); + return QGraphicsView::viewportEvent(event); } diff --git a/examples/multitouch/pinchzoom/graphicsview.h b/examples/multitouch/pinchzoom/graphicsview.h index 928fd16..e4ca65d 100644 --- a/examples/multitouch/pinchzoom/graphicsview.h +++ b/examples/multitouch/pinchzoom/graphicsview.h @@ -49,5 +49,5 @@ class GraphicsView : public QGraphicsView public: GraphicsView(QGraphicsScene *scene = 0, QWidget *parent = 0); - bool event(QEvent *event); + bool viewportEvent(QEvent *event); }; diff --git a/examples/phonon/musicplayer/mainwindow.cpp b/examples/phonon/musicplayer/mainwindow.cpp index 7403e33..a20d05f 100644 --- a/examples/phonon/musicplayer/mainwindow.cpp +++ b/examples/phonon/musicplayer/mainwindow.cpp @@ -184,7 +184,7 @@ void MainWindow::metaStateChanged(Phonon::State newState, Phonon::State /* oldSt QMessageBox::warning(this, tr("Error opening files"), metaInformationResolver->errorString()); while (!sources.isEmpty() && - !(sources.takeLast() == metaInformationResolver->currentSource())); + !(sources.takeLast() == metaInformationResolver->currentSource())) /* loop */; return; } |