diff options
author | David Boddie <dboddie@trolltech.com> | 2010-05-20 13:24:30 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2010-05-20 13:24:30 (GMT) |
commit | ba2cc78943678173d21a4339839e63d16fe774a9 (patch) | |
tree | 691ac2916d5daf948cdac07bc4ef19d08f36cabd /examples/declarative | |
parent | 8f47373e3795d7ec50387d5f1a771a59567bdaea (diff) | |
parent | ef8cd7f2e68d6d34d70c3a12e82a67ed16b92b72 (diff) | |
download | Qt-ba2cc78943678173d21a4339839e63d16fe774a9.zip Qt-ba2cc78943678173d21a4339839e63d16fe774a9.tar.gz Qt-ba2cc78943678173d21a4339839e63d16fe774a9.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'examples/declarative')
52 files changed, 169 insertions, 289 deletions
diff --git a/examples/declarative/cppextensions/cppextensions.pro b/examples/declarative/cppextensions/cppextensions.pro index caa6092..33762fe 100644 --- a/examples/declarative/cppextensions/cppextensions.pro +++ b/examples/declarative/cppextensions/cppextensions.pro @@ -3,8 +3,8 @@ TEMPLATE = subdirs SUBDIRS += \ imageprovider \ plugins \ - proxyviewer \ - proxywidgets \ + networkaccessmanagerfactory \ + qwidgets \ qgraphicslayouts \ referenceexamples diff --git a/examples/declarative/cppextensions/proxyviewer/main.cpp b/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp index 0f814cc..13212ca 100644 --- a/examples/declarative/cppextensions/proxyviewer/main.cpp +++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp @@ -48,11 +48,11 @@ /* - This example illustrates using a QNetworkAccessManagerFactory to + This example illustrates using a QDeclarativeNetworkAccessManagerFactory to create a QNetworkAccessManager with a proxy. Usage: - proxyviewer [-host <proxy> -port <port>] [file] + networkaccessmanagerfactory [-host <proxy> -port <port>] [file] */ static QString proxyHost; @@ -92,7 +92,7 @@ int main(int argc, char ** argv) } else if (arg[0] != '-') { source = QUrl::fromLocalFile(arg); } else { - qWarning() << "Usage: proxyviewer [-host <proxy> -port <port>] [file]"; + qWarning() << "Usage: networkaccessmanagerfactory [-host <proxy> -port <port>] [file]"; exit(1); } } diff --git a/examples/declarative/cppextensions/proxyviewer/proxyviewer.pro b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro index b6bfa7f..74d8db3 100644 --- a/examples/declarative/cppextensions/proxyviewer/proxyviewer.pro +++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro @@ -1,9 +1,9 @@ TEMPLATE = app -TARGET = proxyviewer +TARGET = networkaccessmanagerfactory DEPENDPATH += . INCLUDEPATH += . QT += declarative network # Input SOURCES += main.cpp -RESOURCES += proxyviewer.qrc +RESOURCES += networkaccessmanagerfactory.qrc diff --git a/examples/declarative/toys/velocity/velocity.qmlproject b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject index d4909f8..d4909f8 100644 --- a/examples/declarative/toys/velocity/velocity.qmlproject +++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject diff --git a/examples/declarative/cppextensions/proxyviewer/proxyviewer.qrc b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc index 17e9301..17e9301 100644 --- a/examples/declarative/cppextensions/proxyviewer/proxyviewer.qrc +++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc diff --git a/examples/declarative/cppextensions/proxyviewer/view.qml b/examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml index 7f1bdef..7f1bdef 100644 --- a/examples/declarative/cppextensions/proxyviewer/view.qml +++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml diff --git a/examples/declarative/cppextensions/proxywidgets/README b/examples/declarative/cppextensions/proxywidgets/README deleted file mode 100644 index f50fa22..0000000 --- a/examples/declarative/cppextensions/proxywidgets/README +++ /dev/null @@ -1,4 +0,0 @@ -To run: - - make install - qml proxywidgets.qml diff --git a/examples/declarative/cppextensions/proxywidgets/proxywidgets.cpp b/examples/declarative/cppextensions/proxywidgets/proxywidgets.cpp deleted file mode 100644 index e03b078..0000000 --- a/examples/declarative/cppextensions/proxywidgets/proxywidgets.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QtDeclarative/QDeclarativeExtensionPlugin> -#include <QtDeclarative/qdeclarative.h> -#include <QtGui/QGraphicsProxyWidget> -#include <QtGui/QPushButton> -#include <QDebug> - -class MyPushButton : public QGraphicsProxyWidget -{ - Q_OBJECT - Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged) - -public: - MyPushButton(QGraphicsItem* parent = 0) - : QGraphicsProxyWidget(parent) - { - widget = new QPushButton("MyPushButton"); - widget->setAttribute(Qt::WA_NoSystemBackground); - setWidget(widget); - - QObject::connect(widget, SIGNAL(clicked(bool)), this, SIGNAL(clicked(bool))); - } - - QString text() const - { - return widget->text(); - } - - void setText(const QString& text) - { - if (text != widget->text()) { - widget->setText(text); - emit textChanged(); - } - } - -Q_SIGNALS: - void clicked(bool); - void textChanged(); - -private: - QPushButton *widget; -}; - -class ProxyWidgetsPlugin : public QDeclarativeExtensionPlugin -{ - Q_OBJECT -public: - void registerTypes(const char *uri) - { - qmlRegisterType<MyPushButton>(uri, 1, 0, "MyPushButton"); - } -}; - -#include "proxywidgets.moc" - -Q_EXPORT_PLUGIN2(proxywidgetsplugin, ProxyWidgetsPlugin); diff --git a/examples/declarative/toys/dynamic/dynamic.qmlproject b/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicsLayouts.qmlproject index d4909f8..d4909f8 100644 --- a/examples/declarative/toys/dynamic/dynamic.qmlproject +++ b/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicsLayouts.qmlproject diff --git a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.pro b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.pro index 4a3fc73..c85a400 100644 --- a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.pro +++ b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.pro @@ -1,13 +1,8 @@ -###################################################################### -# Automatically generated by qmake (2.01a) Tue May 4 13:36:26 2010 -###################################################################### - TEMPLATE = app TARGET = DEPENDPATH += . INCLUDEPATH += . QT += declarative -# Input SOURCES += main.cpp RESOURCES += layoutItem.qrc diff --git a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qml b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qml index 460c564..6f91dc9 100644 --- a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qml +++ b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qml @@ -1,15 +1,17 @@ import Qt 4.7 -LayoutItem {//Sized by the layout +LayoutItem { //Sized by the layout id: resizable + minimumSize: "100x100" maximumSize: "300x300" preferredSize: "100x100" + Rectangle { color: "yellow"; anchors.fill: parent } + Rectangle { - width: 100; height: 100; - anchors.top: parent.top; - anchors.right: parent.right; - color: "green"; + width: 100; height: 100 + anchors.top: parent.top; anchors.right: parent.right + color: "green" } } diff --git a/examples/declarative/imageelements/image/image.qmlproject b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qmlproject index d4909f8..d4909f8 100644 --- a/examples/declarative/imageelements/image/image.qmlproject +++ b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qmlproject diff --git a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/main.cpp b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/main.cpp index 3d1a390..ef927d1 100644 --- a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/main.cpp +++ b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/main.cpp @@ -52,6 +52,7 @@ int main(int argc, char* argv[]) { QApplication app(argc, argv); + //Set up a graphics scene with a QGraphicsWidget and Layout QGraphicsView view; QGraphicsScene scene; @@ -60,6 +61,7 @@ int main(int argc, char* argv[]) widget->setLayout(layout); scene.addItem(widget); view.setScene(&scene); + //Add the QML snippet into the layout QDeclarativeEngine engine; QDeclarativeComponent c(&engine, QUrl(":layoutItem.qml")); diff --git a/examples/declarative/cppextensions/proxywidgets/ProxyWidgets/qmldir b/examples/declarative/cppextensions/qwidgets/QWidgets/qmldir index e55267c..e55267c 100644 --- a/examples/declarative/cppextensions/proxywidgets/ProxyWidgets/qmldir +++ b/examples/declarative/cppextensions/qwidgets/QWidgets/qmldir diff --git a/examples/declarative/cppextensions/qwidgets/README b/examples/declarative/cppextensions/qwidgets/README new file mode 100644 index 0000000..e2f1b2b --- /dev/null +++ b/examples/declarative/cppextensions/qwidgets/README @@ -0,0 +1,6 @@ +This example shows how to embed QWidget-based objects into QML. + +To run: + + make install + qml qwidgets.qml diff --git a/examples/declarative/cppextensions/qwidgets/qwidgets.cpp b/examples/declarative/cppextensions/qwidgets/qwidgets.cpp new file mode 100644 index 0000000..228f9f1 --- /dev/null +++ b/examples/declarative/cppextensions/qwidgets/qwidgets.cpp @@ -0,0 +1,97 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtDeclarative/QDeclarativeExtensionPlugin> +#include <QtDeclarative/qdeclarative.h> +#include <QtGui/QGraphicsProxyWidget> +#include <QtGui/QPushButton> +#include <QDebug> + +class MyPushButton : public QGraphicsProxyWidget +{ + Q_OBJECT + Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged) + +public: + MyPushButton(QGraphicsItem* parent = 0) + : QGraphicsProxyWidget(parent) + { + widget = new QPushButton("MyPushButton"); + widget->setAttribute(Qt::WA_NoSystemBackground); + setWidget(widget); + + QObject::connect(widget, SIGNAL(clicked(bool)), this, SIGNAL(clicked(bool))); + } + + QString text() const + { + return widget->text(); + } + + void setText(const QString& text) + { + if (text != widget->text()) { + widget->setText(text); + emit textChanged(); + } + } + +Q_SIGNALS: + void clicked(bool); + void textChanged(); + +private: + QPushButton *widget; +}; + +class QWidgetsPlugin : public QDeclarativeExtensionPlugin +{ + Q_OBJECT +public: + void registerTypes(const char *uri) + { + qmlRegisterType<MyPushButton>(uri, 1, 0, "MyPushButton"); + } +}; + +#include "qwidgets.moc" + +Q_EXPORT_PLUGIN2(qwidgetsplugin, QWidgetsPlugin); diff --git a/examples/declarative/cppextensions/proxywidgets/proxywidgets.pro b/examples/declarative/cppextensions/qwidgets/qwidgets.pro index cb07d80..37f313d 100644 --- a/examples/declarative/cppextensions/proxywidgets/proxywidgets.pro +++ b/examples/declarative/cppextensions/qwidgets/qwidgets.pro @@ -1,12 +1,12 @@ TEMPLATE = lib -DESTDIR = ProxyWidgets -TARGET = proxywidgetsplugin +DESTDIR = QWidgets +TARGET = qwidgetsplugin CONFIG += qt plugin QT += declarative -SOURCES += proxywidgets.cpp +SOURCES += qwidgets.cpp -sources.files += proxywidgets.pro proxywidgets.cpp proxywidgets.qml +sources.files += qwidgets.pro qwidgets.cpp qwidgets.qml sources.path += $$[QT_INSTALL_EXAMPLES]/declarative/plugins @@ -18,4 +18,4 @@ symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) symbian:{ TARGET.EPOCALLOWDLLDATA = 1 -}
\ No newline at end of file +} diff --git a/examples/declarative/cppextensions/proxywidgets/proxywidgets.qml b/examples/declarative/cppextensions/qwidgets/qwidgets.qml index 88de37f..47f9573 100644 --- a/examples/declarative/cppextensions/proxywidgets/proxywidgets.qml +++ b/examples/declarative/cppextensions/qwidgets/qwidgets.qml @@ -1,5 +1,5 @@ import Qt 4.7 -import "ProxyWidgets" 1.0 +import "QWidgets" 1.0 Rectangle { id: window diff --git a/examples/declarative/cppextensions/proxywidgets/proxywidgets.qmlproject b/examples/declarative/cppextensions/qwidgets/qwidgets.qmlproject index d4909f8..d4909f8 100644 --- a/examples/declarative/cppextensions/proxywidgets/proxywidgets.qmlproject +++ b/examples/declarative/cppextensions/qwidgets/qwidgets.qmlproject diff --git a/examples/declarative/imageelements/image/face_fit.qml b/examples/declarative/imageelements/image/face_fit.qml deleted file mode 100644 index 52cd4c2..0000000 --- a/examples/declarative/imageelements/image/face_fit.qml +++ /dev/null @@ -1,26 +0,0 @@ -import Qt 4.7 - -// Here, we implement a hybrid of the "scale to fit" and "scale and crop" -// behaviours which will crop up to 25% from *one* dimension if necessary -// to fully scale the other. This is a realistic algorithm, for example -// when the edges of the image contain less vital information than the -// center - such as a face. -// -Rectangle { - // default size: whole image, unscaled - width: face.width - height: face.height - color: "gray" - clip: true - - Image { - id: face - smooth: true - anchors.centerIn: parent - source: "pics/face.png" - x: (parent.width-width*scale)/2 - y: (parent.height-height*scale)/2 - scale: Math.max(Math.min(parent.width/width*1.333,parent.height/height), - Math.min(parent.width/width,parent.height/height*1.333)) - } -} diff --git a/examples/declarative/imageelements/image/face_fit_animated.qml b/examples/declarative/imageelements/image/face_fit_animated.qml deleted file mode 100644 index 63fc9c6..0000000 --- a/examples/declarative/imageelements/image/face_fit_animated.qml +++ /dev/null @@ -1,28 +0,0 @@ -import Qt 4.7 - -// Here, we extend the "face_fit" example with animation to show how truly -// diverse and usage-specific behaviours are made possible by NOT putting a -// hard-coded aspect ratio feature into the Image primitive. -// -Rectangle { - // default size: whole image, unscaled - width: face.width - height: face.height - color: "gray" - clip: true - - Image { - id: face - smooth: true - anchors.centerIn: parent - source: "pics/face.png" - x: (parent.width-width*scale)/2 - y: (parent.height-height*scale)/2 - SpringFollow on scale { - to: Math.max(Math.min(face.parent.width/face.width*1.333,face.parent.height/face.height), - Math.min(face.parent.width/face.width,face.parent.height/face.height*1.333)) - spring: 1 - damping: 0.05 - } - } -} diff --git a/examples/declarative/imageelements/image/pics/face.png b/examples/declarative/imageelements/image/pics/face.png Binary files differdeleted file mode 100644 index 3d66d72..0000000 --- a/examples/declarative/imageelements/image/pics/face.png +++ /dev/null diff --git a/examples/declarative/imageelements/image/scale_and_crop.qml b/examples/declarative/imageelements/image/scale_and_crop.qml deleted file mode 100644 index a438104..0000000 --- a/examples/declarative/imageelements/image/scale_and_crop.qml +++ /dev/null @@ -1,21 +0,0 @@ -import Qt 4.7 - -// Here, we implement "Scale and Crop" behaviour. -// -Rectangle { - // default size: whole image, unscaled - width: face.width - height: face.height - color: "gray" - clip: true - - Image { - id: face - smooth: true - anchors.centerIn: parent - source: "pics/face.png" - x: (parent.width-width*scale)/2 - y: (parent.height-height*scale)/2 - scale: Math.max(parent.width/width,parent.height/height) - } -} diff --git a/examples/declarative/imageelements/image/scale_and_crop_simple.qml b/examples/declarative/imageelements/image/scale_and_crop_simple.qml deleted file mode 100644 index 1160ec5..0000000 --- a/examples/declarative/imageelements/image/scale_and_crop_simple.qml +++ /dev/null @@ -1,20 +0,0 @@ -import Qt 4.7 - -// Here, we implement "Scale to Fit" behaviour, using the -// fillMode property. -// -Rectangle { - // default size: whole image, unscaled - width: face.width - height: face.height - color: "gray" - clip: true - - Image { - id: face - smooth: true - source: "pics/face.png" - fillMode: Image.PreserveAspectCrop - anchors.fill: parent - } -} diff --git a/examples/declarative/imageelements/image/scale_and_sidecrop.qml b/examples/declarative/imageelements/image/scale_and_sidecrop.qml deleted file mode 100644 index 5593ab8..0000000 --- a/examples/declarative/imageelements/image/scale_and_sidecrop.qml +++ /dev/null @@ -1,22 +0,0 @@ -import Qt 4.7 - -// Here, we implement a variant of "Scale and Crop" behaviour, where we -// crop the sides if necessary to fully fit vertically, but not the reverse. -// -Rectangle { - // default size: whole image, unscaled - width: face.width - height: face.height - color: "gray" - clip: true - - Image { - id: face - smooth: true - anchors.centerIn: parent - source: "pics/face.png" - x: (parent.width-width*scale)/2 - y: (parent.height-height*scale)/2 - scale: parent.height/height - } -} diff --git a/examples/declarative/imageelements/image/scale_to_fit.qml b/examples/declarative/imageelements/image/scale_to_fit.qml deleted file mode 100644 index 724a36e..0000000 --- a/examples/declarative/imageelements/image/scale_to_fit.qml +++ /dev/null @@ -1,22 +0,0 @@ -import Qt 4.7 - -// Here, we implement "Scale to Fit" behaviour "manually", rather -// than using the preserveAspect property. -// -Rectangle { - // default size: whole image, unscaled - width: face.width - height: face.height - color: "gray" - clip: true - - Image { - id: face - smooth: true - anchors.centerIn: parent - source: "pics/face.png" - x: (parent.width-width*scale)/2 - y: (parent.height-height*scale)/2 - scale: Math.min(parent.width/width,parent.height/height) - } -} diff --git a/examples/declarative/imageelements/image/scale_to_fit_simple.qml b/examples/declarative/imageelements/image/scale_to_fit_simple.qml deleted file mode 100644 index 0e960b4..0000000 --- a/examples/declarative/imageelements/image/scale_to_fit_simple.qml +++ /dev/null @@ -1,20 +0,0 @@ -import Qt 4.7 - -// Here, we implement "Scale to Fit" behaviour, using the -// fillMode property. -// -Rectangle { - // default size: whole image, unscaled - width: face.width - height: face.height - color: "gray" - clip: true - - Image { - id: face - smooth: true - source: "pics/face.png" - fillMode: Image.PreserveAspectFit - anchors.fill: parent - } -} diff --git a/examples/declarative/toys/velocity/Day.qml b/examples/declarative/toys/corkboards/Day.qml index 350c1c4..350c1c4 100644 --- a/examples/declarative/toys/velocity/Day.qml +++ b/examples/declarative/toys/corkboards/Day.qml diff --git a/examples/declarative/toys/velocity/cork.jpg b/examples/declarative/toys/corkboards/cork.jpg Binary files differindex 160bc00..160bc00 100644 --- a/examples/declarative/toys/velocity/cork.jpg +++ b/examples/declarative/toys/corkboards/cork.jpg diff --git a/examples/declarative/toys/velocity/velocity.qml b/examples/declarative/toys/corkboards/corkboards.qml index 871bafc..871bafc 100644 --- a/examples/declarative/toys/velocity/velocity.qml +++ b/examples/declarative/toys/corkboards/corkboards.qml diff --git a/examples/declarative/toys/corkboards/corkboards.qmlproject b/examples/declarative/toys/corkboards/corkboards.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/toys/corkboards/corkboards.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} diff --git a/examples/declarative/toys/velocity/note-yellow.png b/examples/declarative/toys/corkboards/note-yellow.png Binary files differindex 8ddecc8..8ddecc8 100644 --- a/examples/declarative/toys/velocity/note-yellow.png +++ b/examples/declarative/toys/corkboards/note-yellow.png diff --git a/examples/declarative/toys/velocity/tack.png b/examples/declarative/toys/corkboards/tack.png Binary files differindex cef2d1c..cef2d1c 100644 --- a/examples/declarative/toys/velocity/tack.png +++ b/examples/declarative/toys/corkboards/tack.png diff --git a/examples/declarative/toys/dynamic/dynamic.qml b/examples/declarative/toys/dynamicscene/dynamicscene.qml index 52c7c1e..52c7c1e 100644 --- a/examples/declarative/toys/dynamic/dynamic.qml +++ b/examples/declarative/toys/dynamicscene/dynamicscene.qml diff --git a/examples/declarative/toys/dynamicscene/dynamicscene.qmlproject b/examples/declarative/toys/dynamicscene/dynamicscene.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/toys/dynamicscene/dynamicscene.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} diff --git a/examples/declarative/toys/dynamic/images/NOTE b/examples/declarative/toys/dynamicscene/images/NOTE index fcd87f9..fcd87f9 100644 --- a/examples/declarative/toys/dynamic/images/NOTE +++ b/examples/declarative/toys/dynamicscene/images/NOTE diff --git a/examples/declarative/toys/dynamic/images/face-smile.png b/examples/declarative/toys/dynamicscene/images/face-smile.png Binary files differindex 3d66d72..3d66d72 100644 --- a/examples/declarative/toys/dynamic/images/face-smile.png +++ b/examples/declarative/toys/dynamicscene/images/face-smile.png diff --git a/examples/declarative/toys/dynamic/images/moon.png b/examples/declarative/toys/dynamicscene/images/moon.png Binary files differindex 1c0d606..1c0d606 100644 --- a/examples/declarative/toys/dynamic/images/moon.png +++ b/examples/declarative/toys/dynamicscene/images/moon.png diff --git a/examples/declarative/toys/dynamic/images/rabbit_brown.png b/examples/declarative/toys/dynamicscene/images/rabbit_brown.png Binary files differindex ebfdeed..ebfdeed 100644 --- a/examples/declarative/toys/dynamic/images/rabbit_brown.png +++ b/examples/declarative/toys/dynamicscene/images/rabbit_brown.png diff --git a/examples/declarative/toys/dynamic/images/rabbit_bw.png b/examples/declarative/toys/dynamicscene/images/rabbit_bw.png Binary files differindex 7bff9b9..7bff9b9 100644 --- a/examples/declarative/toys/dynamic/images/rabbit_bw.png +++ b/examples/declarative/toys/dynamicscene/images/rabbit_bw.png diff --git a/examples/declarative/toys/dynamic/images/star.png b/examples/declarative/toys/dynamicscene/images/star.png Binary files differindex 27ef924..27ef924 100644 --- a/examples/declarative/toys/dynamic/images/star.png +++ b/examples/declarative/toys/dynamicscene/images/star.png diff --git a/examples/declarative/toys/dynamic/images/sun.png b/examples/declarative/toys/dynamicscene/images/sun.png Binary files differindex 7713ca5..7713ca5 100644 --- a/examples/declarative/toys/dynamic/images/sun.png +++ b/examples/declarative/toys/dynamicscene/images/sun.png diff --git a/examples/declarative/toys/dynamic/images/tree_s.png b/examples/declarative/toys/dynamicscene/images/tree_s.png Binary files differindex 6eac35a..6eac35a 100644 --- a/examples/declarative/toys/dynamic/images/tree_s.png +++ b/examples/declarative/toys/dynamicscene/images/tree_s.png diff --git a/examples/declarative/toys/dynamic/qml/Button.qml b/examples/declarative/toys/dynamicscene/qml/Button.qml index 963a850..963a850 100644 --- a/examples/declarative/toys/dynamic/qml/Button.qml +++ b/examples/declarative/toys/dynamicscene/qml/Button.qml diff --git a/examples/declarative/toys/dynamic/qml/PaletteItem.qml b/examples/declarative/toys/dynamicscene/qml/PaletteItem.qml index dcb5cc3..dcb5cc3 100644 --- a/examples/declarative/toys/dynamic/qml/PaletteItem.qml +++ b/examples/declarative/toys/dynamicscene/qml/PaletteItem.qml diff --git a/examples/declarative/toys/dynamic/qml/PerspectiveItem.qml b/examples/declarative/toys/dynamicscene/qml/PerspectiveItem.qml index c04d3dc..c04d3dc 100644 --- a/examples/declarative/toys/dynamic/qml/PerspectiveItem.qml +++ b/examples/declarative/toys/dynamicscene/qml/PerspectiveItem.qml diff --git a/examples/declarative/toys/dynamic/qml/Sun.qml b/examples/declarative/toys/dynamicscene/qml/Sun.qml index 43dcb9a..43dcb9a 100644 --- a/examples/declarative/toys/dynamic/qml/Sun.qml +++ b/examples/declarative/toys/dynamicscene/qml/Sun.qml diff --git a/examples/declarative/toys/dynamic/qml/itemCreation.js b/examples/declarative/toys/dynamicscene/qml/itemCreation.js index 59750f3..f92dd15 100644 --- a/examples/declarative/toys/dynamic/qml/itemCreation.js +++ b/examples/declarative/toys/dynamicscene/qml/itemCreation.js @@ -36,7 +36,7 @@ function createItem() { } else if (itemComponent.status == Component.Error) { draggedItem = null; console.log("error creating component"); - console.log(component.errorsString()); + console.log(component.errorString()); } } diff --git a/examples/declarative/tutorials/extending/chapter5-plugins/chapter5-plugins.pro b/examples/declarative/tutorials/extending/chapter5-plugins/chapter5-plugins.pro index 7ec68e9..a8fb565 100644 --- a/examples/declarative/tutorials/extending/chapter5-plugins/chapter5-plugins.pro +++ b/examples/declarative/tutorials/extending/chapter5-plugins/chapter5-plugins.pro @@ -13,3 +13,8 @@ SOURCES += musician.cpp \ DESTDIR = lib OBJECTS_DIR = tmp MOC_DIR = tmp + +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.EPOCALLOWDLLDATA = 1 +} diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.js b/examples/declarative/tutorials/samegame/samegame2/samegame.js index 0dbe6a6..c749dc1 100644 --- a/examples/declarative/tutorials/samegame/samegame2/samegame.js +++ b/examples/declarative/tutorials/samegame/samegame2/samegame.js @@ -44,7 +44,7 @@ function createBlock(column, row) { var dynamicObject = component.createObject(background); if (dynamicObject == null) { console.log("error creating block"); - console.log(component.errorsString()); + console.log(component.errorString()); return false; } dynamicObject.x = column * blockSize; @@ -54,7 +54,7 @@ function createBlock(column, row) { board[index(column, row)] = dynamicObject; } else { console.log("error loading block component"); - console.log(component.errorsString()); + console.log(component.errorString()); return false; } return true; diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.js b/examples/declarative/tutorials/samegame/samegame3/samegame.js index 3e97264..df5bdfb 100644 --- a/examples/declarative/tutorials/samegame/samegame3/samegame.js +++ b/examples/declarative/tutorials/samegame/samegame3/samegame.js @@ -41,7 +41,7 @@ function createBlock(column, row) { var dynamicObject = component.createObject(gameCanvas); if (dynamicObject == null) { console.log("error creating block"); - console.log(component.errorsString()); + console.log(component.errorString()); return false; } dynamicObject.type = Math.floor(Math.random() * 3); @@ -52,7 +52,7 @@ function createBlock(column, row) { board[index(column, row)] = dynamicObject; } else { console.log("error loading block component"); - console.log(component.errorsString()); + console.log(component.errorString()); return false; } return true; diff --git a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js index 0505b8d..930a3d8 100755 --- a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js +++ b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js @@ -52,7 +52,7 @@ function createBlock(column, row) { var dynamicObject = component.createObject(gameCanvas); if (dynamicObject == null) { console.log("error creating block"); - console.log(component.errorsString()); + console.log(component.errorString()); return false; } dynamicObject.type = Math.floor(Math.random() * 3); @@ -65,7 +65,7 @@ function createBlock(column, row) { board[index(column, row)] = dynamicObject; } else { console.log("error loading block component"); - console.log(component.errorsString()); + console.log(component.errorString()); return false; } return true; |