From 27d22c5f4201c7555b42e187252bee3fd88d3821 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 13 Jun 2013 15:13:32 +0200 Subject: Doc: Move Qt Quick 1 demos and their documentation When installing the examples, we currently end up with a QT_INSTALL_EXAMPLES/demos directory with nothing but documentation files. This change moves the docs and also the demos themselves into examples/declarative/demos. Also fixes the links in demo .qdoc files. Task-number: QTBUG-31722 Change-Id: Ied15526be1db8437e14be786ea69eae98af8dd3f Reviewed-by: Jerome Pasion --- examples/declarative/demos/rssnews/main.cpp | 55 ++++++++++ .../rssnews/qml/rssnews/content/BusyIndicator.qml | 53 ++++++++++ .../qml/rssnews/content/CategoryDelegate.qml | 82 +++++++++++++++ .../rssnews/qml/rssnews/content/NewsDelegate.qml | 71 +++++++++++++ .../demos/rssnews/qml/rssnews/content/RssFeeds.qml | 59 +++++++++++ .../rssnews/qml/rssnews/content/ScrollBar.qml | 107 ++++++++++++++++++++ .../rssnews/qml/rssnews/content/images/busy.png | Bin 0 -> 2629 bytes .../qml/rssnews/content/images/scrollbar.png | Bin 0 -> 161 bytes .../demos/rssnews/qml/rssnews/rssnews.qml | 111 +++++++++++++++++++++ examples/declarative/demos/rssnews/rssnews.desktop | 11 ++ examples/declarative/demos/rssnews/rssnews.pro | 24 +++++ .../declarative/demos/rssnews/rssnews.qmlproject | 16 +++ examples/declarative/demos/rssnews/rssnews.svg | 93 +++++++++++++++++ examples/declarative/demos/rssnews/rssnews64.png | Bin 0 -> 3400 bytes examples/declarative/demos/rssnews/rssnews80.png | Bin 0 -> 4945 bytes .../demos/rssnews/rssnews_harmattan.desktop | 11 ++ 16 files changed, 693 insertions(+) create mode 100644 examples/declarative/demos/rssnews/main.cpp create mode 100644 examples/declarative/demos/rssnews/qml/rssnews/content/BusyIndicator.qml create mode 100644 examples/declarative/demos/rssnews/qml/rssnews/content/CategoryDelegate.qml create mode 100644 examples/declarative/demos/rssnews/qml/rssnews/content/NewsDelegate.qml create mode 100644 examples/declarative/demos/rssnews/qml/rssnews/content/RssFeeds.qml create mode 100644 examples/declarative/demos/rssnews/qml/rssnews/content/ScrollBar.qml create mode 100644 examples/declarative/demos/rssnews/qml/rssnews/content/images/busy.png create mode 100644 examples/declarative/demos/rssnews/qml/rssnews/content/images/scrollbar.png create mode 100644 examples/declarative/demos/rssnews/qml/rssnews/rssnews.qml create mode 100644 examples/declarative/demos/rssnews/rssnews.desktop create mode 100644 examples/declarative/demos/rssnews/rssnews.pro create mode 100644 examples/declarative/demos/rssnews/rssnews.qmlproject create mode 100644 examples/declarative/demos/rssnews/rssnews.svg create mode 100644 examples/declarative/demos/rssnews/rssnews64.png create mode 100644 examples/declarative/demos/rssnews/rssnews80.png create mode 100644 examples/declarative/demos/rssnews/rssnews_harmattan.desktop (limited to 'examples/declarative/demos/rssnews') diff --git a/examples/declarative/demos/rssnews/main.cpp b/examples/declarative/demos/rssnews/main.cpp new file mode 100644 index 00000000..d4066f73 --- /dev/null +++ b/examples/declarative/demos/rssnews/main.cpp @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qmlapplicationviewer.h" +#include + +Q_DECL_EXPORT int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + + QmlApplicationViewer viewer; + viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto); + viewer.setMainQmlFile(QLatin1String("qml/rssnews/rssnews.qml")); + viewer.showExpanded(); + + return app.exec(); +} diff --git a/examples/declarative/demos/rssnews/qml/rssnews/content/BusyIndicator.qml b/examples/declarative/demos/rssnews/qml/rssnews/content/BusyIndicator.qml new file mode 100644 index 00000000..71e6c019 --- /dev/null +++ b/examples/declarative/demos/rssnews/qml/rssnews/content/BusyIndicator.qml @@ -0,0 +1,53 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Image { + id: container + property bool on: false + + source: "images/busy.png"; visible: container.on + + NumberAnimation on rotation { + running: container.on; from: 0; to: 360; loops: Animation.Infinite; duration: 1200 + } +} diff --git a/examples/declarative/demos/rssnews/qml/rssnews/content/CategoryDelegate.qml b/examples/declarative/demos/rssnews/qml/rssnews/content/CategoryDelegate.qml new file mode 100644 index 00000000..a1ad72c4 --- /dev/null +++ b/examples/declarative/demos/rssnews/qml/rssnews/content/CategoryDelegate.qml @@ -0,0 +1,82 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Item { + id: delegate + + width: delegate.ListView.view.width; height: 60 + + Text { + text: name + color: delegate.ListView.isCurrentItem ? "white" : "black" + font { family: "Helvetica"; pixelSize: 16; bold: true } + anchors { + left: parent.left; leftMargin: 15 + verticalCenter: parent.verticalCenter + } + } + + BusyIndicator { + scale: 0.6 + on: delegate.ListView.isCurrentItem && window.loading + anchors { right: parent.right; rightMargin: 10; verticalCenter: parent.verticalCenter } + } + + Rectangle { + width: delegate.width; height: 1; color: "#cccccc" + anchors.bottom: delegate.bottom + visible: delegate.ListView.isCurrentItem ? false : true + } + Rectangle { + width: delegate.width; height: 1; color: "white" + visible: delegate.ListView.isCurrentItem ? false : true + } + + MouseArea { + anchors.fill: delegate + onClicked: { + delegate.ListView.view.currentIndex = index + window.currentFeed = feed + } + } +} diff --git a/examples/declarative/demos/rssnews/qml/rssnews/content/NewsDelegate.qml b/examples/declarative/demos/rssnews/qml/rssnews/content/NewsDelegate.qml new file mode 100644 index 00000000..3a3be14c --- /dev/null +++ b/examples/declarative/demos/rssnews/qml/rssnews/content/NewsDelegate.qml @@ -0,0 +1,71 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Item { + id: delegate + height: column.height + 40 + width: delegate.ListView.view.width + + Column { + id: column + x: 20; y: 20 + width: parent.width - 40 + + Text { + id: titleText + text: title; width: parent.width; wrapMode: Text.WordWrap + font { bold: true; family: "Helvetica"; pointSize: 16 } + } + + Text { + id: descriptionText + width: parent.width; text: description + wrapMode: Text.WordWrap; font.family: "Helvetica" + } + } + + Rectangle { + width: parent.width; height: 1; color: "#cccccc" + anchors.bottom: parent.bottom + } +} diff --git a/examples/declarative/demos/rssnews/qml/rssnews/content/RssFeeds.qml b/examples/declarative/demos/rssnews/qml/rssnews/content/RssFeeds.qml new file mode 100644 index 00000000..c2285b25 --- /dev/null +++ b/examples/declarative/demos/rssnews/qml/rssnews/content/RssFeeds.qml @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +ListModel { + id: rssFeeds + + ListElement { name: "Top Stories"; feed: "rss.news.yahoo.com/rss/topstories" } + ListElement { name: "World"; feed: "rss.news.yahoo.com/rss/world" } + ListElement { name: "Europe"; feed: "rss.news.yahoo.com/rss/europe" } + ListElement { name: "Oceania"; feed: "rss.news.yahoo.com/rss/oceania" } + ListElement { name: "U.S. National"; feed: "rss.news.yahoo.com/rss/us" } + ListElement { name: "Politics"; feed: "rss.news.yahoo.com/rss/politics" } + ListElement { name: "Business"; feed: "rss.news.yahoo.com/rss/business" } + ListElement { name: "Technology"; feed: "rss.news.yahoo.com/rss/tech" } + ListElement { name: "Entertainment"; feed: "rss.news.yahoo.com/rss/entertainment" } + ListElement { name: "Health"; feed: "rss.news.yahoo.com/rss/health" } + ListElement { name: "Science"; feed: "rss.news.yahoo.com/rss/science" } + ListElement { name: "Sports"; feed: "rss.news.yahoo.com/rss/sports" } +} diff --git a/examples/declarative/demos/rssnews/qml/rssnews/content/ScrollBar.qml b/examples/declarative/demos/rssnews/qml/rssnews/content/ScrollBar.qml new file mode 100644 index 00000000..a873bd3e --- /dev/null +++ b/examples/declarative/demos/rssnews/qml/rssnews/content/ScrollBar.qml @@ -0,0 +1,107 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Item { + id: container + + property variant scrollArea + property variant orientation: Qt.Vertical + + opacity: 0 + + function position() + { + var ny = 0; + if (container.orientation == Qt.Vertical) + ny = scrollArea.visibleArea.yPosition * container.height; + else + ny = scrollArea.visibleArea.xPosition * container.width; + if (ny > 2) return ny; else return 2; + } + + function size() + { + var nh, ny; + + if (container.orientation == Qt.Vertical) + nh = scrollArea.visibleArea.heightRatio * container.height; + else + nh = scrollArea.visibleArea.widthRatio * container.width; + + if (container.orientation == Qt.Vertical) + ny = scrollArea.visibleArea.yPosition * container.height; + else + ny = scrollArea.visibleArea.xPosition * container.width; + + if (ny > 3) { + var t; + if (container.orientation == Qt.Vertical) + t = Math.ceil(container.height - 3 - ny); + else + t = Math.ceil(container.width - 3 - ny); + if (nh > t) return t; else return nh; + } else return nh + ny; + } + + Rectangle { anchors.fill: parent; color: "Black"; opacity: 0.3 } + + BorderImage { + source: "images/scrollbar.png" + border { left: 1; right: 1; top: 1; bottom: 1 } + x: container.orientation == Qt.Vertical ? 2 : position() + width: container.orientation == Qt.Vertical ? container.width - 4 : size() + y: container.orientation == Qt.Vertical ? position() : 2 + height: container.orientation == Qt.Vertical ? size() : container.height - 4 + } + + states: State { + name: "visible" + when: container.orientation == Qt.Vertical ? scrollArea.movingVertically : scrollArea.movingHorizontally + PropertyChanges { target: container; opacity: 1.0 } + } + + transitions: Transition { + from: "visible"; to: "" + NumberAnimation { properties: "opacity"; duration: 600 } + } +} diff --git a/examples/declarative/demos/rssnews/qml/rssnews/content/images/busy.png b/examples/declarative/demos/rssnews/qml/rssnews/content/images/busy.png new file mode 100644 index 00000000..664c2b14 Binary files /dev/null and b/examples/declarative/demos/rssnews/qml/rssnews/content/images/busy.png differ diff --git a/examples/declarative/demos/rssnews/qml/rssnews/content/images/scrollbar.png b/examples/declarative/demos/rssnews/qml/rssnews/content/images/scrollbar.png new file mode 100644 index 00000000..0228dcf9 Binary files /dev/null and b/examples/declarative/demos/rssnews/qml/rssnews/content/images/scrollbar.png differ diff --git a/examples/declarative/demos/rssnews/qml/rssnews/rssnews.qml b/examples/declarative/demos/rssnews/qml/rssnews/rssnews.qml new file mode 100644 index 00000000..e39e2f75 --- /dev/null +++ b/examples/declarative/demos/rssnews/qml/rssnews/rssnews.qml @@ -0,0 +1,111 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 +import "content" + +Rectangle { + id: window + width: 800; height: 480 + + property string currentFeed: "rss.news.yahoo.com/rss/topstories" + property bool loading: feedModel.status == XmlListModel.Loading + + RssFeeds { id: rssFeeds } + + XmlListModel { + id: feedModel + source: "http://" + window.currentFeed + query: "/rss/channel/item" + + XmlRole { name: "title"; query: "title/string()" } + XmlRole { name: "link"; query: "link/string()" } + XmlRole { name: "description"; query: "description/string()" } + } + + Row { + Rectangle { + width: 220; height: window.height + color: "#efefef" + + ListView { + focus: true + id: categories + anchors.fill: parent + model: rssFeeds + footer: quitButtonDelegate + delegate: CategoryDelegate {} + highlight: Rectangle { color: "steelblue" } + highlightMoveSpeed: 9999999 + } + ScrollBar { + scrollArea: categories; height: categories.height; width: 8 + anchors.right: categories.right + } + } + ListView { + id: list + width: window.width - 220; height: window.height + model: feedModel + delegate: NewsDelegate {} + } + } + Component { + id: quitButtonDelegate + Item { + width: categories.width; height: 60 + Text { + text: "Quit" + font { family: "Helvetica"; pixelSize: 16; bold: true } + anchors { + left: parent.left; leftMargin: 15 + verticalCenter: parent.verticalCenter + } + } + MouseArea { + anchors.fill: parent + onClicked: Qt.quit() + } + } + } + ScrollBar { scrollArea: list; height: list.height; width: 8; anchors.right: window.right } + Rectangle { x: 220; height: window.height; width: 1; color: "#cccccc" } +} diff --git a/examples/declarative/demos/rssnews/rssnews.desktop b/examples/declarative/demos/rssnews/rssnews.desktop new file mode 100644 index 00000000..7d02ed5f --- /dev/null +++ b/examples/declarative/demos/rssnews/rssnews.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=rssnews +Exec=/opt/rssnews/bin/rssnews +Icon=rssnews64 +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/declarative/demos/rssnews/rssnews.pro b/examples/declarative/demos/rssnews/rssnews.pro new file mode 100644 index 00000000..5cdb9a95 --- /dev/null +++ b/examples/declarative/demos/rssnews/rssnews.pro @@ -0,0 +1,24 @@ +# Add more folders to ship with the application, here +folder_01.source = qml/rssnews +folder_01.target = qml +DEPLOYMENTFOLDERS = folder_01 + +# Additional import path used to resolve QML modules in Creator's code model +QML_IMPORT_PATH = + +# If your application uses the Qt Mobility libraries, uncomment the following +# lines and add the respective components to the MOBILITY variable. +# CONFIG += mobility +# MOBILITY += + +# Speed up launching on MeeGo/Harmattan when using applauncherd daemon +# CONFIG += qdeclarative-boostable + +# The .cpp file which was generated for your project. Feel free to hack it. +SOURCES += main.cpp + +# Please do not modify the following two lines. Required for deployment. +desktopInstallPrefix = $$[QT_INSTALL_EXAMPLES]/declarative/demos/rssnews +exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +qtcAddDeployment() diff --git a/examples/declarative/demos/rssnews/rssnews.qmlproject b/examples/declarative/demos/rssnews/rssnews.qmlproject new file mode 100644 index 00000000..608be8d3 --- /dev/null +++ b/examples/declarative/demos/rssnews/rssnews.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "qml/rssnews" + } + JavaScriptFiles { + directory: "qml/rssnews" + } + ImageFiles { + directory: "qml/rssnews" + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} diff --git a/examples/declarative/demos/rssnews/rssnews.svg b/examples/declarative/demos/rssnews/rssnews.svg new file mode 100644 index 00000000..566acfad --- /dev/null +++ b/examples/declarative/demos/rssnews/rssnews.svg @@ -0,0 +1,93 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/examples/declarative/demos/rssnews/rssnews64.png b/examples/declarative/demos/rssnews/rssnews64.png new file mode 100644 index 00000000..707d5c4e Binary files /dev/null and b/examples/declarative/demos/rssnews/rssnews64.png differ diff --git a/examples/declarative/demos/rssnews/rssnews80.png b/examples/declarative/demos/rssnews/rssnews80.png new file mode 100644 index 00000000..6ad8096c Binary files /dev/null and b/examples/declarative/demos/rssnews/rssnews80.png differ diff --git a/examples/declarative/demos/rssnews/rssnews_harmattan.desktop b/examples/declarative/demos/rssnews/rssnews_harmattan.desktop new file mode 100644 index 00000000..df6303ff --- /dev/null +++ b/examples/declarative/demos/rssnews/rssnews_harmattan.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=rssnews +Exec=/usr/bin/single-instance /opt/rssnews/bin/rssnews +Icon=/usr/share/icons/hicolor/80x80/apps/rssnews80.png +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable -- cgit v1.2.3