aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick')
-rw-r--r--examples/quick/demos/clocks/clocks.pro14
-rw-r--r--examples/quick/demos/clocks/clocks.qml6
-rw-r--r--examples/quick/demos/clocks/clocks.qrc15
-rw-r--r--examples/quick/demos/clocks/main.cpp41
-rw-r--r--examples/quick/demos/demos.pro2
5 files changed, 74 insertions, 4 deletions
diff --git a/examples/quick/demos/clocks/clocks.pro b/examples/quick/demos/clocks/clocks.pro
new file mode 100644
index 0000000000..21d3f7f971
--- /dev/null
+++ b/examples/quick/demos/clocks/clocks.pro
@@ -0,0 +1,14 @@
+TEMPLATE = app
+
+QT += qml quick
+
+SOURCES += main.cpp
+RESOURCES += clocks.qrc
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/clocks
+INSTALLS += target
+
+OTHER_FILES += \
+ clocks.qml \
+ content/Clock.qml \
+ content/*.png
diff --git a/examples/quick/demos/clocks/clocks.qml b/examples/quick/demos/clocks/clocks.qml
index ddf9e42ea2..d16e3c5442 100644
--- a/examples/quick/demos/clocks/clocks.qml
+++ b/examples/quick/demos/clocks/clocks.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the examples of the Qt Toolkit.
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import "content"
+import "content" as Content
Rectangle {
id: root
@@ -54,7 +54,7 @@ Rectangle {
snapMode: ListView.SnapOneItem
highlightRangeMode: ListView.ApplyRange
- delegate: Clock { city: cityName; shift: timeShift }
+ delegate: Content.Clock { city: cityName; shift: timeShift }
model: ListModel {
ListElement { cityName: "New York"; timeShift: -4 }
ListElement { cityName: "London"; timeShift: 0 }
diff --git a/examples/quick/demos/clocks/clocks.qrc b/examples/quick/demos/clocks/clocks.qrc
new file mode 100644
index 0000000000..eaff4729ae
--- /dev/null
+++ b/examples/quick/demos/clocks/clocks.qrc
@@ -0,0 +1,15 @@
+<RCC>
+ <qresource prefix="/demos/clocks">
+ <file>clocks.qml</file>
+ <file>content/arrow.png</file>
+ <file>content/background.png</file>
+ <file>content/center.png</file>
+ <file>content/clock-night.png</file>
+ <file>content/clock.png</file>
+ <file>content/Clock.qml</file>
+ <file>content/hour.png</file>
+ <file>content/minute.png</file>
+ <file>content/quit.png</file>
+ <file>content/second.png</file>
+ </qresource>
+</RCC>
diff --git a/examples/quick/demos/clocks/main.cpp b/examples/quick/demos/clocks/main.cpp
new file mode 100644
index 0000000000..f6b7f87d38
--- /dev/null
+++ b/examples/quick/demos/clocks/main.cpp
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "../../shared/shared.h"
+DECLARATIVE_EXAMPLE_MAIN(demos/clocks/clocks)
diff --git a/examples/quick/demos/demos.pro b/examples/quick/demos/demos.pro
index 867dfa5a07..ac15cc3c1f 100644
--- a/examples/quick/demos/demos.pro
+++ b/examples/quick/demos/demos.pro
@@ -1,12 +1,12 @@
TEMPLATE = subdirs
SUBDIRS = samegame \
calqlatr \
+ clocks \
tweetsearch \
maroon \
photosurface \
stocqt
EXAMPLE_FILES = \
- clocks \
photoviewer \
rssnews