From 1f5839fb3f2887a339d29d980235d5906c0cb540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lasse=20R=C3=A4ih=C3=A4?= Date: Thu, 30 May 2013 14:33:54 +0300 Subject: Removed PinchArea. Change-Id: I868bd797a84eaa62ceeffb0e84ad9a8735e26bf8 Reviewed-by: Kimmo Ollila --- QtDemo/qml/QtDemo/Slide.qml | 3 ++- QtDemo/qml/QtDemo/WorldCanvas.qml | 14 ++++++------ QtDemo/qml/QtDemo/engine.js | 45 ++++++++++++++++++++------------------- QtDemo/qml/QtDemo/main.qml | 2 +- 4 files changed, 33 insertions(+), 31 deletions(-) diff --git a/QtDemo/qml/QtDemo/Slide.qml b/QtDemo/qml/QtDemo/Slide.qml index 77e316f..1cd591f 100644 --- a/QtDemo/qml/QtDemo/Slide.qml +++ b/QtDemo/qml/QtDemo/Slide.qml @@ -20,6 +20,7 @@ Item { property string demoColor: "#883322" property string name: "" property bool dirty: parent.angle !== 0 || rotation !==0 + property bool preventShader: false function targetWidth() { @@ -66,7 +67,7 @@ Item { height: demoHeight sourceItem: demoContainer live: visible && (slide.loading || slide.loaded) - visible: slide.dirty || !slide.loaded || updating + visible: (!slide.preventShader && slide.dirty) || !slide.loaded || updating hideSource: visible && !updating && !loading clip: true diff --git a/QtDemo/qml/QtDemo/WorldCanvas.qml b/QtDemo/qml/QtDemo/WorldCanvas.qml index 1ce4a8d..563239b 100644 --- a/QtDemo/qml/QtDemo/WorldCanvas.qml +++ b/QtDemo/qml/QtDemo/WorldCanvas.qml @@ -68,13 +68,13 @@ Item{ canvas.goHome() } - Behavior on angle { + /*Behavior on angle { RotationAnimation{ duration: Style.APP_ANIMATION_DELAY direction: RotationAnimation.Shortest } enabled: !worldPinchArea.pinching - } + }*/ Behavior on xOffset { id: xOffsetBehaviour @@ -92,13 +92,13 @@ Item{ NumberAnimation{ duration: Style.APP_ANIMATION_DELAY } - enabled: !worldPinchArea.pinching + //enabled: !worldPinchArea.pinching } Behavior on rotationOriginY { NumberAnimation{ duration: Style.APP_ANIMATION_DELAY } - enabled: !worldPinchArea.pinching + //enabled: !worldPinchArea.pinching } transform: [ @@ -110,12 +110,12 @@ Item{ xScale: canvas.scalingFactor yScale :canvas.scalingFactor - }, - Rotation{ + } + /*Rotation{ id: canvasRotation origin.x: canvas.rotationOriginX origin.y: canvas.rotationOriginY angle: canvas.angle - } + }*/ ] } diff --git a/QtDemo/qml/QtDemo/engine.js b/QtDemo/qml/QtDemo/engine.js index 7bdd4c8..67a077d 100644 --- a/QtDemo/qml/QtDemo/engine.js +++ b/QtDemo/qml/QtDemo/engine.js @@ -1,32 +1,32 @@ var positions = [ - {x:-800, y:-1500, gid: 0, url: "demos/rssnews/rssnews.qml", device: 3, name: "Rss Reader"}, - {x:-1800, y:-1400, gid: 0, url: "demos/gridrssnews/main.qml", device: 6, name: "Rss Reader"}, - {x:-1200, y:-1050, gid: 0, url: "demos/tweetsearch/tweetsearch.qml", device: 2, name: "TweetSearch"}, + {x:-800, y:-1500, gid: 0, preventShader: false, url: "demos/rssnews/rssnews.qml", device: 3, name: "Rss Reader"}, + {x:-1800, y:-1400, gid: 0, preventShader: false, url: "demos/gridrssnews/main.qml", device: 6, name: "Rss Reader"}, + {x:-1200, y:-1050, gid: 0, preventShader: false, url: "demos/tweetsearch/tweetsearch.qml", device: 2, name: "TweetSearch"}, - {x:1800, y:-1700, gid: 1, url: "demos/heartmonitor/main.qml", device: 4, name: "Heart Monitor"}, - {x:1100, y:-1500, gid: 1, url: "demos/canvasclock/canvasClock.qml", device: 4, name: "Canvas Clock"}, + {x:1800, y:-1700, gid: 1, preventShader: true, url: "demos/heartmonitor/main.qml", device: 4, name: "Heart Monitor"}, + {x:1100, y:-1500, gid: 1, preventShader: false, url: "demos/canvasclock/canvasClock.qml", device: 4, name: "Canvas Clock"}, - {x:1600, y:-500, gid: 2, url: "demos/calqlatr/Calqlatr.qml", device: 0, name: "Calqlatr"}, - {x:700, y:-300, gid: 2, url: "demos/photosurface/photosurface.qml", device: 5, name: "Photo Surface"}, - {x:-100, y:-50, gid: 2, url: "demos/touchgallery/main.qml", device: 2, name: "Widget Gallery"}, + {x:1600, y:-500, gid: 2, preventShader: false, url: "demos/calqlatr/Calqlatr.qml", device: 0, name: "Calqlatr"}, + {x:700, y:-300, gid: 2, preventShader: false, url: "demos/photosurface/photosurface.qml", device: 5, name: "Photo Surface"}, + {x:-100, y:-50, gid: 2, preventShader: false, url: "demos/touchgallery/main.qml", device: 2, name: "Widget Gallery"}, - {x:-1500, y:0, gid: 3, url: "demos/maroon/Maroon.qml", device: 1, name: "Maroon in\n Trouble"}, - {x:-2200, y:100, gid: 3, url: "demos/samegame/samegame.qml", device: 1, name: "SameGame"}, + {x:-1500, y:0, gid: 3, preventShader: false, url: "demos/maroon/Maroon.qml", device: 1, name: "Maroon in\n Trouble"}, + {x:-2200, y:100, gid: 3, preventShader: false, url: "demos/samegame/samegame.qml", device: 1, name: "SameGame"}, - {x:2200, y:1100, gid: 5, url: "demos/particledemo/particledemo.qml", device: 6, name: "Particle Paint"}, - {x:1000, y:1280, gid: 5, url: "demos/shaders/main.qml", device: 5, name: "Shaders"}, + {x:2200, y:1100, gid: 5, preventShader: true, url: "demos/particledemo/particledemo.qml", device: 6, name: "Particle Paint"}, + {x:1000, y:1280, gid: 5, preventShader: false, url: "demos/shaders/main.qml", device: 5, name: "Shaders"}, - {x:-800, y:1200, gid: 4, url: "demos/video/main.qml", device: 7, name: "Qt Video"}, - {x:-1800, y:1400, gid: 4, url: "demos/radio/radio.qml", device: 4, name: "Internet Radio"} + {x:-800, y:1200, gid: 4, preventShader: false, url: "demos/video/main.qml", device: 7, name: "Qt Video"}, + {x:-1800, y:1400, gid: 4, preventShader: false, url: "demos/radio/radio.qml", device: 4, name: "Internet Radio"} ] var groupPositions = [ - {x:-2320, y:-1950, width: 2150, height: 1200, textX: 150, textY: 20, name: "Feeds"}, - {x:650, y:-2000, width: 1600, height: 1000, textX: 150, textY: 20, name: "Canvas"}, - {x:-350, y:-800, width: 2350, height: 1200, textX: 150, textY: 20, name: "Applications"}, - {x:-2500, y:-500, width: 1500, height: 1150, textX: 150, textY: 20, name: "Games"}, - {x:-2250, y:850, width: 2050, height: 1150, textX: 150, textY: 20, name: "Multimedia"}, - {x:510, y:700, width: 2400, height: 1300, textX: 150, textY: 20, name: "Particles & Shaders"} + {x:-2320, y:-1950, width: 2150, height: 1200, textX: 150, textY: 50, name: "Feeds"}, + {x:650, y:-2000, width: 1600, height: 1000, textX: 150, textY: 50, name: "Canvas"}, + {x:-350, y:-800, width: 2350, height: 1200, textX: 150, textY: 50, name: "Applications"}, + {x:-2500, y:-500, width: 1500, height: 1150, textX: 150, textY: 50, name: "Games"}, + {x:-2250, y:850, width: 2050, height: 1150, textX: 150, textY: 50, name: "Multimedia"}, + {x:510, y:700, width: 2400, height: 1300, textX: 150, textY: 50, name: "Particles & Shaders"} ] var imageSources = ["phone1.png","phone2.png", "phone3.png","tablet1.png", "medical_device.png", "laptop1.png", "laptop2.png", "tv.png"] @@ -47,11 +47,11 @@ var groups = [] function initSlides(){ positions.forEach(function(pos){ - createSlide(pos.x,pos.y, pos.gid, pos.url, pos.device, pos.name) + createSlide(pos.x,pos.y, pos.gid, pos.preventShader, pos.url, pos.device, pos.name) }) } -function createSlide(x,y,gid,url,device,name){ +function createSlide(x,y,gid,preventShader,url,device,name){ var component = Qt.createComponent("Slide.qml") if (component.status === Component.Ready){ var object=component.createObject(canvas) @@ -67,6 +67,7 @@ function createSlide(x,y,gid,url,device,name){ object.maskHorizontalOffset = maskHorizontalOffsets[device] object.uid = objects.length object.gid = gid + object.preventShader = preventShader object.name = name object.x = x-object.width/2 object.y = y-object.height/2 diff --git a/QtDemo/qml/QtDemo/main.qml b/QtDemo/qml/QtDemo/main.qml index e804fa9..a143dfa 100644 --- a/QtDemo/qml/QtDemo/main.qml +++ b/QtDemo/qml/QtDemo/main.qml @@ -99,7 +99,7 @@ Rectangle{ } WorldMouseArea { id: worldMouseArea } - WorldPinchArea { id: worldPinchArea } + //WorldPinchArea { id: worldPinchArea } WorldCanvas { id:canvas } NavigationPanel{ id: navigationPanel } -- cgit v1.2.3