From 0fb0d434b4e5745712ff31c6f9f4dd686e404893 Mon Sep 17 00:00:00 2001 From: Damian Jansen Date: Thu, 25 Aug 2011 13:55:54 +1000 Subject: Update calculator, i18n, imageelements examples to QtQuick 2.0 Change-Id: Ib506f6b1daf431135c6608bdf1c5ea3afe08b213 Reviewed-on: http://codereview.qt.nokia.com/3551 Reviewed-by: Qt Sanity Bot Reviewed-by: Alan Alpert --- examples/declarative/calculator/Core/Button.qml | 2 +- examples/declarative/calculator/Core/Display.qml | 2 +- examples/declarative/calculator/calculator.qml | 2 +- .../declarative/calculator/calculator.qmlproject | 16 -- examples/declarative/i18n/i18n.desktop | 11 -- examples/declarative/i18n/i18n.png | Bin 3400 -> 0 bytes examples/declarative/i18n/i18n.pro | 39 ---- examples/declarative/i18n/i18n.qml | 8 +- examples/declarative/i18n/i18n.svg | 93 ---------- examples/declarative/i18n/i18n/base.ts | 12 ++ examples/declarative/i18n/i18n/qml_en_AU.ts | 12 ++ examples/declarative/i18n/i18n/qml_fr.ts | 12 ++ examples/declarative/i18n/main.cpp | 54 ------ examples/declarative/i18n/qml/i18n.qml | 78 -------- examples/declarative/i18n/qml/i18n/base.ts | 12 -- examples/declarative/i18n/qml/i18n/qml_en_AU.ts | 12 -- examples/declarative/i18n/qml/i18n/qml_fr.ts | 12 -- .../qmlapplicationviewer/qmlapplicationviewer.cpp | 197 --------------------- .../qmlapplicationviewer/qmlapplicationviewer.h | 79 --------- .../qmlapplicationviewer/qmlapplicationviewer.pri | 154 ---------------- .../imageelements/borderimage/borderimage.desktop | 11 -- .../imageelements/borderimage/borderimage.png | Bin 3400 -> 0 bytes .../imageelements/borderimage/borderimage.pro | 39 ---- .../imageelements/borderimage/borderimage.qml | 2 +- .../imageelements/borderimage/borderimage.svg | 93 ---------- .../borderimage/content/MyBorderImage.qml | 2 +- .../borderimage/content/ShadowRectangle.qml | 2 +- .../imageelements/borderimage/content/bw.png | Bin 0 -> 1357 bytes .../borderimage/content/colors-round.sci | 7 + .../borderimage/content/colors-stretch.sci | 5 + .../imageelements/borderimage/content/colors.png | Bin 0 -> 1655 bytes .../imageelements/borderimage/content/shadow.png | Bin 0 -> 588 bytes .../declarative/imageelements/borderimage/main.cpp | 54 ------ .../imageelements/borderimage/qml/borderimage.qml | 97 ---------- .../borderimage/qml/content/MyBorderImage.qml | 90 ---------- .../borderimage/qml/content/ShadowRectangle.qml | 54 ------ .../imageelements/borderimage/qml/content/bw.png | Bin 1357 -> 0 bytes .../borderimage/qml/content/colors-round.sci | 7 - .../borderimage/qml/content/colors-stretch.sci | 5 - .../borderimage/qml/content/colors.png | Bin 1655 -> 0 bytes .../borderimage/qml/content/shadow.png | Bin 588 -> 0 bytes .../imageelements/borderimage/qml/shadows.qml | 64 ------- .../qmlapplicationviewer/qmlapplicationviewer.cpp | 197 --------------------- .../qmlapplicationviewer/qmlapplicationviewer.h | 79 --------- .../qmlapplicationviewer/qmlapplicationviewer.pri | 154 ---------------- .../qtc_packaging/debian_fremantle/README | 6 - .../qtc_packaging/debian_fremantle/changelog | 5 - .../qtc_packaging/debian_fremantle/compat | 1 - .../qtc_packaging/debian_fremantle/control | 13 -- .../qtc_packaging/debian_fremantle/copyright | 40 ----- .../qtc_packaging/debian_fremantle/rules | 91 ---------- .../imageelements/borderimage/shadows.qml | 2 +- 52 files changed, 59 insertions(+), 1868 deletions(-) delete mode 100644 examples/declarative/calculator/calculator.qmlproject delete mode 100644 examples/declarative/i18n/i18n.desktop delete mode 100644 examples/declarative/i18n/i18n.png delete mode 100644 examples/declarative/i18n/i18n.pro delete mode 100644 examples/declarative/i18n/i18n.svg create mode 100644 examples/declarative/i18n/i18n/base.ts create mode 100644 examples/declarative/i18n/i18n/qml_en_AU.ts create mode 100644 examples/declarative/i18n/i18n/qml_fr.ts delete mode 100644 examples/declarative/i18n/main.cpp delete mode 100644 examples/declarative/i18n/qml/i18n.qml delete mode 100644 examples/declarative/i18n/qml/i18n/base.ts delete mode 100644 examples/declarative/i18n/qml/i18n/qml_en_AU.ts delete mode 100644 examples/declarative/i18n/qml/i18n/qml_fr.ts delete mode 100644 examples/declarative/i18n/qmlapplicationviewer/qmlapplicationviewer.cpp delete mode 100644 examples/declarative/i18n/qmlapplicationviewer/qmlapplicationviewer.h delete mode 100644 examples/declarative/i18n/qmlapplicationviewer/qmlapplicationviewer.pri delete mode 100644 examples/declarative/imageelements/borderimage/borderimage.desktop delete mode 100644 examples/declarative/imageelements/borderimage/borderimage.png delete mode 100644 examples/declarative/imageelements/borderimage/borderimage.pro delete mode 100644 examples/declarative/imageelements/borderimage/borderimage.svg create mode 100644 examples/declarative/imageelements/borderimage/content/bw.png create mode 100644 examples/declarative/imageelements/borderimage/content/colors-round.sci create mode 100644 examples/declarative/imageelements/borderimage/content/colors-stretch.sci create mode 100644 examples/declarative/imageelements/borderimage/content/colors.png create mode 100644 examples/declarative/imageelements/borderimage/content/shadow.png delete mode 100644 examples/declarative/imageelements/borderimage/main.cpp delete mode 100644 examples/declarative/imageelements/borderimage/qml/borderimage.qml delete mode 100644 examples/declarative/imageelements/borderimage/qml/content/MyBorderImage.qml delete mode 100644 examples/declarative/imageelements/borderimage/qml/content/ShadowRectangle.qml delete mode 100644 examples/declarative/imageelements/borderimage/qml/content/bw.png delete mode 100644 examples/declarative/imageelements/borderimage/qml/content/colors-round.sci delete mode 100644 examples/declarative/imageelements/borderimage/qml/content/colors-stretch.sci delete mode 100644 examples/declarative/imageelements/borderimage/qml/content/colors.png delete mode 100644 examples/declarative/imageelements/borderimage/qml/content/shadow.png delete mode 100644 examples/declarative/imageelements/borderimage/qml/shadows.qml delete mode 100644 examples/declarative/imageelements/borderimage/qmlapplicationviewer/qmlapplicationviewer.cpp delete mode 100644 examples/declarative/imageelements/borderimage/qmlapplicationviewer/qmlapplicationviewer.h delete mode 100644 examples/declarative/imageelements/borderimage/qmlapplicationviewer/qmlapplicationviewer.pri delete mode 100644 examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/README delete mode 100644 examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/changelog delete mode 100644 examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/compat delete mode 100644 examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/control delete mode 100644 examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/copyright delete mode 100755 examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/rules (limited to 'examples') diff --git a/examples/declarative/calculator/Core/Button.qml b/examples/declarative/calculator/Core/Button.qml index c5ec39cea8..9080c2472e 100644 --- a/examples/declarative/calculator/Core/Button.qml +++ b/examples/declarative/calculator/Core/Button.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import QtQuick 1.0 +import QtQuick 2.0 BorderImage { id: button diff --git a/examples/declarative/calculator/Core/Display.qml b/examples/declarative/calculator/Core/Display.qml index 5e27897bae..a847cb8983 100644 --- a/examples/declarative/calculator/Core/Display.qml +++ b/examples/declarative/calculator/Core/Display.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import QtQuick 1.0 +import QtQuick 2.0 BorderImage { id: image diff --git a/examples/declarative/calculator/calculator.qml b/examples/declarative/calculator/calculator.qml index c844c710aa..06f08eeb86 100644 --- a/examples/declarative/calculator/calculator.qml +++ b/examples/declarative/calculator/calculator.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import QtQuick 1.0 +import QtQuick 2.0 import "Core" import "Core/calculator.js" as CalcEngine diff --git a/examples/declarative/calculator/calculator.qmlproject b/examples/declarative/calculator/calculator.qmlproject deleted file mode 100644 index d4909f8685..0000000000 --- a/examples/declarative/calculator/calculator.qmlproject +++ /dev/null @@ -1,16 +0,0 @@ -import QmlProject 1.0 - -Project { - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } - /* List of plugin directories passed to QML runtime */ - // importPaths: [ " ../exampleplugin " ] -} diff --git a/examples/declarative/i18n/i18n.desktop b/examples/declarative/i18n/i18n.desktop deleted file mode 100644 index 8dd6e345da..0000000000 --- a/examples/declarative/i18n/i18n.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Version=1.0 -Type=Application -Terminal=false -Name=i18n -Exec=/opt/usr/bin/i18n -Icon=i18n -X-Window-Icon= -X-HildonDesk-ShowInToolbar=true -X-Osso-Type=application/x-executable diff --git a/examples/declarative/i18n/i18n.png b/examples/declarative/i18n/i18n.png deleted file mode 100644 index 707d5c4e85..0000000000 Binary files a/examples/declarative/i18n/i18n.png and /dev/null differ diff --git a/examples/declarative/i18n/i18n.pro b/examples/declarative/i18n/i18n.pro deleted file mode 100644 index 184feabd9a..0000000000 --- a/examples/declarative/i18n/i18n.pro +++ /dev/null @@ -1,39 +0,0 @@ -# Add more folders to ship with the application, here -folder_01.source = qml -folder_01.target = qml -DEPLOYMENTFOLDERS = folder_01 - -# Additional import path used to resolve QML modules in Creator's code model -QML_IMPORT_PATH = - -# Avoid auto screen rotation -DEFINES += ORIENTATIONLOCK - -# Needs to be defined for Symbian -#DEFINES += NETWORKACCESS - -symbian:TARGET.UID3 = 0xE069582C - -# Smart Installer package's UID -# This UID is from the protected range -# and therefore the package will fail to install if self-signed -# By default qmake uses the unprotected range value if unprotected UID is defined for the application -# and 0x2002CCCF value if protected UID is given to the application -#symbian:DEPLOYMENT.installer_header = 0x2002CCCF - -# Define QMLJSDEBUGGER to allow debugging of QML in debug builds -# (This might significantly increase build time) -# DEFINES += QMLJSDEBUGGER - -# If your application uses the Qt Mobility libraries, uncomment -# the following lines and add the respective components to the -# MOBILITY variable. -# CONFIG += mobility -# MOBILITY += - -# 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. -include(qmlapplicationviewer/qmlapplicationviewer.pri) -qtcAddDeployment() diff --git a/examples/declarative/i18n/i18n.qml b/examples/declarative/i18n/i18n.qml index 3e24f659fc..250935ee7b 100644 --- a/examples/declarative/i18n/i18n.qml +++ b/examples/declarative/i18n/i18n.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import QtQuick 1.0 +import QtQuick 2.0 // // The QML runtime automatically loads a translation from the i18n subdirectory of the root @@ -53,7 +53,7 @@ import QtQuick 1.0 // // linguist i18n/qml_fr.ts // -// The run-time translation files are then generaeted by running: +// The run-time translation files are then generated by running: // // lrelease i18n/*.ts // @@ -65,8 +65,8 @@ Rectangle { anchors.fill: parent; spacing: 20 Text { - text: "If a translation is available for the system language (eg. French) then the - string below will translated (eg. 'Bonjour'). Otherwise it will show 'Hello'." + text: "If a translation is available for the system language (eg. French) then the "+ + "string below will translated (eg. 'Bonjour'). Otherwise it will show 'Hello'." width: parent.width; wrapMode: Text.WordWrap } diff --git a/examples/declarative/i18n/i18n.svg b/examples/declarative/i18n/i18n.svg deleted file mode 100644 index 566acfada0..0000000000 --- a/examples/declarative/i18n/i18n.svg +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - diff --git a/examples/declarative/i18n/i18n/base.ts b/examples/declarative/i18n/i18n/base.ts new file mode 100644 index 0000000000..82547a1f93 --- /dev/null +++ b/examples/declarative/i18n/i18n/base.ts @@ -0,0 +1,12 @@ + + + + + i18n + + + Hello + + + + diff --git a/examples/declarative/i18n/i18n/qml_en_AU.ts b/examples/declarative/i18n/i18n/qml_en_AU.ts new file mode 100644 index 0000000000..e991affe7f --- /dev/null +++ b/examples/declarative/i18n/i18n/qml_en_AU.ts @@ -0,0 +1,12 @@ + + + + + i18n + + + Hello + G'day + + + diff --git a/examples/declarative/i18n/i18n/qml_fr.ts b/examples/declarative/i18n/i18n/qml_fr.ts new file mode 100644 index 0000000000..365abd95c2 --- /dev/null +++ b/examples/declarative/i18n/i18n/qml_fr.ts @@ -0,0 +1,12 @@ + + + + + i18n + + + Hello + Bonjour + + + diff --git a/examples/declarative/i18n/main.cpp b/examples/declarative/i18n/main.cpp deleted file mode 100644 index bc650f277a..0000000000 --- a/examples/declarative/i18n/main.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtCore module 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 Nokia Corporation 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 -#include "qmlapplicationviewer.h" - -int main(int argc, char *argv[]) -{ - QApplication app(argc, argv); - - QmlApplicationViewer viewer; - viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape); - viewer.setMainQmlFile(QLatin1String("qml/qml/i18n.qml")); - viewer.showExpanded(); - - return app.exec(); -} diff --git a/examples/declarative/i18n/qml/i18n.qml b/examples/declarative/i18n/qml/i18n.qml deleted file mode 100644 index 219deda894..0000000000 --- a/examples/declarative/i18n/qml/i18n.qml +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** 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 Nokia Corporation 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$ -** -****************************************************************************/ - -import QtQuick 1.0 - -// -// The QML runtime automatically loads a translation from the i18n subdirectory of the root -// QML file, based on the system language. -// -// The files are created/updated by running: -// -// lupdate i18n.qml -ts i18n/base.ts -// -// Translations for new languages are created by copying i18n/base.ts to i18n/qml_.ts -// The .ts files can then be edited with Linguist: -// -// linguist i18n/qml_fr.ts -// -// The run-time translation files are then generaeted by running: -// -// lrelease i18n/*.ts -// - -Rectangle { - width: 640; height: 480 - - Column { - anchors.fill: parent; spacing: 20 - - Text { - text: "If a translation is available for the system language (eg. French) then the - string below will translated (eg. 'Bonjour'). Otherwise it will show 'Hello'." - width: parent.width; wrapMode: Text.WordWrap - } - - Text { - text: qsTr("Hello") - font.pointSize: 25; anchors.horizontalCenter: parent.horizontalCenter - } - } -} diff --git a/examples/declarative/i18n/qml/i18n/base.ts b/examples/declarative/i18n/qml/i18n/base.ts deleted file mode 100644 index 82547a1f93..0000000000 --- a/examples/declarative/i18n/qml/i18n/base.ts +++ /dev/null @@ -1,12 +0,0 @@ - - - - - i18n - - - Hello - - - - diff --git a/examples/declarative/i18n/qml/i18n/qml_en_AU.ts b/examples/declarative/i18n/qml/i18n/qml_en_AU.ts deleted file mode 100644 index e991affe7f..0000000000 --- a/examples/declarative/i18n/qml/i18n/qml_en_AU.ts +++ /dev/null @@ -1,12 +0,0 @@ - - - - - i18n - - - Hello - G'day - - - diff --git a/examples/declarative/i18n/qml/i18n/qml_fr.ts b/examples/declarative/i18n/qml/i18n/qml_fr.ts deleted file mode 100644 index 365abd95c2..0000000000 --- a/examples/declarative/i18n/qml/i18n/qml_fr.ts +++ /dev/null @@ -1,12 +0,0 @@ - - - - - i18n - - - Hello - Bonjour - - - diff --git a/examples/declarative/i18n/qmlapplicationviewer/qmlapplicationviewer.cpp b/examples/declarative/i18n/qmlapplicationviewer/qmlapplicationviewer.cpp deleted file mode 100644 index 411a04c139..0000000000 --- a/examples/declarative/i18n/qmlapplicationviewer/qmlapplicationviewer.cpp +++ /dev/null @@ -1,197 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtCore module 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 Nokia Corporation 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$ -** -****************************************************************************/ - -// checksum 0x28c7 version 0x2000a -/* - This file was generated by the Qt Quick Application wizard of Qt Creator. - QmlApplicationViewer is a convenience class containing mobile device specific - code such as screen orientation handling. Also QML paths and debugging are - handled here. - It is recommended not to modify this file, since newer versions of Qt Creator - may offer an updated version of it. -*/ - -#include "qmlapplicationviewer.h" - -#include -#include -#include -#include -#include -#include - -#if defined(QMLJSDEBUGGER) -#include -#endif - -#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER) -#include -#endif -#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER) -#include -#endif - -#if defined(Q_OS_SYMBIAN) && defined(ORIENTATIONLOCK) -#include -#include -#include -#include -#endif // Q_OS_SYMBIAN && ORIENTATIONLOCK - -#if defined(QMLJSDEBUGGER) - -// Enable debugging before any QDeclarativeEngine is created -struct QmlJsDebuggingEnabler -{ - QmlJsDebuggingEnabler() - { - QDeclarativeDebugHelper::enableDebugging(); - } -}; - -// Execute code in constructor before first QDeclarativeEngine is instantiated -static QmlJsDebuggingEnabler enableDebuggingHelper; - -#endif // QMLJSDEBUGGER - -class QmlApplicationViewerPrivate -{ - QString mainQmlFile; - friend class QmlApplicationViewer; - static QString adjustPath(const QString &path); -}; - -QString QmlApplicationViewerPrivate::adjustPath(const QString &path) -{ -#ifdef Q_OS_UNIX -#ifdef Q_OS_MAC - if (!QDir::isAbsolutePath(path)) - return QCoreApplication::applicationDirPath() - + QLatin1String("/../Resources/") + path; -#else - const QString pathInShareDir = QCoreApplication::applicationDirPath() - + QLatin1String("/../share/") - + QFileInfo(QCoreApplication::applicationFilePath()).fileName() - + QLatin1Char('/') + path; - if (QFileInfo(pathInShareDir).exists()) - return pathInShareDir; -#endif -#endif - return path; -} - -QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) : - QDeclarativeView(parent), - m_d(new QmlApplicationViewerPrivate) -{ - connect(engine(), SIGNAL(quit()), SLOT(close())); - setResizeMode(QDeclarativeView::SizeRootObjectToView); -#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER) - new QmlJSDebugger::JSDebuggerAgent(engine()); -#endif -#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER) - new QmlJSDebugger::QDeclarativeViewObserver(this, parent); -#endif -} - -QmlApplicationViewer::~QmlApplicationViewer() -{ - delete m_d; -} - -void QmlApplicationViewer::setMainQmlFile(const QString &file) -{ - m_d->mainQmlFile = QmlApplicationViewerPrivate::adjustPath(file); - setSource(QUrl::fromLocalFile(m_d->mainQmlFile)); -} - -void QmlApplicationViewer::addImportPath(const QString &path) -{ - engine()->addImportPath(QmlApplicationViewerPrivate::adjustPath(path)); -} - -void QmlApplicationViewer::setOrientation(ScreenOrientation orientation) -{ -#ifdef Q_OS_SYMBIAN - if (orientation != ScreenOrientationAuto) { -#if defined(ORIENTATIONLOCK) - const CAknAppUiBase::TAppUiOrientation uiOrientation = - (orientation == ScreenOrientationLockPortrait) ? CAknAppUi::EAppUiOrientationPortrait - : CAknAppUi::EAppUiOrientationLandscape; - CAknAppUi* appUi = dynamic_cast (CEikonEnv::Static()->AppUi()); - TRAPD(error, - if (appUi) - appUi->SetOrientationL(uiOrientation); - ); - Q_UNUSED(error) -#else // ORIENTATIONLOCK - qWarning("'ORIENTATIONLOCK' needs to be defined on Symbian when locking the orientation."); -#endif // ORIENTATIONLOCK - } -#elif defined(Q_WS_MAEMO_5) - Qt::WidgetAttribute attribute; - switch (orientation) { - case ScreenOrientationLockPortrait: - attribute = Qt::WA_Maemo5PortraitOrientation; - break; - case ScreenOrientationLockLandscape: - attribute = Qt::WA_Maemo5LandscapeOrientation; - break; - case ScreenOrientationAuto: - default: - attribute = Qt::WA_Maemo5AutoOrientation; - break; - } - setAttribute(attribute, true); -#else // Q_OS_SYMBIAN - Q_UNUSED(orientation); -#endif // Q_OS_SYMBIAN -} - -void QmlApplicationViewer::showExpanded() -{ -#ifdef Q_OS_SYMBIAN - showFullScreen(); -#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) - showMaximized(); -#else - show(); -#endif -} diff --git a/examples/declarative/i18n/qmlapplicationviewer/qmlapplicationviewer.h b/examples/declarative/i18n/qmlapplicationviewer/qmlapplicationviewer.h deleted file mode 100644 index f5b24b0199..0000000000 --- a/examples/declarative/i18n/qmlapplicationviewer/qmlapplicationviewer.h +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtCore module 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 Nokia Corporation 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$ -** -****************************************************************************/ - -// checksum 0x5a59 version 0x2000a -/* - This file was generated by the Qt Quick Application wizard of Qt Creator. - QmlApplicationViewer is a convenience class containing mobile device specific - code such as screen orientation handling. Also QML paths and debugging are - handled here. - It is recommended not to modify this file, since newer versions of Qt Creator - may offer an updated version of it. -*/ - -#ifndef QMLAPPLICATIONVIEWER_H -#define QMLAPPLICATIONVIEWER_H - -#include - -class QmlApplicationViewer : public QDeclarativeView -{ - Q_OBJECT - -public: - enum ScreenOrientation { - ScreenOrientationLockPortrait, - ScreenOrientationLockLandscape, - ScreenOrientationAuto - }; - - explicit QmlApplicationViewer(QWidget *parent = 0); - virtual ~QmlApplicationViewer(); - - void setMainQmlFile(const QString &file); - void addImportPath(const QString &path); - void setOrientation(ScreenOrientation orientation); - void showExpanded(); - -private: - class QmlApplicationViewerPrivate *m_d; -}; - -#endif // QMLAPPLICATIONVIEWER_H diff --git a/examples/declarative/i18n/qmlapplicationviewer/qmlapplicationviewer.pri b/examples/declarative/i18n/qmlapplicationviewer/qmlapplicationviewer.pri deleted file mode 100644 index 1c0c7edb39..0000000000 --- a/examples/declarative/i18n/qmlapplicationviewer/qmlapplicationviewer.pri +++ /dev/null @@ -1,154 +0,0 @@ -# checksum 0x3dc8 version 0x2000a -# This file was generated by the Qt Quick Application wizard of Qt Creator. -# The code below adds the QmlApplicationViewer to the project and handles the -# activation of QML debugging. -# It is recommended not to modify this file, since newer versions of Qt Creator -# may offer an updated version of it. - -QT += declarative - -SOURCES += $$PWD/qmlapplicationviewer.cpp -HEADERS += $$PWD/qmlapplicationviewer.h -INCLUDEPATH += $$PWD - -defineTest(minQtVersion) { - maj = $$1 - min = $$2 - patch = $$3 - isEqual(QT_MAJOR_VERSION, $$maj) { - isEqual(QT_MINOR_VERSION, $$min) { - isEqual(QT_PATCH_VERSION, $$patch) { - return(true) - } - greaterThan(QT_PATCH_VERSION, $$patch) { - return(true) - } - } - greaterThan(QT_MINOR_VERSION, $$min) { - return(true) - } - } - return(false) -} - -contains(DEFINES, QMLJSDEBUGGER) { - CONFIG(debug, debug|release) { - !minQtVersion(4, 7, 1) { - warning() - warning("Disabling QML debugging:") - warning() - warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") - warning("This library requires Qt 4.7.1 or newer.") - warning() - DEFINES -= QMLJSDEBUGGER - } else:isEmpty(QMLJSDEBUGGER_PATH) { - warning() - warning("Disabling QML debugging:") - warning() - warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") - warning("Please specify its location on the qmake command line, eg") - warning(" qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qmljsdebugger") - warning() - DEFINES -= QMLJSDEBUGGER - } else { - include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri) - } - } else { - DEFINES -= QMLJSDEBUGGER - } -} -# This file was generated by an application wizard of Qt Creator. -# The code below handles deployment to Symbian and Maemo, aswell as copying -# of the application data to shadow build directories on desktop. -# It is recommended not to modify this file, since newer versions of Qt Creator -# may offer an updated version of it. - -defineTest(qtcAddDeployment) { -for(deploymentfolder, DEPLOYMENTFOLDERS) { - item = item$${deploymentfolder} - itemsources = $${item}.sources - $$itemsources = $$eval($${deploymentfolder}.source) - itempath = $${item}.path - $$itempath= $$eval($${deploymentfolder}.target) - export($$itemsources) - export($$itempath) - DEPLOYMENT += $$item -} - -MAINPROFILEPWD = $$PWD - -symbian { - ICON = $${TARGET}.svg - TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 - contains(DEFINES, ORIENTATIONLOCK):LIBS += -lavkon -leikcore -lcone - contains(DEFINES, NETWORKACCESS):TARGET.CAPABILITY += NetworkServices -} else:win32 { - !isEqual(PWD,$$OUT_PWD) { - copyCommand = @echo Copying application data... - for(deploymentfolder, DEPLOYMENTFOLDERS) { - source = $$eval($${deploymentfolder}.source) - pathSegments = $$split(source, /) - sourceAndTarget = $$MAINPROFILEPWD/$$source $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(pathSegments) - copyCommand += && $(COPY_DIR) $$replace(sourceAndTarget, /, \\) - } - copydeploymentfolders.commands = $$copyCommand - first.depends = $(first) copydeploymentfolders - export(first.depends) - export(copydeploymentfolders.commands) - QMAKE_EXTRA_TARGETS += first copydeploymentfolders - } -} else:unix { - maemo5 { - installPrefix = /opt/usr - desktopfile.path = /usr/share/applications/hildon - } else { - installPrefix = /usr/local - desktopfile.path = /usr/share/applications - !isEqual(PWD,$$OUT_PWD) { - copyCommand = @echo Copying application data... - for(deploymentfolder, DEPLOYMENTFOLDERS) { - macx { - target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target) - } else { - target = $$OUT_PWD/$$eval($${deploymentfolder}.target) - } - copyCommand += && $(MKDIR) $$target - copyCommand += && $(COPY_DIR) $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) $$target - } - copydeploymentfolders.commands = $$copyCommand - first.depends = $(first) copydeploymentfolders - export(first.depends) - export(copydeploymentfolders.commands) - QMAKE_EXTRA_TARGETS += first copydeploymentfolders - } - } - for(deploymentfolder, DEPLOYMENTFOLDERS) { - item = item$${deploymentfolder} - itemfiles = $${item}.files - $$itemfiles = $$eval($${deploymentfolder}.source) - itempath = $${item}.path - $$itempath = $${installPrefix}/share/$${TARGET}/$$eval($${deploymentfolder}.target) - export($$itemfiles) - export($$itempath) - INSTALLS += $$item - } - icon.files = $${TARGET}.png - icon.path = /usr/share/icons/hicolor/64x64/apps - desktopfile.files = $${TARGET}.desktop - target.path = $${installPrefix}/bin - export(icon.files) - export(icon.path) - export(desktopfile.files) - export(desktopfile.path) - export(target.path) - INSTALLS += desktopfile icon target -} - -export (ICON) -export (INSTALLS) -export (DEPLOYMENT) -export (TARGET.EPOCHEAPSIZE) -export (TARGET.CAPABILITY) -export (LIBS) -export (QMAKE_EXTRA_TARGETS) -} diff --git a/examples/declarative/imageelements/borderimage/borderimage.desktop b/examples/declarative/imageelements/borderimage/borderimage.desktop deleted file mode 100644 index 35f4d2bb03..0000000000 --- a/examples/declarative/imageelements/borderimage/borderimage.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Version=1.0 -Type=Application -Terminal=false -Name=borderimage -Exec=/opt/usr/bin/borderimage -Icon=borderimage -X-Window-Icon= -X-HildonDesk-ShowInToolbar=true -X-Osso-Type=application/x-executable diff --git a/examples/declarative/imageelements/borderimage/borderimage.png b/examples/declarative/imageelements/borderimage/borderimage.png deleted file mode 100644 index 707d5c4e85..0000000000 Binary files a/examples/declarative/imageelements/borderimage/borderimage.png and /dev/null differ diff --git a/examples/declarative/imageelements/borderimage/borderimage.pro b/examples/declarative/imageelements/borderimage/borderimage.pro deleted file mode 100644 index fd4967652e..0000000000 --- a/examples/declarative/imageelements/borderimage/borderimage.pro +++ /dev/null @@ -1,39 +0,0 @@ -# Add more folders to ship with the application, here -folder_01.source = qml -folder_01.target = qml -DEPLOYMENTFOLDERS = folder_01 - -# Additional import path used to resolve QML modules in Creator's code model -QML_IMPORT_PATH = - -# Avoid auto screen rotation -DEFINES += ORIENTATIONLOCK - -# Needs to be defined for Symbian -#DEFINES += NETWORKACCESS - -symbian:TARGET.UID3 = 0xEBB4D123 - -# Smart Installer package's UID -# This UID is from the protected range -# and therefore the package will fail to install if self-signed -# By default qmake uses the unprotected range value if unprotected UID is defined for the application -# and 0x2002CCCF value if protected UID is given to the application -#symbian:DEPLOYMENT.installer_header = 0x2002CCCF - -# Define QMLJSDEBUGGER to allow debugging of QML in debug builds -# (This might significantly increase build time) -# DEFINES += QMLJSDEBUGGER - -# If your application uses the Qt Mobility libraries, uncomment -# the following lines and add the respective components to the -# MOBILITY variable. -# CONFIG += mobility -# MOBILITY += - -# 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. -include(qmlapplicationviewer/qmlapplicationviewer.pri) -qtcAddDeployment() diff --git a/examples/declarative/imageelements/borderimage/borderimage.qml b/examples/declarative/imageelements/borderimage/borderimage.qml index 2ff18c8f72..8fede46a9a 100644 --- a/examples/declarative/imageelements/borderimage/borderimage.qml +++ b/examples/declarative/imageelements/borderimage/borderimage.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import QtQuick 1.0 +import QtQuick 2.0 import "content" Rectangle { diff --git a/examples/declarative/imageelements/borderimage/borderimage.svg b/examples/declarative/imageelements/borderimage/borderimage.svg deleted file mode 100644 index 566acfada0..0000000000 --- a/examples/declarative/imageelements/borderimage/borderimage.svg +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - diff --git a/examples/declarative/imageelements/borderimage/content/MyBorderImage.qml b/examples/declarative/imageelements/borderimage/content/MyBorderImage.qml index 8ace6e1bf4..4ad69fdb1d 100644 --- a/examples/declarative/imageelements/borderimage/content/MyBorderImage.qml +++ b/examples/declarative/imageelements/borderimage/content/MyBorderImage.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import QtQuick 1.0 +import QtQuick 2.0 Item { id: container diff --git a/examples/declarative/imageelements/borderimage/content/ShadowRectangle.qml b/examples/declarative/imageelements/borderimage/content/ShadowRectangle.qml index 722beae6ce..4d0df21459 100644 --- a/examples/declarative/imageelements/borderimage/content/ShadowRectangle.qml +++ b/examples/declarative/imageelements/borderimage/content/ShadowRectangle.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import QtQuick 1.0 +import QtQuick 2.0 Item { property alias color : rectangle.color diff --git a/examples/declarative/imageelements/borderimage/content/bw.png b/examples/declarative/imageelements/borderimage/content/bw.png new file mode 100644 index 0000000000..486eaae96e Binary files /dev/null and b/examples/declarative/imageelements/borderimage/content/bw.png differ diff --git a/examples/declarative/imageelements/borderimage/content/colors-round.sci b/examples/declarative/imageelements/borderimage/content/colors-round.sci new file mode 100644 index 0000000000..506f6f5f99 --- /dev/null +++ b/examples/declarative/imageelements/borderimage/content/colors-round.sci @@ -0,0 +1,7 @@ +border.left:30 +border.top:30 +border.right:30 +border.bottom:30 +horizontalTileRule:Round +verticalTileRule:Round +source:colors.png diff --git a/examples/declarative/imageelements/borderimage/content/colors-stretch.sci b/examples/declarative/imageelements/borderimage/content/colors-stretch.sci new file mode 100644 index 0000000000..e4989a723c --- /dev/null +++ b/examples/declarative/imageelements/borderimage/content/colors-stretch.sci @@ -0,0 +1,5 @@ +border.left:30 +border.top:30 +border.right:30 +border.bottom:30 +source:colors.png diff --git a/examples/declarative/imageelements/borderimage/content/colors.png b/examples/declarative/imageelements/borderimage/content/colors.png new file mode 100644 index 0000000000..dfb62f3d64 Binary files /dev/null and b/examples/declarative/imageelements/borderimage/content/colors.png differ diff --git a/examples/declarative/imageelements/borderimage/content/shadow.png b/examples/declarative/imageelements/borderimage/content/shadow.png new file mode 100644 index 0000000000..431af8545d Binary files /dev/null and b/examples/declarative/imageelements/borderimage/content/shadow.png differ diff --git a/examples/declarative/imageelements/borderimage/main.cpp b/examples/declarative/imageelements/borderimage/main.cpp deleted file mode 100644 index c8a9b85b78..0000000000 --- a/examples/declarative/imageelements/borderimage/main.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtCore module 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 Nokia Corporation 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 -#include "qmlapplicationviewer.h" - -int main(int argc, char *argv[]) -{ - QApplication app(argc, argv); - - QmlApplicationViewer viewer; - viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape); - viewer.setMainQmlFile(QLatin1String("qml/qml/shadows.qml")); - viewer.showExpanded(); - - return app.exec(); -} diff --git a/examples/declarative/imageelements/borderimage/qml/borderimage.qml b/examples/declarative/imageelements/borderimage/qml/borderimage.qml deleted file mode 100644 index 53e35f97e8..0000000000 --- a/examples/declarative/imageelements/borderimage/qml/borderimage.qml +++ /dev/null @@ -1,97 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** 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 Nokia Corporation 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$ -** -****************************************************************************/ - -import QtQuick 1.0 -import "content" - -Rectangle { - id: page - width: 1030; height: 540 - - Grid { - anchors.centerIn: parent; spacing: 20 - - MyBorderImage { - minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 240 - source: "content/colors.png"; margin: 30 - } - - MyBorderImage { - minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 240 - source: "content/colors.png"; margin: 30 - horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat - } - - MyBorderImage { - minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 240 - source: "content/colors.png"; margin: 30 - horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat - } - - MyBorderImage { - minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 240 - source: "content/colors.png"; margin: 30 - horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round - } - - MyBorderImage { - minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200 - source: "content/bw.png"; margin: 10 - } - - MyBorderImage { - minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200 - source: "content/bw.png"; margin: 10 - horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat - } - - MyBorderImage { - minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200 - source: "content/bw.png"; margin: 10 - horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat - } - - MyBorderImage { - minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200 - source: "content/bw.png"; margin: 10 - horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round - } - } -} diff --git a/examples/declarative/imageelements/borderimage/qml/content/MyBorderImage.qml b/examples/declarative/imageelements/borderimage/qml/content/MyBorderImage.qml deleted file mode 100644 index 96495cbefa..0000000000 --- a/examples/declarative/imageelements/borderimage/qml/content/MyBorderImage.qml +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** 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 Nokia Corporation 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$ -** -****************************************************************************/ - -import QtQuick 1.0 - -Item { - id: container - - property alias horizontalMode: image.horizontalTileMode - property alias verticalMode: image.verticalTileMode - property alias source: image.source - - property int minWidth - property int minHeight - property int maxWidth - property int maxHeight - property int margin - - width: 240; height: 240 - - BorderImage { - id: image; anchors.centerIn: parent - - SequentialAnimation on width { - loops: Animation.Infinite - NumberAnimation { - from: container.minWidth; to: container.maxWidth - duration: 2000; easing.type: Easing.InOutQuad - } - NumberAnimation { - from: container.maxWidth; to: container.minWidth - duration: 2000; easing.type: Easing.InOutQuad - } - } - - SequentialAnimation on height { - loops: Animation.Infinite - NumberAnimation { - from: container.minHeight; to: container.maxHeight - duration: 2000; easing.type: Easing.InOutQuad - } - NumberAnimation { - from: container.maxHeight; to: container.minHeight - duration: 2000; easing.type: Easing.InOutQuad - } - } - - border.top: container.margin - border.left: container.margin - border.bottom: container.margin - border.right: container.margin - } -} diff --git a/examples/declarative/imageelements/borderimage/qml/content/ShadowRectangle.qml b/examples/declarative/imageelements/borderimage/qml/content/ShadowRectangle.qml deleted file mode 100644 index 839ecf1177..0000000000 --- a/examples/declarative/imageelements/borderimage/qml/content/ShadowRectangle.qml +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** 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 Nokia Corporation 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$ -** -****************************************************************************/ - -import QtQuick 1.0 - -Item { - property alias color : rectangle.color - - BorderImage { - anchors.fill: rectangle - anchors { leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8 } - border { left: 10; top: 10; right: 10; bottom: 10 } - source: "shadow.png"; smooth: true - } - - Rectangle { id: rectangle; anchors.fill: parent } -} diff --git a/examples/declarative/imageelements/borderimage/qml/content/bw.png b/examples/declarative/imageelements/borderimage/qml/content/bw.png deleted file mode 100644 index 486eaae96e..0000000000 Binary files a/examples/declarative/imageelements/borderimage/qml/content/bw.png and /dev/null differ diff --git a/examples/declarative/imageelements/borderimage/qml/content/colors-round.sci b/examples/declarative/imageelements/borderimage/qml/content/colors-round.sci deleted file mode 100644 index 506f6f5f99..0000000000 --- a/examples/declarative/imageelements/borderimage/qml/content/colors-round.sci +++ /dev/null @@ -1,7 +0,0 @@ -border.left:30 -border.top:30 -border.right:30 -border.bottom:30 -horizontalTileRule:Round -verticalTileRule:Round -source:colors.png diff --git a/examples/declarative/imageelements/borderimage/qml/content/colors-stretch.sci b/examples/declarative/imageelements/borderimage/qml/content/colors-stretch.sci deleted file mode 100644 index e4989a723c..0000000000 --- a/examples/declarative/imageelements/borderimage/qml/content/colors-stretch.sci +++ /dev/null @@ -1,5 +0,0 @@ -border.left:30 -border.top:30 -border.right:30 -border.bottom:30 -source:colors.png diff --git a/examples/declarative/imageelements/borderimage/qml/content/colors.png b/examples/declarative/imageelements/borderimage/qml/content/colors.png deleted file mode 100644 index dfb62f3d64..0000000000 Binary files a/examples/declarative/imageelements/borderimage/qml/content/colors.png and /dev/null differ diff --git a/examples/declarative/imageelements/borderimage/qml/content/shadow.png b/examples/declarative/imageelements/borderimage/qml/content/shadow.png deleted file mode 100644 index 431af8545d..0000000000 Binary files a/examples/declarative/imageelements/borderimage/qml/content/shadow.png and /dev/null differ diff --git a/examples/declarative/imageelements/borderimage/qml/shadows.qml b/examples/declarative/imageelements/borderimage/qml/shadows.qml deleted file mode 100644 index d547f63eac..0000000000 --- a/examples/declarative/imageelements/borderimage/qml/shadows.qml +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** 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 Nokia Corporation 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$ -** -****************************************************************************/ - -import QtQuick 1.0 -import "content" - -Rectangle { - id: window - - width: 480; height: 320 - color: "gray" - - ShadowRectangle { - anchors.centerIn: parent; width: 250; height: 250 - color: "lightsteelblue" - } - - ShadowRectangle { - anchors.centerIn: parent; width: 200; height: 200 - color: "steelblue" - } - - ShadowRectangle { - anchors.centerIn: parent; width: 150; height: 150 - color: "thistle" - } -} diff --git a/examples/declarative/imageelements/borderimage/qmlapplicationviewer/qmlapplicationviewer.cpp b/examples/declarative/imageelements/borderimage/qmlapplicationviewer/qmlapplicationviewer.cpp deleted file mode 100644 index 411a04c139..0000000000 --- a/examples/declarative/imageelements/borderimage/qmlapplicationviewer/qmlapplicationviewer.cpp +++ /dev/null @@ -1,197 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtCore module 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 Nokia Corporation 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$ -** -****************************************************************************/ - -// checksum 0x28c7 version 0x2000a -/* - This file was generated by the Qt Quick Application wizard of Qt Creator. - QmlApplicationViewer is a convenience class containing mobile device specific - code such as screen orientation handling. Also QML paths and debugging are - handled here. - It is recommended not to modify this file, since newer versions of Qt Creator - may offer an updated version of it. -*/ - -#include "qmlapplicationviewer.h" - -#include -#include -#include -#include -#include -#include - -#if defined(QMLJSDEBUGGER) -#include -#endif - -#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER) -#include -#endif -#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER) -#include -#endif - -#if defined(Q_OS_SYMBIAN) && defined(ORIENTATIONLOCK) -#include -#include -#include -#include -#endif // Q_OS_SYMBIAN && ORIENTATIONLOCK - -#if defined(QMLJSDEBUGGER) - -// Enable debugging before any QDeclarativeEngine is created -struct QmlJsDebuggingEnabler -{ - QmlJsDebuggingEnabler() - { - QDeclarativeDebugHelper::enableDebugging(); - } -}; - -// Execute code in constructor before first QDeclarativeEngine is instantiated -static QmlJsDebuggingEnabler enableDebuggingHelper; - -#endif // QMLJSDEBUGGER - -class QmlApplicationViewerPrivate -{ - QString mainQmlFile; - friend class QmlApplicationViewer; - static QString adjustPath(const QString &path); -}; - -QString QmlApplicationViewerPrivate::adjustPath(const QString &path) -{ -#ifdef Q_OS_UNIX -#ifdef Q_OS_MAC - if (!QDir::isAbsolutePath(path)) - return QCoreApplication::applicationDirPath() - + QLatin1String("/../Resources/") + path; -#else - const QString pathInShareDir = QCoreApplication::applicationDirPath() - + QLatin1String("/../share/") - + QFileInfo(QCoreApplication::applicationFilePath()).fileName() - + QLatin1Char('/') + path; - if (QFileInfo(pathInShareDir).exists()) - return pathInShareDir; -#endif -#endif - return path; -} - -QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) : - QDeclarativeView(parent), - m_d(new QmlApplicationViewerPrivate) -{ - connect(engine(), SIGNAL(quit()), SLOT(close())); - setResizeMode(QDeclarativeView::SizeRootObjectToView); -#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER) - new QmlJSDebugger::JSDebuggerAgent(engine()); -#endif -#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER) - new QmlJSDebugger::QDeclarativeViewObserver(this, parent); -#endif -} - -QmlApplicationViewer::~QmlApplicationViewer() -{ - delete m_d; -} - -void QmlApplicationViewer::setMainQmlFile(const QString &file) -{ - m_d->mainQmlFile = QmlApplicationViewerPrivate::adjustPath(file); - setSource(QUrl::fromLocalFile(m_d->mainQmlFile)); -} - -void QmlApplicationViewer::addImportPath(const QString &path) -{ - engine()->addImportPath(QmlApplicationViewerPrivate::adjustPath(path)); -} - -void QmlApplicationViewer::setOrientation(ScreenOrientation orientation) -{ -#ifdef Q_OS_SYMBIAN - if (orientation != ScreenOrientationAuto) { -#if defined(ORIENTATIONLOCK) - const CAknAppUiBase::TAppUiOrientation uiOrientation = - (orientation == ScreenOrientationLockPortrait) ? CAknAppUi::EAppUiOrientationPortrait - : CAknAppUi::EAppUiOrientationLandscape; - CAknAppUi* appUi = dynamic_cast (CEikonEnv::Static()->AppUi()); - TRAPD(error, - if (appUi) - appUi->SetOrientationL(uiOrientation); - ); - Q_UNUSED(error) -#else // ORIENTATIONLOCK - qWarning("'ORIENTATIONLOCK' needs to be defined on Symbian when locking the orientation."); -#endif // ORIENTATIONLOCK - } -#elif defined(Q_WS_MAEMO_5) - Qt::WidgetAttribute attribute; - switch (orientation) { - case ScreenOrientationLockPortrait: - attribute = Qt::WA_Maemo5PortraitOrientation; - break; - case ScreenOrientationLockLandscape: - attribute = Qt::WA_Maemo5LandscapeOrientation; - break; - case ScreenOrientationAuto: - default: - attribute = Qt::WA_Maemo5AutoOrientation; - break; - } - setAttribute(attribute, true); -#else // Q_OS_SYMBIAN - Q_UNUSED(orientation); -#endif // Q_OS_SYMBIAN -} - -void QmlApplicationViewer::showExpanded() -{ -#ifdef Q_OS_SYMBIAN - showFullScreen(); -#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) - showMaximized(); -#else - show(); -#endif -} diff --git a/examples/declarative/imageelements/borderimage/qmlapplicationviewer/qmlapplicationviewer.h b/examples/declarative/imageelements/borderimage/qmlapplicationviewer/qmlapplicationviewer.h deleted file mode 100644 index f5b24b0199..0000000000 --- a/examples/declarative/imageelements/borderimage/qmlapplicationviewer/qmlapplicationviewer.h +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtCore module 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 Nokia Corporation 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$ -** -****************************************************************************/ - -// checksum 0x5a59 version 0x2000a -/* - This file was generated by the Qt Quick Application wizard of Qt Creator. - QmlApplicationViewer is a convenience class containing mobile device specific - code such as screen orientation handling. Also QML paths and debugging are - handled here. - It is recommended not to modify this file, since newer versions of Qt Creator - may offer an updated version of it. -*/ - -#ifndef QMLAPPLICATIONVIEWER_H -#define QMLAPPLICATIONVIEWER_H - -#include - -class QmlApplicationViewer : public QDeclarativeView -{ - Q_OBJECT - -public: - enum ScreenOrientation { - ScreenOrientationLockPortrait, - ScreenOrientationLockLandscape, - ScreenOrientationAuto - }; - - explicit QmlApplicationViewer(QWidget *parent = 0); - virtual ~QmlApplicationViewer(); - - void setMainQmlFile(const QString &file); - void addImportPath(const QString &path); - void setOrientation(ScreenOrientation orientation); - void showExpanded(); - -private: - class QmlApplicationViewerPrivate *m_d; -}; - -#endif // QMLAPPLICATIONVIEWER_H diff --git a/examples/declarative/imageelements/borderimage/qmlapplicationviewer/qmlapplicationviewer.pri b/examples/declarative/imageelements/borderimage/qmlapplicationviewer/qmlapplicationviewer.pri deleted file mode 100644 index 1c0c7edb39..0000000000 --- a/examples/declarative/imageelements/borderimage/qmlapplicationviewer/qmlapplicationviewer.pri +++ /dev/null @@ -1,154 +0,0 @@ -# checksum 0x3dc8 version 0x2000a -# This file was generated by the Qt Quick Application wizard of Qt Creator. -# The code below adds the QmlApplicationViewer to the project and handles the -# activation of QML debugging. -# It is recommended not to modify this file, since newer versions of Qt Creator -# may offer an updated version of it. - -QT += declarative - -SOURCES += $$PWD/qmlapplicationviewer.cpp -HEADERS += $$PWD/qmlapplicationviewer.h -INCLUDEPATH += $$PWD - -defineTest(minQtVersion) { - maj = $$1 - min = $$2 - patch = $$3 - isEqual(QT_MAJOR_VERSION, $$maj) { - isEqual(QT_MINOR_VERSION, $$min) { - isEqual(QT_PATCH_VERSION, $$patch) { - return(true) - } - greaterThan(QT_PATCH_VERSION, $$patch) { - return(true) - } - } - greaterThan(QT_MINOR_VERSION, $$min) { - return(true) - } - } - return(false) -} - -contains(DEFINES, QMLJSDEBUGGER) { - CONFIG(debug, debug|release) { - !minQtVersion(4, 7, 1) { - warning() - warning("Disabling QML debugging:") - warning() - warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") - warning("This library requires Qt 4.7.1 or newer.") - warning() - DEFINES -= QMLJSDEBUGGER - } else:isEmpty(QMLJSDEBUGGER_PATH) { - warning() - warning("Disabling QML debugging:") - warning() - warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") - warning("Please specify its location on the qmake command line, eg") - warning(" qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qmljsdebugger") - warning() - DEFINES -= QMLJSDEBUGGER - } else { - include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri) - } - } else { - DEFINES -= QMLJSDEBUGGER - } -} -# This file was generated by an application wizard of Qt Creator. -# The code below handles deployment to Symbian and Maemo, aswell as copying -# of the application data to shadow build directories on desktop. -# It is recommended not to modify this file, since newer versions of Qt Creator -# may offer an updated version of it. - -defineTest(qtcAddDeployment) { -for(deploymentfolder, DEPLOYMENTFOLDERS) { - item = item$${deploymentfolder} - itemsources = $${item}.sources - $$itemsources = $$eval($${deploymentfolder}.source) - itempath = $${item}.path - $$itempath= $$eval($${deploymentfolder}.target) - export($$itemsources) - export($$itempath) - DEPLOYMENT += $$item -} - -MAINPROFILEPWD = $$PWD - -symbian { - ICON = $${TARGET}.svg - TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 - contains(DEFINES, ORIENTATIONLOCK):LIBS += -lavkon -leikcore -lcone - contains(DEFINES, NETWORKACCESS):TARGET.CAPABILITY += NetworkServices -} else:win32 { - !isEqual(PWD,$$OUT_PWD) { - copyCommand = @echo Copying application data... - for(deploymentfolder, DEPLOYMENTFOLDERS) { - source = $$eval($${deploymentfolder}.source) - pathSegments = $$split(source, /) - sourceAndTarget = $$MAINPROFILEPWD/$$source $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(pathSegments) - copyCommand += && $(COPY_DIR) $$replace(sourceAndTarget, /, \\) - } - copydeploymentfolders.commands = $$copyCommand - first.depends = $(first) copydeploymentfolders - export(first.depends) - export(copydeploymentfolders.commands) - QMAKE_EXTRA_TARGETS += first copydeploymentfolders - } -} else:unix { - maemo5 { - installPrefix = /opt/usr - desktopfile.path = /usr/share/applications/hildon - } else { - installPrefix = /usr/local - desktopfile.path = /usr/share/applications - !isEqual(PWD,$$OUT_PWD) { - copyCommand = @echo Copying application data... - for(deploymentfolder, DEPLOYMENTFOLDERS) { - macx { - target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target) - } else { - target = $$OUT_PWD/$$eval($${deploymentfolder}.target) - } - copyCommand += && $(MKDIR) $$target - copyCommand += && $(COPY_DIR) $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) $$target - } - copydeploymentfolders.commands = $$copyCommand - first.depends = $(first) copydeploymentfolders - export(first.depends) - export(copydeploymentfolders.commands) - QMAKE_EXTRA_TARGETS += first copydeploymentfolders - } - } - for(deploymentfolder, DEPLOYMENTFOLDERS) { - item = item$${deploymentfolder} - itemfiles = $${item}.files - $$itemfiles = $$eval($${deploymentfolder}.source) - itempath = $${item}.path - $$itempath = $${installPrefix}/share/$${TARGET}/$$eval($${deploymentfolder}.target) - export($$itemfiles) - export($$itempath) - INSTALLS += $$item - } - icon.files = $${TARGET}.png - icon.path = /usr/share/icons/hicolor/64x64/apps - desktopfile.files = $${TARGET}.desktop - target.path = $${installPrefix}/bin - export(icon.files) - export(icon.path) - export(desktopfile.files) - export(desktopfile.path) - export(target.path) - INSTALLS += desktopfile icon target -} - -export (ICON) -export (INSTALLS) -export (DEPLOYMENT) -export (TARGET.EPOCHEAPSIZE) -export (TARGET.CAPABILITY) -export (LIBS) -export (QMAKE_EXTRA_TARGETS) -} diff --git a/examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/README b/examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/README deleted file mode 100644 index 421e6e32ba..0000000000 --- a/examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/README +++ /dev/null @@ -1,6 +0,0 @@ -The Debian Package borderimage ----------------------------- - -Comments regarding the Package - - -- Daniel Molkentin Thu, 18 Nov 2010 16:13:09 +0100 diff --git a/examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/changelog b/examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/changelog deleted file mode 100644 index 77071e007a..0000000000 --- a/examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/changelog +++ /dev/null @@ -1,5 +0,0 @@ -borderimage (0.0.1) unstable; urgency=low - - * Initial Release. - - -- Daniel Molkentin Thu, 18 Nov 2010 16:13:09 +0100 diff --git a/examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/compat b/examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/compat deleted file mode 100644 index 7f8f011eb7..0000000000 --- a/examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/compat +++ /dev/null @@ -1 +0,0 @@ -7 diff --git a/examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/control b/examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/control deleted file mode 100644 index 4bdc93ef3e..0000000000 --- a/examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/control +++ /dev/null @@ -1,13 +0,0 @@ -Source: borderimage -Section: user/hidden -Priority: optional -Maintainer: Daniel Molkentin -Build-Depends: debhelper (>= 5), libqt4-dev -Standards-Version: 3.7.3 -Homepage: - -Package: borderimage -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: - diff --git a/examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/copyright b/examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/copyright deleted file mode 100644 index e1c7a293e9..0000000000 --- a/examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/copyright +++ /dev/null @@ -1,40 +0,0 @@ -This package was debianized by Daniel Molkentin on -Thu, 18 Nov 2010 16:13:09 +0100. - -It was downloaded from - -Upstream Author(s): - - - - -Copyright: - - - - -License: - - This package is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this package; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -On Debian systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. - -The Debian packaging is (C) 2010, Daniel Molkentin and -is licensed under the GPL, see above. - - -# Please also look if there are files or directories which have a -# different copyright/license attached and list them here. diff --git a/examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/rules b/examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/rules deleted file mode 100755 index 3799b01dd7..0000000000 --- a/examples/declarative/imageelements/borderimage/qtc_packaging/debian_fremantle/rules +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - - - - - -configure: configure-stamp -configure-stamp: - dh_testdir - # Add here commands to configure the package. - - touch configure-stamp - - -build: build-stamp - -build-stamp: configure-stamp - dh_testdir - - # Add here commands to compile the package. - $(MAKE) - #docbook-to-man debian/borderimage.sgml > borderimage.1 - - touch $@ - -clean: - dh_testdir - dh_testroot - rm -f build-stamp configure-stamp - - # Add here commands to clean up after the build process. - $(MAKE) clean - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Add here commands to install the package into debian/borderimage. - $(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/borderimage install - - -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot - dh_installchangelogs - dh_installdocs - dh_installexamples -# dh_install -# dh_installmenu -# dh_installdebconf -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime -# dh_python -# dh_installinit -# dh_installcron -# dh_installinfo - dh_installman - dh_link - # dh_strip - dh_compress - dh_fixperms -# dh_perl -# dh_makeshlibs - dh_installdeb - # dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/examples/declarative/imageelements/borderimage/shadows.qml b/examples/declarative/imageelements/borderimage/shadows.qml index b48ab84d5f..ebc2cdadcf 100644 --- a/examples/declarative/imageelements/borderimage/shadows.qml +++ b/examples/declarative/imageelements/borderimage/shadows.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import QtQuick 1.0 +import QtQuick 2.0 import "content" Rectangle { -- cgit v1.2.3