diff options
author | Lasse Räihä <lasse.raiha@digia.com> | 2013-05-30 10:34:47 +0300 |
---|---|---|
committer | Kimmo Ollila <kimmo.ollila@digia.com> | 2013-05-30 10:36:54 +0300 |
commit | f8907fe5fca45d51ab79c11fe486b1640015eeeb (patch) | |
tree | c321232896760e60bfd66ff48af1cf37220a56b1 | |
parent | 578108b9330793c77781c1922fa5b0be0d81db05 (diff) |
Removed SlidePuzzle. Refactoring.
Change-Id: I3c7e3fec04d411ccdb942c5be8b743350581a631
Reviewed-by: Kimmo Ollila <kimmo.ollila@digia.com>
-rw-r--r-- | QtDemo/qml/QtDemo/Button.qml | 3 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/Cloud.qml | 4 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/Element.qml | 3 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/IslandElementContainer.qml | 4 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/QuitDialog.qml | 3 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/description/videos.xml | 18 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/gridrssnews/main.qml | 3 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/heartmonitor/main.qml | 6 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/shaders/Logo.qml | 4 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/shaders/LogoContainer.qml | 3 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/shaders/ParameterPanel.qml | 3 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/slidepuzzle/Button.qml | 57 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/slidepuzzle/ButtonList.qml | 13 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/slidepuzzle/Toolbar.qml | 78 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/slidepuzzle/images/QtLogo_background.png | bin | 30311 -> 0 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_0.png | bin | 4041 -> 0 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_1.png | bin | 6996 -> 0 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_2.png | bin | 2683 -> 0 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_3.png | bin | 3711 -> 0 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_4.png | bin | 6907 -> 0 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_5.png | bin | 2065 -> 0 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_6.png | bin | 2385 -> 0 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_7.png | bin | 6866 -> 0 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_8.png | bin | 3361 -> 0 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/slidepuzzle/slidepuzzle.qml | 201 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/Content.qml (renamed from QtDemo/qml/QtDemo/demos/description/Content.qml) | 0 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/ContentVideo.qml (renamed from QtDemo/qml/QtDemo/demos/description/ContentVideo.qml) | 0 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/ControlBar.qml (renamed from QtDemo/qml/QtDemo/demos/description/ControlBar.qml) | 0 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/ImageButton.qml (renamed from QtDemo/qml/QtDemo/demos/description/ImageButton.qml) | 0 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/PlaybackControl.qml (renamed from QtDemo/qml/QtDemo/demos/description/PlaybackControl.qml) | 0 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/ScrollBar.qml (renamed from QtDemo/qml/QtDemo/demos/description/ScrollBar.qml) | 0 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/SeekControl.qml (renamed from QtDemo/qml/QtDemo/demos/description/SeekControl.qml) | 0 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/Slider.qml (renamed from QtDemo/qml/QtDemo/demos/description/Slider.qml) | 0 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/VideoDelegate.qml (renamed from QtDemo/qml/QtDemo/demos/description/VideoDelegate.qml) | 3 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/VideoSelector.qml (renamed from QtDemo/qml/QtDemo/demos/description/VideoSelector.qml) | 4 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/VolumeControl.qml (renamed from QtDemo/qml/QtDemo/demos/description/VolumeControl.qml) | 0 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/images/CloseButton.png (renamed from QtDemo/qml/QtDemo/demos/description/images/CloseButton.png) | bin | 534 -> 534 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/images/PauseButton.png (renamed from QtDemo/qml/QtDemo/demos/description/images/PauseButton.png) | bin | 681 -> 681 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/images/PlayButton.png (renamed from QtDemo/qml/QtDemo/demos/description/images/PlayButton.png) | bin | 1617 -> 1617 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/images/RateButtonForward.png (renamed from QtDemo/qml/QtDemo/demos/description/images/RateButtonForward.png) | bin | 3175 -> 3175 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/images/RateButtonReverse.png (renamed from QtDemo/qml/QtDemo/demos/description/images/RateButtonReverse.png) | bin | 3289 -> 3289 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/images/StopButton.png (renamed from QtDemo/qml/QtDemo/demos/description/images/StopButton.png) | bin | 534 -> 534 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/images/VolumeDown.png (renamed from QtDemo/qml/QtDemo/demos/description/images/VolumeDown.png) | bin | 814 -> 814 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/images/VolumeUp.png (renamed from QtDemo/qml/QtDemo/demos/description/images/VolumeUp.png) | bin | 1972 -> 1972 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/main.qml (renamed from QtDemo/qml/QtDemo/demos/description/main.qml) | 0 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/qt5_video_jens.png (renamed from QtDemo/qml/QtDemo/demos/description/qt5_video_jens.png) | bin | 34519 -> 34519 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/qt5_video_kenneth.png (renamed from QtDemo/qml/QtDemo/demos/description/qt5_video_kenneth.png) | bin | 42023 -> 42023 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/qt5_video_lars.png (renamed from QtDemo/qml/QtDemo/demos/description/qt5_video_lars.png) | bin | 52829 -> 52829 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/qt5_video_samuel.png (renamed from QtDemo/qml/QtDemo/demos/description/qt5_video_samuel.png) | bin | 27869 -> 27869 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/qt5_video_simon.png (renamed from QtDemo/qml/QtDemo/demos/description/qt5_video_simon.png) | bin | 33733 -> 33733 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/qt5_video_thiago.png (renamed from QtDemo/qml/QtDemo/demos/description/qt5_video_thiago.png) | bin | 31894 -> 31894 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/video/qt5_videos.xml (renamed from QtDemo/qml/QtDemo/demos/description/qt5_videos.xml) | 0 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/engine.js | 2 |
53 files changed, 16 insertions, 396 deletions
diff --git a/QtDemo/qml/QtDemo/Button.qml b/QtDemo/qml/QtDemo/Button.qml index d62dd28..813303d 100644 --- a/QtDemo/qml/QtDemo/Button.qml +++ b/QtDemo/qml/QtDemo/Button.qml @@ -1,10 +1,9 @@ import QtQuick 2.0 -Rectangle { +Item { id: root width: (app.height + app.width) * 0.04 height: width - color: "transparent" property string imageSource : "" property double rotation: 0 diff --git a/QtDemo/qml/QtDemo/Cloud.qml b/QtDemo/qml/QtDemo/Cloud.qml index f00d4de..5526988 100644 --- a/QtDemo/qml/QtDemo/Cloud.qml +++ b/QtDemo/qml/QtDemo/Cloud.qml @@ -1,14 +1,12 @@ import QtQuick 2.0 -Rectangle { +Item { id: cloudRoot x: app.width y: randomY+deltaY width: app.width*0.2 height: width*0.4 - color: "transparent" - property int duration: 20000 property string sourceImage: "" property real deltaY: 0 diff --git a/QtDemo/qml/QtDemo/Element.qml b/QtDemo/qml/QtDemo/Element.qml index 5150f4f..5c4426d 100644 --- a/QtDemo/qml/QtDemo/Element.qml +++ b/QtDemo/qml/QtDemo/Element.qml @@ -1,8 +1,7 @@ import QtQuick 2.0 -Rectangle { +Item { id: root - color: "transparent" property int itemId : 1 property int posX: 0 diff --git a/QtDemo/qml/QtDemo/IslandElementContainer.qml b/QtDemo/qml/QtDemo/IslandElementContainer.qml index 42df00b..25ecd29 100644 --- a/QtDemo/qml/QtDemo/IslandElementContainer.qml +++ b/QtDemo/qml/QtDemo/IslandElementContainer.qml @@ -1,13 +1,11 @@ import QtQuick 2.0 -Rectangle { +Item { id: elementContainer width: place == 2 ? 0.8*parent.width : 0.1*islandWidth height: place == 2 ? 0.1*islandHeight : 0.15*islandHeight x: place == 0 ? (-width-0.02*islandWidth) : place == 1 ? (parent.width+0.02*islandWidth) : 0.1*parent.width y: place == 2 ? parent.height : (parent.height - height) - color: "transparent" - //border {width: 3; color: "red"} property int place : 0 property int itemWidth : islandWidth * 0.07 diff --git a/QtDemo/qml/QtDemo/QuitDialog.qml b/QtDemo/qml/QtDemo/QuitDialog.qml index 7c460b3..19c484e 100644 --- a/QtDemo/qml/QtDemo/QuitDialog.qml +++ b/QtDemo/qml/QtDemo/QuitDialog.qml @@ -27,11 +27,10 @@ Rectangle { radius: 10 border { color: "#999999"; width: 1 } - Rectangle { + Item { id: content anchors { left: parent.left; right: parent.right; top: parent.top } height: dialog.height * 0.6 - color: "transparent" Text { anchors.centerIn: parent diff --git a/QtDemo/qml/QtDemo/demos/description/videos.xml b/QtDemo/qml/QtDemo/demos/description/videos.xml deleted file mode 100644 index 4aca775..0000000 --- a/QtDemo/qml/QtDemo/demos/description/videos.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<videolist> - <item> - <title>Video1</title> - <thumbnail>http://findicons.com/files/icons/719/crystal_clear_actions/64/agt_action_fail.png</thumbnail> - <link>http://download.qt-project.org/learning/videos/Qt5-Jens-Bache-Wiig-Qt-Quick.mp4</link> - </item> - <item> - <title>Video2</title> - <thumbnail>http://findicons.com/files/icons/72/harmonia_pastelis/128/hp_fav_star.png</thumbnail> - <link>http://download.qt-project.org/learning/videos/Qt5-Jens-Bache-Wiig-Qt-Quick.mp4</link> - </item> - <item> - <title>Video3</title> - <thumbnail>http://findicons.com/files/icons/1786/oxygen_refit/128/face_gearhead_female_smile.png</thumbnail> - <link>http://download.qt-project.org/learning/videos/Qt5-Jens-Bache-Wiig-Qt-Quick.mp4</link> - </item> -</videolist> diff --git a/QtDemo/qml/QtDemo/demos/gridrssnews/main.qml b/QtDemo/qml/QtDemo/demos/gridrssnews/main.qml index abaa356..a79249a 100644 --- a/QtDemo/qml/QtDemo/demos/gridrssnews/main.qml +++ b/QtDemo/qml/QtDemo/demos/gridrssnews/main.qml @@ -39,7 +39,7 @@ Rectangle { }
// Top bar
- Rectangle {
+ Item {
id: topBar
anchors.left: parent.left
anchors.right: parent.right
@@ -47,7 +47,6 @@ Rectangle { anchors.leftMargin: horizontalMargin
opacity: 0
height: topBarsize
- color: "transparent"
Text {
id: title
anchors.verticalCenter: parent.verticalCenter
diff --git a/QtDemo/qml/QtDemo/demos/heartmonitor/main.qml b/QtDemo/qml/QtDemo/demos/heartmonitor/main.qml index 979cea4..0b9419a 100644 --- a/QtDemo/qml/QtDemo/demos/heartmonitor/main.qml +++ b/QtDemo/qml/QtDemo/demos/heartmonitor/main.qml @@ -78,10 +78,9 @@ Rectangle { }
onHeightChanged: gridCanvas.requestPaint()
- Rectangle {
+ Item {
id: grid
anchors.fill: parent
- color: "transparent"
Canvas {
id: gridCanvas
@@ -133,10 +132,9 @@ Rectangle { opacity: .3
}
- Rectangle {
+ Item {
id: canvasContainer
anchors.fill: canvasBackground
- color: "transparent"
Canvas {
id: heartCanvas
diff --git a/QtDemo/qml/QtDemo/demos/shaders/Logo.qml b/QtDemo/qml/QtDemo/demos/shaders/Logo.qml index 709aea0..d8f29fa 100644 --- a/QtDemo/qml/QtDemo/demos/shaders/Logo.qml +++ b/QtDemo/qml/QtDemo/demos/shaders/Logo.qml @@ -1,9 +1,9 @@ import QtQuick 2.0 import QtQuick.Particles 2.0 -Rectangle { +Item { id: root - color: "transparent" + property int logoSize: Math.min(parent.height, parent.width) / 2 property int logoSizeDivider: 1 property int logoState: 1 diff --git a/QtDemo/qml/QtDemo/demos/shaders/LogoContainer.qml b/QtDemo/qml/QtDemo/demos/shaders/LogoContainer.qml index 9a4cb94..43be60d 100644 --- a/QtDemo/qml/QtDemo/demos/shaders/LogoContainer.qml +++ b/QtDemo/qml/QtDemo/demos/shaders/LogoContainer.qml @@ -1,8 +1,7 @@ import QtQuick 2.0 -Rectangle { +Item { id: root - color: "transparent" anchors.fill: parent property int logoCount: 0 diff --git a/QtDemo/qml/QtDemo/demos/shaders/ParameterPanel.qml b/QtDemo/qml/QtDemo/demos/shaders/ParameterPanel.qml index cb4a82f..33dd5ea 100644 --- a/QtDemo/qml/QtDemo/demos/shaders/ParameterPanel.qml +++ b/QtDemo/qml/QtDemo/demos/shaders/ParameterPanel.qml @@ -61,11 +61,10 @@ Rectangle { Component { id: editDelegate - Rectangle { + Item { id: delegate width: root.width height: root.sliderHeight - color: "transparent" Text { id: text diff --git a/QtDemo/qml/QtDemo/demos/slidepuzzle/Button.qml b/QtDemo/qml/QtDemo/demos/slidepuzzle/Button.qml deleted file mode 100644 index 75b25c7..0000000 --- a/QtDemo/qml/QtDemo/demos/slidepuzzle/Button.qml +++ /dev/null @@ -1,57 +0,0 @@ -import QtQuick 2.0 - -Rectangle { - id: button - property int index: 0; - property int posX: 0; - property int posY: 0; - property bool ready: true; - x: posX * game.buttonWidth() - y: posY * game.buttonHeight() - width: game.buttonWidth() - height: game.buttonHeight() - color: "transparent" - border.color: "#555555" - border.width: game.gameRunning ? 1 : 0 - opacity: button.ready ? 1.0 : 0.7 - - MouseArea { - anchors.fill: parent - onPressed: { - if (game.gameRunning) - game.move(button) - } - } - - Image { - id: buttonImage - anchors.fill: parent - source: "images/button_" + index + ".png" - smooth: true - } - - Behavior on x { - enabled: game.gameRunning; - NumberAnimation { - id: xani - easing.type: Easing.InOutBounce; - duration: 150; - onRunningChanged: { - if (!xani.running) - game.checkGameOver(); - } - } - } - Behavior on y { - enabled: game.gameRunning; - NumberAnimation { - id: yani - easing.type: Easing.InOutBounce; - duration: 150; - onRunningChanged: { - if (!yani.running) - game.checkGameOver(); - } - } - } -} diff --git a/QtDemo/qml/QtDemo/demos/slidepuzzle/ButtonList.qml b/QtDemo/qml/QtDemo/demos/slidepuzzle/ButtonList.qml deleted file mode 100644 index 5f0d9bd..0000000 --- a/QtDemo/qml/QtDemo/demos/slidepuzzle/ButtonList.qml +++ /dev/null @@ -1,13 +0,0 @@ -import QtQuick 2.0 - -Item { - id: buttonList - Button { index: 0; posX:0; posY:0} - Button { index: 1; posX:1; posY:0} - Button { index: 2; posX:2; posY:0} - Button { index: 3; posX:0; posY:1} - Button { index: 4; posX:1; posY:1} - Button { index: 5; posX:2; posY:1} - Button { index: 6; posX:0; posY:2} - Button { index: 7; posX:1; posY:2} -} diff --git a/QtDemo/qml/QtDemo/demos/slidepuzzle/Toolbar.qml b/QtDemo/qml/QtDemo/demos/slidepuzzle/Toolbar.qml deleted file mode 100644 index 483677b..0000000 --- a/QtDemo/qml/QtDemo/demos/slidepuzzle/Toolbar.qml +++ /dev/null @@ -1,78 +0,0 @@ -import QtQuick 2.0 - -Rectangle { - id: toolbar - color: "#232323" - anchors.fill: parent - anchors.rightMargin: 0.7*parent.width; - anchors.leftMargin: -1; - anchors.topMargin: -1; - anchors.bottomMargin: -1 - border.color: "#666666" - function setElapsedSeconds(s) - { - timeText.text = qsTr("Time: " + s + " s"); - } - function setClicks(c) - { - clicksText.text = qsTr("Clicks: " + c); - } - - Text { - id: timeText - color: "#ffffff" - text: qsTr("Time: ") - styleColor: "#ffffff" - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignLeft - anchors.topMargin: toolbar.height*0.05 - anchors.leftMargin: toolbar.height*0.02 - anchors.top: toolbar.top - anchors.right: toolbar.right - anchors.left: toolbar.left - font.pixelSize: toolbar.width * 0.14 - } - - Text { - id: clicksText - color: "#ffffff" - text: qsTr("Clicks: ") - styleColor: "#ffffff" - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignLeft - anchors.topMargin: toolbar.height*0.05 - anchors.leftMargin: toolbar.height*0.02 - anchors.top: timeText.bottom - anchors.right: toolbar.right - anchors.left: toolbar.left - font.pixelSize: toolbar.width * 0.14 - } - - Rectangle - { - id: startButton - anchors.bottom: toolbar.bottom - anchors.right: toolbar.right - anchors.left: toolbar.left - anchors.margins: toolbar.height*0.05 - anchors.bottomMargin: toolbar.height*0.02 - height: toolbar.height * 0.1 - color: "transparent" - radius: 6 - Text { - id: startText - anchors.fill: parent - color: "#987621" - text: qsTr("Start") - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - font.pixelSize: toolbar.width * 0.14 - } - MouseArea { - anchors.fill: parent - onPressed: startButton.color = "#778899" - onReleased: startButton.color = "transparent" - onClicked: game.startNewGame() - } - } -} diff --git a/QtDemo/qml/QtDemo/demos/slidepuzzle/images/QtLogo_background.png b/QtDemo/qml/QtDemo/demos/slidepuzzle/images/QtLogo_background.png Binary files differdeleted file mode 100644 index 55b6926..0000000 --- a/QtDemo/qml/QtDemo/demos/slidepuzzle/images/QtLogo_background.png +++ /dev/null diff --git a/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_0.png b/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_0.png Binary files differdeleted file mode 100644 index 08c93f2..0000000 --- a/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_0.png +++ /dev/null diff --git a/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_1.png b/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_1.png Binary files differdeleted file mode 100644 index 9589e1c..0000000 --- a/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_1.png +++ /dev/null diff --git a/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_2.png b/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_2.png Binary files differdeleted file mode 100644 index d166504..0000000 --- a/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_2.png +++ /dev/null diff --git a/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_3.png b/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_3.png Binary files differdeleted file mode 100644 index 3d6ac64..0000000 --- a/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_3.png +++ /dev/null diff --git a/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_4.png b/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_4.png Binary files differdeleted file mode 100644 index b481a53..0000000 --- a/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_4.png +++ /dev/null diff --git a/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_5.png b/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_5.png Binary files differdeleted file mode 100644 index 29a5352..0000000 --- a/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_5.png +++ /dev/null diff --git a/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_6.png b/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_6.png Binary files differdeleted file mode 100644 index 3c050b1..0000000 --- a/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_6.png +++ /dev/null diff --git a/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_7.png b/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_7.png Binary files differdeleted file mode 100644 index 51c904c..0000000 --- a/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_7.png +++ /dev/null diff --git a/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_8.png b/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_8.png Binary files differdeleted file mode 100644 index 0a08a08..0000000 --- a/QtDemo/qml/QtDemo/demos/slidepuzzle/images/button_8.png +++ /dev/null diff --git a/QtDemo/qml/QtDemo/demos/slidepuzzle/slidepuzzle.qml b/QtDemo/qml/QtDemo/demos/slidepuzzle/slidepuzzle.qml deleted file mode 100644 index 7bddc70..0000000 --- a/QtDemo/qml/QtDemo/demos/slidepuzzle/slidepuzzle.qml +++ /dev/null @@ -1,201 +0,0 @@ -import QtQuick 2.0 - -Rectangle { - id: game - anchors.fill: parent - gradient: Gradient { - GradientStop { position: 0.0; color: "#222222" } - GradientStop { position: 0.3; color: "#666666" } - GradientStop { position: 0.8; color: "#444444" } - } - property int freeX: 2; - property int freeY: 2; - property int time: 0; - property int clicks: 0; - property bool gameRunning: false; - - Toolbar { id: toolbar } - - // Game table - Rectangle { - id: gameTable - color: "transparent" - smooth: true - anchors.fill: parent - anchors.centerIn: parent - anchors.leftMargin: 0.3*parent.width; - - Image { - id: backgroundImage - anchors.fill: parent - source: "images/QtLogo_background.png" - smooth: true - opacity: 0.2 - - MouseArea { - anchors.fill: parent - onPressed: backgroundImage.opacity = 0.5 - onReleased: backgroundImage.opacity = 0.2 - } - } - - ButtonList { id: buttons; } - Button { - index: 8 - posX:2 - posY:2 - visible: !game.gameRunning - opacity: 1.0 - } - } - - // Click clock timer - Timer { - id: clockTimer - interval: 1000 - running: false - repeat: true - onTriggered: { - toolbar.setElapsedSeconds(++time); - } - } - - // Start timer - Timer { - id: startTimer - interval: 10 - running: false - repeat: false - onTriggered: game.startGame() - } - - // Move button to the x,y and set free position - function moveButton(button, x, y) - { - var tempX = button.posX; - var tempY = button.posY; - button.posX = x; - button.posY = y; - freeX = tempX; - freeY = tempY; - } - - function move(button) - { - // Move button to the free place - if (((freeX == button.posX-1 || freeX == button.posX+1) && freeY === button.posY) || - ((freeY == button.posY-1 || freeY == button.posY+1) && freeX === button.posX)) - { - if (game.gameRunning) - toolbar.setClicks(++clicks); - moveButton(button, freeX, freeY); - } - } - - function buttonWidth() { - return 0.33*gameTable.width; - } - function buttonHeight() { - return 0.33*gameTable.height; - } - - // Check if our game is over - function checkGameOver() - { - if (game.gameRunning) - { - var startX = buttonWidth()/2; - var startY = buttonHeight()/2; - var stepX = buttonWidth(); - var stepY = buttonHeight(); - var index = 0; - var ready = true; - - // Check if we are ready. Set the ready-flag in the buttons - // from the start to the first wrong button - for (var y=0; y<3; y++) - { - for (var x=0; x<3; x++) - { - var xx = startX + x*stepX; - var yy = startY + y*stepY; - var btn = buttons.childAt(xx,yy); - if (btn !== null) - { - ready = ready & index === btn.index; - btn.ready = ready; - } - else if (y != 2 || x != 2) - { - ready = false; - } - - index++; - } - } - - if (ready) - { - game.gameRunning = false; - clockTimer.stop(); - // show particles - } - } - } - - // Here we change buttons position - function shakeButtons() - { - var startX = buttonWidth()/2; - var startY = buttonHeight()/2; - var stepX = buttonWidth(); - var stepY = buttonHeight(); - - var now = new Date(); - var seed = now.getMilliseconds(); - - for (var i=0; i<200; i++) - { - seed++; - var num = (Math.floor(4 * Math.random(seed))); - - var xNew = freeX; - var yNew = freeY; - switch (num) - { - case 0: xNew = Math.max(0,freeX-1); break; //move left - case 1: xNew = Math.min(2,freeX+1); break; //move right - case 2: yNew = Math.max(0,freeY-1); break; //move up - default: yNew = Math.min(2,freeX+1); break; //move down - } - - var xx = startX + xNew*stepX; - var yy = startY + yNew*stepY; - if (buttons.childAt(xx,yy) !== null) - game.move(buttons.childAt(xx,yy)); - } - - } - - function startNewGame() - { - game.gameRunning = false; - clockTimer.stop(); - startTimer.start(); - } - - // Start game with shaking buttons - function startGame() - { - // Shake buttons and start new game - shakeButtons(); - - game.gameRunning = true; - clicks = 0; - time = 0; - toolbar.setClicks(0); - toolbar.setElapsedSeconds(0); - clockTimer.start(); - checkGameOver(); - } -} diff --git a/QtDemo/qml/QtDemo/demos/description/Content.qml b/QtDemo/qml/QtDemo/demos/video/Content.qml index de25f13..de25f13 100644 --- a/QtDemo/qml/QtDemo/demos/description/Content.qml +++ b/QtDemo/qml/QtDemo/demos/video/Content.qml diff --git a/QtDemo/qml/QtDemo/demos/description/ContentVideo.qml b/QtDemo/qml/QtDemo/demos/video/ContentVideo.qml index 83c9ab7..83c9ab7 100644 --- a/QtDemo/qml/QtDemo/demos/description/ContentVideo.qml +++ b/QtDemo/qml/QtDemo/demos/video/ContentVideo.qml diff --git a/QtDemo/qml/QtDemo/demos/description/ControlBar.qml b/QtDemo/qml/QtDemo/demos/video/ControlBar.qml index 7568468..7568468 100644 --- a/QtDemo/qml/QtDemo/demos/description/ControlBar.qml +++ b/QtDemo/qml/QtDemo/demos/video/ControlBar.qml diff --git a/QtDemo/qml/QtDemo/demos/description/ImageButton.qml b/QtDemo/qml/QtDemo/demos/video/ImageButton.qml index 50dd3fa..50dd3fa 100644 --- a/QtDemo/qml/QtDemo/demos/description/ImageButton.qml +++ b/QtDemo/qml/QtDemo/demos/video/ImageButton.qml diff --git a/QtDemo/qml/QtDemo/demos/description/PlaybackControl.qml b/QtDemo/qml/QtDemo/demos/video/PlaybackControl.qml index 3a4153f..3a4153f 100644 --- a/QtDemo/qml/QtDemo/demos/description/PlaybackControl.qml +++ b/QtDemo/qml/QtDemo/demos/video/PlaybackControl.qml diff --git a/QtDemo/qml/QtDemo/demos/description/ScrollBar.qml b/QtDemo/qml/QtDemo/demos/video/ScrollBar.qml index 05b8c64..05b8c64 100644 --- a/QtDemo/qml/QtDemo/demos/description/ScrollBar.qml +++ b/QtDemo/qml/QtDemo/demos/video/ScrollBar.qml diff --git a/QtDemo/qml/QtDemo/demos/description/SeekControl.qml b/QtDemo/qml/QtDemo/demos/video/SeekControl.qml index ff4e55a..ff4e55a 100644 --- a/QtDemo/qml/QtDemo/demos/description/SeekControl.qml +++ b/QtDemo/qml/QtDemo/demos/video/SeekControl.qml diff --git a/QtDemo/qml/QtDemo/demos/description/Slider.qml b/QtDemo/qml/QtDemo/demos/video/Slider.qml index f952163..f952163 100644 --- a/QtDemo/qml/QtDemo/demos/description/Slider.qml +++ b/QtDemo/qml/QtDemo/demos/video/Slider.qml diff --git a/QtDemo/qml/QtDemo/demos/description/VideoDelegate.qml b/QtDemo/qml/QtDemo/demos/video/VideoDelegate.qml index d49a30d..aa5a3cb 100644 --- a/QtDemo/qml/QtDemo/demos/description/VideoDelegate.qml +++ b/QtDemo/qml/QtDemo/demos/video/VideoDelegate.qml @@ -1,10 +1,9 @@ import QtQuick 2.0 -Rectangle { +Item { id: delegate height: grid.cellHeight width: grid.cellWidth - color: "transparent" property int tileMargin: videoSelector.tileMargin signal videoSelected(string link) diff --git a/QtDemo/qml/QtDemo/demos/description/VideoSelector.qml b/QtDemo/qml/QtDemo/demos/video/VideoSelector.qml index 0b81da7..564f1ed 100644 --- a/QtDemo/qml/QtDemo/demos/description/VideoSelector.qml +++ b/QtDemo/qml/QtDemo/demos/video/VideoSelector.qml @@ -1,9 +1,9 @@ import QtQuick 2.0 import QtQuick.XmlListModel 2.0 -Rectangle { +Item { id: videoSelector - color: "transparent" + property int tileHeight: parseInt(grid.height / 2) property int tileMargin: tileHeight * 0.1 property int tileFontSize: tileHeight * 0.05 diff --git a/QtDemo/qml/QtDemo/demos/description/VolumeControl.qml b/QtDemo/qml/QtDemo/demos/video/VolumeControl.qml index a71d66e..a71d66e 100644 --- a/QtDemo/qml/QtDemo/demos/description/VolumeControl.qml +++ b/QtDemo/qml/QtDemo/demos/video/VolumeControl.qml diff --git a/QtDemo/qml/QtDemo/demos/description/images/CloseButton.png b/QtDemo/qml/QtDemo/demos/video/images/CloseButton.png Binary files differindex 24407fe..24407fe 100644 --- a/QtDemo/qml/QtDemo/demos/description/images/CloseButton.png +++ b/QtDemo/qml/QtDemo/demos/video/images/CloseButton.png diff --git a/QtDemo/qml/QtDemo/demos/description/images/PauseButton.png b/QtDemo/qml/QtDemo/demos/video/images/PauseButton.png Binary files differindex b58ceb4..b58ceb4 100644 --- a/QtDemo/qml/QtDemo/demos/description/images/PauseButton.png +++ b/QtDemo/qml/QtDemo/demos/video/images/PauseButton.png diff --git a/QtDemo/qml/QtDemo/demos/description/images/PlayButton.png b/QtDemo/qml/QtDemo/demos/video/images/PlayButton.png Binary files differindex 247fe32..247fe32 100644 --- a/QtDemo/qml/QtDemo/demos/description/images/PlayButton.png +++ b/QtDemo/qml/QtDemo/demos/video/images/PlayButton.png diff --git a/QtDemo/qml/QtDemo/demos/description/images/RateButtonForward.png b/QtDemo/qml/QtDemo/demos/video/images/RateButtonForward.png Binary files differindex ebfca0d..ebfca0d 100644 --- a/QtDemo/qml/QtDemo/demos/description/images/RateButtonForward.png +++ b/QtDemo/qml/QtDemo/demos/video/images/RateButtonForward.png diff --git a/QtDemo/qml/QtDemo/demos/description/images/RateButtonReverse.png b/QtDemo/qml/QtDemo/demos/video/images/RateButtonReverse.png Binary files differindex 1837bfd..1837bfd 100644 --- a/QtDemo/qml/QtDemo/demos/description/images/RateButtonReverse.png +++ b/QtDemo/qml/QtDemo/demos/video/images/RateButtonReverse.png diff --git a/QtDemo/qml/QtDemo/demos/description/images/StopButton.png b/QtDemo/qml/QtDemo/demos/video/images/StopButton.png Binary files differindex 76bcbc8..76bcbc8 100644 --- a/QtDemo/qml/QtDemo/demos/description/images/StopButton.png +++ b/QtDemo/qml/QtDemo/demos/video/images/StopButton.png diff --git a/QtDemo/qml/QtDemo/demos/description/images/VolumeDown.png b/QtDemo/qml/QtDemo/demos/video/images/VolumeDown.png Binary files differindex 38b1013..38b1013 100644 --- a/QtDemo/qml/QtDemo/demos/description/images/VolumeDown.png +++ b/QtDemo/qml/QtDemo/demos/video/images/VolumeDown.png diff --git a/QtDemo/qml/QtDemo/demos/description/images/VolumeUp.png b/QtDemo/qml/QtDemo/demos/video/images/VolumeUp.png Binary files differindex cffe961..cffe961 100644 --- a/QtDemo/qml/QtDemo/demos/description/images/VolumeUp.png +++ b/QtDemo/qml/QtDemo/demos/video/images/VolumeUp.png diff --git a/QtDemo/qml/QtDemo/demos/description/main.qml b/QtDemo/qml/QtDemo/demos/video/main.qml index 5987843..5987843 100644 --- a/QtDemo/qml/QtDemo/demos/description/main.qml +++ b/QtDemo/qml/QtDemo/demos/video/main.qml diff --git a/QtDemo/qml/QtDemo/demos/description/qt5_video_jens.png b/QtDemo/qml/QtDemo/demos/video/qt5_video_jens.png Binary files differindex 84f3bce..84f3bce 100644 --- a/QtDemo/qml/QtDemo/demos/description/qt5_video_jens.png +++ b/QtDemo/qml/QtDemo/demos/video/qt5_video_jens.png diff --git a/QtDemo/qml/QtDemo/demos/description/qt5_video_kenneth.png b/QtDemo/qml/QtDemo/demos/video/qt5_video_kenneth.png Binary files differindex eecb297..eecb297 100644 --- a/QtDemo/qml/QtDemo/demos/description/qt5_video_kenneth.png +++ b/QtDemo/qml/QtDemo/demos/video/qt5_video_kenneth.png diff --git a/QtDemo/qml/QtDemo/demos/description/qt5_video_lars.png b/QtDemo/qml/QtDemo/demos/video/qt5_video_lars.png Binary files differindex 51e0701..51e0701 100644 --- a/QtDemo/qml/QtDemo/demos/description/qt5_video_lars.png +++ b/QtDemo/qml/QtDemo/demos/video/qt5_video_lars.png diff --git a/QtDemo/qml/QtDemo/demos/description/qt5_video_samuel.png b/QtDemo/qml/QtDemo/demos/video/qt5_video_samuel.png Binary files differindex 1ed97c1..1ed97c1 100644 --- a/QtDemo/qml/QtDemo/demos/description/qt5_video_samuel.png +++ b/QtDemo/qml/QtDemo/demos/video/qt5_video_samuel.png diff --git a/QtDemo/qml/QtDemo/demos/description/qt5_video_simon.png b/QtDemo/qml/QtDemo/demos/video/qt5_video_simon.png Binary files differindex 583c564..583c564 100644 --- a/QtDemo/qml/QtDemo/demos/description/qt5_video_simon.png +++ b/QtDemo/qml/QtDemo/demos/video/qt5_video_simon.png diff --git a/QtDemo/qml/QtDemo/demos/description/qt5_video_thiago.png b/QtDemo/qml/QtDemo/demos/video/qt5_video_thiago.png Binary files differindex abf8522..abf8522 100644 --- a/QtDemo/qml/QtDemo/demos/description/qt5_video_thiago.png +++ b/QtDemo/qml/QtDemo/demos/video/qt5_video_thiago.png diff --git a/QtDemo/qml/QtDemo/demos/description/qt5_videos.xml b/QtDemo/qml/QtDemo/demos/video/qt5_videos.xml index 420e476..420e476 100644 --- a/QtDemo/qml/QtDemo/demos/description/qt5_videos.xml +++ b/QtDemo/qml/QtDemo/demos/video/qt5_videos.xml diff --git a/QtDemo/qml/QtDemo/engine.js b/QtDemo/qml/QtDemo/engine.js index 32074d2..2183a2b 100644 --- a/QtDemo/qml/QtDemo/engine.js +++ b/QtDemo/qml/QtDemo/engine.js @@ -6,7 +6,7 @@ var positions = [ {x:1750, y:-1650, 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:900, y:-300, gid: 2, url: "demos/description/main.qml", device: 7, name: "Qt Video"}, + {x:900, y:-300, gid: 2, url: "demos/video/main.qml", device: 7, name: "Qt Video"}, {x:-100, y:-100, gid: 2, url: "demos/radio/radio.qml", device: 4, name: "Internet Radio"}, {x:-1500, y:0, gid: 3, url: "demos/maroon/Maroon.qml", device: 1, name: "Maroon in\n Trouble"}, |