From f535efb015314fb07573739fd33aa00ba5502bde Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 12 May 2010 00:24:55 +0200 Subject: Standalone Qml demos for Fluidlauncher There new Qml demos are self-contained Qml applications, ready to be run on Symbian devices: qmlcalculator qmlclocks qmldialcontrol qmleasing qmlflickr qmlphotoviewer qmltwitter Since these depend on the DEPLOYMENT feature of qmake, they currently will only work for Symbian and theoretically WinCE/Mobile. TODO: create INSTALLS rules in order to support more platforms. Task-number: QTBUG-10148 Reviewed-By: axis --- demos/embedded/embedded.pro | 5 ++ demos/embedded/fluidlauncher/config_s60/config.xml | 7 ++ demos/embedded/fluidlauncher/fluidlauncher.pro | 12 +++ .../fluidlauncher/screenshots/qmlcalculator.png | Bin 0 -> 15455 bytes .../fluidlauncher/screenshots/qmlclocks.png | Bin 0 -> 12409 bytes .../fluidlauncher/screenshots/qmldialcontrol.png | Bin 0 -> 16811 bytes .../fluidlauncher/screenshots/qmleasing.png | Bin 0 -> 3453 bytes .../fluidlauncher/screenshots/qmlflickr.jpg | Bin 0 -> 35616 bytes .../fluidlauncher/screenshots/qmlphotoviewer.jpg | Bin 0 -> 24216 bytes .../fluidlauncher/screenshots/qmltwitter.jpg | Bin 0 -> 35159 bytes demos/embedded/qmlcalculator/deployment.pri | 7 ++ demos/embedded/qmlcalculator/qmlcalculator.cpp | 78 +++++++++++++++++ demos/embedded/qmlcalculator/qmlcalculator.pro | 12 +++ demos/embedded/qmlclocks/deployment.pri | 7 ++ demos/embedded/qmlclocks/qmlclocks.cpp | 78 +++++++++++++++++ demos/embedded/qmlclocks/qmlclocks.pro | 12 +++ demos/embedded/qmldialcontrol/deployment.pri | 7 ++ demos/embedded/qmldialcontrol/qmldialcontrol.cpp | 66 +++++++++++++++ demos/embedded/qmldialcontrol/qmldialcontrol.pro | 11 +++ demos/embedded/qmleasing/deployment.pri | 7 ++ demos/embedded/qmleasing/qmleasing.cpp | 66 +++++++++++++++ demos/embedded/qmleasing/qmleasing.pro | 11 +++ demos/embedded/qmlflickr/deployment.pri | 7 ++ demos/embedded/qmlflickr/qmlflickr.cpp | 92 +++++++++++++++++++++ demos/embedded/qmlflickr/qmlflickr.pro | 14 ++++ demos/embedded/qmlphotoviewer/deployment.pri | 7 ++ demos/embedded/qmlphotoviewer/qmlphotoviewer.cpp | 92 +++++++++++++++++++++ demos/embedded/qmlphotoviewer/qmlphotoviewer.pro | 14 ++++ demos/embedded/qmltwitter/deployment.pri | 7 ++ demos/embedded/qmltwitter/qmltwitter.cpp | 92 +++++++++++++++++++++ demos/embedded/qmltwitter/qmltwitter.pro | 14 ++++ 31 files changed, 725 insertions(+) create mode 100644 demos/embedded/fluidlauncher/screenshots/qmlcalculator.png create mode 100644 demos/embedded/fluidlauncher/screenshots/qmlclocks.png create mode 100644 demos/embedded/fluidlauncher/screenshots/qmldialcontrol.png create mode 100644 demos/embedded/fluidlauncher/screenshots/qmleasing.png create mode 100644 demos/embedded/fluidlauncher/screenshots/qmlflickr.jpg create mode 100644 demos/embedded/fluidlauncher/screenshots/qmlphotoviewer.jpg create mode 100644 demos/embedded/fluidlauncher/screenshots/qmltwitter.jpg create mode 100644 demos/embedded/qmlcalculator/deployment.pri create mode 100644 demos/embedded/qmlcalculator/qmlcalculator.cpp create mode 100644 demos/embedded/qmlcalculator/qmlcalculator.pro create mode 100644 demos/embedded/qmlclocks/deployment.pri create mode 100644 demos/embedded/qmlclocks/qmlclocks.cpp create mode 100644 demos/embedded/qmlclocks/qmlclocks.pro create mode 100644 demos/embedded/qmldialcontrol/deployment.pri create mode 100644 demos/embedded/qmldialcontrol/qmldialcontrol.cpp create mode 100644 demos/embedded/qmldialcontrol/qmldialcontrol.pro create mode 100644 demos/embedded/qmleasing/deployment.pri create mode 100644 demos/embedded/qmleasing/qmleasing.cpp create mode 100644 demos/embedded/qmleasing/qmleasing.pro create mode 100644 demos/embedded/qmlflickr/deployment.pri create mode 100644 demos/embedded/qmlflickr/qmlflickr.cpp create mode 100644 demos/embedded/qmlflickr/qmlflickr.pro create mode 100644 demos/embedded/qmlphotoviewer/deployment.pri create mode 100644 demos/embedded/qmlphotoviewer/qmlphotoviewer.cpp create mode 100644 demos/embedded/qmlphotoviewer/qmlphotoviewer.pro create mode 100644 demos/embedded/qmltwitter/deployment.pri create mode 100644 demos/embedded/qmltwitter/qmltwitter.cpp create mode 100644 demos/embedded/qmltwitter/qmltwitter.pro diff --git a/demos/embedded/embedded.pro b/demos/embedded/embedded.pro index da764d1..a3fc72b 100644 --- a/demos/embedded/embedded.pro +++ b/demos/embedded/embedded.pro @@ -19,6 +19,11 @@ contains(QT_CONFIG, webkit) { SUBDIRS += anomaly } +contains(QT_CONFIG, declarative) { + # Qml demos require DEPLOYMENT support. Therefore, only symbian. + symbian:SUBDIRS += qmlcalculator qmlclocks qmldialcontrol qmleasing qmlflickr qmlphotoviewer qmltwitter +} + # install sources.files = README *.pro sources.path = $$[QT_INSTALL_DEMOS]/embedded diff --git a/demos/embedded/fluidlauncher/config_s60/config.xml b/demos/embedded/fluidlauncher/config_s60/config.xml index d926a4b..4f10488 100644 --- a/demos/embedded/fluidlauncher/config_s60/config.xml +++ b/demos/embedded/fluidlauncher/config_s60/config.xml @@ -21,6 +21,13 @@ + + + + + + + diff --git a/demos/embedded/fluidlauncher/fluidlauncher.pro b/demos/embedded/fluidlauncher/fluidlauncher.pro index bb512d9..21f3819 100644 --- a/demos/embedded/fluidlauncher/fluidlauncher.pro +++ b/demos/embedded/fluidlauncher/fluidlauncher.pro @@ -215,6 +215,16 @@ symbian { $$appResourceDir(examples/script/context2d/context2d.mif) } + qmldemos = qmlcalculator qmlclocks qmldialcontrol qmleasing qmlflickr qmlphotoviewer qmltwitter + contains(QT_CONFIG, declarative) { + for(qmldemo, qmldemos) { + executables.sources += $$QT_BUILD_TREE/demos/embedded/$${qmldemo}/$${qmldemo}.exe + reg_resource.sources += $$regResourceDir(demos/embedded/$${qmldemo}/$${qmldemo}_reg.rsc) + resource.sources += $$appResourceDir(demos/embedded/$${qmldemo}/$${qmldemo}.rsc) + mifs.sources += $$appResourceDir(demos/embedded/$${qmldemo}/$${qmldemo}.mif) + } + } + files.sources = $$PWD/screenshots $$PWD/slides files.path = . @@ -243,6 +253,8 @@ symbian { DEPLOYMENT += config files executables viewerimages saxbookmarks reg_resource resource \ mifs desktopservices_music desktopservices_images fluidbackup + contains(QT_CONFIG, declarative):for(qmldemo, qmldemos):include($$QT_BUILD_TREE/demos/embedded/$${qmldemo}/deployment.pri) + DEPLOYMENT.installer_header = 0xA000D7CD TARGET.EPOCHEAPSIZE = 100000 20000000 diff --git a/demos/embedded/fluidlauncher/screenshots/qmlcalculator.png b/demos/embedded/fluidlauncher/screenshots/qmlcalculator.png new file mode 100644 index 0000000..f4218f5 Binary files /dev/null and b/demos/embedded/fluidlauncher/screenshots/qmlcalculator.png differ diff --git a/demos/embedded/fluidlauncher/screenshots/qmlclocks.png b/demos/embedded/fluidlauncher/screenshots/qmlclocks.png new file mode 100644 index 0000000..ba25a18 Binary files /dev/null and b/demos/embedded/fluidlauncher/screenshots/qmlclocks.png differ diff --git a/demos/embedded/fluidlauncher/screenshots/qmldialcontrol.png b/demos/embedded/fluidlauncher/screenshots/qmldialcontrol.png new file mode 100644 index 0000000..b8def8c Binary files /dev/null and b/demos/embedded/fluidlauncher/screenshots/qmldialcontrol.png differ diff --git a/demos/embedded/fluidlauncher/screenshots/qmleasing.png b/demos/embedded/fluidlauncher/screenshots/qmleasing.png new file mode 100644 index 0000000..d34c2ac Binary files /dev/null and b/demos/embedded/fluidlauncher/screenshots/qmleasing.png differ diff --git a/demos/embedded/fluidlauncher/screenshots/qmlflickr.jpg b/demos/embedded/fluidlauncher/screenshots/qmlflickr.jpg new file mode 100644 index 0000000..d7faabf Binary files /dev/null and b/demos/embedded/fluidlauncher/screenshots/qmlflickr.jpg differ diff --git a/demos/embedded/fluidlauncher/screenshots/qmlphotoviewer.jpg b/demos/embedded/fluidlauncher/screenshots/qmlphotoviewer.jpg new file mode 100644 index 0000000..673ffc6 Binary files /dev/null and b/demos/embedded/fluidlauncher/screenshots/qmlphotoviewer.jpg differ diff --git a/demos/embedded/fluidlauncher/screenshots/qmltwitter.jpg b/demos/embedded/fluidlauncher/screenshots/qmltwitter.jpg new file mode 100644 index 0000000..4399eea Binary files /dev/null and b/demos/embedded/fluidlauncher/screenshots/qmltwitter.jpg differ diff --git a/demos/embedded/qmlcalculator/deployment.pri b/demos/embedded/qmlcalculator/deployment.pri new file mode 100644 index 0000000..d5078f6 --- /dev/null +++ b/demos/embedded/qmlcalculator/deployment.pri @@ -0,0 +1,7 @@ +qmlcalculator_src = $$PWD/../../declarative/calculator +symbian { + qmlcalculator_uid3 = EA8EBD98 + qmlcalculator_files.path = ../$$qmlcalculator_uid3 +} +qmlcalculator_files.sources = $$qmlcalculator_src/calculator.qml $$qmlcalculator_src/Core +DEPLOYMENT += qmlcalculator_files diff --git a/demos/embedded/qmlcalculator/qmlcalculator.cpp b/demos/embedded/qmlcalculator/qmlcalculator.cpp new file mode 100644 index 0000000..3030e81 --- /dev/null +++ b/demos/embedded/qmlcalculator/qmlcalculator.cpp @@ -0,0 +1,78 @@ +/**************************************************************************** +** +** 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 demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include + +#if defined(Q_OS_SYMBIAN) +#include +#include +#include +#include +#endif // Q_OS_SYMBIAN + +int main(int argc, char *argv[]) +{ + QApplication application(argc, argv); + + const QString mainQmlApp = QLatin1String("calculator.qml"); + QDeclarativeView view; + view.setSource(QUrl(mainQmlApp)); + view.setResizeMode(QDeclarativeView::SizeRootObjectToView); + +#if defined(QT_KEYPAD_NAVIGATION) + QApplication::setNavigationMode(Qt::NavigationModeCursorAuto); +#endif // QT_KEYPAD_NAVIGATION + +#if defined(Q_OS_SYMBIAN) + CAknAppUi* appUi = dynamic_cast (CEikonEnv::Static()->AppUi()); + TRAPD(error, + if (appUi) + appUi->SetOrientationL(CAknAppUi::EAppUiOrientationPortrait) + ) + view.showFullScreen(); +#else // Q_OS_SYMBIAN + view.show(); +#endif // Q_OS_SYMBIAN + + return application.exec(); +} diff --git a/demos/embedded/qmlcalculator/qmlcalculator.pro b/demos/embedded/qmlcalculator/qmlcalculator.pro new file mode 100644 index 0000000..1e71eed --- /dev/null +++ b/demos/embedded/qmlcalculator/qmlcalculator.pro @@ -0,0 +1,12 @@ +!symbian:!wince*:warning("DEPLOYMENT support required. This project only works on Symbian and WinCE.") + +QT += declarative +SOURCES += $$PWD/qmlcalculator.cpp +include($$PWD/deployment.pri) + +symbian { + TARGET.UID3 = 0x$$qmlcalculator_uid3 # defined in deployment.pri + include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) + TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 + LIBS += -lcone -leikcore -lavkon # Screen orientation +} diff --git a/demos/embedded/qmlclocks/deployment.pri b/demos/embedded/qmlclocks/deployment.pri new file mode 100644 index 0000000..84803ec --- /dev/null +++ b/demos/embedded/qmlclocks/deployment.pri @@ -0,0 +1,7 @@ +qmlclocks_src = $$PWD/../../../examples/declarative/toys/clocks +symbian { + qmlclocks_uid3 = E19225B9 + qmlclocks_files.path = ../$$qmlclocks_uid3 +} +qmlclocks_files.sources = $$qmlclocks_src/clocks.qml $$qmlclocks_src/content +DEPLOYMENT += qmlclocks_files diff --git a/demos/embedded/qmlclocks/qmlclocks.cpp b/demos/embedded/qmlclocks/qmlclocks.cpp new file mode 100644 index 0000000..d94cbdd --- /dev/null +++ b/demos/embedded/qmlclocks/qmlclocks.cpp @@ -0,0 +1,78 @@ +/**************************************************************************** +** +** 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 demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include + +#if defined(Q_OS_SYMBIAN) +#include +#include +#include +#include +#endif // Q_OS_SYMBIAN + +int main(int argc, char *argv[]) +{ + QApplication application(argc, argv); + + const QString mainQmlApp = QLatin1String("clocks.qml"); + QDeclarativeView view; + view.setSource(QUrl(mainQmlApp)); + view.setResizeMode(QDeclarativeView::SizeRootObjectToView); + +#if defined(QT_KEYPAD_NAVIGATION) + QApplication::setNavigationMode(Qt::NavigationModeCursorAuto); +#endif // QT_KEYPAD_NAVIGATION + +#if defined(Q_OS_SYMBIAN) + CAknAppUi* appUi = dynamic_cast (CEikonEnv::Static()->AppUi()); + TRAPD(error, + if (appUi) + appUi->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape) + ) + view.showFullScreen(); +#else // Q_OS_SYMBIAN + view.show(); +#endif // Q_OS_SYMBIAN + + return application.exec(); +} diff --git a/demos/embedded/qmlclocks/qmlclocks.pro b/demos/embedded/qmlclocks/qmlclocks.pro new file mode 100644 index 0000000..5edfe14 --- /dev/null +++ b/demos/embedded/qmlclocks/qmlclocks.pro @@ -0,0 +1,12 @@ +!symbian:!wince*:warning("DEPLOYMENT support required. This project only works on Symbian and WinCE.") + +QT += declarative +SOURCES += $$PWD/qmlclocks.cpp +include($$PWD/deployment.pri) + +symbian { + TARGET.UID3 = 0x$$qmlclocks_uid3 # defined in deployment.pri + include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) + TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 + LIBS += -lcone -leikcore -lavkon # Screen orientation +} diff --git a/demos/embedded/qmldialcontrol/deployment.pri b/demos/embedded/qmldialcontrol/deployment.pri new file mode 100644 index 0000000..8eb39b2 --- /dev/null +++ b/demos/embedded/qmldialcontrol/deployment.pri @@ -0,0 +1,7 @@ +qmldialcontrol_src = $$PWD/../../../examples/declarative/ui-components/dialcontrol +symbian { + qmldialcontrol_uid3 = E59A9283 + qmldialcontrol_files.path = ../$$qmldialcontrol_uid3 +} +qmldialcontrol_files.sources = $$qmldialcontrol_src/dialcontrol.qml $$qmldialcontrol_src/content +DEPLOYMENT += qmldialcontrol_files diff --git a/demos/embedded/qmldialcontrol/qmldialcontrol.cpp b/demos/embedded/qmldialcontrol/qmldialcontrol.cpp new file mode 100644 index 0000000..311cee0 --- /dev/null +++ b/demos/embedded/qmldialcontrol/qmldialcontrol.cpp @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** 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 demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include + +int main(int argc, char *argv[]) +{ + QApplication application(argc, argv); + + const QString mainQmlApp = QLatin1String("dialcontrol.qml"); + QDeclarativeView view; + view.setSource(QUrl(mainQmlApp)); + view.setResizeMode(QDeclarativeView::SizeRootObjectToView); + +#if defined(QT_KEYPAD_NAVIGATION) + QApplication::setNavigationMode(Qt::NavigationModeCursorAuto); +#endif // QT_KEYPAD_NAVIGATION + +#if defined(Q_OS_SYMBIAN) + view.showFullScreen(); +#else // Q_OS_SYMBIAN + view.show(); +#endif // Q_OS_SYMBIAN + + return application.exec(); +} diff --git a/demos/embedded/qmldialcontrol/qmldialcontrol.pro b/demos/embedded/qmldialcontrol/qmldialcontrol.pro new file mode 100644 index 0000000..193cf55 --- /dev/null +++ b/demos/embedded/qmldialcontrol/qmldialcontrol.pro @@ -0,0 +1,11 @@ +!symbian:!wince*:warning("DEPLOYMENT support required. This project only works on Symbian and WinCE.") + +QT += declarative +SOURCES += $$PWD/qmldialcontrol.cpp +include($$PWD/deployment.pri) + +symbian { + TARGET.UID3 = 0x$$qmldialcontrol_uid3 # defined in deployment.pri + include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) + TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 +} diff --git a/demos/embedded/qmleasing/deployment.pri b/demos/embedded/qmleasing/deployment.pri new file mode 100644 index 0000000..ddab1ba --- /dev/null +++ b/demos/embedded/qmleasing/deployment.pri @@ -0,0 +1,7 @@ +qmleasing_src = $$PWD/../../../examples/declarative/animation/easing +symbian { + qmleasing_uid3 = E8E8E725 + qmleasing_files.path = ../$$qmleasing_uid3 +} +qmleasing_files.sources = $$qmleasing_src/easing.qml +DEPLOYMENT += qmleasing_files diff --git a/demos/embedded/qmleasing/qmleasing.cpp b/demos/embedded/qmleasing/qmleasing.cpp new file mode 100644 index 0000000..d326468 --- /dev/null +++ b/demos/embedded/qmleasing/qmleasing.cpp @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** 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 demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include + +int main(int argc, char *argv[]) +{ + QApplication application(argc, argv); + + const QString mainQmlApp = QLatin1String("easing.qml"); + QDeclarativeView view; + view.setSource(QUrl(mainQmlApp)); + view.setResizeMode(QDeclarativeView::SizeRootObjectToView); + +#if defined(QT_KEYPAD_NAVIGATION) + QApplication::setNavigationMode(Qt::NavigationModeCursorAuto); +#endif // QT_KEYPAD_NAVIGATION + +#if defined(Q_OS_SYMBIAN) + view.showFullScreen(); +#else // Q_OS_SYMBIAN + view.show(); +#endif // Q_OS_SYMBIAN + + return application.exec(); +} diff --git a/demos/embedded/qmleasing/qmleasing.pro b/demos/embedded/qmleasing/qmleasing.pro new file mode 100644 index 0000000..084a880 --- /dev/null +++ b/demos/embedded/qmleasing/qmleasing.pro @@ -0,0 +1,11 @@ +!symbian:!wince*:warning("DEPLOYMENT support required. This project only works on Symbian and WinCE.") + +QT += declarative +SOURCES += $$PWD/qmleasing.cpp +include($$PWD/deployment.pri) + +symbian { + TARGET.UID3 = 0x$$qmleasing_uid3 # defined in deployment.pri + include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) + TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 +} diff --git a/demos/embedded/qmlflickr/deployment.pri b/demos/embedded/qmlflickr/deployment.pri new file mode 100644 index 0000000..aef3198 --- /dev/null +++ b/demos/embedded/qmlflickr/deployment.pri @@ -0,0 +1,7 @@ +qmlflickr_src = $$PWD/../../declarative/flickr +symbian { + qmlflickr_uid3 = E56D5A92 + qmlflickr_files.path = ../$$qmlflickr_uid3 +} +qmlflickr_files.sources = $$qmlflickr_src/flickr.qml $$qmlflickr_src/common $$qmlflickr_src/mobile +DEPLOYMENT += qmlflickr_files diff --git a/demos/embedded/qmlflickr/qmlflickr.cpp b/demos/embedded/qmlflickr/qmlflickr.cpp new file mode 100644 index 0000000..6f0c528 --- /dev/null +++ b/demos/embedded/qmlflickr/qmlflickr.cpp @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** 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 demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include + +#if defined(Q_OS_SYMBIAN) +#include +#include +#include "sym_iap_util.h" + +class QmlAppView : public QDeclarativeView +{ +Q_OBJECT +public: + QmlAppView(QWidget *parent = 0) + : QDeclarativeView(parent) + { + QTimer::singleShot(0, this, SLOT(setDefaultIap())); + } + +private slots: + void setDefaultIap() + { + qt_SetDefaultIap(); + } +}; +#else // Q_OS_SYMBIAN +typedef QDeclarativeView QmlAppView; +#endif // Q_OS_SYMBIAN + +int main(int argc, char *argv[]) +{ + QApplication application(argc, argv); + + const QString mainQmlApp = QLatin1String("flickr.qml"); + QmlAppView view; + view.setSource(QUrl(mainQmlApp)); + view.setResizeMode(QDeclarativeView::SizeRootObjectToView); + +#if defined(Q_OS_SYMBIAN) + view.showFullScreen(); +#else // Q_OS_SYMBIAN + view.setGeometry(QRect(100, 100, 360, 640)); + view.show(); +#endif // Q_OS_SYMBIAN + return application.exec(); +} + +#if defined(Q_OS_SYMBIAN) +#include "qmlflickr.moc" +#endif // Q_OS_SYMBIAN diff --git a/demos/embedded/qmlflickr/qmlflickr.pro b/demos/embedded/qmlflickr/qmlflickr.pro new file mode 100644 index 0000000..e706134 --- /dev/null +++ b/demos/embedded/qmlflickr/qmlflickr.pro @@ -0,0 +1,14 @@ +!symbian:!wince*:warning("DEPLOYMENT support required. This project only works on Symbian and WinCE.") + +QT += declarative network +SOURCES += $$PWD/qmlflickr.cpp +include($$PWD/deployment.pri) + +symbian { + TARGET.UID3 = 0x$$qmlflickr_uid3 # defined in deployment.pri + include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) + INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/ + LIBS += -lesock -lcommdb -linsock # For IAP selection + TARGET.CAPABILITY = NetworkServices + TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 +} diff --git a/demos/embedded/qmlphotoviewer/deployment.pri b/demos/embedded/qmlphotoviewer/deployment.pri new file mode 100644 index 0000000..99475cc --- /dev/null +++ b/demos/embedded/qmlphotoviewer/deployment.pri @@ -0,0 +1,7 @@ +qmlphotoviewer_src = $$PWD/../../declarative/photoviewer +symbian { + qmlphotoviewer_uid3 = E8567E72 + qmlphotoviewer_files.path = ../$$qmlphotoviewer_uid3 +} +qmlphotoviewer_files.sources = $$qmlphotoviewer_src/photoviewer.qml $$qmlphotoviewer_src/PhotoViewerCore +DEPLOYMENT += qmlphotoviewer_files diff --git a/demos/embedded/qmlphotoviewer/qmlphotoviewer.cpp b/demos/embedded/qmlphotoviewer/qmlphotoviewer.cpp new file mode 100644 index 0000000..7889842 --- /dev/null +++ b/demos/embedded/qmlphotoviewer/qmlphotoviewer.cpp @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** 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 demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include + +#if defined(Q_OS_SYMBIAN) +#include +#include +#include "sym_iap_util.h" + +class QmlAppView : public QDeclarativeView +{ +Q_OBJECT +public: + QmlAppView(QWidget *parent = 0) + : QDeclarativeView(parent) + { + QTimer::singleShot(0, this, SLOT(setDefaultIap())); + } + +private slots: + void setDefaultIap() + { + qt_SetDefaultIap(); + } +}; +#else // Q_OS_SYMBIAN +typedef QDeclarativeView QmlAppView; +#endif // Q_OS_SYMBIAN + +int main(int argc, char *argv[]) +{ + QApplication application(argc, argv); + + const QString mainQmlApp = QLatin1String("photoviewer.qml"); + QmlAppView view; + view.setSource(QUrl(mainQmlApp)); + view.setResizeMode(QDeclarativeView::SizeRootObjectToView); + +#if defined(Q_OS_SYMBIAN) + view.showFullScreen(); +#else // Q_OS_SYMBIAN + view.setGeometry(QRect(100, 100, 360, 640)); + view.show(); +#endif // Q_OS_SYMBIAN + return application.exec(); +} + +#if defined(Q_OS_SYMBIAN) +#include "qmlphotoviewer.moc" +#endif // Q_OS_SYMBIAN diff --git a/demos/embedded/qmlphotoviewer/qmlphotoviewer.pro b/demos/embedded/qmlphotoviewer/qmlphotoviewer.pro new file mode 100644 index 0000000..ead5e67 --- /dev/null +++ b/demos/embedded/qmlphotoviewer/qmlphotoviewer.pro @@ -0,0 +1,14 @@ +!symbian:!wince*:warning("DEPLOYMENT support required. This project only works on Symbian and WinCE.") + +QT += declarative network +SOURCES += $$PWD/qmlphotoviewer.cpp +include($$PWD/deployment.pri) + +symbian { + TARGET.UID3 = 0x$$qmlphotoviewer_uid3 # defined in deployment.pri + include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) + INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/ + LIBS += -lesock -lcommdb -linsock # For IAP selection + TARGET.CAPABILITY = NetworkServices + TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 +} diff --git a/demos/embedded/qmltwitter/deployment.pri b/demos/embedded/qmltwitter/deployment.pri new file mode 100644 index 0000000..e5bd884 --- /dev/null +++ b/demos/embedded/qmltwitter/deployment.pri @@ -0,0 +1,7 @@ +qmltwitter_src = $$PWD/../../declarative/twitter +symbian { + qmltwitter_uid3 = EEF6D468 + qmltwitter_files.path = ../$$qmltwitter_uid3 +} +qmltwitter_files.sources = $$qmltwitter_src/twitter.qml $$qmltwitter_src/TwitterCore +DEPLOYMENT += qmltwitter_files diff --git a/demos/embedded/qmltwitter/qmltwitter.cpp b/demos/embedded/qmltwitter/qmltwitter.cpp new file mode 100644 index 0000000..e30ab24 --- /dev/null +++ b/demos/embedded/qmltwitter/qmltwitter.cpp @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** 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 demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include + +#if defined(Q_OS_SYMBIAN) +#include +#include +#include "sym_iap_util.h" + +class QmlAppView : public QDeclarativeView +{ +Q_OBJECT +public: + QmlAppView(QWidget *parent = 0) + : QDeclarativeView(parent) + { + QTimer::singleShot(0, this, SLOT(setDefaultIap())); + } + +private slots: + void setDefaultIap() + { + qt_SetDefaultIap(); + } +}; +#else // Q_OS_SYMBIAN +typedef QDeclarativeView QmlAppView; +#endif // Q_OS_SYMBIAN + +int main(int argc, char *argv[]) +{ + QApplication application(argc, argv); + + const QString mainQmlApp = QLatin1String("twitter.qml"); + QmlAppView view; + view.setSource(QUrl(mainQmlApp)); + view.setResizeMode(QDeclarativeView::SizeRootObjectToView); + +#if defined(Q_OS_SYMBIAN) + view.showFullScreen(); +#else // Q_OS_SYMBIAN + view.setGeometry(QRect(100, 100, 360, 640)); + view.show(); +#endif // Q_OS_SYMBIAN + return application.exec(); +} + +#if defined(Q_OS_SYMBIAN) +#include "qmltwitter.moc" +#endif // Q_OS_SYMBIAN diff --git a/demos/embedded/qmltwitter/qmltwitter.pro b/demos/embedded/qmltwitter/qmltwitter.pro new file mode 100644 index 0000000..7f9be57 --- /dev/null +++ b/demos/embedded/qmltwitter/qmltwitter.pro @@ -0,0 +1,14 @@ +!symbian:!wince*:warning("DEPLOYMENT support required. This project only works on Symbian and WinCE.") + +QT += declarative network +SOURCES += $$PWD/qmltwitter.cpp +include($$PWD/deployment.pri) + +symbian { + TARGET.UID3 = 0x$$qmltwitter_uid3 # defined in deployment.pri + include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) + INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/ + LIBS += -lesock -lcommdb -linsock # For IAP selection + TARGET.CAPABILITY = NetworkServices + TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 +} -- cgit v0.12