diff options
author | Gunnar Sletta <gunnar.sletta@digia.com> | 2012-12-18 14:07:57 +0100 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@digia.com> | 2012-12-18 14:07:57 +0100 |
commit | b0b2fc0913c5de4eca81329858d47f470d87282b (patch) | |
tree | a7143ed385a9a7fab16f4432a765e9641e7ade02 | |
parent | 74300c194f93881835c072368650c311818e16b7 (diff) |
Tweaks to the demo
-rw-r--r-- | CanvasSlide.qml | 10 | ||||
-rw-r--r-- | SlideDeck.qml | 15 | ||||
-rw-r--r-- | WebkitSlide.qml | 53 |
3 files changed, 57 insertions, 21 deletions
diff --git a/CanvasSlide.qml b/CanvasSlide.qml index c0b780a..7dd16c5 100644 --- a/CanvasSlide.qml +++ b/CanvasSlide.qml @@ -55,10 +55,7 @@ Slide { anchors.right: parent.right; antialiasing: true radius: slide.height * 0.03; - gradient: Gradient { - GradientStop { position: 0; color: Qt.rgba(0.4, 0.4, 0.4) } - GradientStop { position: 1; color: Qt.rgba(0.05, 0.05, 0.05) } - } + color: Qt.rgba(0.0, 0.0, 0.0, 0.2); Canvas { id:canvas anchors.fill: parent; @@ -76,10 +73,7 @@ Slide { anchors.left: parent.left antialiasing: true radius: slide.height * 0.03; - gradient: Gradient { - GradientStop { position: 0; color: Qt.rgba(0.4, 0.4, 0.4) } - GradientStop { position: 1; color: Qt.rgba(0.05, 0.05, 0.05) } - } + color: Qt.rgba(0.0, 0.0, 0.0, 0.2); clip: true; diff --git a/SlideDeck.qml b/SlideDeck.qml index b86415a..dc027cb 100644 --- a/SlideDeck.qml +++ b/SlideDeck.qml @@ -118,9 +118,9 @@ WebKit - Full HTML 5 support from the worlds most popular web engine, including Slide { title: "Qt 5 - Features" - writeInText: "Modularization of the Qt libraries - sanitizing our codebase and making it possible to deploy only that which is needed + writeInText: "Modularization of the Qt libraries - sanitizing our codebase and simplifying deployment -Qt Platform Abstraction - Unifying the Qt codebase across platforms and greatly reducing the effort needed to port to new platforms +Qt Platform Abstraction - Unifying the Qt codebase across platforms, minimizing the porting effort for new platforms Wayland support - Wayland 1.0 compatible Qt backend and compositor framework" } @@ -136,9 +136,7 @@ JSON Support - Fast parser and writer, binary format support Unicode - Updated to latest Unicode specification, UTF-8 source files" } - Slide { - centeredText: "And much more..." - } + WidgetsSlide { } @@ -187,9 +185,10 @@ Unicode - Updated to latest Unicode specification, UTF-8 source files" + /******************************************************************************** * - * Multimedia + * WebKit * */ @@ -199,12 +198,10 @@ Unicode - Updated to latest Unicode specification, UTF-8 source files" /******************************************************************************** * - * The rest + * The End * */ - WidgetsSlide { } - Slide { title: "Links" content: [ diff --git a/WebkitSlide.qml b/WebkitSlide.qml index 6806529..7d9c44b 100644 --- a/WebkitSlide.qml +++ b/WebkitSlide.qml @@ -1,4 +1,5 @@ import QtQuick 2.0 +import QtQuick.Particles 2.0 import QtWebKit 3.0 import Qt.labs.presentation 1.0 @@ -10,7 +11,7 @@ Slide { WebView { id: browser anchors.fill: parent - url: textInput.text + url: editor.text // This works around rendering bugs in webkit. CSS animations // and webGL content gets a bad offset, but this hack @@ -25,20 +26,64 @@ Slide { border.color: "black" opacity: 0.5 color: "black" - anchors.fill: textInput - anchors.margins: -textInput.height * 0.2; + anchors.fill: editor + anchors.margins: -editor.height * 0.2; radius: -anchors.margins antialiasing: true } TextInput { - id: textInput + id: editor anchors.top: browser.bottom; anchors.horizontalCenter: browser.horizontalCenter font.pixelSize: slide.baseFontSize; text: "http://qt.digia.com" onAccepted: browser.reload(); color: "white" + + onCursorPositionChanged: { + + var rect = positionToRectangle(cursorPosition); + print(rect); + emitter.x = rect.x; + emitter.y = rect.y; + emitter.width = rect.width; + emitter.height = rect.height; + emitter.burst(10); + } + + ParticleSystem { + id: sys1 + running: slide.visible + } + + ImageParticle { + system: sys1 + source: "images/particle.png" + color: "white" + colorVariation: 0.2 + alpha: 0 + } + + Emitter { + id: emitter + system: sys1 + + enabled: false + + lifeSpan: 2000 + + velocity: PointDirection { xVariation: 30; yVariation: 30; } + acceleration: PointDirection {xVariation: 30; yVariation: 30; y: 100 } + + endSize: 0 + + size: 8 + sizeVariation: 2 + } } + + + } |