diff options
Diffstat (limited to 'examples')
1225 files changed, 42374 insertions, 1482 deletions
diff --git a/examples/HACKING b/examples/HACKING index 7eea4975ac..9539d2d129 100644 --- a/examples/HACKING +++ b/examples/HACKING @@ -1,4 +1,4 @@ -Some guidelines for QtDeclarative examples +Some guidelines for QtQml examples Snippets --- diff --git a/examples/demos/calculator/CalculatorCore/Button.qml b/examples/demos/calculator/CalculatorCore/Button.qml index 872fc81174..e7b3637b4c 100644 --- a/examples/demos/calculator/CalculatorCore/Button.qml +++ b/examples/demos/calculator/CalculatorCore/Button.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/calculator/CalculatorCore/Display.qml b/examples/demos/calculator/CalculatorCore/Display.qml index 3333484971..3dceeab169 100644 --- a/examples/demos/calculator/CalculatorCore/Display.qml +++ b/examples/demos/calculator/CalculatorCore/Display.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/calculator/calculator-desktop.qml b/examples/demos/calculator/calculator-desktop.qml index 7e72f50beb..be65c77170 100644 --- a/examples/demos/calculator/calculator-desktop.qml +++ b/examples/demos/calculator/calculator-desktop.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/calculator/calculator-mobile.qml b/examples/demos/calculator/calculator-mobile.qml index b4fc372b39..7ee622f698 100644 --- a/examples/demos/calculator/calculator-mobile.qml +++ b/examples/demos/calculator/calculator-mobile.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/calculator/calculator.pro b/examples/demos/calculator/calculator.pro index 3bf3b8ca2f..297d5cfdbb 100644 --- a/examples/demos/calculator/calculator.pro +++ b/examples/demos/calculator/calculator.pro @@ -1,6 +1,6 @@ TEMPLATE = app -QT += quick declarative +QT += quick qml SOURCES += main.cpp target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/demos/calculator diff --git a/examples/demos/calculator/main.cpp b/examples/demos/calculator/main.cpp index c7f9b29952..fafe14fe46 100644 --- a/examples/demos/calculator/main.cpp +++ b/examples/demos/calculator/main.cpp @@ -41,7 +41,7 @@ #include <QGuiApplication> #include <QStringList> #include <QQuickView> -#include <QDeclarativeEngine> +#include <QQmlEngine> void usage() { diff --git a/examples/demos/flickr/content/Button.qml b/examples/demos/flickr/content/Button.qml index d6a8d3e001..57f846aec3 100644 --- a/examples/demos/flickr/content/Button.qml +++ b/examples/demos/flickr/content/Button.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/flickr/content/GridDelegate.qml b/examples/demos/flickr/content/GridDelegate.qml index 794d768c74..f8838bd609 100644 --- a/examples/demos/flickr/content/GridDelegate.qml +++ b/examples/demos/flickr/content/GridDelegate.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/flickr/content/ImageDetails.qml b/examples/demos/flickr/content/ImageDetails.qml index 83f2537d65..42b5e845ea 100644 --- a/examples/demos/flickr/content/ImageDetails.qml +++ b/examples/demos/flickr/content/ImageDetails.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/flickr/content/ListDelegate.qml b/examples/demos/flickr/content/ListDelegate.qml index 9c239151f1..00f837f862 100644 --- a/examples/demos/flickr/content/ListDelegate.qml +++ b/examples/demos/flickr/content/ListDelegate.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/flickr/content/Progress.qml b/examples/demos/flickr/content/Progress.qml index 81f1e79ed6..ed2629b48a 100644 --- a/examples/demos/flickr/content/Progress.qml +++ b/examples/demos/flickr/content/Progress.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/flickr/content/RssModel.qml b/examples/demos/flickr/content/RssModel.qml index f28a23d502..51cea498e6 100644 --- a/examples/demos/flickr/content/RssModel.qml +++ b/examples/demos/flickr/content/RssModel.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/flickr/content/ScrollBar.qml b/examples/demos/flickr/content/ScrollBar.qml index 388e43dc2d..7c62ad088f 100644 --- a/examples/demos/flickr/content/ScrollBar.qml +++ b/examples/demos/flickr/content/ScrollBar.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/flickr/content/Slider.qml b/examples/demos/flickr/content/Slider.qml index 0f9e8b20f2..c4e743641f 100644 --- a/examples/demos/flickr/content/Slider.qml +++ b/examples/demos/flickr/content/Slider.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/flickr/content/TitleBar.qml b/examples/demos/flickr/content/TitleBar.qml index 3dab005a11..223939f81a 100644 --- a/examples/demos/flickr/content/TitleBar.qml +++ b/examples/demos/flickr/content/TitleBar.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/flickr/content/ToolBar.qml b/examples/demos/flickr/content/ToolBar.qml index e82be63e7e..356993b41a 100644 --- a/examples/demos/flickr/content/ToolBar.qml +++ b/examples/demos/flickr/content/ToolBar.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/flickr/content/UnifiedDelegate.qml b/examples/demos/flickr/content/UnifiedDelegate.qml index 00a777b0a1..0b068c0abe 100644 --- a/examples/demos/flickr/content/UnifiedDelegate.qml +++ b/examples/demos/flickr/content/UnifiedDelegate.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/flickr/flickr-90.qml b/examples/demos/flickr/flickr-90.qml index ae06957649..b95b1c9872 100644 --- a/examples/demos/flickr/flickr-90.qml +++ b/examples/demos/flickr/flickr-90.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/flickr/flickr.qml b/examples/demos/flickr/flickr.qml index 74c41f185b..98ca5197ab 100644 --- a/examples/demos/flickr/flickr.qml +++ b/examples/demos/flickr/flickr.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/minehunt/MinehuntCore/Explosion.qml b/examples/demos/minehunt/MinehuntCore/Explosion.qml index 0983b68db4..a1b4292bcf 100644 --- a/examples/demos/minehunt/MinehuntCore/Explosion.qml +++ b/examples/demos/minehunt/MinehuntCore/Explosion.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/minehunt/MinehuntCore/Tile.qml b/examples/demos/minehunt/MinehuntCore/Tile.qml index 14c1f51f9e..1180b6f584 100644 --- a/examples/demos/minehunt/MinehuntCore/Tile.qml +++ b/examples/demos/minehunt/MinehuntCore/Tile.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/minehunt/main.cpp b/examples/demos/minehunt/main.cpp index 47c0436969..0aa11a1d7a 100644 --- a/examples/demos/minehunt/main.cpp +++ b/examples/demos/minehunt/main.cpp @@ -41,8 +41,8 @@ #include <QtGui/QGuiApplication> #include <QtQuick/qquickview.h> -#include <QtDeclarative/QDeclarativeContext> -#include <QtDeclarative/QDeclarativeEngine> +#include <QtQml/QQmlContext> +#include <QtQml/QQmlEngine> #include "minehunt.h" diff --git a/examples/demos/minehunt/minehunt.cpp b/examples/demos/minehunt/minehunt.cpp index facbec375a..cde30278b3 100644 --- a/examples/demos/minehunt/minehunt.cpp +++ b/examples/demos/minehunt/minehunt.cpp @@ -45,25 +45,25 @@ #include "minehunt.h" -void tilesPropAppend(QDeclarativeListProperty<TileData>* prop, TileData* value) +void tilesPropAppend(QQmlListProperty<TileData>* prop, TileData* value) { Q_UNUSED(prop); Q_UNUSED(value); return; //Append not supported } -int tilesPropCount(QDeclarativeListProperty<TileData>* prop) +int tilesPropCount(QQmlListProperty<TileData>* prop) { return static_cast<QList<TileData*>*>(prop->data)->count(); } -TileData* tilesPropAt(QDeclarativeListProperty<TileData>* prop, int index) +TileData* tilesPropAt(QQmlListProperty<TileData>* prop, int index) { return static_cast<QList<TileData*>*>(prop->data)->at(index); } -QDeclarativeListProperty<TileData> MinehuntGame::tiles(){ - return QDeclarativeListProperty<TileData>(this, &_tiles, &tilesPropAppend, +QQmlListProperty<TileData> MinehuntGame::tiles(){ + return QQmlListProperty<TileData>(this, &_tiles, &tilesPropAppend, &tilesPropCount, &tilesPropAt, 0); } diff --git a/examples/demos/minehunt/minehunt.h b/examples/demos/minehunt/minehunt.h index a0ae23fa8a..34bab71218 100644 --- a/examples/demos/minehunt/minehunt.h +++ b/examples/demos/minehunt/minehunt.h @@ -40,7 +40,7 @@ ****************************************************************************/ -#include <qdeclarative.h> +#include <qqml.h> class TileData : public QObject { @@ -85,8 +85,8 @@ class MinehuntGame : public QObject public: MinehuntGame(); - Q_PROPERTY(QDeclarativeListProperty<TileData> tiles READ tiles CONSTANT) - QDeclarativeListProperty<TileData> tiles(); + Q_PROPERTY(QQmlListProperty<TileData> tiles READ tiles CONSTANT) + QQmlListProperty<TileData> tiles(); Q_PROPERTY(bool isPlaying READ isPlaying NOTIFY isPlayingChanged) bool isPlaying() {return playing;} diff --git a/examples/demos/minehunt/minehunt.pro b/examples/demos/minehunt/minehunt.pro index 81b6b80486..78e874d805 100644 --- a/examples/demos/minehunt/minehunt.pro +++ b/examples/demos/minehunt/minehunt.pro @@ -1,4 +1,4 @@ -QT += declarative quick +QT += qml quick HEADERS += minehunt.h SOURCES += main.cpp minehunt.cpp diff --git a/examples/demos/minehunt/minehunt.qml b/examples/demos/minehunt/minehunt.qml index 7c4948a3bb..42dc408fff 100644 --- a/examples/demos/minehunt/minehunt.qml +++ b/examples/demos/minehunt/minehunt.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/photoviewer/PhotoViewerCore/AlbumDelegate.qml b/examples/demos/photoviewer/PhotoViewerCore/AlbumDelegate.qml index f183c4b2a0..164f47faa9 100644 --- a/examples/demos/photoviewer/PhotoViewerCore/AlbumDelegate.qml +++ b/examples/demos/photoviewer/PhotoViewerCore/AlbumDelegate.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/photoviewer/PhotoViewerCore/BusyIndicator.qml b/examples/demos/photoviewer/PhotoViewerCore/BusyIndicator.qml index 2b1a75f369..867c268399 100644 --- a/examples/demos/photoviewer/PhotoViewerCore/BusyIndicator.qml +++ b/examples/demos/photoviewer/PhotoViewerCore/BusyIndicator.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/photoviewer/PhotoViewerCore/Button.qml b/examples/demos/photoviewer/PhotoViewerCore/Button.qml index fcce969fbd..8f4177c097 100644 --- a/examples/demos/photoviewer/PhotoViewerCore/Button.qml +++ b/examples/demos/photoviewer/PhotoViewerCore/Button.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/photoviewer/PhotoViewerCore/EditableButton.qml b/examples/demos/photoviewer/PhotoViewerCore/EditableButton.qml index 5d845938c7..435ad2644f 100644 --- a/examples/demos/photoviewer/PhotoViewerCore/EditableButton.qml +++ b/examples/demos/photoviewer/PhotoViewerCore/EditableButton.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/photoviewer/PhotoViewerCore/PhotoDelegate.qml b/examples/demos/photoviewer/PhotoViewerCore/PhotoDelegate.qml index b972c938eb..5d4e5aee5d 100644 --- a/examples/demos/photoviewer/PhotoViewerCore/PhotoDelegate.qml +++ b/examples/demos/photoviewer/PhotoViewerCore/PhotoDelegate.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/photoviewer/PhotoViewerCore/ProgressBar.qml b/examples/demos/photoviewer/PhotoViewerCore/ProgressBar.qml index 43c936e342..58beef57f3 100644 --- a/examples/demos/photoviewer/PhotoViewerCore/ProgressBar.qml +++ b/examples/demos/photoviewer/PhotoViewerCore/ProgressBar.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/photoviewer/PhotoViewerCore/RssModel.qml b/examples/demos/photoviewer/PhotoViewerCore/RssModel.qml index ab818924ac..1598977bb1 100644 --- a/examples/demos/photoviewer/PhotoViewerCore/RssModel.qml +++ b/examples/demos/photoviewer/PhotoViewerCore/RssModel.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/photoviewer/PhotoViewerCore/Tag.qml b/examples/demos/photoviewer/PhotoViewerCore/Tag.qml index 2b546a3ac6..ed4a248a7b 100644 --- a/examples/demos/photoviewer/PhotoViewerCore/Tag.qml +++ b/examples/demos/photoviewer/PhotoViewerCore/Tag.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/photoviewer/photoviewer.qml b/examples/demos/photoviewer/photoviewer.qml index 918438832b..208720b9e6 100644 --- a/examples/demos/photoviewer/photoviewer.qml +++ b/examples/demos/photoviewer/photoviewer.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/plasmapatrol/content/BlasterHardpoint.qml b/examples/demos/plasmapatrol/content/BlasterHardpoint.qml index 4ac30d0202..10c50d43c8 100644 --- a/examples/demos/plasmapatrol/content/BlasterHardpoint.qml +++ b/examples/demos/plasmapatrol/content/BlasterHardpoint.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/plasmapatrol/content/Button.qml b/examples/demos/plasmapatrol/content/Button.qml index 405b99304f..992be295fc 100644 --- a/examples/demos/plasmapatrol/content/Button.qml +++ b/examples/demos/plasmapatrol/content/Button.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/plasmapatrol/content/CannonHardpoint.qml b/examples/demos/plasmapatrol/content/CannonHardpoint.qml index c4aa412760..48eb9d171a 100644 --- a/examples/demos/plasmapatrol/content/CannonHardpoint.qml +++ b/examples/demos/plasmapatrol/content/CannonHardpoint.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/plasmapatrol/content/ChoiceBox.qml b/examples/demos/plasmapatrol/content/ChoiceBox.qml index a678bc9dd4..6e21101f2e 100644 --- a/examples/demos/plasmapatrol/content/ChoiceBox.qml +++ b/examples/demos/plasmapatrol/content/ChoiceBox.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/plasmapatrol/content/Cruiser.qml b/examples/demos/plasmapatrol/content/Cruiser.qml index c689879dce..c469eb46d2 100644 --- a/examples/demos/plasmapatrol/content/Cruiser.qml +++ b/examples/demos/plasmapatrol/content/Cruiser.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/plasmapatrol/content/Frigate.qml b/examples/demos/plasmapatrol/content/Frigate.qml index de099bed72..92c63b87d1 100644 --- a/examples/demos/plasmapatrol/content/Frigate.qml +++ b/examples/demos/plasmapatrol/content/Frigate.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/plasmapatrol/content/Hardpoint.qml b/examples/demos/plasmapatrol/content/Hardpoint.qml index 5c7fb5521b..9e6057057d 100644 --- a/examples/demos/plasmapatrol/content/Hardpoint.qml +++ b/examples/demos/plasmapatrol/content/Hardpoint.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/plasmapatrol/content/HelpScreens.qml b/examples/demos/plasmapatrol/content/HelpScreens.qml index 9297f86f31..db70c6ee90 100644 --- a/examples/demos/plasmapatrol/content/HelpScreens.qml +++ b/examples/demos/plasmapatrol/content/HelpScreens.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/plasmapatrol/content/LaserHardpoint.qml b/examples/demos/plasmapatrol/content/LaserHardpoint.qml index 87ac3e9e62..a7baed604b 100644 --- a/examples/demos/plasmapatrol/content/LaserHardpoint.qml +++ b/examples/demos/plasmapatrol/content/LaserHardpoint.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/plasmapatrol/content/PlasmaPatrolParticles.qml b/examples/demos/plasmapatrol/content/PlasmaPatrolParticles.qml index 1d856b5805..e1924c3467 100644 --- a/examples/demos/plasmapatrol/content/PlasmaPatrolParticles.qml +++ b/examples/demos/plasmapatrol/content/PlasmaPatrolParticles.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/plasmapatrol/content/SequentialLoader.qml b/examples/demos/plasmapatrol/content/SequentialLoader.qml index eaef87fe57..3707759ce3 100644 --- a/examples/demos/plasmapatrol/content/SequentialLoader.qml +++ b/examples/demos/plasmapatrol/content/SequentialLoader.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/plasmapatrol/content/Ship.qml b/examples/demos/plasmapatrol/content/Ship.qml index a928cd2a2e..bd023b1dc2 100644 --- a/examples/demos/plasmapatrol/content/Ship.qml +++ b/examples/demos/plasmapatrol/content/Ship.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/plasmapatrol/content/Sloop.qml b/examples/demos/plasmapatrol/content/Sloop.qml index c6b1183162..3bc58a28b0 100644 --- a/examples/demos/plasmapatrol/content/Sloop.qml +++ b/examples/demos/plasmapatrol/content/Sloop.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/plasmapatrol/plasmapatrol.qml b/examples/demos/plasmapatrol/plasmapatrol.qml index 45f81c7222..b14ac6385b 100644 --- a/examples/demos/plasmapatrol/plasmapatrol.qml +++ b/examples/demos/plasmapatrol/plasmapatrol.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/rssnews/content/BusyIndicator.qml b/examples/demos/rssnews/content/BusyIndicator.qml index b6264ead92..f1abd1119c 100644 --- a/examples/demos/rssnews/content/BusyIndicator.qml +++ b/examples/demos/rssnews/content/BusyIndicator.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/rssnews/content/CategoryDelegate.qml b/examples/demos/rssnews/content/CategoryDelegate.qml index 1a56184489..fe64238adb 100644 --- a/examples/demos/rssnews/content/CategoryDelegate.qml +++ b/examples/demos/rssnews/content/CategoryDelegate.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/rssnews/content/NewsDelegate.qml b/examples/demos/rssnews/content/NewsDelegate.qml index 84019a9179..59ab269d3b 100644 --- a/examples/demos/rssnews/content/NewsDelegate.qml +++ b/examples/demos/rssnews/content/NewsDelegate.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/rssnews/content/RssFeeds.qml b/examples/demos/rssnews/content/RssFeeds.qml index 278f05752c..ed58ef3852 100644 --- a/examples/demos/rssnews/content/RssFeeds.qml +++ b/examples/demos/rssnews/content/RssFeeds.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/rssnews/content/ScrollBar.qml b/examples/demos/rssnews/content/ScrollBar.qml index 4ca4132c6b..7b1a2ac3e5 100644 --- a/examples/demos/rssnews/content/ScrollBar.qml +++ b/examples/demos/rssnews/content/ScrollBar.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/rssnews/rssnews.qml b/examples/demos/rssnews/rssnews.qml index 491cefda07..d26b94b6d3 100644 --- a/examples/demos/rssnews/rssnews.qml +++ b/examples/demos/rssnews/rssnews.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/samegame/content/BoomBlock.qml b/examples/demos/samegame/content/BoomBlock.qml index 47f86bd81b..a348368ae1 100644 --- a/examples/demos/samegame/content/BoomBlock.qml +++ b/examples/demos/samegame/content/BoomBlock.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/samegame/content/Button.qml b/examples/demos/samegame/content/Button.qml index b305455c92..2d1a993226 100644 --- a/examples/demos/samegame/content/Button.qml +++ b/examples/demos/samegame/content/Button.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/samegame/content/Dialog.qml b/examples/demos/samegame/content/Dialog.qml index 80e5984bfe..c81580e6a5 100644 --- a/examples/demos/samegame/content/Dialog.qml +++ b/examples/demos/samegame/content/Dialog.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/samegame/content/GameArea.qml b/examples/demos/samegame/content/GameArea.qml index a43d55117a..3422582b21 100644 --- a/examples/demos/samegame/content/GameArea.qml +++ b/examples/demos/samegame/content/GameArea.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/samegame/content/NameInputDialog.qml b/examples/demos/samegame/content/NameInputDialog.qml index 602e69789a..7c3bfa274a 100644 --- a/examples/demos/samegame/content/NameInputDialog.qml +++ b/examples/demos/samegame/content/NameInputDialog.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/samegame/samegame.qml b/examples/demos/samegame/samegame.qml index 201f826a29..b98b6a0074 100644 --- a/examples/demos/samegame/samegame.qml +++ b/examples/demos/samegame/samegame.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/snake/content/Button.qml b/examples/demos/snake/content/Button.qml index dfac45049a..4f294556b3 100644 --- a/examples/demos/snake/content/Button.qml +++ b/examples/demos/snake/content/Button.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/snake/content/Cookie.qml b/examples/demos/snake/content/Cookie.qml index cae53af525..35ffe400b8 100644 --- a/examples/demos/snake/content/Cookie.qml +++ b/examples/demos/snake/content/Cookie.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/snake/content/HighScoreModel.qml b/examples/demos/snake/content/HighScoreModel.qml index af66b99ede..734a661f5b 100644 --- a/examples/demos/snake/content/HighScoreModel.qml +++ b/examples/demos/snake/content/HighScoreModel.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/snake/content/Link.qml b/examples/demos/snake/content/Link.qml index 891adafe5e..aab005afd5 100644 --- a/examples/demos/snake/content/Link.qml +++ b/examples/demos/snake/content/Link.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/snake/content/Skull.qml b/examples/demos/snake/content/Skull.qml index 9026790a5d..0c173be7da 100644 --- a/examples/demos/snake/content/Skull.qml +++ b/examples/demos/snake/content/Skull.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/snake/snake.qml b/examples/demos/snake/snake.qml index fca3273def..efd5747173 100644 --- a/examples/demos/snake/snake.qml +++ b/examples/demos/snake/snake.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/twitter/TwitterCore/Button.qml b/examples/demos/twitter/TwitterCore/Button.qml index 064fd4b277..353b993742 100644 --- a/examples/demos/twitter/TwitterCore/Button.qml +++ b/examples/demos/twitter/TwitterCore/Button.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/twitter/TwitterCore/FatDelegate.qml b/examples/demos/twitter/TwitterCore/FatDelegate.qml index 5fd0d1622b..4cb0dfc713 100644 --- a/examples/demos/twitter/TwitterCore/FatDelegate.qml +++ b/examples/demos/twitter/TwitterCore/FatDelegate.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/twitter/TwitterCore/Input.qml b/examples/demos/twitter/TwitterCore/Input.qml index 2987b9e5d8..68b1c6186a 100644 --- a/examples/demos/twitter/TwitterCore/Input.qml +++ b/examples/demos/twitter/TwitterCore/Input.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/twitter/TwitterCore/Loading.qml b/examples/demos/twitter/TwitterCore/Loading.qml index 8f7c868bee..566857b8b2 100644 --- a/examples/demos/twitter/TwitterCore/Loading.qml +++ b/examples/demos/twitter/TwitterCore/Loading.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/twitter/TwitterCore/MultiTitleBar.qml b/examples/demos/twitter/TwitterCore/MultiTitleBar.qml index f52ce5be26..3920520b7a 100644 --- a/examples/demos/twitter/TwitterCore/MultiTitleBar.qml +++ b/examples/demos/twitter/TwitterCore/MultiTitleBar.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/twitter/TwitterCore/RssModel.qml b/examples/demos/twitter/TwitterCore/RssModel.qml index c4050994e6..27f7495be2 100644 --- a/examples/demos/twitter/TwitterCore/RssModel.qml +++ b/examples/demos/twitter/TwitterCore/RssModel.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/twitter/TwitterCore/SearchView.qml b/examples/demos/twitter/TwitterCore/SearchView.qml index 82a8559889..7732e6f68d 100644 --- a/examples/demos/twitter/TwitterCore/SearchView.qml +++ b/examples/demos/twitter/TwitterCore/SearchView.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/twitter/TwitterCore/TitleBar.qml b/examples/demos/twitter/TwitterCore/TitleBar.qml index 3624048c4d..3e0818b0dd 100644 --- a/examples/demos/twitter/TwitterCore/TitleBar.qml +++ b/examples/demos/twitter/TwitterCore/TitleBar.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/twitter/TwitterCore/ToolBar.qml b/examples/demos/twitter/TwitterCore/ToolBar.qml index 06d3324ee3..d4265f3e98 100644 --- a/examples/demos/twitter/TwitterCore/ToolBar.qml +++ b/examples/demos/twitter/TwitterCore/ToolBar.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/twitter/TwitterCore/UserModel.qml b/examples/demos/twitter/TwitterCore/UserModel.qml index f88837c344..428089b539 100644 --- a/examples/demos/twitter/TwitterCore/UserModel.qml +++ b/examples/demos/twitter/TwitterCore/UserModel.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/demos/twitter/twitter.qml b/examples/demos/twitter/twitter.qml index 26e4a7079b..aca0968cfb 100644 --- a/examples/demos/twitter/twitter.qml +++ b/examples/demos/twitter/twitter.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/examples/embedded/embedded.pro b/examples/embedded/embedded.pro new file mode 100644 index 0000000000..81334fa552 --- /dev/null +++ b/examples/embedded/embedded.pro @@ -0,0 +1,2 @@ +TEMPLATE = subdirs +SUBDIRS += qmleasing qmlflickr qmldialcontrol qmlcalculator qmlphotoviewer qmlclocks qmltwitter diff --git a/examples/embedded/qmlcalculator/deployment.pri b/examples/embedded/qmlcalculator/deployment.pri new file mode 100644 index 0000000000..4286bb6e24 --- /dev/null +++ b/examples/embedded/qmlcalculator/deployment.pri @@ -0,0 +1,4 @@ +qmlcalculator_src = $$PWD/../../qml/calculator + +qmlcalculator_files.files = $$qmlcalculator_src/calculator.qml $$qmlcalculator_src/Core +DEPLOYMENT += qmlcalculator_files diff --git a/examples/embedded/qmlcalculator/qmlcalculator.cpp b/examples/embedded/qmlcalculator/qmlcalculator.cpp new file mode 100644 index 0000000000..17bf0f14f2 --- /dev/null +++ b/examples/embedded/qmlcalculator/qmlcalculator.cpp @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtCore/QFileInfo> +#include <QtWidgets/QApplication> +#include <QtQuick/QQuickView> +#include <QtQml/QQmlEngine> + +int main(int argc, char *argv[]) +{ + QApplication application(argc, argv); + + const QString mainQmlApp = QLatin1String("calculator.qml"); + QQuickView view; + view.setSource(QUrl(mainQmlApp)); + view.setResizeMode(QQuickView::SizeRootObjectToView); + QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit())); + +#if defined(QT_KEYPAD_NAVIGATION) + QApplication::setNavigationMode(Qt::NavigationModeCursorAuto); +#endif // QT_KEYPAD_NAVIGATION + + view.show(); + return application.exec(); +} diff --git a/examples/embedded/qmlcalculator/qmlcalculator.pro b/examples/embedded/qmlcalculator/qmlcalculator.pro new file mode 100644 index 0000000000..4ebf2d5972 --- /dev/null +++ b/examples/embedded/qmlcalculator/qmlcalculator.pro @@ -0,0 +1,5 @@ +!wince*:warning("DEPLOYMENT support required. This project only works on WinCE.") + +QT += qml +SOURCES += $$PWD/qmlcalculator.cpp +include($$PWD/deployment.pri) diff --git a/examples/embedded/qmlclocks/deployment.pri b/examples/embedded/qmlclocks/deployment.pri new file mode 100644 index 0000000000..75b39ac48f --- /dev/null +++ b/examples/embedded/qmlclocks/deployment.pri @@ -0,0 +1,4 @@ +qmlclocks_src = $$PWD/../../../examples/qml/toys/clocks + +qmlclocks_files.files = $$qmlclocks_src/clocks.qml $$qmlclocks_src/content +DEPLOYMENT += qmlclocks_files diff --git a/examples/embedded/qmlclocks/qmlclocks.cpp b/examples/embedded/qmlclocks/qmlclocks.cpp new file mode 100644 index 0000000000..1f9a553944 --- /dev/null +++ b/examples/embedded/qmlclocks/qmlclocks.cpp @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtCore/QFileInfo> +#include <QtWidgets/QApplication> +#include <QtQuick/QQuickView> +#include <QtQml/QQmlEngine> + +int main(int argc, char *argv[]) +{ + QApplication application(argc, argv); + + const QString mainQmlApp = QLatin1String("clocks.qml"); + QQuickView view; + view.setSource(QUrl(mainQmlApp)); + view.setResizeMode(QQuickView::SizeRootObjectToView); + QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit())); + +#if defined(QT_KEYPAD_NAVIGATION) + QApplication::setNavigationMode(Qt::NavigationModeCursorAuto); +#endif // QT_KEYPAD_NAVIGATION + + view.show(); + return application.exec(); +} diff --git a/examples/embedded/qmlclocks/qmlclocks.pro b/examples/embedded/qmlclocks/qmlclocks.pro new file mode 100644 index 0000000000..43a9e31972 --- /dev/null +++ b/examples/embedded/qmlclocks/qmlclocks.pro @@ -0,0 +1,5 @@ +!wince*:warning("DEPLOYMENT support required. This project only works on WinCE.") + +QT += qml +SOURCES += $$PWD/qmlclocks.cpp +include($$PWD/deployment.pri) diff --git a/examples/embedded/qmldialcontrol/deployment.pri b/examples/embedded/qmldialcontrol/deployment.pri new file mode 100644 index 0000000000..58c815e1e5 --- /dev/null +++ b/examples/embedded/qmldialcontrol/deployment.pri @@ -0,0 +1,4 @@ +qmldialcontrol_src = $$PWD/../../../examples/qml/ui-components/dialcontrol + +qmldialcontrol_files.files = $$qmldialcontrol_src/dialcontrol.qml $$qmldialcontrol_src/content +DEPLOYMENT += qmldialcontrol_files diff --git a/examples/embedded/qmldialcontrol/qmldialcontrol.cpp b/examples/embedded/qmldialcontrol/qmldialcontrol.cpp new file mode 100644 index 0000000000..6f81e5f8a0 --- /dev/null +++ b/examples/embedded/qmldialcontrol/qmldialcontrol.cpp @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtCore/QFileInfo> +#include <QtWidgets/QApplication> +#include <QtQuick/QQuickView> +#include <QtQml/QQmlEngine> + +int main(int argc, char *argv[]) +{ + QApplication application(argc, argv); + + const QString mainQmlApp = QLatin1String("dialcontrol.qml"); + QQuickView view; + view.setSource(QUrl(mainQmlApp)); + view.setResizeMode(QQuickView::SizeRootObjectToView); + QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit())); + +#if defined(QT_KEYPAD_NAVIGATION) + QApplication::setNavigationMode(Qt::NavigationModeCursorAuto); +#endif // QT_KEYPAD_NAVIGATION + + view.show(); + return application.exec(); +} diff --git a/examples/embedded/qmldialcontrol/qmldialcontrol.pro b/examples/embedded/qmldialcontrol/qmldialcontrol.pro new file mode 100644 index 0000000000..58ed7cabb8 --- /dev/null +++ b/examples/embedded/qmldialcontrol/qmldialcontrol.pro @@ -0,0 +1,5 @@ +!wince*:warning("DEPLOYMENT support required. This project only works on WinCE.") + +QT += qml +SOURCES += $$PWD/qmldialcontrol.cpp +include($$PWD/deployment.pri) diff --git a/examples/embedded/qmleasing/deployment.pri b/examples/embedded/qmleasing/deployment.pri new file mode 100644 index 0000000000..427259b816 --- /dev/null +++ b/examples/embedded/qmleasing/deployment.pri @@ -0,0 +1,4 @@ +qmleasing_src = $$PWD/../../../examples/qml/animation/easing + +qmleasing_files.files = $$qmleasing_src/easing.qml $$qmleasing_src/content +DEPLOYMENT += qmleasing_files diff --git a/examples/embedded/qmleasing/qmleasing.cpp b/examples/embedded/qmleasing/qmleasing.cpp new file mode 100644 index 0000000000..d516825d9a --- /dev/null +++ b/examples/embedded/qmleasing/qmleasing.cpp @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtCore/QFileInfo> +#include <QtWidgets/QApplication> +#include <QtQuick/QQuickView> +#include <QtQml/QQmlEngine> + +int main(int argc, char *argv[]) +{ + QApplication application(argc, argv); + + const QString mainQmlApp = QLatin1String("easing.qml"); + QQuickView view; + view.setSource(QUrl(mainQmlApp)); + view.setResizeMode(QQuickView::SizeRootObjectToView); + QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit())); + +#if defined(QT_KEYPAD_NAVIGATION) + QApplication::setNavigationMode(Qt::NavigationModeCursorAuto); +#endif // QT_KEYPAD_NAVIGATION + + view.show(); + return application.exec(); +} diff --git a/examples/embedded/qmleasing/qmleasing.pro b/examples/embedded/qmleasing/qmleasing.pro new file mode 100644 index 0000000000..6e0383502b --- /dev/null +++ b/examples/embedded/qmleasing/qmleasing.pro @@ -0,0 +1,5 @@ +!wince*:warning("DEPLOYMENT support required. This project only works on WinCE.") + +QT += qml +SOURCES += $$PWD/qmleasing.cpp +include($$PWD/deployment.pri) diff --git a/examples/embedded/qmlflickr/deployment.pri b/examples/embedded/qmlflickr/deployment.pri new file mode 100644 index 0000000000..7b9b62b459 --- /dev/null +++ b/examples/embedded/qmlflickr/deployment.pri @@ -0,0 +1,4 @@ +qmlflickr_src = $$PWD/../../qml/flickr + +qmlflickr_files.files = $$qmlflickr_src/flickr.qml $$qmlflickr_src/common $$qmlflickr_src/mobile +DEPLOYMENT += qmlflickr_files diff --git a/examples/embedded/qmlflickr/qmlflickr.cpp b/examples/embedded/qmlflickr/qmlflickr.cpp new file mode 100644 index 0000000000..268542e61b --- /dev/null +++ b/examples/embedded/qmlflickr/qmlflickr.cpp @@ -0,0 +1,104 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtCore/QFileInfo> +#include <QtCore/QSettings> +#include <QtWidgets/QApplication> +#include <QtQuick/QQuickView> +#include <QtQml/QQmlEngine> +#include <QtQml/QQmlNetworkAccessManagerFactory> +#include <QtNetwork/QNetworkConfiguration> +#include <QtNetwork/QNetworkConfigurationManager> +#include <QtNetwork/QNetworkAccessManager> +#include <QtQml/QQmlEngine> + +// Factory to create QNetworkAccessManagers that use the saved network configuration; otherwise +// the system default. +class NetworkAccessManagerFactory : public QQmlNetworkAccessManagerFactory +{ +public: + ~NetworkAccessManagerFactory() { } + + QNetworkAccessManager *create(QObject *parent); +}; + +QNetworkAccessManager *NetworkAccessManagerFactory::create(QObject *parent) +{ + QNetworkAccessManager *accessManager = new QNetworkAccessManager(parent); + + QNetworkConfigurationManager manager; + if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) { + // Get saved network configuration + QSettings settings(QSettings::UserScope, QLatin1String("Trolltech")); + settings.beginGroup(QLatin1String("QtNetwork")); + const QString id = settings.value(QLatin1String("DefaultNetworkConfiguration")).toString(); + settings.endGroup(); + + // If the saved network configuration is not currently discovered use the system default + QNetworkConfiguration config = manager.configurationFromIdentifier(id); + if ((config.state() & QNetworkConfiguration::Discovered) != + QNetworkConfiguration::Discovered) { + config = manager.defaultConfiguration(); + } + + accessManager->setConfiguration(config); + } + + return accessManager; +} + +int main(int argc, char *argv[]) +{ + QApplication application(argc, argv); + + NetworkAccessManagerFactory networkAccessManagerFactory; + + const QString mainQmlApp = QLatin1String("flickr.qml"); + QQuickView view; + view.engine()->setNetworkAccessManagerFactory(&networkAccessManagerFactory); + view.setSource(QUrl(mainQmlApp)); + view.setResizeMode(QQuickView::SizeRootObjectToView); + QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit())); + view.setGeometry(QRect(100, 100, 360, 640)); + view.show(); + return application.exec(); +} + diff --git a/examples/embedded/qmlflickr/qmlflickr.pro b/examples/embedded/qmlflickr/qmlflickr.pro new file mode 100644 index 0000000000..141c02d3fe --- /dev/null +++ b/examples/embedded/qmlflickr/qmlflickr.pro @@ -0,0 +1,5 @@ +!wince*:warning("DEPLOYMENT support required. This project only works on WinCE.") + +QT += qml network +SOURCES += $$PWD/qmlflickr.cpp +include($$PWD/deployment.pri) diff --git a/examples/embedded/qmlphotoviewer/deployment.pri b/examples/embedded/qmlphotoviewer/deployment.pri new file mode 100644 index 0000000000..ea9a052b4b --- /dev/null +++ b/examples/embedded/qmlphotoviewer/deployment.pri @@ -0,0 +1,4 @@ +qmlphotoviewer_src = $$PWD/../../qml/photoviewer + +qmlphotoviewer_files.files = $$qmlphotoviewer_src/photoviewer.qml $$qmlphotoviewer_src/PhotoViewerCore +DEPLOYMENT += qmlphotoviewer_files diff --git a/examples/embedded/qmlphotoviewer/qmlphotoviewer.cpp b/examples/embedded/qmlphotoviewer/qmlphotoviewer.cpp new file mode 100644 index 0000000000..18bf1ae094 --- /dev/null +++ b/examples/embedded/qmlphotoviewer/qmlphotoviewer.cpp @@ -0,0 +1,104 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtCore/QFileInfo> +#include <QtCore/QSettings> +#include <QtWidgets/QApplication> +#include <QtQuick/QQuickView> +#include <QtQml/QQmlEngine> +#include <QtQml/QQmlNetworkAccessManagerFactory> +#include <QtNetwork/QNetworkConfiguration> +#include <QtNetwork/QNetworkConfigurationManager> +#include <QtNetwork/QNetworkAccessManager> + +// Factory to create QNetworkAccessManagers that use the saved network configuration; otherwise +// the system default. +class NetworkAccessManagerFactory : public QQmlNetworkAccessManagerFactory +{ +public: + ~NetworkAccessManagerFactory() { } + + QNetworkAccessManager *create(QObject *parent); +}; + +QNetworkAccessManager *NetworkAccessManagerFactory::create(QObject *parent) +{ + QNetworkAccessManager *accessManager = new QNetworkAccessManager(parent); + + QNetworkConfigurationManager manager; + if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) { + // Get saved network configuration + QSettings settings(QSettings::UserScope, QLatin1String("Trolltech")); + settings.beginGroup(QLatin1String("QtNetwork")); + const QString id = settings.value(QLatin1String("DefaultNetworkConfiguration")).toString(); + settings.endGroup(); + + // If the saved network configuration is not currently discovered use the system default + QNetworkConfiguration config = manager.configurationFromIdentifier(id); + if ((config.state() & QNetworkConfiguration::Discovered) != + QNetworkConfiguration::Discovered) { + config = manager.defaultConfiguration(); + } + + accessManager->setConfiguration(config); + } + + return accessManager; +} + +int main(int argc, char *argv[]) +{ + QApplication application(argc, argv); + + NetworkAccessManagerFactory networkAccessManagerFactory; + + const QString mainQmlApp = QLatin1String("photoviewer.qml"); + QQuickView view; + view.engine()->setNetworkAccessManagerFactory(&networkAccessManagerFactory); + view.setSource(QUrl(mainQmlApp)); + view.setResizeMode(QQuickView::SizeRootObjectToView); + + QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit())); + view.setGeometry(QRect(100, 100, 360, 640)); + view.show(); + return application.exec(); +} + diff --git a/examples/embedded/qmlphotoviewer/qmlphotoviewer.pro b/examples/embedded/qmlphotoviewer/qmlphotoviewer.pro new file mode 100644 index 0000000000..1c0301118e --- /dev/null +++ b/examples/embedded/qmlphotoviewer/qmlphotoviewer.pro @@ -0,0 +1,5 @@ +!wince*:warning("DEPLOYMENT support required. This project only works on WinCE.") + +QT += qml network +SOURCES += $$PWD/qmlphotoviewer.cpp +include($$PWD/deployment.pri) diff --git a/examples/embedded/qmltwitter/deployment.pri b/examples/embedded/qmltwitter/deployment.pri new file mode 100644 index 0000000000..2f3066bc72 --- /dev/null +++ b/examples/embedded/qmltwitter/deployment.pri @@ -0,0 +1,4 @@ +qmltwitter_src = $$PWD/../../qml/twitter + +qmltwitter_files.files = $$qmltwitter_src/twitter.qml $$qmltwitter_src/TwitterCore +DEPLOYMENT += qmltwitter_files diff --git a/examples/embedded/qmltwitter/qmltwitter.cpp b/examples/embedded/qmltwitter/qmltwitter.cpp new file mode 100644 index 0000000000..a3a5c40f34 --- /dev/null +++ b/examples/embedded/qmltwitter/qmltwitter.cpp @@ -0,0 +1,103 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the demonstration applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtCore/QFileInfo> +#include <QtCore/QSettings> +#include <QtWidgets/QApplication> +#include <QtQuick/QQuickView> +#include <QtQml/QQmlEngine> +#include <QtQml/QQmlNetworkAccessManagerFactory> +#include <QtNetwork/QNetworkConfiguration> +#include <QtNetwork/QNetworkConfigurationManager> +#include <QtNetwork/QNetworkAccessManager> + +// Factory to create QNetworkAccessManagers that use the saved network configuration; otherwise +// the system default. +class NetworkAccessManagerFactory : public QQmlNetworkAccessManagerFactory +{ +public: + ~NetworkAccessManagerFactory() { } + + QNetworkAccessManager *create(QObject *parent); +}; + +QNetworkAccessManager *NetworkAccessManagerFactory::create(QObject *parent) +{ + QNetworkAccessManager *accessManager = new QNetworkAccessManager(parent); + + QNetworkConfigurationManager manager; + if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) { + // Get saved network configuration + QSettings settings(QSettings::UserScope, QLatin1String("Trolltech")); + settings.beginGroup(QLatin1String("QtNetwork")); + const QString id = settings.value(QLatin1String("DefaultNetworkConfiguration")).toString(); + settings.endGroup(); + + // If the saved network configuration is not currently discovered use the system default + QNetworkConfiguration config = manager.configurationFromIdentifier(id); + if ((config.state() & QNetworkConfiguration::Discovered) != + QNetworkConfiguration::Discovered) { + config = manager.defaultConfiguration(); + } + + accessManager->setConfiguration(config); + } + + return accessManager; +} + +int main(int argc, char *argv[]) +{ + QApplication application(argc, argv); + + NetworkAccessManagerFactory networkAccessManagerFactory; + + const QString mainQmlApp = QLatin1String("twitter.qml"); + QQuickView view; + view.engine()->setNetworkAccessManagerFactory(&networkAccessManagerFactory); + view.setSource(QUrl(mainQmlApp)); + view.setResizeMode(QQuickView::SizeRootObjectToView); + QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit())); + view.setGeometry(QRect(100, 100, 360, 640)); + view.show(); + return application.exec(); +} + diff --git a/examples/embedded/qmltwitter/qmltwitter.pro b/examples/embedded/qmltwitter/qmltwitter.pro new file mode 100644 index 0000000000..eca46f9f97 --- /dev/null +++ b/examples/embedded/qmltwitter/qmltwitter.pro @@ -0,0 +1,5 @@ +!wince*:warning("DEPLOYMENT support required. This project only works on WinCE.") + +QT += qml network +SOURCES += $$PWD/qmltwitter.cpp +include($$PWD/deployment.pri) diff --git a/examples/examples.pro b/examples/examples.pro index 2b78ed7e12..d3d2f5520f 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -1,3 +1,3 @@ TEMPLATE = subdirs -SUBDIRS += demos shared localstorage particles qml qtquick tutorials window +SUBDIRS += demos shared localstorage particles qml quick tutorials window contains(QT_CONFIG, qmltest): SUBDIRS += qmltest diff --git a/examples/qml/README b/examples/qml/README new file mode 100644 index 0000000000..56c48d71fb --- /dev/null +++ b/examples/qml/README @@ -0,0 +1,13 @@ +The Qt Declarative module provides the ability to specify and implement +your user interface declaratively, using the Qt Meta-Object Language (QML). This +language is very expressive and human readable, and can be used by +designers to actually implement their UI vision. QML UIs can integrate +with C++ code in many ways, including being loaded as a part of a C++ UI +and loading data models from C++ and interacting with them. + +Mostof these examples can be viewed directly with the +QML viewer utility, without requiring compilation. + + +Documentation for these examples can be found via the Examples +link in the main Qt documentation. diff --git a/examples/qml/accessibility/accessibility.qml b/examples/qml/accessibility/accessibility.qml new file mode 100644 index 0000000000..e0152f065b --- /dev/null +++ b/examples/qml/accessibility/accessibility.qml @@ -0,0 +1,105 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Window 2.0 +import "widgets" + +Rectangle { + id: window + + width: 360; height: 300 + color: "white" + + Column { + id: column + spacing: 6 + anchors.fill: parent + width: parent.width + Row { + spacing: 6 + width: column.width + Button { width: 100; height: column.h + 20; text: "Send" } + Button { width: 100; height: column.h + 20; text: "Discard" } + } + + Row { + spacing: 6 + width: column.width + height: column.h + Text { + id: subjectLabel + Accessible.role: Accessible.StaticText + Accessible.name: text + text: "Subject:" + width: 50 + } + Rectangle { + id: subjectBorder + Accessible.role: Accessible.EditableText + Accessible.name: subjectEdit.text + border.width: 1 + border.color: "black" + height: subjectEdit.height + width: 304 + TextInput { + id: subjectEdit + text: "Vacation plans" + } + } + } + Rectangle { + id: textBorder + Accessible.role: Accessible.EditableText + property alias text : textEdit.text + border.width: 1 + border.color: "black" + width: parent.width + height: textEdit.height + TextEdit { + id: textEdit + text: "Hi, we're going to the Dolomites this summer. Weren't you also going to northern Italy? \n\nbest wishes, your friend Luke" + width: parent.width + wrapMode: TextEdit.WordWrap + } + } + } +} diff --git a/examples/qml/accessibility/widgets/Button.qml b/examples/qml/accessibility/widgets/Button.qml new file mode 100644 index 0000000000..793f895c57 --- /dev/null +++ b/examples/qml/accessibility/widgets/Button.qml @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + id: button + + property alias text : buttonText.text + Accessible.name: text + Accessible.description: "This button does " + text + Accessible.role: Accessible.Button + + signal clicked + + width: buttonText.width + 20 + height: 30 + gradient: Gradient { + GradientStop { position: 0.0; color: "lightsteelblue" } + GradientStop { position: 1.0; color: "blue" } + } + border.width: 2 + border.color: "black"; + radius: 10 + + Text { + id: buttonText + text: parent.description + anchors.centerIn: parent + font.pixelSize: parent.height * .5 + style: Text.Sunken; color: "white"; styleColor: "black"; smooth: true + } + + MouseArea { + id: mouseArea + anchors.fill: parent + onClicked: { + checked = !checked; + } + } +} diff --git a/examples/qml/animation/animation.qml b/examples/qml/animation/animation.qml new file mode 100644 index 0000000000..7c5829e790 --- /dev/null +++ b/examples/qml/animation/animation.qml @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** 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 2.0 +import "../shared" + +Item { + height: 480 + width: 320 + LauncherList { + id: ll + anchors.fill: parent + Component.onCompleted: { + addExample("ColorAnimation", "Interpolates between colors", Qt.resolvedUrl("basics/color-animation.qml")); + addExample("PropertyAnimation", "Interpolates between numbers", Qt.resolvedUrl("basics/property-animation.qml")); + addExample("Behaviors", "Animates procedural movement", Qt.resolvedUrl("behaviors/behavior-example.qml")); + addExample("WigglyText", "Text that wiggles as you drag it", Qt.resolvedUrl("behaviors/wigglytext.qml")); + addExample("Easing Curves", "Compare available easing curves", Qt.resolvedUrl("easing/easing.qml")); + addExample("States", "Simple states", Qt.resolvedUrl("states/states.qml")); + addExample("Transitions", "Simple states with animated transitions", Qt.resolvedUrl("states/transitions.qml")); + addExample("PathAnimation", "Animate along a path", Qt.resolvedUrl("pathanimation/pathanimation.qml")); + addExample("PathInterpolator", "Interpolates along a path", Qt.resolvedUrl("pathinterpolator/pathinterpolator.qml")); + } + } +} diff --git a/examples/qtquick/animation/animation.qmlproject b/examples/qml/animation/animation.qmlproject index 2e96daa881..2e96daa881 100644 --- a/examples/qtquick/animation/animation.qmlproject +++ b/examples/qml/animation/animation.qmlproject diff --git a/examples/qml/animation/basics/color-animation.qml b/examples/qml/animation/basics/color-animation.qml new file mode 100644 index 0000000000..a54091d7dd --- /dev/null +++ b/examples/qml/animation/basics/color-animation.qml @@ -0,0 +1,121 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** 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 2.0 +import QtQuick.Particles 2.0 + +Item { + id: window + width: 640; height: 480 + + // Let's draw the sky... + Rectangle { + anchors { left: parent.left; top: parent.top; right: parent.right; bottom: parent.verticalCenter } + gradient: Gradient { + GradientStop { + position: 0.0 + SequentialAnimation on color { + loops: Animation.Infinite + ColorAnimation { from: "DeepSkyBlue"; to: "#0E1533"; duration: 5000 } + ColorAnimation { from: "#0E1533"; to: "DeepSkyBlue"; duration: 5000 } + } + } + GradientStop { + position: 1.0 + SequentialAnimation on color { + loops: Animation.Infinite + ColorAnimation { from: "SkyBlue"; to: "#437284"; duration: 5000 } + ColorAnimation { from: "#437284"; to: "SkyBlue"; duration: 5000 } + } + } + } + } + + // the sun, moon, and stars + Item { + width: parent.width; height: 2 * parent.height + NumberAnimation on rotation { from: 0; to: 360; duration: 10000; loops: Animation.Infinite } + Image { + source: "images/sun.png"; y: 10; anchors.horizontalCenter: parent.horizontalCenter + rotation: -3 * parent.rotation + } + Image { + source: "images/moon.png"; y: parent.height - 74; anchors.horizontalCenter: parent.horizontalCenter + rotation: -parent.rotation + } + ParticleSystem { + id: particlesystem + x: 0; y: parent.height/2 + width: parent.width; height: parent.height/2 + ImageParticle { + source: "images/star.png" + groups: ["star"] + color: "#00333333" + SequentialAnimation on opacity { + loops: Animation.Infinite + NumberAnimation { from: 0; to: 1; duration: 5000 } + NumberAnimation { from: 1; to: 0; duration: 5000 } + } + } + Emitter { + group: "star" + anchors.fill: parent + emitRate: parent.width / 50 + lifeSpan: 5000 + } + } + } + + // ...and the ground. + Rectangle { + anchors { left: parent.left; top: parent.verticalCenter; right: parent.right; bottom: parent.bottom } + gradient: Gradient { + GradientStop { + position: 0.0 + SequentialAnimation on color { + loops: Animation.Infinite + ColorAnimation { from: "ForestGreen"; to: "#001600"; duration: 5000 } + ColorAnimation { from: "#001600"; to: "ForestGreen"; duration: 5000 } + } + } + GradientStop { position: 1.0; color: "DarkGreen" } + } + } +} diff --git a/examples/qtquick/animation/basics/images/face-smile.png b/examples/qml/animation/basics/images/face-smile.png Binary files differindex 3d66d72578..3d66d72578 100644 --- a/examples/qtquick/animation/basics/images/face-smile.png +++ b/examples/qml/animation/basics/images/face-smile.png diff --git a/examples/qtquick/animation/basics/images/moon.png b/examples/qml/animation/basics/images/moon.png Binary files differindex 9407b2b4f0..9407b2b4f0 100644 --- a/examples/qtquick/animation/basics/images/moon.png +++ b/examples/qml/animation/basics/images/moon.png diff --git a/examples/qtquick/animation/basics/images/shadow.png b/examples/qml/animation/basics/images/shadow.png Binary files differindex 8270565e87..8270565e87 100644 --- a/examples/qtquick/animation/basics/images/shadow.png +++ b/examples/qml/animation/basics/images/shadow.png diff --git a/examples/qtquick/animation/basics/images/star.png b/examples/qml/animation/basics/images/star.png Binary files differindex 27ef924267..27ef924267 100644 --- a/examples/qtquick/animation/basics/images/star.png +++ b/examples/qml/animation/basics/images/star.png diff --git a/examples/qtquick/animation/basics/images/sun.png b/examples/qml/animation/basics/images/sun.png Binary files differindex 7713ca5ce7..7713ca5ce7 100644 --- a/examples/qtquick/animation/basics/images/sun.png +++ b/examples/qml/animation/basics/images/sun.png diff --git a/examples/qtquick/animation/basics/property-animation.qml b/examples/qml/animation/basics/property-animation.qml index 4a4d3e3b2a..4a4d3e3b2a 100644 --- a/examples/qtquick/animation/basics/property-animation.qml +++ b/examples/qml/animation/basics/property-animation.qml diff --git a/examples/qtquick/animation/behaviors/SideRect.qml b/examples/qml/animation/behaviors/SideRect.qml index 623c6965d8..623c6965d8 100644 --- a/examples/qtquick/animation/behaviors/SideRect.qml +++ b/examples/qml/animation/behaviors/SideRect.qml diff --git a/examples/qml/animation/behaviors/behavior-example.qml b/examples/qml/animation/behaviors/behavior-example.qml new file mode 100644 index 0000000000..89fc9992b6 --- /dev/null +++ b/examples/qml/animation/behaviors/behavior-example.qml @@ -0,0 +1,118 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** 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 2.0 + +Rectangle { + width: 600; height: 400 + color: "#343434" + + Rectangle { + anchors.centerIn: parent + width: 200; height: 200 + radius: 30 + color: "transparent" + border.width: 4; border.color: "white" + + + SideRect { + id: leftRect + anchors { verticalCenter: parent.verticalCenter; horizontalCenter: parent.left } + text: "Left" + } + + SideRect { + id: rightRect + anchors { verticalCenter: parent.verticalCenter; horizontalCenter: parent.right } + text: "Right" + } + + SideRect { + id: topRect + anchors { verticalCenter: parent.top; horizontalCenter: parent.horizontalCenter } + text: "Top" + } + + SideRect { + id: bottomRect + anchors { verticalCenter: parent.bottom; horizontalCenter: parent.horizontalCenter } + text: "Bottom" + } + + + Rectangle { + id: focusRect + + property string text + + x: 62; y: 75; width: 75; height: 50 + radius: 6 + border.width: 4; border.color: "white" + color: "firebrick" + + // Set an 'elastic' behavior on the focusRect's x property. + Behavior on x { + NumberAnimation { easing.type: Easing.OutElastic; easing.amplitude: 3.0; easing.period: 2.0; duration: 300 } + } + + // Set an 'elastic' behavior on the focusRect's y property. + Behavior on y { + NumberAnimation { easing.type: Easing.OutElastic; easing.amplitude: 3.0; easing.period: 2.0; duration: 300 } + } + + Text { + id: focusText + text: focusRect.text + anchors.centerIn: parent + color: "white" + font.pixelSize: 16; font.bold: true + + // Set a behavior on the focusText's x property: + // Set the opacity to 0, set the new text value, then set the opacity back to 1. + Behavior on text { + SequentialAnimation { + NumberAnimation { target: focusText; property: "opacity"; to: 0; duration: 150 } + NumberAnimation { target: focusText; property: "opacity"; to: 1; duration: 150 } + } + } + } + } + } +} diff --git a/examples/qml/animation/behaviors/wigglytext.qml b/examples/qml/animation/behaviors/wigglytext.qml new file mode 100644 index 0000000000..e2ed472088 --- /dev/null +++ b/examples/qml/animation/behaviors/wigglytext.qml @@ -0,0 +1,108 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** 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 2.0 + +Rectangle { + id: container + + property string text: "Drag this text..." + property bool animated: true + + width: 640; height: 480; color: "#474747"; focus: true + + Keys.onPressed: { + if (event.key == Qt.Key_Delete || event.key == Qt.Key_Backspace) + container.remove() + else if (event.text != "") { + container.append(event.text) + } + } + + function append(text) { + container.animated = false + var lastLetter = container.children[container.children.length - 1] + var newLetter = letterComponent.createObject(container) + newLetter.text = text + newLetter.follow = lastLetter + container.animated = true + } + + function remove() { + if (container.children.length) + container.children[container.children.length - 1].destroy() + } + + function doLayout() { + var follow = null + for (var i = 0; i < container.text.length; ++i) { + var newLetter = letterComponent.createObject(container) + newLetter.text = container.text[i] + newLetter.follow = follow + follow = newLetter + } + } + + Component { + id: letterComponent + Text { + id: letter + property variant follow + + x: follow ? follow.x + follow.width : container.width / 3 + y: follow ? follow.y : container.height / 2 + + font.pixelSize: 40; font.bold: true + color: "#999999"; styleColor: "#222222"; style: Text.Raised + + MouseArea { + anchors.fill: parent + drag.target: letter; drag.axis: Drag.XandYAxis + onPressed: letter.color = "#dddddd" + onReleased: letter.color = "#999999" + } + + Behavior on x { enabled: container.animated; SpringAnimation { spring: 3; damping: 0.3; mass: 1.0 } } + Behavior on y { enabled: container.animated; SpringAnimation { spring: 3; damping: 0.3; mass: 1.0 } } + } + } + + Component.onCompleted: doLayout() +} diff --git a/examples/qtquick/animation/easing/content/QuitButton.qml b/examples/qml/animation/easing/content/QuitButton.qml index 702b892d23..702b892d23 100644 --- a/examples/qtquick/animation/easing/content/QuitButton.qml +++ b/examples/qml/animation/easing/content/QuitButton.qml diff --git a/examples/qtquick/animation/easing/content/quit.png b/examples/qml/animation/easing/content/quit.png Binary files differindex b822057d4e..b822057d4e 100644 --- a/examples/qtquick/animation/easing/content/quit.png +++ b/examples/qml/animation/easing/content/quit.png diff --git a/examples/qml/animation/easing/easing.qml b/examples/qml/animation/easing/easing.qml new file mode 100644 index 0000000000..207b653d6e --- /dev/null +++ b/examples/qml/animation/easing/easing.qml @@ -0,0 +1,170 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** 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 2.0 +import "content" + +Rectangle { + id: window + width: 600; height: 460; color: "#232323" + + property var easingCurve: [ 0.2, 0.2, 0.13, 0.65, 0.2, 0.8, + 0.624, 0.98, 0.93, 0.95, 1, 1 ] + + ListModel { + id: easingTypes + ListElement { name: "Easing.Linear"; type: Easing.Linear; ballColor: "DarkRed" } + ListElement { name: "Easing.InQuad"; type: Easing.InQuad; ballColor: "IndianRed" } + ListElement { name: "Easing.OutQuad"; type: Easing.OutQuad; ballColor: "Salmon" } + ListElement { name: "Easing.InOutQuad"; type: Easing.InOutQuad; ballColor: "Tomato" } + ListElement { name: "Easing.OutInQuad"; type: Easing.OutInQuad; ballColor: "DarkOrange" } + ListElement { name: "Easing.InCubic"; type: Easing.InCubic; ballColor: "Gold" } + ListElement { name: "Easing.OutCubic"; type: Easing.OutCubic; ballColor: "Yellow" } + ListElement { name: "Easing.InOutCubic"; type: Easing.InOutCubic; ballColor: "PeachPuff" } + ListElement { name: "Easing.OutInCubic"; type: Easing.OutInCubic; ballColor: "Thistle" } + ListElement { name: "Easing.InQuart"; type: Easing.InQuart; ballColor: "Orchid" } + ListElement { name: "Easing.OutQuart"; type: Easing.OutQuart; ballColor: "Purple" } + ListElement { name: "Easing.InOutQuart"; type: Easing.InOutQuart; ballColor: "SlateBlue" } + ListElement { name: "Easing.OutInQuart"; type: Easing.OutInQuart; ballColor: "Chartreuse" } + ListElement { name: "Easing.InQuint"; type: Easing.InQuint; ballColor: "LimeGreen" } + ListElement { name: "Easing.OutQuint"; type: Easing.OutQuint; ballColor: "SeaGreen" } + ListElement { name: "Easing.InOutQuint"; type: Easing.InOutQuint; ballColor: "DarkGreen" } + ListElement { name: "Easing.OutInQuint"; type: Easing.OutInQuint; ballColor: "Olive" } + ListElement { name: "Easing.InSine"; type: Easing.InSine; ballColor: "DarkSeaGreen" } + ListElement { name: "Easing.OutSine"; type: Easing.OutSine; ballColor: "Teal" } + ListElement { name: "Easing.InOutSine"; type: Easing.InOutSine; ballColor: "Turquoise" } + ListElement { name: "Easing.OutInSine"; type: Easing.OutInSine; ballColor: "SteelBlue" } + ListElement { name: "Easing.InExpo"; type: Easing.InExpo; ballColor: "SkyBlue" } + ListElement { name: "Easing.OutExpo"; type: Easing.OutExpo; ballColor: "RoyalBlue" } + ListElement { name: "Easing.InOutExpo"; type: Easing.InOutExpo; ballColor: "MediumBlue" } + ListElement { name: "Easing.OutInExpo"; type: Easing.OutInExpo; ballColor: "MidnightBlue" } + ListElement { name: "Easing.InCirc"; type: Easing.InCirc; ballColor: "CornSilk" } + ListElement { name: "Easing.OutCirc"; type: Easing.OutCirc; ballColor: "Bisque" } + ListElement { name: "Easing.InOutCirc"; type: Easing.InOutCirc; ballColor: "RosyBrown" } + ListElement { name: "Easing.OutInCirc"; type: Easing.OutInCirc; ballColor: "SandyBrown" } + ListElement { name: "Easing.InElastic"; type: Easing.InElastic; ballColor: "DarkGoldenRod" } + ListElement { name: "Easing.OutElastic"; type: Easing.OutElastic; ballColor: "Chocolate" } + ListElement { name: "Easing.InOutElastic"; type: Easing.InOutElastic; ballColor: "SaddleBrown" } + ListElement { name: "Easing.OutInElastic"; type: Easing.OutInElastic; ballColor: "Brown" } + ListElement { name: "Easing.InBack"; type: Easing.InBack; ballColor: "Maroon" } + ListElement { name: "Easing.OutBack"; type: Easing.OutBack; ballColor: "LavenderBlush" } + ListElement { name: "Easing.InOutBack"; type: Easing.InOutBack; ballColor: "MistyRose" } + ListElement { name: "Easing.OutInBack"; type: Easing.OutInBack; ballColor: "Gainsboro" } + ListElement { name: "Easing.OutBounce"; type: Easing.OutBounce; ballColor: "Silver" } + ListElement { name: "Easing.InBounce"; type: Easing.InBounce; ballColor: "DimGray" } + ListElement { name: "Easing.InOutBounce"; type: Easing.InOutBounce; ballColor: "SlateGray" } + ListElement { name: "Easing.OutInBounce"; type: Easing.OutInBounce; ballColor: "DarkSlateGray" } + ListElement { name: "Easing.Bezier"; type: Easing.Bezier; ballColor: "Chartreuse"; } + } + + Component { + id: delegate + + Item { + height: 56; width: window.width + + Text { text: name; anchors.centerIn: parent; color: "White" } + + Rectangle { + id: slot1; color: "#121212"; x: 30; height: 46; width: 46 + border.color: "#343434"; border.width: 1; radius: 12 + anchors.verticalCenter: parent.verticalCenter + } + + Rectangle { + id: slot2; color: "#121212"; x: window.width - 76; height: 46; width: 46 + border.color: "#343434"; border.width: 1; radius: 12 + anchors.verticalCenter: parent.verticalCenter + } + + Rectangle { + id: rect; x: 30; color: "#454545" + border.color: "White"; border.width: 2 + height: 46; width: 46; radius: 12 + anchors.verticalCenter: parent.verticalCenter + + MouseArea { + onClicked: if (rect.state == '') rect.state = "right"; else rect.state = '' + anchors.fill: parent + anchors.margins: -5 // Make MouseArea bigger than the rectangle, itself + } + + states : State { + name: "right" + PropertyChanges { target: rect; x: window.width - 76; color: ballColor } + } + + transitions: Transition { + NumberAnimation { properties: "x"; easing.type: type; easing.bezierCurve: getBezierCurve(name); duration: 1000 } + ColorAnimation { properties: "color"; easing.type: type; easing.bezierCurve: getBezierCurve(name); duration: 1000 } + } + } + } + } + + Flickable { + anchors.fill: parent + contentHeight: layout.height+50 + Rectangle { + id: titlePane + color: "#444444" + height: 35 + anchors { top: parent.top; left: parent.left; right: parent.right } + QuitButton { + id: quitButton + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: 10 + } + } + Column { + id: layout + anchors { top: titlePane.bottom; topMargin: 10; left: parent.left; right: parent.right } + Repeater { model: easingTypes; delegate: delegate } + } + } + + function getBezierCurve(name) + { + if (name === "Easing.Bezier") + return easingCurve; + return []; + } +} diff --git a/examples/qml/animation/pathanimation/pathanimation.qml b/examples/qml/animation/pathanimation/pathanimation.qml new file mode 100644 index 0000000000..4d0a31bdf8 --- /dev/null +++ b/examples/qml/animation/pathanimation/pathanimation.qml @@ -0,0 +1,108 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** 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 2.0 + +Rectangle { + id: window + width: 400 + height: 400 + + Canvas { + id: canvas + anchors.fill: parent + smooth: true + + onPaint: { + context.clearRect(0, 0, width, height) + context.strokeStyle = "black" + context.path = pathAnim.path + context.stroke() + } + } + + PathAnimation { + id: pathAnim + + duration: 2000 + easing.type: Easing.InQuad + + target: box + orientation: PathAnimation.RightFirst + anchorPoint: Qt.point(box.width/2, box.height/2) + path: Path { + startX: 50; startY: 50 + + PathCubic { + x: window.width - 50 + y: window.height - 50 + + control1X: x; control1Y: 50 + control2X: 50; control2Y: y + } + + onChanged: canvas.requestPaint() + } + } + + Rectangle { + id: box + + x: 25; y: 25 + width: 50; height: 50 + border.width: 1 + smooth: true + + Text { + anchors.centerIn: parent + text: "Box" + } + } + + MouseArea { + anchors.fill: parent + onClicked: pathAnim.restart() + } + + Text { + text: "Click anywhere to animate along the path" + anchors.horizontalCenter: parent.horizontalCenter + } +} diff --git a/examples/qml/animation/pathinterpolator/pathinterpolator.qml b/examples/qml/animation/pathinterpolator/pathinterpolator.qml new file mode 100644 index 0000000000..67a34ce582 --- /dev/null +++ b/examples/qml/animation/pathinterpolator/pathinterpolator.qml @@ -0,0 +1,115 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** 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 2.0 + +Rectangle { + id: window + width: 400 + height: 400 + + Canvas { + id: canvas + anchors.fill: parent + smooth: true + + onPaint: { + context.clearRect(0, 0, width, height) + context.strokeStyle = "black" + context.path = motionPath.path + context.stroke() + } + } + + PathInterpolator { + id: motionPath + + path: Path { + startX: 50; startY: 50 + + PathCubic { + x: window.width - 50 + y: window.height - 50 + + control1X: x; control1Y: 50 + control2X: 50; control2Y: y + } + + onChanged: canvas.requestPaint() + } + + NumberAnimation on progress { + id: progressAnim + running: false + from: 0; to: 1 + duration: 2000 + easing.type: Easing.InQuad + } + } + + Rectangle { + id: box + + width: 50; height: 50 + border.width: 1 + smooth: true + + //bind our attributes to follow the path as progress changes + x: motionPath.x + y: motionPath.y + rotation: motionPath.angle + transform: Translate { x: -box.width/2; y: -box.height/2 } + + Text { + anchors.centerIn: parent + text: "Box" + } + } + + MouseArea { + anchors.fill: parent + onClicked: progressAnim.restart() + } + + Text { + text: "Click anywhere to animate along the path" + anchors.horizontalCenter: parent.horizontalCenter + } +} diff --git a/examples/qtquick/animation/states/qt-logo.png b/examples/qml/animation/states/qt-logo.png Binary files differindex 14ddf2a028..14ddf2a028 100644 --- a/examples/qtquick/animation/states/qt-logo.png +++ b/examples/qml/animation/states/qt-logo.png diff --git a/examples/qtquick/animation/states/states.qml b/examples/qml/animation/states/states.qml index 7ca56a9295..7ca56a9295 100644 --- a/examples/qtquick/animation/states/states.qml +++ b/examples/qml/animation/states/states.qml diff --git a/examples/qtquick/animation/states/transitions.qml b/examples/qml/animation/states/transitions.qml index d57924d6d2..d57924d6d2 100644 --- a/examples/qtquick/animation/states/transitions.qml +++ b/examples/qml/animation/states/transitions.qml diff --git a/examples/qml/calculator/calculator.qml b/examples/qml/calculator/calculator.qml new file mode 100644 index 0000000000..913643a93b --- /dev/null +++ b/examples/qml/calculator/calculator.qml @@ -0,0 +1,163 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Window 2.0 +import "content" +import "content/calculator.js" as CalcEngine + +Rectangle { + id: window + + width: 360; height: 480 + color: "#282828" + + property string rotateLeft: "\u2939" + property string rotateRight: "\u2935" + property string leftArrow: "\u2190" + property string division : "\u00f7" + property string multiplication : "\u00d7" + property string squareRoot : "\u221a" + property string plusminus : "\u00b1" + + function doOp(operation) { CalcEngine.doOperation(operation) } + + Item { + id: main + state: "orientation " + Screen.orientation + + property bool landscapeWindow: window.width > window.height + property real baseWidth: landscapeWindow ? window.height : window.width + property real baseHeight: landscapeWindow ? window.width : window.height + property real rotationDelta: landscapeWindow ? -90 : 0 + + rotation: rotationDelta + width: main.baseWidth + height: main.baseHeight + anchors.centerIn: parent + + Column { + id: box; spacing: 8 + + anchors { fill: parent; topMargin: 6; bottomMargin: 6; leftMargin: 6; rightMargin: 6 } + + Display { + id: display + width: box.width-3 + height: 64 + } + + Column { + id: column; spacing: 6 + + property real h: ((box.height - 72) / 6) - ((spacing * (6 - 1)) / 6) + property real w: (box.width / 4) - ((spacing * (4 - 1)) / 4) + + Row { + spacing: 6 + Button { width: column.w; height: column.h; color: 'purple'; operation: "Off" } + Button { width: column.w; height: column.h; color: 'purple'; operation: leftArrow } + Button { width: column.w; height: column.h; color: 'purple'; operation: "C" } + Button { width: column.w; height: column.h; color: 'purple'; operation: "AC" } + } + + Row { + spacing: 6 + property real w: (box.width / 4) - ((spacing * (4 - 1)) / 4) + + Button { width: column.w; height: column.h; color: 'green'; operation: "mc" } + Button { width: column.w; height: column.h; color: 'green'; operation: "m+" } + Button { width: column.w; height: column.h; color: 'green'; operation: "m-" } + Button { width: column.w; height: column.h; color: 'green'; operation: "mr" } + } + + Grid { + id: grid; rows: 5; columns: 5; spacing: 6 + + property real w: (box.width / columns) - ((spacing * (columns - 1)) / columns) + + Button { width: grid.w; height: column.h; operation: "7"; color: 'blue' } + Button { width: grid.w; height: column.h; operation: "8"; color: 'blue' } + Button { width: grid.w; height: column.h; operation: "9"; color: 'blue' } + Button { width: grid.w; height: column.h; operation: division } + Button { width: grid.w; height: column.h; operation: squareRoot } + Button { width: grid.w; height: column.h; operation: "4"; color: 'blue' } + Button { width: grid.w; height: column.h; operation: "5"; color: 'blue' } + Button { width: grid.w; height: column.h; operation: "6"; color: 'blue' } + Button { width: grid.w; height: column.h; operation: multiplication } + Button { width: grid.w; height: column.h; operation: "x^2" } + Button { width: grid.w; height: column.h; operation: "1"; color: 'blue' } + Button { width: grid.w; height: column.h; operation: "2"; color: 'blue' } + Button { width: grid.w; height: column.h; operation: "3"; color: 'blue' } + Button { width: grid.w; height: column.h; operation: "-" } + Button { width: grid.w; height: column.h; operation: "1/x" } + Button { width: grid.w; height: column.h; operation: "0"; color: 'blue' } + Button { width: grid.w; height: column.h; operation: "." } + Button { width: grid.w; height: column.h; operation: plusminus } + Button { width: grid.w; height: column.h; operation: "+" } + Button { width: grid.w; height: column.h; operation: "="; color: 'red' } + } + } + } + + states: [ + State { + name: "orientation " + Qt.LandscapeOrientation + PropertyChanges { target: main; rotation: 90 + rotationDelta; width: main.baseHeight; height: main.baseWidth } + }, + State { + name: "orientation " + Qt.InvertedPortraitOrientation + PropertyChanges { target: main; rotation: 180 + rotationDelta; } + }, + State { + name: "orientation " + Qt.InvertedLandscapeOrientation + PropertyChanges { target: main; rotation: 270 + rotationDelta; width: main.baseHeight; height: main.baseWidth } + } + ] + + transitions: Transition { + SequentialAnimation { + RotationAnimation { direction: RotationAnimation.Shortest; duration: 300; easing.type: Easing.InOutQuint } + NumberAnimation { properties: "x,y,width,height"; duration: 300; easing.type: Easing.InOutQuint } + } + } + } +} diff --git a/examples/qml/calculator/content/Button.qml b/examples/qml/calculator/content/Button.qml new file mode 100644 index 0000000000..feaa5e7df3 --- /dev/null +++ b/examples/qml/calculator/content/Button.qml @@ -0,0 +1,84 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +BorderImage { + id: button + + property alias operation: buttonText.text + property string color: "" + + Accessible.name: operation + Accessible.description: "This button does " + operation + Accessible.role: Accessible.Button + + signal clicked + + source: "images/button-" + color + ".png"; clip: true + border { left: 10; top: 10; right: 10; bottom: 10 } + + Rectangle { + id: shade + anchors.fill: button; radius: 10; color: "black"; opacity: 0 + } + + Text { + id: buttonText + anchors.centerIn: parent; anchors.verticalCenterOffset: -1 + font.pixelSize: parent.width > parent.height ? parent.height * .5 : parent.width * .5 + style: Text.Sunken; color: "white"; styleColor: "black"; smooth: true + } + + MouseArea { + id: mouseArea + anchors.fill: parent + onClicked: { + doOp(operation) + button.clicked() + } + } + + states: State { + name: "pressed"; when: mouseArea.pressed == true + PropertyChanges { target: shade; opacity: .4 } + } +} diff --git a/examples/qml/calculator/content/Display.qml b/examples/qml/calculator/content/Display.qml new file mode 100644 index 0000000000..3dceeab169 --- /dev/null +++ b/examples/qml/calculator/content/Display.qml @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +BorderImage { + id: image + + property alias text : displayText.text + property alias currentOperation : operationText + + source: "images/display.png" + border { left: 10; top: 10; right: 10; bottom: 10 } + + Text { + id: displayText + anchors { + right: parent.right; verticalCenter: parent.verticalCenter; verticalCenterOffset: -1 + rightMargin: 6; left: operationText.right + } + font.pixelSize: parent.height * .6; text: "0"; horizontalAlignment: Text.AlignRight; elide: Text.ElideRight + color: "#343434"; smooth: true; font.bold: true + } + Text { + id: operationText + font.bold: true; font.pixelSize: parent.height * .7 + color: "#343434"; smooth: true + anchors { left: parent.left; leftMargin: 6; verticalCenterOffset: -3; verticalCenter: parent.verticalCenter } + } +} diff --git a/examples/qml/calculator/content/calculator.js b/examples/qml/calculator/content/calculator.js new file mode 100644 index 0000000000..7c363c7f30 --- /dev/null +++ b/examples/qml/calculator/content/calculator.js @@ -0,0 +1,91 @@ + +var curVal = 0 +var memory = 0 +var lastOp = "" +var timer = 0 + +function disabled(op) { + if (op == "." && display.text.toString().search(/\./) != -1) { + return true + } else if (op == squareRoot && display.text.toString().search(/-/) != -1) { + return true + } else { + return false + } +} + +function doOperation(op) { + if (disabled(op)) { + return + } + + if (op.toString().length==1 && ((op >= "0" && op <= "9") || op==".") ) { + if (display.text.toString().length >= 14) + return; // No arbitrary length numbers + if (lastOp.toString().length == 1 && ((lastOp >= "0" && lastOp <= "9") || lastOp == ".") ) { + display.text = display.text + op.toString() + } else { + display.text = op + } + lastOp = op + return + } + lastOp = op + + if (display.currentOperation.text == "+") { + display.text = Number(display.text.valueOf()) + Number(curVal.valueOf()) + } else if (display.currentOperation.text == "-") { + display.text = Number(curVal) - Number(display.text.valueOf()) + } else if (display.currentOperation.text == multiplication) { + display.text = Number(curVal) * Number(display.text.valueOf()) + } else if (display.currentOperation.text == division) { + display.text = Number(Number(curVal) / Number(display.text.valueOf())).toString() + } else if (display.currentOperation.text == "=") { + } + + if (op == "+" || op == "-" || op == multiplication || op == division) { + display.currentOperation.text = op + curVal = display.text.valueOf() + return + } + + curVal = 0 + display.currentOperation.text = "" + + if (op == "1/x") { + display.text = (1 / display.text.valueOf()).toString() + } else if (op == "x^2") { + display.text = (display.text.valueOf() * display.text.valueOf()).toString() + } else if (op == "Abs") { + display.text = (Math.abs(display.text.valueOf())).toString() + } else if (op == "Int") { + display.text = (Math.floor(display.text.valueOf())).toString() + } else if (op == plusminus) { + display.text = (display.text.valueOf() * -1).toString() + } else if (op == squareRoot) { + display.text = (Math.sqrt(display.text.valueOf())).toString() + } else if (op == "mc") { + memory = 0; + } else if (op == "m+") { + memory += display.text.valueOf() + } else if (op == "mr") { + display.text = memory.toString() + } else if (op == "m-") { + memory = display.text.valueOf() + } else if (op == leftArrow) { + display.text = display.text.toString().slice(0, -1) + if (display.text.length == 0) { + display.text = "0" + } + } else if (op == "Off") { + Qt.quit(); + } else if (op == "C") { + display.text = "0" + } else if (op == "AC") { + curVal = 0 + memory = 0 + lastOp = "" + display.text ="0" + } +} + diff --git a/examples/qml/calculator/content/images/button-.png b/examples/qml/calculator/content/images/button-.png Binary files differnew file mode 100644 index 0000000000..544e514536 --- /dev/null +++ b/examples/qml/calculator/content/images/button-.png diff --git a/examples/qml/calculator/content/images/button-blue.png b/examples/qml/calculator/content/images/button-blue.png Binary files differnew file mode 100644 index 0000000000..5f92de32d0 --- /dev/null +++ b/examples/qml/calculator/content/images/button-blue.png diff --git a/examples/qml/calculator/content/images/button-green.png b/examples/qml/calculator/content/images/button-green.png Binary files differnew file mode 100644 index 0000000000..36c93914c7 --- /dev/null +++ b/examples/qml/calculator/content/images/button-green.png diff --git a/examples/qml/calculator/content/images/button-purple.png b/examples/qml/calculator/content/images/button-purple.png Binary files differnew file mode 100644 index 0000000000..347cbbea9d --- /dev/null +++ b/examples/qml/calculator/content/images/button-purple.png diff --git a/examples/qml/calculator/content/images/button-red.png b/examples/qml/calculator/content/images/button-red.png Binary files differnew file mode 100644 index 0000000000..3b335891ae --- /dev/null +++ b/examples/qml/calculator/content/images/button-red.png diff --git a/examples/qml/calculator/content/images/display.png b/examples/qml/calculator/content/images/display.png Binary files differnew file mode 100644 index 0000000000..9507f4382e --- /dev/null +++ b/examples/qml/calculator/content/images/display.png diff --git a/examples/qml/calculator/content/qmldir b/examples/qml/calculator/content/qmldir new file mode 100644 index 0000000000..a926b93fac --- /dev/null +++ b/examples/qml/calculator/content/qmldir @@ -0,0 +1,2 @@ +Button Button.qml +Display Display.qml diff --git a/examples/qtquick/canvas/bezierCurve/bezierCurve.qml b/examples/qml/canvas/bezierCurve/bezierCurve.qml index f57839b0a5..f57839b0a5 100644 --- a/examples/qtquick/canvas/bezierCurve/bezierCurve.qml +++ b/examples/qml/canvas/bezierCurve/bezierCurve.qml diff --git a/examples/qtquick/canvas/clip/clip.qml b/examples/qml/canvas/clip/clip.qml index d861ff0a46..d861ff0a46 100644 --- a/examples/qtquick/canvas/clip/clip.qml +++ b/examples/qml/canvas/clip/clip.qml diff --git a/examples/qtquick/canvas/contents/Button.qml b/examples/qml/canvas/contents/Button.qml index 1413cdb9fa..1413cdb9fa 100644 --- a/examples/qtquick/canvas/contents/Button.qml +++ b/examples/qml/canvas/contents/Button.qml diff --git a/examples/qtquick/canvas/contents/ScrollBar.qml b/examples/qml/canvas/contents/ScrollBar.qml index 98b8efee4a..98b8efee4a 100644 --- a/examples/qtquick/canvas/contents/ScrollBar.qml +++ b/examples/qml/canvas/contents/ScrollBar.qml diff --git a/examples/qtquick/canvas/contents/Slider.qml b/examples/qml/canvas/contents/Slider.qml index 1050e307f6..1050e307f6 100644 --- a/examples/qtquick/canvas/contents/Slider.qml +++ b/examples/qml/canvas/contents/Slider.qml diff --git a/examples/qtquick/canvas/contents/Stocks.qml b/examples/qml/canvas/contents/Stocks.qml index 043bca132e..043bca132e 100644 --- a/examples/qtquick/canvas/contents/Stocks.qml +++ b/examples/qml/canvas/contents/Stocks.qml diff --git a/examples/qtquick/canvas/contents/TitleBar.qml b/examples/qml/canvas/contents/TitleBar.qml index 28edda2ae7..28edda2ae7 100644 --- a/examples/qtquick/canvas/contents/TitleBar.qml +++ b/examples/qml/canvas/contents/TitleBar.qml diff --git a/examples/qtquick/canvas/contents/ToolBar.qml b/examples/qml/canvas/contents/ToolBar.qml index 7ae7391ddf..7ae7391ddf 100644 --- a/examples/qtquick/canvas/contents/ToolBar.qml +++ b/examples/qml/canvas/contents/ToolBar.qml diff --git a/examples/qtquick/canvas/contents/images/button-pressed.png b/examples/qml/canvas/contents/images/button-pressed.png Binary files differindex e434d327f2..e434d327f2 100644 --- a/examples/qtquick/canvas/contents/images/button-pressed.png +++ b/examples/qml/canvas/contents/images/button-pressed.png diff --git a/examples/qtquick/canvas/contents/images/button.png b/examples/qml/canvas/contents/images/button.png Binary files differindex 56a63ce641..56a63ce641 100644 --- a/examples/qtquick/canvas/contents/images/button.png +++ b/examples/qml/canvas/contents/images/button.png diff --git a/examples/qtquick/canvas/contents/images/default.svg b/examples/qml/canvas/contents/images/default.svg index 248199cc4e..248199cc4e 100644 --- a/examples/qtquick/canvas/contents/images/default.svg +++ b/examples/qml/canvas/contents/images/default.svg diff --git a/examples/qtquick/canvas/contents/images/gloss.png b/examples/qml/canvas/contents/images/gloss.png Binary files differindex 5d370cd93d..5d370cd93d 100755 --- a/examples/qtquick/canvas/contents/images/gloss.png +++ b/examples/qml/canvas/contents/images/gloss.png diff --git a/examples/qtquick/canvas/contents/images/lineedit.png b/examples/qml/canvas/contents/images/lineedit.png Binary files differindex 2cc38dc35b..2cc38dc35b 100755 --- a/examples/qtquick/canvas/contents/images/lineedit.png +++ b/examples/qml/canvas/contents/images/lineedit.png diff --git a/examples/qtquick/canvas/contents/images/lineedit.sci b/examples/qml/canvas/contents/images/lineedit.sci index 054bff78be..054bff78be 100644 --- a/examples/qtquick/canvas/contents/images/lineedit.sci +++ b/examples/qml/canvas/contents/images/lineedit.sci diff --git a/examples/qtquick/canvas/contents/images/quit.png b/examples/qml/canvas/contents/images/quit.png Binary files differindex 5bda1b6e0d..5bda1b6e0d 100755 --- a/examples/qtquick/canvas/contents/images/quit.png +++ b/examples/qml/canvas/contents/images/quit.png diff --git a/examples/qtquick/canvas/contents/images/stripes.png b/examples/qml/canvas/contents/images/stripes.png Binary files differindex 9f36727ea4..9f36727ea4 100755 --- a/examples/qtquick/canvas/contents/images/stripes.png +++ b/examples/qml/canvas/contents/images/stripes.png diff --git a/examples/qtquick/canvas/contents/images/titlebar.png b/examples/qml/canvas/contents/images/titlebar.png Binary files differindex 51c90082d0..51c90082d0 100755 --- a/examples/qtquick/canvas/contents/images/titlebar.png +++ b/examples/qml/canvas/contents/images/titlebar.png diff --git a/examples/qtquick/canvas/contents/images/titlebar.sci b/examples/qml/canvas/contents/images/titlebar.sci index 0418d94cd6..0418d94cd6 100644 --- a/examples/qtquick/canvas/contents/images/titlebar.sci +++ b/examples/qml/canvas/contents/images/titlebar.sci diff --git a/examples/qtquick/canvas/contents/images/toolbutton.png b/examples/qml/canvas/contents/images/toolbutton.png Binary files differindex 11310013ee..11310013ee 100755 --- a/examples/qtquick/canvas/contents/images/toolbutton.png +++ b/examples/qml/canvas/contents/images/toolbutton.png diff --git a/examples/qtquick/canvas/contents/images/toolbutton.sci b/examples/qml/canvas/contents/images/toolbutton.sci index 9e4f965307..9e4f965307 100644 --- a/examples/qtquick/canvas/contents/images/toolbutton.sci +++ b/examples/qml/canvas/contents/images/toolbutton.sci diff --git a/examples/qtquick/canvas/contents/qt-logo.png b/examples/qml/canvas/contents/qt-logo.png Binary files differindex 5ab3a1b0c4..5ab3a1b0c4 100644 --- a/examples/qtquick/canvas/contents/qt-logo.png +++ b/examples/qml/canvas/contents/qt-logo.png diff --git a/examples/qtquick/canvas/quadraticCurveTo/quadraticCurveTo.qml b/examples/qml/canvas/quadraticCurveTo/quadraticCurveTo.qml index bc3ca0071a..bc3ca0071a 100644 --- a/examples/qtquick/canvas/quadraticCurveTo/quadraticCurveTo.qml +++ b/examples/qml/canvas/quadraticCurveTo/quadraticCurveTo.qml diff --git a/examples/qtquick/canvas/roundedrect/roundedrect.qml b/examples/qml/canvas/roundedrect/roundedrect.qml index fd86c63a3b..fd86c63a3b 100644 --- a/examples/qtquick/canvas/roundedrect/roundedrect.qml +++ b/examples/qml/canvas/roundedrect/roundedrect.qml diff --git a/examples/qtquick/canvas/smile/smile.qml b/examples/qml/canvas/smile/smile.qml index 28a48a6c81..28a48a6c81 100644 --- a/examples/qtquick/canvas/smile/smile.qml +++ b/examples/qml/canvas/smile/smile.qml diff --git a/examples/qtquick/canvas/squircle/squircle.png b/examples/qml/canvas/squircle/squircle.png Binary files differindex 86c69d945f..86c69d945f 100644 --- a/examples/qtquick/canvas/squircle/squircle.png +++ b/examples/qml/canvas/squircle/squircle.png diff --git a/examples/qtquick/canvas/squircle/squircle.qml b/examples/qml/canvas/squircle/squircle.qml index 2fc65b67b3..2fc65b67b3 100644 --- a/examples/qtquick/canvas/squircle/squircle.qml +++ b/examples/qml/canvas/squircle/squircle.qml diff --git a/examples/qtquick/canvas/stockchart/README b/examples/qml/canvas/stockchart/README index 2652866ed6..2652866ed6 100644 --- a/examples/qtquick/canvas/stockchart/README +++ b/examples/qml/canvas/stockchart/README diff --git a/examples/qtquick/canvas/stockchart/com/nokia/StockChartExample/qmldir b/examples/qml/canvas/stockchart/com/nokia/StockChartExample/qmldir index 4c60e556d4..4c60e556d4 100644 --- a/examples/qtquick/canvas/stockchart/com/nokia/StockChartExample/qmldir +++ b/examples/qml/canvas/stockchart/com/nokia/StockChartExample/qmldir diff --git a/examples/qtquick/canvas/stockchart/model.cpp b/examples/qml/canvas/stockchart/model.cpp index 42eb2d592f..42eb2d592f 100644 --- a/examples/qtquick/canvas/stockchart/model.cpp +++ b/examples/qml/canvas/stockchart/model.cpp diff --git a/examples/qtquick/canvas/stockchart/model.h b/examples/qml/canvas/stockchart/model.h index 95e6f4891c..95e6f4891c 100644 --- a/examples/qtquick/canvas/stockchart/model.h +++ b/examples/qml/canvas/stockchart/model.h diff --git a/examples/qml/canvas/stockchart/plugin.cpp b/examples/qml/canvas/stockchart/plugin.cpp new file mode 100644 index 0000000000..3b354e2b31 --- /dev/null +++ b/examples/qml/canvas/stockchart/plugin.cpp @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** 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$ +** +****************************************************************************/ + +#include <QtQml/QQmlExtensionPlugin> +#include <QtQml/qqml.h> +#include <QtGui/QGuiApplication> +#include "model.h" + +class QStockChartExampleQmlPlugin : public QQmlExtensionPlugin +{ + Q_OBJECT +public: + void registerTypes(const char *uri) + { + Q_ASSERT(uri == QLatin1String("com.nokia.StockChartExample")); + qmlRegisterType<StockModel>(uri, 1, 0, "StockModel"); + qmlRegisterType<StockPrice>(uri, 1, 0, "StockPrice"); + } +}; + +#include "plugin.moc" + +Q_EXPORT_PLUGIN2(qmlstockchartexampleplugin, QStockChartExampleQmlPlugin); diff --git a/examples/qtquick/canvas/stockchart/stock.qml b/examples/qml/canvas/stockchart/stock.qml index 1c95fde2ce..1c95fde2ce 100644 --- a/examples/qtquick/canvas/stockchart/stock.qml +++ b/examples/qml/canvas/stockchart/stock.qml diff --git a/examples/qml/canvas/stockchart/stockchart.pro b/examples/qml/canvas/stockchart/stockchart.pro new file mode 100644 index 0000000000..0e3ca82c44 --- /dev/null +++ b/examples/qml/canvas/stockchart/stockchart.pro @@ -0,0 +1,20 @@ +TEMPLATE = lib +CONFIG += qt plugin +QT += qml network + +DESTDIR = com/nokia/StockChartExample +TARGET = qmlstockchartexampleplugin + +SOURCES += model.cpp plugin.cpp +HEADERS += model.h +qqmlsources.files += \ + com/nokia/StockChartExample/qmldir \ + stock.qml + +qqmlsources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/plugins/com/nokia/StockChartExample + +sources.files += stockchart.pro model.h model.cpp plugin.cpp README +sources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/plugins +target.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/plugins/com/nokia/StockChartExample + +INSTALLS += qqmlsources sources target diff --git a/examples/qtquick/canvas/tiger/tiger.js b/examples/qml/canvas/tiger/tiger.js index 4be0d26c9d..4be0d26c9d 100644 --- a/examples/qtquick/canvas/tiger/tiger.js +++ b/examples/qml/canvas/tiger/tiger.js diff --git a/examples/qtquick/canvas/tiger/tiger.qml b/examples/qml/canvas/tiger/tiger.qml index 2eb1bb2106..2eb1bb2106 100644 --- a/examples/qtquick/canvas/tiger/tiger.qml +++ b/examples/qml/canvas/tiger/tiger.qml diff --git a/examples/qtquick/canvas/twitterfriends/TwitterUser.qml b/examples/qml/canvas/twitterfriends/TwitterUser.qml index 8b906216ef..8b906216ef 100644 --- a/examples/qtquick/canvas/twitterfriends/TwitterUser.qml +++ b/examples/qml/canvas/twitterfriends/TwitterUser.qml diff --git a/examples/qtquick/canvas/twitterfriends/cache.js b/examples/qml/canvas/twitterfriends/cache.js index 6c8a1cd71a..6c8a1cd71a 100644 --- a/examples/qtquick/canvas/twitterfriends/cache.js +++ b/examples/qml/canvas/twitterfriends/cache.js diff --git a/examples/qtquick/canvas/twitterfriends/twitter.qml b/examples/qml/canvas/twitterfriends/twitter.qml index 9dc2bcc939..9dc2bcc939 100644 --- a/examples/qtquick/canvas/twitterfriends/twitter.qml +++ b/examples/qml/canvas/twitterfriends/twitter.qml diff --git a/examples/qml/cppextensions/imageprovider/imageprovider.cpp b/examples/qml/cppextensions/imageprovider/imageprovider.cpp index 7fe4b72c08..f6632a89e8 100644 --- a/examples/qml/cppextensions/imageprovider/imageprovider.cpp +++ b/examples/qml/cppextensions/imageprovider/imageprovider.cpp @@ -39,19 +39,19 @@ ****************************************************************************/ -#include <qdeclarativeextensionplugin.h> +#include <qqmlextensionplugin.h> -#include <qdeclarativeengine.h> -#include <qdeclarativeimageprovider.h> +#include <qqmlengine.h> +#include <qqmlimageprovider.h> #include <QImage> #include <QPainter> //![0] -class ColorImageProvider : public QDeclarativeImageProvider +class ColorImageProvider : public QQmlImageProvider { public: ColorImageProvider() - : QDeclarativeImageProvider(QDeclarativeImageProvider::Pixmap) + : QQmlImageProvider(QQmlImageProvider::Pixmap) { } @@ -84,17 +84,17 @@ public: //![1] -class ImageProviderExtensionPlugin : public QDeclarativeExtensionPlugin +class ImageProviderExtensionPlugin : public QQmlExtensionPlugin { Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "imageprovider.json") + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface" FILE "imageprovider.json") public: void registerTypes(const char *uri) { Q_UNUSED(uri); } - void initializeEngine(QDeclarativeEngine *engine, const char *uri) + void initializeEngine(QQmlEngine *engine, const char *uri) { Q_UNUSED(uri); engine->addImageProvider("colors", new ColorImageProvider); @@ -103,7 +103,7 @@ public: }; -#define QDeclarativeExtensionInterface_iid "org.qt-project.Qt.QDeclarativeExtensionInterface" +#define QQmlExtensionInterface_iid "org.qt-project.Qt.QQmlExtensionInterface" #include "imageprovider.moc" diff --git a/examples/qml/cppextensions/imageprovider/imageprovider.pro b/examples/qml/cppextensions/imageprovider/imageprovider.pro index dd128d56a8..b4a832b720 100644 --- a/examples/qml/cppextensions/imageprovider/imageprovider.pro +++ b/examples/qml/cppextensions/imageprovider/imageprovider.pro @@ -1,6 +1,6 @@ TEMPLATE = lib CONFIG += qt plugin -QT += declarative +QT += qml DESTDIR = ImageProviderCore TARGET = qmlimageproviderplugin @@ -10,13 +10,13 @@ SOURCES += imageprovider.cpp OTHER_FILES += imageprovider.json sources.files = $$SOURCES imageprovider.qml imageprovider.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/imageprovider +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/imageprovider -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/imageprovider/ImageProviderCore +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/imageprovider/ImageProviderCore ImageProviderCore_sources.files = \ ImageProviderCore/qmldir -ImageProviderCore_sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/imageprovider/ImageProviderCore +ImageProviderCore_sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/imageprovider/ImageProviderCore INSTALLS = sources ImageProviderCore_sources target diff --git a/examples/qml/cppextensions/networkaccessmanagerfactory/main.cpp b/examples/qml/cppextensions/networkaccessmanagerfactory/main.cpp index 2bad2aa285..6ebded0512 100644 --- a/examples/qml/cppextensions/networkaccessmanagerfactory/main.cpp +++ b/examples/qml/cppextensions/networkaccessmanagerfactory/main.cpp @@ -42,13 +42,13 @@ #include <QNetworkAccessManager> #include <QNetworkProxy> -#include <QDeclarativeEngine> -#include <QDeclarativeNetworkAccessManagerFactory> +#include <QQmlEngine> +#include <QQmlNetworkAccessManagerFactory> #include <QtQuick/QQuickView> /* - This example illustrates using a QDeclarativeNetworkAccessManagerFactory to + This example illustrates using a QQmlNetworkAccessManagerFactory to create a QNetworkAccessManager with a proxy. Usage: @@ -58,7 +58,7 @@ static QString proxyHost; static int proxyPort = 0; -class MyNetworkAccessManagerFactory : public QDeclarativeNetworkAccessManagerFactory +class MyNetworkAccessManagerFactory : public QQmlNetworkAccessManagerFactory { public: virtual QNetworkAccessManager *create(QObject *parent); diff --git a/examples/qml/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro b/examples/qml/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro index 479af364d0..6cbc24a7b8 100644 --- a/examples/qml/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro +++ b/examples/qml/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro @@ -1,4 +1,4 @@ -QT += declarative quick network +QT += qml quick network SOURCES += main.cpp RESOURCES += networkaccessmanagerfactory.qrc diff --git a/examples/qml/cppextensions/plugins/plugin.cpp b/examples/qml/cppextensions/plugins/plugin.cpp index 4ba0a928eb..5e9900cb4f 100644 --- a/examples/qml/cppextensions/plugins/plugin.cpp +++ b/examples/qml/cppextensions/plugins/plugin.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ -#include <QtDeclarative/QDeclarativeExtensionPlugin> -#include <QtDeclarative/qdeclarative.h> +#include <QtQml/QQmlExtensionPlugin> +#include <QtQml/qqml.h> #include <qdebug.h> #include <qdatetime.h> #include <qbasictimer.h> @@ -138,10 +138,10 @@ int TimeModel::instances=0; MinuteTimer *TimeModel::timer=0; //![plugin] -class QExampleQmlPlugin : public QDeclarativeExtensionPlugin +class QExampleQmlPlugin : public QQmlExtensionPlugin { Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "plugin.json") + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface" FILE "plugin.json") public: void registerTypes(const char *uri) diff --git a/examples/qml/cppextensions/plugins/plugins.pro b/examples/qml/cppextensions/plugins/plugins.pro index a28582a07a..08a4d1a61c 100644 --- a/examples/qml/cppextensions/plugins/plugins.pro +++ b/examples/qml/cppextensions/plugins/plugins.pro @@ -1,6 +1,6 @@ TEMPLATE = lib CONFIG += qt plugin -QT += declarative +QT += qml DESTDIR = com/nokia/TimeExample TARGET = qmlqtimeexampleplugin @@ -17,11 +17,11 @@ qdeclarativesources.files += \ com/nokia/TimeExample/hour.png \ com/nokia/TimeExample/minute.png -qdeclarativesources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/plugins/com/nokia/TimeExample +qdeclarativesources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/plugins/com/nokia/TimeExample sources.files += plugins.pro plugin.cpp plugins.qml README -sources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/plugins -target.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/plugins/com/nokia/TimeExample +sources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/plugins +target.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/plugins/com/nokia/TimeExample INSTALLS += qdeclarativesources sources target diff --git a/examples/qml/cppextensions/referenceexamples/adding/adding.pro b/examples/qml/cppextensions/referenceexamples/adding/adding.pro index 1a972926b7..706322e9ff 100644 --- a/examples/qml/cppextensions/referenceexamples/adding/adding.pro +++ b/examples/qml/cppextensions/referenceexamples/adding/adding.pro @@ -1,11 +1,11 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp HEADERS += person.h RESOURCES += adding.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/adding +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/adding sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS adding.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/adding +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/adding INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/adding/main.cpp b/examples/qml/cppextensions/referenceexamples/adding/main.cpp index 4c1918b6de..c3a0ab6812 100644 --- a/examples/qml/cppextensions/referenceexamples/adding/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/adding/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "person.h" @@ -50,8 +50,8 @@ int main(int argc, char ** argv) qmlRegisterType<Person>("People", 1,0, "Person"); //![0] - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); Person *person = qobject_cast<Person *>(component.create()); if (person) { qWarning() << "The person's name is" << person->name(); diff --git a/examples/qml/cppextensions/referenceexamples/attached/attached.pro b/examples/qml/cppextensions/referenceexamples/attached/attached.pro index 4cfd4e0aed..f4385e1a30 100644 --- a/examples/qml/cppextensions/referenceexamples/attached/attached.pro +++ b/examples/qml/cppextensions/referenceexamples/attached/attached.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += attached.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/attached +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/attached sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS attached.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/attached +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/attached INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.cpp index feefef4fe1..c4f906119a 100644 --- a/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.cpp @@ -69,9 +69,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty<Person> BirthdayParty::guests() +QQmlListProperty<Person> BirthdayParty::guests() { - return QDeclarativeListProperty<Person>(this, m_guests); + return QQmlListProperty<Person>(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.h index c789c0bd51..1da6c34026 100644 --- a/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.h @@ -42,7 +42,7 @@ #include <QObject> #include <QDate> -#include <qdeclarative.h> +#include <qqml.h> #include "person.h" class BirthdayPartyAttached : public QObject @@ -63,7 +63,7 @@ class BirthdayParty : public QObject { Q_OBJECT Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests) + Q_PROPERTY(QQmlListProperty<Person> guests READ guests) Q_CLASSINFO("DefaultProperty", "guests") public: BirthdayParty(QObject *parent = 0); @@ -71,7 +71,7 @@ public: Person *host() const; void setHost(Person *); - QDeclarativeListProperty<Person> guests(); + QQmlListProperty<Person> guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/qml/cppextensions/referenceexamples/attached/main.cpp b/examples/qml/cppextensions/referenceexamples/attached/main.cpp index 4c2c3003fe..ce067bbbf7 100644 --- a/examples/qml/cppextensions/referenceexamples/attached/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/attached/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "birthdayparty.h" #include "person.h" @@ -55,8 +55,8 @@ int main(int argc, char ** argv) qmlRegisterType<Boy>("People", 1,0, "Boy"); qmlRegisterType<Girl>("People", 1,0, "Girl"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create()); if (party && party->host()) { diff --git a/examples/qml/cppextensions/referenceexamples/binding/binding.pro b/examples/qml/cppextensions/referenceexamples/binding/binding.pro index 2add33fa47..0379f93ea7 100644 --- a/examples/qml/cppextensions/referenceexamples/binding/binding.pro +++ b/examples/qml/cppextensions/referenceexamples/binding/binding.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -9,7 +9,7 @@ HEADERS += person.h \ happybirthdaysong.h RESOURCES += binding.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/binding +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/binding sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS binding.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/binding +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/binding INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.cpp index 4f5acdfb75..62499862f0 100644 --- a/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.cpp @@ -75,9 +75,9 @@ void BirthdayParty::setHost(Person *c) emit hostChanged(); } -QDeclarativeListProperty<Person> BirthdayParty::guests() +QQmlListProperty<Person> BirthdayParty::guests() { - return QDeclarativeListProperty<Person>(this, m_guests); + return QQmlListProperty<Person>(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.h index 376d107f26..195e9cd9cf 100644 --- a/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.h @@ -43,7 +43,7 @@ #include <QObject> #include <QDate> #include <QDebug> -#include <qdeclarative.h> +#include <qqml.h> #include "person.h" class BirthdayPartyAttached : public QObject @@ -69,7 +69,7 @@ class BirthdayParty : public QObject // ![0] Q_PROPERTY(Person *host READ host WRITE setHost NOTIFY hostChanged) // ![0] - Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests) + Q_PROPERTY(QQmlListProperty<Person> guests READ guests) Q_PROPERTY(QString announcement READ announcement WRITE setAnnouncement) Q_CLASSINFO("DefaultProperty", "guests") public: @@ -78,7 +78,7 @@ public: Person *host() const; void setHost(Person *); - QDeclarativeListProperty<Person> guests(); + QQmlListProperty<Person> guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.cpp b/examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.cpp index df4dbec9c4..90220e15ae 100644 --- a/examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.cpp +++ b/examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.cpp @@ -49,7 +49,7 @@ HappyBirthdaySong::HappyBirthdaySong(QObject *parent) timer->start(1000); } -void HappyBirthdaySong::setTarget(const QDeclarativeProperty &p) +void HappyBirthdaySong::setTarget(const QQmlProperty &p) { m_target = p; } diff --git a/examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.h b/examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.h index a9f3a94544..ace48b2af0 100644 --- a/examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.h +++ b/examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.h @@ -40,20 +40,20 @@ #ifndef HAPPYBIRTHDAYSONG_H #define HAPPYBIRTHDAYSONG_H -#include <QDeclarativePropertyValueSource> -#include <QDeclarativeProperty> +#include <QQmlPropertyValueSource> +#include <QQmlProperty> #include <QStringList> -class HappyBirthdaySong : public QObject, public QDeclarativePropertyValueSource +class HappyBirthdaySong : public QObject, public QQmlPropertyValueSource { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) - Q_INTERFACES(QDeclarativePropertyValueSource) + Q_INTERFACES(QQmlPropertyValueSource) public: HappyBirthdaySong(QObject *parent = 0); - virtual void setTarget(const QDeclarativeProperty &); + virtual void setTarget(const QQmlProperty &); QString name() const; void setName(const QString &); @@ -66,7 +66,7 @@ signals: private: int m_line; QStringList m_lyrics; - QDeclarativeProperty m_target; + QQmlProperty m_target; QString m_name; }; diff --git a/examples/qml/cppextensions/referenceexamples/binding/main.cpp b/examples/qml/cppextensions/referenceexamples/binding/main.cpp index 551d24b702..389cb7609b 100644 --- a/examples/qml/cppextensions/referenceexamples/binding/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/binding/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "birthdayparty.h" #include "happybirthdaysong.h" @@ -56,8 +56,8 @@ int main(int argc, char ** argv) qmlRegisterType<Boy>("People", 1,0, "Boy"); qmlRegisterType<Girl>("People", 1,0, "Girl"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create()); if (party && party->host()) { diff --git a/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.cpp index 1859ca9461..e15ffe1604 100644 --- a/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.cpp @@ -54,9 +54,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty<Person> BirthdayParty::guests() +QQmlListProperty<Person> BirthdayParty::guests() { - return QDeclarativeListProperty<Person>(this, m_guests); + return QQmlListProperty<Person>(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.h index 4315d3727e..43611693d9 100644 --- a/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.h @@ -41,7 +41,7 @@ #define BIRTHDAYPARTY_H #include <QObject> -#include <QDeclarativeListProperty> +#include <QQmlListProperty> #include "person.h" class BirthdayParty : public QObject @@ -49,7 +49,7 @@ class BirthdayParty : public QObject Q_OBJECT // ![0] Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests) + Q_PROPERTY(QQmlListProperty<Person> guests READ guests) // ![0] public: BirthdayParty(QObject *parent = 0); @@ -57,7 +57,7 @@ public: Person *host() const; void setHost(Person *); - QDeclarativeListProperty<Person> guests(); + QQmlListProperty<Person> guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/qml/cppextensions/referenceexamples/coercion/coercion.pro b/examples/qml/cppextensions/referenceexamples/coercion/coercion.pro index 742b85b683..60e8532bab 100644 --- a/examples/qml/cppextensions/referenceexamples/coercion/coercion.pro +++ b/examples/qml/cppextensions/referenceexamples/coercion/coercion.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += coercion.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/coercion +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/coercion sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS coercion.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/coercion +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/coercion INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/coercion/main.cpp b/examples/qml/cppextensions/referenceexamples/coercion/main.cpp index 95b309de4c..15e41ca597 100644 --- a/examples/qml/cppextensions/referenceexamples/coercion/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/coercion/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "birthdayparty.h" #include "person.h" @@ -58,8 +58,8 @@ int main(int argc, char ** argv) qmlRegisterType<Girl>("People", 1,0, "Girl"); //![register boy girl] - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create()); if (party && party->host()) { diff --git a/examples/qml/cppextensions/referenceexamples/default/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/default/birthdayparty.cpp index 1859ca9461..e15ffe1604 100644 --- a/examples/qml/cppextensions/referenceexamples/default/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/default/birthdayparty.cpp @@ -54,9 +54,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty<Person> BirthdayParty::guests() +QQmlListProperty<Person> BirthdayParty::guests() { - return QDeclarativeListProperty<Person>(this, m_guests); + return QQmlListProperty<Person>(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/qml/cppextensions/referenceexamples/default/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/default/birthdayparty.h index cfca6689db..3ee635039d 100644 --- a/examples/qml/cppextensions/referenceexamples/default/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/default/birthdayparty.h @@ -41,7 +41,7 @@ #define BIRTHDAYPARTY_H #include <QObject> -#include <QDeclarativeListProperty> +#include <QQmlListProperty> #include "person.h" // ![0] @@ -49,7 +49,7 @@ class BirthdayParty : public QObject { Q_OBJECT Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests) + Q_PROPERTY(QQmlListProperty<Person> guests READ guests) Q_CLASSINFO("DefaultProperty", "guests") public: BirthdayParty(QObject *parent = 0); @@ -57,7 +57,7 @@ public: Person *host() const; void setHost(Person *); - QDeclarativeListProperty<Person> guests(); + QQmlListProperty<Person> guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/qml/cppextensions/referenceexamples/default/default.pro b/examples/qml/cppextensions/referenceexamples/default/default.pro index 6533cdd7d3..36ef39fc55 100644 --- a/examples/qml/cppextensions/referenceexamples/default/default.pro +++ b/examples/qml/cppextensions/referenceexamples/default/default.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += default.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/default +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/default sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS default.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/default +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/default INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/default/main.cpp b/examples/qml/cppextensions/referenceexamples/default/main.cpp index 3a03279129..175945fc5d 100644 --- a/examples/qml/cppextensions/referenceexamples/default/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/default/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "birthdayparty.h" #include "person.h" @@ -53,8 +53,8 @@ int main(int argc, char ** argv) qmlRegisterType<Boy>("People", 1,0, "Boy"); qmlRegisterType<Girl>("People", 1,0, "Girl"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create()); if (party && party->host()) { diff --git a/examples/qml/cppextensions/referenceexamples/extended/extended.pro b/examples/qml/cppextensions/referenceexamples/extended/extended.pro index 3d9f59c470..206ea19c61 100644 --- a/examples/qml/cppextensions/referenceexamples/extended/extended.pro +++ b/examples/qml/cppextensions/referenceexamples/extended/extended.pro @@ -1,11 +1,11 @@ -QT += declarative widgets +QT += qml widgets SOURCES += main.cpp \ lineedit.cpp HEADERS += lineedit.h RESOURCES += extended.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/extended +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/extended sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS extended.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/extended +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/extended INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/extended/lineedit.cpp b/examples/qml/cppextensions/referenceexamples/extended/lineedit.cpp index 8f7fd8aa93..a3b1d0d54e 100644 --- a/examples/qml/cppextensions/referenceexamples/extended/lineedit.cpp +++ b/examples/qml/cppextensions/referenceexamples/extended/lineedit.cpp @@ -38,7 +38,7 @@ ** ****************************************************************************/ #include "lineedit.h" -#include <qdeclarative.h> +#include <qqml.h> LineEditExtension::LineEditExtension(QObject *object) : QObject(object), m_lineedit(static_cast<QLineEdit *>(object)) diff --git a/examples/qml/cppextensions/referenceexamples/extended/main.cpp b/examples/qml/cppextensions/referenceexamples/extended/main.cpp index 3c580396f2..de7c450169 100644 --- a/examples/qml/cppextensions/referenceexamples/extended/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/extended/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include <QLineEdit> #include "lineedit.h" @@ -50,8 +50,8 @@ int main(int argc, char ** argv) qmlRegisterExtendedType<QLineEdit, LineEditExtension>("People", 1,0, "QLineEdit"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); QLineEdit *edit = qobject_cast<QLineEdit *>(component.create()); if (edit) { diff --git a/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.cpp index 1859ca9461..e15ffe1604 100644 --- a/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.cpp @@ -54,9 +54,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty<Person> BirthdayParty::guests() +QQmlListProperty<Person> BirthdayParty::guests() { - return QDeclarativeListProperty<Person>(this, m_guests); + return QQmlListProperty<Person>(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.h index 491903adc5..5ca0e9b982 100644 --- a/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.h @@ -41,14 +41,14 @@ #define BIRTHDAYPARTY_H #include <QObject> -#include <QDeclarativeListProperty> +#include <QQmlListProperty> #include "person.h" class BirthdayParty : public QObject { Q_OBJECT Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests) + Q_PROPERTY(QQmlListProperty<Person> guests READ guests) Q_CLASSINFO("DefaultProperty", "guests") public: BirthdayParty(QObject *parent = 0); @@ -56,7 +56,7 @@ public: Person *host() const; void setHost(Person *); - QDeclarativeListProperty<Person> guests(); + QQmlListProperty<Person> guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/qml/cppextensions/referenceexamples/grouped/grouped.pro b/examples/qml/cppextensions/referenceexamples/grouped/grouped.pro index aab0c8469a..d32a98f79b 100644 --- a/examples/qml/cppextensions/referenceexamples/grouped/grouped.pro +++ b/examples/qml/cppextensions/referenceexamples/grouped/grouped.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += grouped.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/grouped +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/grouped sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS grouped.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/grouped +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/grouped INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/grouped/main.cpp b/examples/qml/cppextensions/referenceexamples/grouped/main.cpp index de7d714c52..55be3b715b 100644 --- a/examples/qml/cppextensions/referenceexamples/grouped/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/grouped/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "birthdayparty.h" #include "person.h" @@ -54,8 +54,8 @@ int main(int argc, char ** argv) qmlRegisterType<Boy>("People", 1,0, "Boy"); qmlRegisterType<Girl>("People", 1,0, "Girl"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create()); if (party && party->host()) { diff --git a/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.cpp index 35444f505a..c96f41d944 100644 --- a/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.cpp @@ -55,9 +55,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty<Person> BirthdayParty::guests() +QQmlListProperty<Person> BirthdayParty::guests() { - return QDeclarativeListProperty<Person>(this, m_guests); + return QQmlListProperty<Person>(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.h index e49afdb78d..df8a859972 100644 --- a/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.h @@ -41,21 +41,21 @@ #define BIRTHDAYPARTY_H #include <QObject> -#include <QDeclarativeListProperty> +#include <QQmlListProperty> #include "person.h" class BirthdayParty : public QObject { Q_OBJECT Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests) + Q_PROPERTY(QQmlListProperty<Person> guests READ guests) public: BirthdayParty(QObject *parent = 0); Person *host() const; void setHost(Person *); - QDeclarativeListProperty<Person> guests(); + QQmlListProperty<Person> guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/qml/cppextensions/referenceexamples/methods/main.cpp b/examples/qml/cppextensions/referenceexamples/methods/main.cpp index d037d88f20..1e502c3943 100644 --- a/examples/qml/cppextensions/referenceexamples/methods/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/methods/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "birthdayparty.h" #include "person.h" @@ -51,8 +51,8 @@ int main(int argc, char ** argv) qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty"); qmlRegisterType<Person>("People", 1,0, "Person"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create()); if (party && party->host()) { diff --git a/examples/qml/cppextensions/referenceexamples/methods/methods.pro b/examples/qml/cppextensions/referenceexamples/methods/methods.pro index ee28355188..f4c63bfa29 100644 --- a/examples/qml/cppextensions/referenceexamples/methods/methods.pro +++ b/examples/qml/cppextensions/referenceexamples/methods/methods.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += methods.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/methods +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/methods sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS methods.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/methods +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/methods INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.cpp index 0038cd0a41..8e79d07748 100644 --- a/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.cpp @@ -55,9 +55,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty<Person> BirthdayParty::guests() +QQmlListProperty<Person> BirthdayParty::guests() { - return QDeclarativeListProperty<Person>(this, m_guests); + return QQmlListProperty<Person>(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.h index 2c3d128b6d..84eefa52ae 100644 --- a/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.h @@ -41,7 +41,7 @@ #define BIRTHDAYPARTY_H #include <QObject> -#include <QDeclarativeListProperty> +#include <QQmlListProperty> #include "person.h" // ![0] @@ -53,7 +53,7 @@ class BirthdayParty : public QObject Q_PROPERTY(Person *host READ host WRITE setHost) // ![1] // ![2] - Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests) + Q_PROPERTY(QQmlListProperty<Person> guests READ guests) // ![2] // ![3] public: @@ -62,7 +62,7 @@ public: Person *host() const; void setHost(Person *); - QDeclarativeListProperty<Person> guests(); + QQmlListProperty<Person> guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/qml/cppextensions/referenceexamples/properties/main.cpp b/examples/qml/cppextensions/referenceexamples/properties/main.cpp index 421ce9fbaa..cc0de89221 100644 --- a/examples/qml/cppextensions/referenceexamples/properties/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/properties/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "birthdayparty.h" #include "person.h" @@ -53,8 +53,8 @@ int main(int argc, char ** argv) qmlRegisterType<Person>("People", 1,0, "Person"); //![register list] - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create()); if (party && party->host()) { diff --git a/examples/qml/cppextensions/referenceexamples/properties/properties.pro b/examples/qml/cppextensions/referenceexamples/properties/properties.pro index 936d0ea429..e079b1f79e 100644 --- a/examples/qml/cppextensions/referenceexamples/properties/properties.pro +++ b/examples/qml/cppextensions/referenceexamples/properties/properties.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += properties.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/properties +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/properties sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS properties.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/properties +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/properties INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.cpp index d576c2a278..b9f7e15907 100644 --- a/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.cpp @@ -70,9 +70,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty<Person> BirthdayParty::guests() +QQmlListProperty<Person> BirthdayParty::guests() { - return QDeclarativeListProperty<Person>(this, m_guests); + return QQmlListProperty<Person>(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.h index 45ad4f0acf..3f1b020b5a 100644 --- a/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.h @@ -42,7 +42,7 @@ #include <QObject> #include <QDate> -#include <qdeclarative.h> +#include <qqml.h> #include "person.h" class BirthdayPartyAttached : public QObject @@ -63,7 +63,7 @@ class BirthdayParty : public QObject { Q_OBJECT Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests) + Q_PROPERTY(QQmlListProperty<Person> guests READ guests) Q_CLASSINFO("DefaultProperty", "guests") public: BirthdayParty(QObject *parent = 0); @@ -71,7 +71,7 @@ public: Person *host() const; void setHost(Person *); - QDeclarativeListProperty<Person> guests(); + QQmlListProperty<Person> guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/qml/cppextensions/referenceexamples/signal/main.cpp b/examples/qml/cppextensions/referenceexamples/signal/main.cpp index 5800cf450f..21a26d9b67 100644 --- a/examples/qml/cppextensions/referenceexamples/signal/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/signal/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "birthdayparty.h" #include "person.h" @@ -55,8 +55,8 @@ int main(int argc, char ** argv) qmlRegisterType<Boy>("People", 1,0, "Boy"); qmlRegisterType<Girl>("People", 1,0, "Girl"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create()); if (party && party->host()) { diff --git a/examples/qml/cppextensions/referenceexamples/signal/signal.pro b/examples/qml/cppextensions/referenceexamples/signal/signal.pro index 8ffdb50f90..d426e398a5 100644 --- a/examples/qml/cppextensions/referenceexamples/signal/signal.pro +++ b/examples/qml/cppextensions/referenceexamples/signal/signal.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -7,7 +7,7 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += signal.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/signal +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/signal sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS signal.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/signal +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/signal INSTALLS += target sources diff --git a/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.cpp index 09137c41a8..aa8bc77116 100644 --- a/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.cpp +++ b/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.cpp @@ -70,9 +70,9 @@ void BirthdayParty::setHost(Person *c) m_host = c; } -QDeclarativeListProperty<Person> BirthdayParty::guests() +QQmlListProperty<Person> BirthdayParty::guests() { - return QDeclarativeListProperty<Person>(this, m_guests); + return QQmlListProperty<Person>(this, m_guests); } int BirthdayParty::guestCount() const diff --git a/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.h index 5d561da807..f3635e899b 100644 --- a/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.h +++ b/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.h @@ -43,7 +43,7 @@ #include <QObject> #include <QDate> #include <QDebug> -#include <qdeclarative.h> +#include <qqml.h> #include "person.h" class BirthdayPartyAttached : public QObject @@ -64,7 +64,7 @@ class BirthdayParty : public QObject { Q_OBJECT Q_PROPERTY(Person *host READ host WRITE setHost) - Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests) + Q_PROPERTY(QQmlListProperty<Person> guests READ guests) // ![0] Q_PROPERTY(QString announcement READ announcement WRITE setAnnouncement) // ![0] @@ -75,7 +75,7 @@ public: Person *host() const; void setHost(Person *); - QDeclarativeListProperty<Person> guests(); + QQmlListProperty<Person> guests(); int guestCount() const; Person *guest(int) const; diff --git a/examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp b/examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp index 629c354543..d69154b57a 100644 --- a/examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp +++ b/examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp @@ -49,7 +49,7 @@ HappyBirthdaySong::HappyBirthdaySong(QObject *parent) timer->start(1000); } -void HappyBirthdaySong::setTarget(const QDeclarativeProperty &p) +void HappyBirthdaySong::setTarget(const QQmlProperty &p) { m_target = p; } diff --git a/examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.h b/examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.h index 9721350435..19e47c28ac 100644 --- a/examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.h +++ b/examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.h @@ -40,24 +40,24 @@ #ifndef HAPPYBIRTHDAYSONG_H #define HAPPYBIRTHDAYSONG_H -#include <QDeclarativePropertyValueSource> -#include <QDeclarativeProperty> -#include <qdeclarative.h> +#include <QQmlPropertyValueSource> +#include <QQmlProperty> +#include <qqml.h> #include <QStringList> // ![0] -class HappyBirthdaySong : public QObject, public QDeclarativePropertyValueSource +class HappyBirthdaySong : public QObject, public QQmlPropertyValueSource { Q_OBJECT - Q_INTERFACES(QDeclarativePropertyValueSource) + Q_INTERFACES(QQmlPropertyValueSource) // ![0] Q_PROPERTY(QString name READ name WRITE setName) // ![1] public: HappyBirthdaySong(QObject *parent = 0); - virtual void setTarget(const QDeclarativeProperty &); + virtual void setTarget(const QQmlProperty &); // ![1] QString name() const; @@ -69,7 +69,7 @@ private slots: private: int m_line; QStringList m_lyrics; - QDeclarativeProperty m_target; + QQmlProperty m_target; QString m_name; // ![2] }; diff --git a/examples/qml/cppextensions/referenceexamples/valuesource/main.cpp b/examples/qml/cppextensions/referenceexamples/valuesource/main.cpp index 53d676dfbe..e119e719af 100644 --- a/examples/qml/cppextensions/referenceexamples/valuesource/main.cpp +++ b/examples/qml/cppextensions/referenceexamples/valuesource/main.cpp @@ -38,8 +38,8 @@ ** ****************************************************************************/ #include <QCoreApplication> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> #include <QDebug> #include "birthdayparty.h" #include "happybirthdaysong.h" @@ -57,8 +57,8 @@ int main(int argc, char ** argv) qmlRegisterType<Boy>("People", 1,0, "Boy"); qmlRegisterType<Girl>("People", 1,0, "Girl"); - QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl("qrc:example.qml")); + QQmlEngine engine; + QQmlComponent component(&engine, QUrl("qrc:example.qml")); BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create()); if (party && party->host()) { diff --git a/examples/qml/cppextensions/referenceexamples/valuesource/valuesource.pro b/examples/qml/cppextensions/referenceexamples/valuesource/valuesource.pro index a978d8452a..afc1784d71 100644 --- a/examples/qml/cppextensions/referenceexamples/valuesource/valuesource.pro +++ b/examples/qml/cppextensions/referenceexamples/valuesource/valuesource.pro @@ -1,4 +1,4 @@ -QT += declarative +QT += qml SOURCES += main.cpp \ person.cpp \ @@ -9,7 +9,7 @@ HEADERS += person.h \ happybirthdaysong.h RESOURCES += valuesource.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/valuesource +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/valuesource sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS valuesource.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/extending/valuesource +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/valuesource INSTALLS += target sources diff --git a/examples/qtquick/modelviews/objectlistmodel/objectlistmodel.qmlproject b/examples/qml/draganddrop/dragtarget.qmlproject index 2bb4016996..2bb4016996 100644 --- a/examples/qtquick/modelviews/objectlistmodel/objectlistmodel.qmlproject +++ b/examples/qml/draganddrop/dragtarget.qmlproject diff --git a/examples/qml/draganddrop/tiles/DragTile.qml b/examples/qml/draganddrop/tiles/DragTile.qml new file mode 100644 index 0000000000..2813fa8caf --- /dev/null +++ b/examples/qml/draganddrop/tiles/DragTile.qml @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** 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 2.0 + +Item { + id: root + property string colorKey + + width: 100; height: 100 + + MouseArea { + id: mouseArea + + width: 100; height: 100 + anchors.centerIn: parent + + drag.target: tile + + onReleased: parent = tile.Drag.target !== null ? tile.Drag.target : root + + Rectangle { + id: tile + + width: 100; height: 100 + + anchors.horizontalCenter: parent.horizontalCenter; anchors.verticalCenter: parent.verticalCenter + color: colorKey + + Drag.keys: [ colorKey ] + Drag.active: mouseArea.drag.active + Drag.hotSpot.x: 50 + Drag.hotSpot.y: 50 + + Text { + anchors.fill: parent + color: "white" + font.pixelSize: 90 + text: modelData + 1 + horizontalAlignment:Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } + + states: State { + when: mouseArea.drag.active + ParentChange { target: tile; parent: root } + AnchorChanges { target: tile; anchors.verticalCenter: undefined; anchors.horizontalCenter: undefined } + } + } + } +} + diff --git a/examples/qml/draganddrop/tiles/DropTile.qml b/examples/qml/draganddrop/tiles/DropTile.qml new file mode 100644 index 0000000000..e8566f04cc --- /dev/null +++ b/examples/qml/draganddrop/tiles/DropTile.qml @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** 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 2.0 + +DropArea { + id: dragTarget + + property string colorKey + property alias dropProxy: dragTarget + + width: 100; height: 100 + keys: [ colorKey ] + + Rectangle { + id: dropRectangle + + anchors.fill: parent + color: colorKey + + states: [ + State { + when: dragTarget.containsDrag + PropertyChanges { + target: dropRectangle + color: "grey" + } + } + ] + } +} diff --git a/examples/qml/draganddrop/tiles/tiles.qml b/examples/qml/draganddrop/tiles/tiles.qml new file mode 100644 index 0000000000..31c87f8244 --- /dev/null +++ b/examples/qml/draganddrop/tiles/tiles.qml @@ -0,0 +1,109 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** 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 2.0 + +Rectangle { + id: root + + width: 620 + height: 410 + + color: "black" + + Grid { + id: redDestination + + anchors.left: redSource.right; anchors.top: parent.top; + anchors.margins: 5 + width: 300 + height: 300 + opacity: 0.5 + columns: 3 + + Repeater { + model: 9; + delegate: DropTile { colorKey: "red" } + } + } + + Grid { + anchors.right: blueSource.left; anchors.bottom: parent.bottom; + anchors.margins: 5 + width: 300 + height: 300 + + opacity: 0.5 + + columns: 3 + + Repeater { + model: 9 + delegate: DropTile { colorKey: "blue" } + } + } + + Column { + id: redSource + + anchors.left: parent.left; anchors.top: parent.top; anchors.bottom: parent.bottom + anchors.margins: 5 + width: 100 + spacing: -60 + + Repeater { + model: 9 + delegate: DragTile { colorKey: "red" } + } + } + Column { + id: blueSource + + anchors.right: parent.right; anchors.top: parent.top; anchors.bottom: parent.bottom + anchors.margins: 5 + width: 100 + spacing: -60 + + Repeater { + model: 9 + delegate: DragTile { colorKey: "blue" } + } + } +} diff --git a/examples/qml/draganddrop/views/gridview.qml b/examples/qml/draganddrop/views/gridview.qml new file mode 100644 index 0000000000..375f3d2824 --- /dev/null +++ b/examples/qml/draganddrop/views/gridview.qml @@ -0,0 +1,117 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** 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 2.0 + +GridView { + id: root + width: 360; height: 360 + cellWidth: 90; cellHeight: 90 + + model: VisualDataModel { + id: visualModel + model: ListModel { + id: colorModel + ListElement { color: "blue" } + ListElement { color: "green" } + ListElement { color: "red" } + ListElement { color: "yellow" } + ListElement { color: "orange" } + ListElement { color: "purple" } + ListElement { color: "cyan" } + ListElement { color: "magenta" } + ListElement { color: "chartreuse" } + ListElement { color: "aquamarine" } + ListElement { color: "indigo" } + ListElement { color: "black" } + ListElement { color: "chartreuse" } + ListElement { color: "violet" } + ListElement { color: "grey" } + ListElement { color: "springgreen" } + } + + delegate: MouseArea { + id: delegateRoot + + property int visualIndex: VisualDataModel.itemsIndex + + width: 90; height: 90 + drag.target: icon + + Rectangle { + id: icon + width: 80; height: 80 + anchors { + horizontalCenter: parent.horizontalCenter; + verticalCenter: parent.verticalCenter + } + color: model.color + radius: 3 + + Drag.active: delegateRoot.pressed + Drag.source: delegateRoot + Drag.hotSpot.x: 40 + Drag.hotSpot.y: 40 + + states: [ + State { + when: icon.Drag.active + ParentChange { + target: icon + parent: root + } + + AnchorChanges { + target: icon; + anchors.horizontalCenter: undefined; + anchors.verticalCenter: undefined + } + } + ] + } + + DropArea { + anchors { fill: parent; margins: 15 } + + onEntered: visualModel.items.move(drag.source.visualIndex, delegateRoot.visualIndex) + } + } + } +} diff --git a/examples/qml/flickr/content/Button.qml b/examples/qml/flickr/content/Button.qml new file mode 100644 index 0000000000..57f846aec3 --- /dev/null +++ b/examples/qml/flickr/content/Button.qml @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: container + + signal clicked + + property string text + + BorderImage { + id: buttonImage + source: "images/toolbutton.sci" + width: container.width; height: container.height + } + BorderImage { + id: pressed + opacity: 0 + source: "images/toolbutton.sci" + width: container.width; height: container.height + } + MouseArea { + id: mouseRegion + anchors.fill: buttonImage + onClicked: { container.clicked(); } + } + Text { + color: "white" + anchors.centerIn: buttonImage; font.bold: true; font.pixelSize: 15 + text: container.text; style: Text.Raised; styleColor: "black" + } + states: [ + State { + name: "Pressed" + when: mouseRegion.pressed == true + PropertyChanges { target: pressed; opacity: 1 } + } + ] +} diff --git a/examples/qml/flickr/content/GridDelegate.qml b/examples/qml/flickr/content/GridDelegate.qml new file mode 100644 index 0000000000..f8838bd609 --- /dev/null +++ b/examples/qml/flickr/content/GridDelegate.qml @@ -0,0 +1,111 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: wrapper; width: GridView.view.cellWidth; height: GridView.view.cellHeight + + function photoClicked() { + imageDetails.photoTitle = title; + imageDetails.photoTags = tags; + imageDetails.photoWidth = photoWidth; + imageDetails.photoHeight = photoHeight; + imageDetails.photoType = photoType; + imageDetails.photoAuthor = photoAuthor; + imageDetails.photoDate = photoDate; + imageDetails.photoUrl = url; + imageDetails.rating = 0; + scaleMe.state = "Details"; + } + + Item { + anchors.centerIn: parent + scale: 0.0 + Behavior on scale { NumberAnimation { easing.type: Easing.InOutQuad} } + id: scaleMe + + Item { + width: 77; height: 77; anchors.centerIn: parent + Rectangle { + id: whiteRect; width: 77; height: 77; color: "#dddddd"; smooth: true + Image { id: thumb; source: imagePath; x: 1; y: 1; smooth: true } + Image { source: "images/gloss.png" } + } + } + + Connections { + target: toolBar + onButton2Clicked: if (scaleMe.state == 'Details' ) scaleMe.state = 'Show' + } + + states: [ + State { + name: "Show"; when: thumb.status == Image.Ready + PropertyChanges { target: scaleMe; scale: 1 } + }, + State { + name: "Details" + PropertyChanges { target: scaleMe; scale: 1 } + ParentChange { target: whiteRect; x: 10; y: 20; parent: imageDetails.frontContainer } + PropertyChanges { target: background; state: "DetailedView" } + } + ] + transitions: [ + Transition { + from: "Show"; to: "Details" + ParentAnimation { + via: foreground + NumberAnimation { properties: "x,y"; duration: 500; easing.type: Easing.InOutQuad } + } + }, + Transition { + from: "Details"; to: "Show" + ParentAnimation { + via: foreground + NumberAnimation { properties: "x,y"; duration: 500; easing.type: Easing.InOutQuad } + } + } + ] + } + MouseArea { anchors.fill: wrapper; onClicked: photoClicked() } +} + diff --git a/examples/qml/flickr/content/ImageDetails.qml b/examples/qml/flickr/content/ImageDetails.qml new file mode 100644 index 0000000000..42b5e845ea --- /dev/null +++ b/examples/qml/flickr/content/ImageDetails.qml @@ -0,0 +1,323 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +Flipable { + id: container + + property alias frontContainer: containerFront + property string photoTitle: "" + property string photoTags: "" + property int photoWidth + property int photoHeight + property string photoType + property string photoAuthor + property string photoDate + property string photoUrl + property int rating: 2 + property variant prevScale: 1.0 + + property int flipDuration: 1600 + + signal closed + + transform: Rotation { + id: itemRotation + origin.x: container.width / 2; + axis.y: 1; axis.z: 0 + } + + front: Item { + id: containerFront; anchors.fill: container + + Rectangle { + anchors.fill: parent + color: "black"; opacity: 0.4 + } + + Column { + spacing: 10 + anchors { + left: parent.left; leftMargin: 10 + right: parent.right; rightMargin: 10 + top: parent.top; topMargin: 120 + } + Text { font.bold: true; color: "white"; elide: Text.ElideRight; text: container.photoTitle; width: parent.width } + Text { color: "white"; elide: Text.ElideRight; text: "Size: " + container.photoWidth + 'x' + container.photoHeight; width: parent.width } + Text { color: "white"; elide: Text.ElideRight; text: "Type: " + container.photoType; width: parent.width } + Text { color: "white"; elide: Text.ElideRight; text: "Author: " + container.photoAuthor; width: parent.width } + Text { color: "white"; elide: Text.ElideRight; text: "Published: " + container.photoDate; width: parent.width } + Text { color: "white"; elide: Text.ElideRight; text: container.photoTags == "" ? "" : "Tags: "; width: parent.width } + Text { color: "white"; elide: Text.ElideRight; text: container.photoTags; width: parent.width } + } + } + + back: Item { + anchors.fill: container + + Rectangle { anchors.fill: parent; color: "black"; opacity: 0.4 } + + Progress { + anchors.centerIn: parent; width: 200; height: 22 + progress: bigImage.progress; visible: bigImage.status != Image.Ready + } + + Flickable { + id: flickable; anchors.fill: parent; clip: true + contentWidth: imageContainer.width; contentHeight: imageContainer.height + + function updateMinimumScale() { + if (bigImage.status == Image.Ready && bigImage.width != 0) { + slider.minimum = Math.min(flickable.width / bigImage.width, flickable.height / bigImage.height); + if (bigImage.width * slider.value > flickable.width) { + var xoff = (flickable.width/2 + flickable.contentX) * slider.value / prevScale; + flickable.contentX = xoff - flickable.width/2; + } + if (bigImage.height * slider.value > flickable.height) { + var yoff = (flickable.height/2 + flickable.contentY) * slider.value / prevScale; + flickable.contentY = yoff - flickable.height/2; + } + prevScale = slider.value; + } + } + + onWidthChanged: updateMinimumScale() + onHeightChanged: updateMinimumScale() + + Item { + id: imageContainer + width: Math.max(bigImage.width * bigImage.scale, flickable.width); + height: Math.max(bigImage.height * bigImage.scale, flickable.height); + Image { + id: bigImage; source: container.photoUrl; scale: slider.value + anchors.centerIn: parent; smooth: !flickable.movingVertically + onStatusChanged : { + // Default scale shows the entire image. + if (bigImage.status == Image.Ready && bigImage.width != 0) { + slider.minimum = Math.min(flickable.width / bigImage.width, flickable.height / bigImage.height); + prevScale = Math.min(slider.minimum, 1); + slider.value = prevScale; + } + if (inBackState && bigImage.status == Image.Ready) + effectBox.imageInAnim(); + } + property bool inBackState: false + onInBackStateChanged:{ + if(inBackState && bigImage.status == Image.Ready) + effectBox.imageInAnim(); + else if (!inBackState && bigImage.status == Image.Ready) + effectBox.imageOutAnim(); + } + } + ShaderEffectSource{ + id: pictureSource + sourceItem: bigImage + smooth: true + //Workaround: Doesn't work below lines + width: bigImage.width + height: bigImage.width + visible: false + } + Turbulence{//only fill visible rect + id: turbulence + system: imageSystem + anchors.fill: parent + strength: 240 + enabled: false + } + + Item{ + id: effectBox + width: bigImage.width * bigImage.scale + height: bigImage.height * bigImage.scale + anchors.centerIn: parent + function imageInAnim(){ + bigImage.visible = false; + noiseIn.visible = true; + endEffectTimer.start(); + } + function imageOutAnim(){ + bigImage.visible = false; + noiseIn.visible = false; + turbulence.enabled = true; + endEffectTimer.start(); + pixelEmitter.burst(2048); + } + Timer{ + id: endEffectTimer + interval: flipDuration + repeat: false + running: false + onTriggered:{ + turbulence.enabled = false; + noiseIn.visible = false; + bigImage.visible = true; + } + } + ShaderEffect{ + id: noiseIn + anchors.fill: parent + property real t: 0 + visible: false + onVisibleChanged: tAnim.start() + NumberAnimation{ + id: tAnim + target: noiseIn + property: "t" + from: 0.0 + to: 1.0 + duration: flipDuration + } + property variant source: pictureSource + property variant noise: ShaderEffectSource{ + sourceItem:Image{ + source: "images/noise.png" + } + hideSource: true + smooth: false + } + fragmentShader:" + uniform sampler2D noise; + uniform sampler2D source; + uniform highp float t; + uniform lowp float qt_Opacity; + varying highp vec2 qt_TexCoord0; + void main(){ + //Want to use noise2, but it always returns (0,0)? + if(texture2D(noise, qt_TexCoord0).w <= t) + gl_FragColor = texture2D(source, qt_TexCoord0) * qt_Opacity; + else + gl_FragColor = vec4(0.,0.,0.,0.); + } + " + } + ParticleSystem{ + id: imageSystem + } + Emitter{ + id: pixelEmitter + system: imageSystem + //anchors.fill: parent + width: Math.min(bigImage.width * bigImage.scale, flickable.width); + height: Math.min(bigImage.height * bigImage.scale, flickable.height); + anchors.centerIn: parent + size: 4 + lifeSpan: flipDuration + emitRate: 2048 + enabled: false + } + CustomParticle{ + id: blowOut + system: imageSystem + property real maxWidth: effectBox.width + property real maxHeight: effectBox.height + vertexShader:" + uniform highp float maxWidth; + uniform highp float maxHeight; + + varying highp vec2 fTex2; + + void main() { + defaultMain(); + fTex2 = vec2(qt_ParticlePos.x / maxWidth, qt_ParticlePos.y / maxHeight); + } + " + property variant pictureTexture: pictureSource + fragmentShader: " + uniform lowp float qt_Opacity; + uniform sampler2D pictureTexture; + varying highp vec2 fTex2; + void main() { + gl_FragColor = texture2D(pictureTexture, fTex2) * qt_Opacity; + }" + } + + + + } + } + } + + Text { + text: "Image Unavailable" + visible: bigImage.status == Image.Error + anchors.centerIn: parent; color: "white"; font.bold: true + } + + Slider { + id: slider; visible: { bigImage.status == Image.Ready && maximum > minimum } + anchors { + bottom: parent.bottom; bottomMargin: 65 + left: parent.left; leftMargin: 25 + right: parent.right; rightMargin: 25 + } + onValueChanged: { + if (bigImage.width * value > flickable.width) { + var xoff = (flickable.width/2 + flickable.contentX) * value / prevScale; + flickable.contentX = xoff - flickable.width/2; + } + if (bigImage.height * value > flickable.height) { + var yoff = (flickable.height/2 + flickable.contentY) * value / prevScale; + flickable.contentY = yoff - flickable.height/2; + } + prevScale = value; + } + } + } + + states: State { + name: "Back" + PropertyChanges { target: itemRotation; angle: 180 } + PropertyChanges { target: toolBar; button2Visible: false } + PropertyChanges { target: toolBar; button1Label: "Back" } + PropertyChanges { target: bigImage; inBackState: true } + } + + transitions: Transition { + SequentialAnimation { + PropertyAction { target: bigImage; property: "smooth"; value: false } + NumberAnimation { easing.type: Easing.InOutQuad; properties: "angle"; duration: flipDuration } + PropertyAction { target: bigImage; property: "smooth"; value: !flickable.movingVertically } + } + } +} diff --git a/examples/qml/flickr/content/ListDelegate.qml b/examples/qml/flickr/content/ListDelegate.qml new file mode 100644 index 0000000000..00f837f862 --- /dev/null +++ b/examples/qml/flickr/content/ListDelegate.qml @@ -0,0 +1,64 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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-li |