aboutsummaryrefslogtreecommitdiffstats
path: root/examples/declarative/qtquick1/cppextensions/referenceexamples
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/qtquick1/cppextensions/referenceexamples')
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/adding/adding.pro15
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/adding/adding.qrc5
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/adding/example.qml48
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/adding/main.cpp64
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/adding/person.cpp68
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/adding/person.h65
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/attached/attached.pro17
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/attached/attached.qrc5
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/attached/birthdayparty.cpp91
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/attached/birthdayparty.h86
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/attached/example.qml71
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/attached/main.cpp90
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/attached/person.cpp118
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/attached/person.h105
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/binding/binding.pro19
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/binding/binding.qrc5
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/binding/birthdayparty.cpp113
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/binding/birthdayparty.h102
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/binding/example.qml77
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/binding/happybirthdaysong.cpp85
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/binding/happybirthdaysong.h74
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/binding/main.cpp92
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/binding/person.cpp138
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/binding/person.h113
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/birthdayparty.cpp71
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/birthdayparty.h69
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/coercion.pro17
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/coercion.qrc5
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/example.qml55
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/main.cpp77
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/person.cpp79
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/person.h82
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/default/birthdayparty.cpp71
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/default/birthdayparty.h70
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/default/default.pro17
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/default/default.qrc5
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/default/example.qml54
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/default/main.cpp75
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/default/person.cpp78
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/default/person.h77
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/extended/example.qml47
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/extended/extended.pro15
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/extended/extended.qrc5
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/extended/lineedit.cpp103
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/extended/lineedit.h73
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/extended/main.cpp64
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/birthdayparty.cpp71
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/birthdayparty.h69
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/example.qml73
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/grouped.pro17
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/grouped.qrc5
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/main.cpp85
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/person.cpp118
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/person.h107
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/methods/birthdayparty.cpp80
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/methods/birthdayparty.h71
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/methods/example.qml58
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/methods/main.cpp68
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/methods/methods.pro18
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/methods/methods.qrc5
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/methods/person.cpp66
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/methods/person.h63
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/properties/birthdayparty.cpp73
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/properties/birthdayparty.h75
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/properties/example.qml55
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/properties/main.cpp68
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/properties/person.cpp66
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/properties/person.h63
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/properties/properties.pro18
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/properties/properties.qrc5
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/referenceexamples.pro14
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/referenceexamples.qmlproject14
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/signal/birthdayparty.cpp98
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/signal/birthdayparty.h92
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/signal/example.qml72
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/signal/main.cpp91
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/signal/person.cpp118
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/signal/person.h105
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/signal/signal.pro17
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/signal/signal.qrc5
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/birthdayparty.cpp108
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/birthdayparty.h97
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/example.qml76
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp80
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/happybirthdaysong.h79
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/main.cpp93
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/person.cpp118
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/person.h105
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/valuesource.pro19
-rw-r--r--examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/valuesource.qrc5
90 files changed, 0 insertions, 5678 deletions
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/adding/adding.pro b/examples/declarative/qtquick1/cppextensions/referenceexamples/adding/adding.pro
deleted file mode 100644
index b830a88798..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/adding/adding.pro
+++ /dev/null
@@ -1,15 +0,0 @@
-TEMPLATE = app
-TARGET = adding
-DEPENDPATH += .
-INCLUDEPATH += .
-QT += declarative
-
-# Input
-SOURCES += main.cpp \
- person.cpp
-HEADERS += person.h
-RESOURCES += adding.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/adding
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS adding.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/adding
-INSTALLS += target sources
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/adding/adding.qrc b/examples/declarative/qtquick1/cppextensions/referenceexamples/adding/adding.qrc
deleted file mode 100644
index e2fa01d5e7..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/adding/adding.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>example.qml</file>
-</qresource>
-</RCC>
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/adding/example.qml b/examples/declarative/qtquick1/cppextensions/referenceexamples/adding/example.qml
deleted file mode 100644
index 3b2ca34d10..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/adding/example.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-
-// ![0]
-import People 1.0
-
-Person {
- name: "Bob Jones"
- shoeSize: 12
-}
-// ![0]
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/adding/main.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/adding/main.cpp
deleted file mode 100644
index 4c1918b6de..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/adding/main.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
-**
-** 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 <QCoreApplication>
-#include <QDeclarativeEngine>
-#include <QDeclarativeComponent>
-#include <QDebug>
-#include "person.h"
-
-int main(int argc, char ** argv)
-{
- QCoreApplication app(argc, argv);
-//![0]
- qmlRegisterType<Person>("People", 1,0, "Person");
-//![0]
-
- QDeclarativeEngine engine;
- QDeclarativeComponent component(&engine, QUrl("qrc:example.qml"));
- Person *person = qobject_cast<Person *>(component.create());
- if (person) {
- qWarning() << "The person's name is" << person->name();
- qWarning() << "They wear a" << person->shoeSize() << "sized shoe";
- } else {
- qWarning() << component.errors();
- }
-
- return 0;
-}
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/adding/person.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/adding/person.cpp
deleted file mode 100644
index 0e78b0b77b..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/adding/person.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** 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 "person.h"
-
-// ![0]
-Person::Person(QObject *parent)
-: QObject(parent), m_shoeSize(0)
-{
-}
-
-QString Person::name() const
-{
- return m_name;
-}
-
-void Person::setName(const QString &n)
-{
- m_name = n;
-}
-
-int Person::shoeSize() const
-{
- return m_shoeSize;
-}
-
-void Person::setShoeSize(int s)
-{
- m_shoeSize = s;
-}
-
-// ![0]
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/adding/person.h b/examples/declarative/qtquick1/cppextensions/referenceexamples/adding/person.h
deleted file mode 100644
index 896bf4bd52..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/adding/person.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#ifndef PERSON_H
-#define PERSON_H
-
-#include <QObject>
-// ![0]
-class Person : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString name READ name WRITE setName)
- Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
-public:
- Person(QObject *parent = 0);
-
- QString name() const;
- void setName(const QString &);
-
- int shoeSize() const;
- void setShoeSize(int);
-
-private:
- QString m_name;
- int m_shoeSize;
-};
-// ![0]
-
-#endif // PERSON_H
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/attached.pro b/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/attached.pro
deleted file mode 100644
index 3843528c50..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/attached.pro
+++ /dev/null
@@ -1,17 +0,0 @@
-TEMPLATE = app
-TARGET = attached
-DEPENDPATH += .
-INCLUDEPATH += .
-QT += declarative
-
-# Input
-SOURCES += main.cpp \
- person.cpp \
- birthdayparty.cpp
-HEADERS += person.h \
- birthdayparty.h
-RESOURCES += attached.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/attached
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS attached.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/attached
-INSTALLS += target sources
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/attached.qrc b/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/attached.qrc
deleted file mode 100644
index e2fa01d5e7..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/attached.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>example.qml</file>
-</qresource>
-</RCC>
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/birthdayparty.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/birthdayparty.cpp
deleted file mode 100644
index 5916d0389d..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/birthdayparty.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-**
-** 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 "birthdayparty.h"
-
-BirthdayPartyAttached::BirthdayPartyAttached(QObject *object)
-: QObject(object)
-{
-}
-
-QDate BirthdayPartyAttached::rsvp() const
-{
- return m_rsvp;
-}
-
-void BirthdayPartyAttached::setRsvp(const QDate &d)
-{
- m_rsvp = d;
-}
-
-BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_host(0)
-{
-}
-
-Person *BirthdayParty::host() const
-{
- return m_host;
-}
-
-void BirthdayParty::setHost(Person *c)
-{
- m_host = c;
-}
-
-QDeclarativeListProperty<Person> BirthdayParty::guests()
-{
- return QDeclarativeListProperty<Person>(this, m_guests);
-}
-
-int BirthdayParty::guestCount() const
-{
- return m_guests.count();
-}
-
-Person *BirthdayParty::guest(int index) const
-{
- return m_guests.at(index);
-}
-
-BirthdayPartyAttached *BirthdayParty::qmlAttachedProperties(QObject *object)
-{
- return new BirthdayPartyAttached(object);
-}
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/birthdayparty.h b/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/birthdayparty.h
deleted file mode 100644
index 02e9593b8b..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/birthdayparty.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#ifndef BIRTHDAYPARTY_H
-#define BIRTHDAYPARTY_H
-
-#include <QObject>
-#include <QDate>
-#include <qdeclarative.h>
-#include "person.h"
-
-class BirthdayPartyAttached : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp)
-public:
- BirthdayPartyAttached(QObject *object);
-
- QDate rsvp() const;
- void setRsvp(const QDate &);
-
-private:
- QDate m_rsvp;
-};
-
-class BirthdayParty : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(Person *host READ host WRITE setHost)
- Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
- Q_CLASSINFO("DefaultProperty", "guests")
-public:
- BirthdayParty(QObject *parent = 0);
-
- Person *host() const;
- void setHost(Person *);
-
- QDeclarativeListProperty<Person> guests();
- int guestCount() const;
- Person *guest(int) const;
-
- static BirthdayPartyAttached *qmlAttachedProperties(QObject *);
-private:
- Person *m_host;
- QList<Person *> m_guests;
-};
-
-QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES)
-
-#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/example.qml b/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/example.qml
deleted file mode 100644
index d09d451f24..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/example.qml
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** 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 People 1.0
-
-BirthdayParty {
- host: Boy {
- name: "Bob Jones"
- shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 }
- }
-
- // ![1]
- Boy {
- name: "Leo Hodges"
- shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 }
-
- BirthdayParty.rsvp: "2009-07-06"
- }
- // ![1]
- Boy {
- name: "Jack Smith"
- shoe { size: 8; color: "blue"; brand: "Puma"; price: 19.95 }
- }
- Girl {
- name: "Anne Brown"
- shoe.size: 7
- shoe.color: "red"
- shoe.brand: "Marc Jacobs"
- shoe.price: 699.99
-
- BirthdayParty.rsvp: "2009-07-01"
- }
-}
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/main.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/main.cpp
deleted file mode 100644
index b92614a15d..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/main.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
-**
-** 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 <QCoreApplication>
-#include <QDeclarativeEngine>
-#include <QDeclarativeComponent>
-#include <QDebug>
-#include "birthdayparty.h"
-#include "person.h"
-
-int main(int argc, char ** argv)
-{
- QCoreApplication app(argc, argv);
-
- qmlRegisterType<BirthdayPartyAttached>();
- qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
- qmlRegisterType<ShoeDescription>();
- qmlRegisterType<Person>();
- qmlRegisterType<Boy>("People", 1,0, "Boy");
- qmlRegisterType<Girl>("People", 1,0, "Girl");
-
- QDeclarativeEngine engine;
- QDeclarativeComponent component(&engine, QUrl("qrc:example.qml"));
- BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
-
- if (party && party->host()) {
- qWarning() << party->host()->name() << "is having a birthday!";
-
- if (qobject_cast<Boy *>(party->host()))
- qWarning() << "He is inviting:";
- else
- qWarning() << "She is inviting:";
-
- for (int ii = 0; ii < party->guestCount(); ++ii) {
- Person *guest = party->guest(ii);
-
- QDate rsvpDate;
- QObject *attached =
- qmlAttachedPropertiesObject<BirthdayParty>(guest, false);
- if (attached)
- rsvpDate = attached->property("rsvp").toDate();
-
- if (rsvpDate.isNull())
- qWarning() << " " << guest->name() << "RSVP date: Hasn't RSVP'd";
- else
- qWarning() << " " << guest->name() << "RSVP date:" << qPrintable(rsvpDate.toString());
- }
-
- } else {
- qWarning() << component.errors();
- }
-
- return 0;
-}
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/person.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/person.cpp
deleted file mode 100644
index 7afcdc6ca6..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/person.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-/****************************************************************************
-**
-** 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 "person.h"
-
-ShoeDescription::ShoeDescription(QObject *parent)
-: QObject(parent), m_size(0), m_price(0)
-{
-}
-
-int ShoeDescription::size() const
-{
- return m_size;
-}
-
-void ShoeDescription::setSize(int s)
-{
- m_size = s;
-}
-
-QColor ShoeDescription::color() const
-{
- return m_color;
-}
-
-void ShoeDescription::setColor(const QColor &c)
-{
- m_color = c;
-}
-
-QString ShoeDescription::brand() const
-{
- return m_brand;
-}
-
-void ShoeDescription::setBrand(const QString &b)
-{
- m_brand = b;
-}
-
-qreal ShoeDescription::price() const
-{
- return m_price;
-}
-
-void ShoeDescription::setPrice(qreal p)
-{
- m_price = p;
-}
-
-Person::Person(QObject *parent)
-: QObject(parent)
-{
-}
-
-QString Person::name() const
-{
- return m_name;
-}
-
-void Person::setName(const QString &n)
-{
- m_name = n;
-}
-
-ShoeDescription *Person::shoe()
-{
- return &m_shoe;
-}
-
-
-Boy::Boy(QObject * parent)
-: Person(parent)
-{
-}
-
-
-Girl::Girl(QObject * parent)
-: Person(parent)
-{
-}
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/person.h b/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/person.h
deleted file mode 100644
index 032eca3c17..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/attached/person.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#ifndef PERSON_H
-#define PERSON_H
-
-#include <QObject>
-#include <QColor>
-
-class ShoeDescription : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(int size READ size WRITE setSize)
- Q_PROPERTY(QColor color READ color WRITE setColor)
- Q_PROPERTY(QString brand READ brand WRITE setBrand)
- Q_PROPERTY(qreal price READ price WRITE setPrice)
-public:
- ShoeDescription(QObject *parent = 0);
-
- int size() const;
- void setSize(int);
-
- QColor color() const;
- void setColor(const QColor &);
-
- QString brand() const;
- void setBrand(const QString &);
-
- qreal price() const;
- void setPrice(qreal);
-private:
- int m_size;
- QColor m_color;
- QString m_brand;
- qreal m_price;
-};
-
-class Person : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString name READ name WRITE setName)
- Q_PROPERTY(ShoeDescription *shoe READ shoe)
-public:
- Person(QObject *parent = 0);
-
- QString name() const;
- void setName(const QString &);
-
- ShoeDescription *shoe();
-private:
- QString m_name;
- ShoeDescription m_shoe;
-};
-
-class Boy : public Person
-{
- Q_OBJECT
-public:
- Boy(QObject * parent = 0);
-};
-
-class Girl : public Person
-{
- Q_OBJECT
-public:
- Girl(QObject * parent = 0);
-};
-
-#endif // PERSON_H
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/binding.pro b/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/binding.pro
deleted file mode 100644
index f1e38a9b5e..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/binding.pro
+++ /dev/null
@@ -1,19 +0,0 @@
-TEMPLATE = app
-TARGET = binding
-DEPENDPATH += .
-INCLUDEPATH += .
-QT += declarative
-
-# Input
-SOURCES += main.cpp \
- person.cpp \
- birthdayparty.cpp \
- happybirthdaysong.cpp
-HEADERS += person.h \
- birthdayparty.h \
- happybirthdaysong.h
-RESOURCES += binding.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/binding
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS binding.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/binding
-INSTALLS += target sources
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/binding.qrc b/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/binding.qrc
deleted file mode 100644
index e2fa01d5e7..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/binding.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>example.qml</file>
-</qresource>
-</RCC>
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/birthdayparty.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/birthdayparty.cpp
deleted file mode 100644
index 682647aea6..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/birthdayparty.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-/****************************************************************************
-**
-** 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 "birthdayparty.h"
-
-BirthdayPartyAttached::BirthdayPartyAttached(QObject *object)
-: QObject(object)
-{
-}
-
-QDate BirthdayPartyAttached::rsvp() const
-{
- return m_rsvp;
-}
-
-void BirthdayPartyAttached::setRsvp(const QDate &d)
-{
- if (d != m_rsvp) {
- m_rsvp = d;
- emit rsvpChanged();
- }
-}
-
-
-BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_host(0)
-{
-}
-
-Person *BirthdayParty::host() const
-{
- return m_host;
-}
-
-void BirthdayParty::setHost(Person *c)
-{
- if (c == m_host) return;
- m_host = c;
- emit hostChanged();
-}
-
-QDeclarativeListProperty<Person> BirthdayParty::guests()
-{
- return QDeclarativeListProperty<Person>(this, m_guests);
-}
-
-int BirthdayParty::guestCount() const
-{
- return m_guests.count();
-}
-
-Person *BirthdayParty::guest(int index) const
-{
- return m_guests.at(index);
-}
-
-void BirthdayParty::startParty()
-{
- QTime time = QTime::currentTime();
- emit partyStarted(time);
-}
-
-QString BirthdayParty::announcement() const
-{
- return QString();
-}
-
-void BirthdayParty::setAnnouncement(const QString &speak)
-{
- qWarning() << qPrintable(speak);
-}
-
-BirthdayPartyAttached *BirthdayParty::qmlAttachedProperties(QObject *object)
-{
- return new BirthdayPartyAttached(object);
-}
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/birthdayparty.h b/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/birthdayparty.h
deleted file mode 100644
index 376d107f26..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/birthdayparty.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#ifndef BIRTHDAYPARTY_H
-#define BIRTHDAYPARTY_H
-
-#include <QObject>
-#include <QDate>
-#include <QDebug>
-#include <qdeclarative.h>
-#include "person.h"
-
-class BirthdayPartyAttached : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp NOTIFY rsvpChanged)
-public:
- BirthdayPartyAttached(QObject *object);
-
- QDate rsvp() const;
- void setRsvp(const QDate &);
-
-signals:
- void rsvpChanged();
-
-private:
- QDate m_rsvp;
-};
-
-class BirthdayParty : public QObject
-{
- Q_OBJECT
-// ![0]
- Q_PROPERTY(Person *host READ host WRITE setHost NOTIFY hostChanged)
-// ![0]
- Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
- Q_PROPERTY(QString announcement READ announcement WRITE setAnnouncement)
- Q_CLASSINFO("DefaultProperty", "guests")
-public:
- BirthdayParty(QObject *parent = 0);
-
- Person *host() const;
- void setHost(Person *);
-
- QDeclarativeListProperty<Person> guests();
- int guestCount() const;
- Person *guest(int) const;
-
- QString announcement() const;
- void setAnnouncement(const QString &);
-
- static BirthdayPartyAttached *qmlAttachedProperties(QObject *);
-
- void startParty();
-signals:
- void partyStarted(const QTime &time);
- void hostChanged();
-
-private:
- Person *m_host;
- QList<Person *> m_guests;
-};
-
-QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES)
-
-#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/example.qml b/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/example.qml
deleted file mode 100644
index 99a0098ff6..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/example.qml
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** 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 People 1.0
-
-// ![0]
-BirthdayParty {
- id: theParty
-
- HappyBirthdaySong on announcement { name: theParty.host.name }
-
- host: Boy {
- name: "Bob Jones"
- shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 }
- }
-// ![0]
- onPartyStarted: console.log("This party started rockin' at " + time);
-
-
- Boy {
- name: "Leo Hodges"
- BirthdayParty.rsvp: "2009-07-06"
- shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 }
- }
- Boy {
- name: "Jack Smith"
- shoe { size: 8; color: "blue"; brand: "Puma"; price: 19.95 }
- }
- Girl {
- name: "Anne Brown"
- BirthdayParty.rsvp: "2009-07-01"
- shoe.size: 7
- shoe.color: "red"
- shoe.brand: "Marc Jacobs"
- shoe.price: 699.99
- }
-
-// ![1]
-}
-// ![1]
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/happybirthdaysong.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/happybirthdaysong.cpp
deleted file mode 100644
index 5738e9a5ae..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/happybirthdaysong.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** 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 "happybirthdaysong.h"
-#include <QTimer>
-
-HappyBirthdaySong::HappyBirthdaySong(QObject *parent)
-: QObject(parent), m_line(-1)
-{
- setName(QString());
- QTimer *timer = new QTimer(this);
- QObject::connect(timer, SIGNAL(timeout()), this, SLOT(advance()));
- timer->start(1000);
-}
-
-void HappyBirthdaySong::setTarget(const QDeclarativeProperty &p)
-{
- m_target = p;
-}
-
-QString HappyBirthdaySong::name() const
-{
- return m_name;
-}
-
-void HappyBirthdaySong::setName(const QString &name)
-{
- if (m_name == name)
- return;
-
- m_name = name;
-
- m_lyrics.clear();
- m_lyrics << "Happy birthday to you,";
- m_lyrics << "Happy birthday to you,";
- m_lyrics << "Happy birthday dear " + m_name + ",";
- m_lyrics << "Happy birthday to you!";
- m_lyrics << "";
-
- emit nameChanged();
-}
-
-void HappyBirthdaySong::advance()
-{
- m_line = (m_line + 1) % m_lyrics.count();
-
- m_target.write(m_lyrics.at(m_line));
-}
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/happybirthdaysong.h b/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/happybirthdaysong.h
deleted file mode 100644
index a9f3a94544..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/happybirthdaysong.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#ifndef HAPPYBIRTHDAYSONG_H
-#define HAPPYBIRTHDAYSONG_H
-
-#include <QDeclarativePropertyValueSource>
-#include <QDeclarativeProperty>
-
-#include <QStringList>
-
-class HappyBirthdaySong : public QObject, public QDeclarativePropertyValueSource
-{
- Q_OBJECT
- Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
- Q_INTERFACES(QDeclarativePropertyValueSource)
-public:
- HappyBirthdaySong(QObject *parent = 0);
-
- virtual void setTarget(const QDeclarativeProperty &);
-
- QString name() const;
- void setName(const QString &);
-
-private slots:
- void advance();
-
-signals:
- void nameChanged();
-private:
- int m_line;
- QStringList m_lyrics;
- QDeclarativeProperty m_target;
- QString m_name;
-};
-
-#endif // HAPPYBIRTHDAYSONG_H
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/main.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/main.cpp
deleted file mode 100644
index 110ea9c4df..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/main.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-/****************************************************************************
-**
-** 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 <QCoreApplication>
-#include <QDeclarativeEngine>
-#include <QDeclarativeComponent>
-#include <QDebug>
-#include "birthdayparty.h"
-#include "happybirthdaysong.h"
-#include "person.h"
-
-int main(int argc, char ** argv)
-{
- QCoreApplication app(argc, argv);
- qmlRegisterType<BirthdayPartyAttached>();
- qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
- qmlRegisterType<HappyBirthdaySong>("People", 1,0, "HappyBirthdaySong");
- qmlRegisterType<ShoeDescription>();
- qmlRegisterType<Person>();
- qmlRegisterType<Boy>("People", 1,0, "Boy");
- qmlRegisterType<Girl>("People", 1,0, "Girl");
-
- QDeclarativeEngine engine;
- QDeclarativeComponent component(&engine, QUrl("qrc:example.qml"));
- BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
-
- if (party && party->host()) {
- qWarning() << party->host()->name() << "is having a birthday!";
-
- if (qobject_cast<Boy *>(party->host()))
- qWarning() << "He is inviting:";
- else
- qWarning() << "She is inviting:";
-
- for (int ii = 0; ii < party->guestCount(); ++ii) {
- Person *guest = party->guest(ii);
-
- QDate rsvpDate;
- QObject *attached =
- qmlAttachedPropertiesObject<BirthdayParty>(guest, false);
- if (attached)
- rsvpDate = attached->property("rsvp").toDate();
-
- if (rsvpDate.isNull())
- qWarning() << " " << guest->name() << "RSVP date: Hasn't RSVP'd";
- else
- qWarning() << " " << guest->name() << "RSVP date:" << qPrintable(rsvpDate.toString());
- }
-
- party->startParty();
- } else {
- qWarning() << component.errors();
- }
-
- return app.exec();
-}
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/person.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/person.cpp
deleted file mode 100644
index 89e7127caf..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/person.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-/****************************************************************************
-**
-** 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 "person.h"
-
-ShoeDescription::ShoeDescription(QObject *parent)
-: QObject(parent), m_size(0), m_price(0)
-{
-}
-
-int ShoeDescription::size() const
-{
- return m_size;
-}
-
-void ShoeDescription::setSize(int s)
-{
- if (m_size == s)
- return;
-
- m_size = s;
- emit shoeChanged();
-}
-
-QColor ShoeDescription::color() const
-{
- return m_color;
-}
-
-void ShoeDescription::setColor(const QColor &c)
-{
- if (m_color == c)
- return;
-
- m_color = c;
- emit shoeChanged();
-}
-
-QString ShoeDescription::brand() const
-{
- return m_brand;
-}
-
-void ShoeDescription::setBrand(const QString &b)
-{
- if (m_brand == b)
- return;
-
- m_brand = b;
- emit shoeChanged();
-}
-
-qreal ShoeDescription::price() const
-{
- return m_price;
-}
-
-void ShoeDescription::setPrice(qreal p)
-{
- if (m_price == p)
- return;
-
- m_price = p;
- emit shoeChanged();
-}
-
-Person::Person(QObject *parent)
-: QObject(parent)
-{
-}
-
-QString Person::name() const
-{
- return m_name;
-}
-
-void Person::setName(const QString &n)
-{
- if (m_name == n)
- return;
-
- m_name = n;
- emit nameChanged();
-}
-
-ShoeDescription *Person::shoe()
-{
- return &m_shoe;
-}
-
-
-Boy::Boy(QObject * parent)
-: Person(parent)
-{
-}
-
-
-Girl::Girl(QObject * parent)
-: Person(parent)
-{
-}
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/person.h b/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/person.h
deleted file mode 100644
index d0f196b95c..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/binding/person.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#ifndef PERSON_H
-#define PERSON_H
-
-#include <QObject>
-#include <QColor>
-
-class ShoeDescription : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(int size READ size WRITE setSize NOTIFY shoeChanged)
- Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY shoeChanged)
- Q_PROPERTY(QString brand READ brand WRITE setBrand NOTIFY shoeChanged)
- Q_PROPERTY(qreal price READ price WRITE setPrice NOTIFY shoeChanged)
-public:
- ShoeDescription(QObject *parent = 0);
-
- int size() const;
- void setSize(int);
-
- QColor color() const;
- void setColor(const QColor &);
-
- QString brand() const;
- void setBrand(const QString &);
-
- qreal price() const;
- void setPrice(qreal);
-signals:
- void shoeChanged();
-
-private:
- int m_size;
- QColor m_color;
- QString m_brand;
- qreal m_price;
-};
-
-class Person : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
-// ![0]
- Q_PROPERTY(ShoeDescription *shoe READ shoe CONSTANT)
-// ![0]
-public:
- Person(QObject *parent = 0);
-
- QString name() const;
- void setName(const QString &);
-
- ShoeDescription *shoe();
-signals:
- void nameChanged();
-
-private:
- QString m_name;
- ShoeDescription m_shoe;
-};
-
-class Boy : public Person
-{
- Q_OBJECT
-public:
- Boy(QObject * parent = 0);
-};
-
-class Girl : public Person
-{
- Q_OBJECT
-public:
- Girl(QObject * parent = 0);
-};
-
-#endif // PERSON_H
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/birthdayparty.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/birthdayparty.cpp
deleted file mode 100644
index 11e408ff3e..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/birthdayparty.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** 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 "birthdayparty.h"
-
-BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_host(0)
-{
-}
-
-Person *BirthdayParty::host() const
-{
- return m_host;
-}
-
-void BirthdayParty::setHost(Person *c)
-{
- m_host = c;
-}
-
-QDeclarativeListProperty<Person> BirthdayParty::guests()
-{
- return QDeclarativeListProperty<Person>(this, m_guests);
-}
-
-int BirthdayParty::guestCount() const
-{
- return m_guests.count();
-}
-
-Person *BirthdayParty::guest(int index) const
-{
- return m_guests.at(index);
-}
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/birthdayparty.h b/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/birthdayparty.h
deleted file mode 100644
index 4315d3727e..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/birthdayparty.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#ifndef BIRTHDAYPARTY_H
-#define BIRTHDAYPARTY_H
-
-#include <QObject>
-#include <QDeclarativeListProperty>
-#include "person.h"
-
-class BirthdayParty : public QObject
-{
- Q_OBJECT
-// ![0]
- Q_PROPERTY(Person *host READ host WRITE setHost)
- Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
-// ![0]
-public:
- BirthdayParty(QObject *parent = 0);
-
- Person *host() const;
- void setHost(Person *);
-
- QDeclarativeListProperty<Person> guests();
- int guestCount() const;
- Person *guest(int) const;
-
-private:
- Person *m_host;
- QList<Person *> m_guests;
-};
-
-#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/coercion.pro b/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/coercion.pro
deleted file mode 100644
index d85a3088ae..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/coercion.pro
+++ /dev/null
@@ -1,17 +0,0 @@
-TEMPLATE = app
-TARGET = coercion
-DEPENDPATH += .
-INCLUDEPATH += .
-QT += declarative
-
-# Input
-SOURCES += main.cpp \
- person.cpp \
- birthdayparty.cpp
-HEADERS += person.h \
- birthdayparty.h
-RESOURCES += coercion.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/coercion
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS coercion.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/coercion
-INSTALLS += target sources
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/coercion.qrc b/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/coercion.qrc
deleted file mode 100644
index e2fa01d5e7..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/coercion.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>example.qml</file>
-</qresource>
-</RCC>
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/example.qml b/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/example.qml
deleted file mode 100644
index 25791f38f8..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/example.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** 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 People 1.0
-
-// ![0]
-BirthdayParty {
- host: Boy {
- name: "Bob Jones"
- shoeSize: 12
- }
- guests: [
- Boy { name: "Leo Hodges" },
- Boy { name: "Jack Smith" },
- Girl { name: "Anne Brown" }
- ]
-}
-// ![0]
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/main.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/main.cpp
deleted file mode 100644
index e0eabae4b4..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/main.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** 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 <QCoreApplication>
-#include <QDeclarativeEngine>
-#include <QDeclarativeComponent>
-#include <QDebug>
-#include "birthdayparty.h"
-#include "person.h"
-
-int main(int argc, char ** argv)
-{
- QCoreApplication app(argc, argv);
-
- qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
-// ![0]
- qmlRegisterType<Person>();
-// ![0]
- qmlRegisterType<Boy>("People", 1,0, "Boy");
- qmlRegisterType<Girl>("People", 1,0, "Girl");
-
- QDeclarativeEngine engine;
- QDeclarativeComponent component(&engine, QUrl("qrc:example.qml"));
- BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
-
- if (party && party->host()) {
- qWarning() << party->host()->name() << "is having a birthday!";
-
- if (qobject_cast<Boy *>(party->host()))
- qWarning() << "He is inviting:";
- else
- qWarning() << "She is inviting:";
-
- for (int ii = 0; ii < party->guestCount(); ++ii)
- qWarning() << " " << party->guest(ii)->name();
- } else {
- qWarning() << component.errors();
- }
-
- return 0;
-}
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/person.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/person.cpp
deleted file mode 100644
index b28d63216e..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/person.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** 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 "person.h"
-
-Person::Person(QObject *parent)
-: QObject(parent), m_shoeSize(0)
-{
-}
-
-QString Person::name() const
-{
- return m_name;
-}
-
-void Person::setName(const QString &n)
-{
- m_name = n;
-}
-
-int Person::shoeSize() const
-{
- return m_shoeSize;
-}
-
-void Person::setShoeSize(int s)
-{
- m_shoeSize = s;
-}
-
-// ![1]
-Boy::Boy(QObject * parent)
-: Person(parent)
-{
-}
-
-
-Girl::Girl(QObject * parent)
-: Person(parent)
-{
-}
-
-// ![1]
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/person.h b/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/person.h
deleted file mode 100644
index 65faaf1521..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/coercion/person.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#ifndef PERSON_H
-#define PERSON_H
-
-#include <QObject>
-
-class Person : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString name READ name WRITE setName)
- Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
-public:
- Person(QObject *parent = 0);
-
- QString name() const;
- void setName(const QString &);
-
- int shoeSize() const;
- void setShoeSize(int);
-private:
- QString m_name;
- int m_shoeSize;
-};
-
-
-// ![0]
-class Boy : public Person
-{
- Q_OBJECT
-public:
- Boy(QObject * parent = 0);
-};
-
-
-class Girl : public Person
-{
- Q_OBJECT
-public:
- Girl(QObject * parent = 0);
-};
-
-// ![0]
-
-#endif // PERSON_H
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/default/birthdayparty.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/default/birthdayparty.cpp
deleted file mode 100644
index 11e408ff3e..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/default/birthdayparty.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** 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 "birthdayparty.h"
-
-BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_host(0)
-{
-}
-
-Person *BirthdayParty::host() const
-{
- return m_host;
-}
-
-void BirthdayParty::setHost(Person *c)
-{
- m_host = c;
-}
-
-QDeclarativeListProperty<Person> BirthdayParty::guests()
-{
- return QDeclarativeListProperty<Person>(this, m_guests);
-}
-
-int BirthdayParty::guestCount() const
-{
- return m_guests.count();
-}
-
-Person *BirthdayParty::guest(int index) const
-{
- return m_guests.at(index);
-}
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/default/birthdayparty.h b/examples/declarative/qtquick1/cppextensions/referenceexamples/default/birthdayparty.h
deleted file mode 100644
index cfca6689db..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/default/birthdayparty.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#ifndef BIRTHDAYPARTY_H
-#define BIRTHDAYPARTY_H
-
-#include <QObject>
-#include <QDeclarativeListProperty>
-#include "person.h"
-
-// ![0]
-class BirthdayParty : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(Person *host READ host WRITE setHost)
- Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
- Q_CLASSINFO("DefaultProperty", "guests")
-public:
- BirthdayParty(QObject *parent = 0);
-
- Person *host() const;
- void setHost(Person *);
-
- QDeclarativeListProperty<Person> guests();
- int guestCount() const;
- Person *guest(int) const;
-
-private:
- Person *m_host;
- QList<Person *> m_guests;
-};
-// ![0]
-
-#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/default/default.pro b/examples/declarative/qtquick1/cppextensions/referenceexamples/default/default.pro
deleted file mode 100644
index d5519f490e..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/default/default.pro
+++ /dev/null
@@ -1,17 +0,0 @@
-TEMPLATE = app
-TARGET = default
-DEPENDPATH += .
-INCLUDEPATH += .
-QT += declarative qtquick1
-
-# Input
-SOURCES += main.cpp \
- person.cpp \
- birthdayparty.cpp
-HEADERS += person.h \
- birthdayparty.h
-RESOURCES += default.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/default
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS default.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/default
-INSTALLS += target sources
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/default/default.qrc b/examples/declarative/qtquick1/cppextensions/referenceexamples/default/default.qrc
deleted file mode 100644
index e2fa01d5e7..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/default/default.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>example.qml</file>
-</qresource>
-</RCC>
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/default/example.qml b/examples/declarative/qtquick1/cppextensions/referenceexamples/default/example.qml
deleted file mode 100644
index 9ef24b59b7..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/default/example.qml
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
-**
-** 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 People 1.0
-
-// ![0]
-BirthdayParty {
- host: Boy {
- name: "Bob Jones"
- shoeSize: 12
- }
-
- Boy { name: "Leo Hodges" }
- Boy { name: "Jack Smith" }
- Girl { name: "Anne Brown" }
-}
-// ![0]
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/default/main.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/default/main.cpp
deleted file mode 100644
index 3a03279129..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/default/main.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
-**
-** 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 <QCoreApplication>
-#include <QDeclarativeEngine>
-#include <QDeclarativeComponent>
-#include <QDebug>
-#include "birthdayparty.h"
-#include "person.h"
-
-int main(int argc, char ** argv)
-{
- QCoreApplication app(argc, argv);
-
- qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
- qmlRegisterType<Person>();
- qmlRegisterType<Boy>("People", 1,0, "Boy");
- qmlRegisterType<Girl>("People", 1,0, "Girl");
-
- QDeclarativeEngine engine;
- QDeclarativeComponent component(&engine, QUrl("qrc:example.qml"));
- BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
-
- if (party && party->host()) {
- qWarning() << party->host()->name() << "is having a birthday!";
-
- if (qobject_cast<Boy *>(party->host()))
- qWarning() << "He is inviting:";
- else
- qWarning() << "She is inviting:";
-
- for (int ii = 0; ii < party->guestCount(); ++ii)
- qWarning() << " " << party->guest(ii)->name();
- } else {
- qWarning() << component.errors();
- }
-
- return 0;
-}
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/default/person.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/default/person.cpp
deleted file mode 100644
index 5a615a1ecd..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/default/person.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-**
-** 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 "person.h"
-
-Person::Person(QObject *parent)
-: QObject(parent), m_shoeSize(0)
-{
-}
-
-QString Person::name() const
-{
- return m_name;
-}
-
-void Person::setName(const QString &n)
-{
- m_name = n;
-}
-
-int Person::shoeSize() const
-{
- return m_shoeSize;
-}
-
-void Person::setShoeSize(int s)
-{
- m_shoeSize = s;
-}
-
-
-Boy::Boy(QObject * parent)
-: Person(parent)
-{
-}
-
-
-Girl::Girl(QObject * parent)
-: Person(parent)
-{
-}
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/default/person.h b/examples/declarative/qtquick1/cppextensions/referenceexamples/default/person.h
deleted file mode 100644
index d85672798c..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/default/person.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#ifndef PERSON_H
-#define PERSON_H
-
-#include <QObject>
-
-class Person : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString name READ name WRITE setName)
- Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
-public:
- Person(QObject *parent = 0);
-
- QString name() const;
- void setName(const QString &);
-
- int shoeSize() const;
- void setShoeSize(int);
-private:
- QString m_name;
- int m_shoeSize;
-};
-
-class Boy : public Person
-{
- Q_OBJECT
-public:
- Boy(QObject * parent = 0);
-};
-
-class Girl : public Person
-{
- Q_OBJECT
-public:
- Girl(QObject * parent = 0);
-};
-
-#endif // PERSON_H
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/extended/example.qml b/examples/declarative/qtquick1/cppextensions/referenceexamples/extended/example.qml
deleted file mode 100644
index 642a95d443..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/extended/example.qml
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************************
-**
-** 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 People 1.0
-
-// ![0]
-QLineEdit {
- leftMargin: 20
-}
-// ![0]
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/extended/extended.pro b/examples/declarative/qtquick1/cppextensions/referenceexamples/extended/extended.pro
deleted file mode 100644
index f3e4284037..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/extended/extended.pro
+++ /dev/null
@@ -1,15 +0,0 @@
-TEMPLATE = app
-TARGET = extended
-DEPENDPATH += .
-INCLUDEPATH += .
-QT += declarative qtquick1
-
-# Input
-SOURCES += main.cpp \
- lineedit.cpp
-HEADERS += lineedit.h
-RESOURCES += extended.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/extended
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS extended.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/extended
-INSTALLS += target sources
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/extended/extended.qrc b/examples/declarative/qtquick1/cppextensions/referenceexamples/extended/extended.qrc
deleted file mode 100644
index e2fa01d5e7..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/extended/extended.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>example.qml</file>
-</qresource>
-</RCC>
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/extended/lineedit.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/extended/lineedit.cpp
deleted file mode 100644
index f00832644f..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/extended/lineedit.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-/****************************************************************************
-**
-** 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 "lineedit.h"
-
-LineEditExtension::LineEditExtension(QObject *object)
-: QObject(object), m_lineedit(static_cast<QLineEdit *>(object))
-{
-}
-
-int LineEditExtension::leftMargin() const
-{
- int l, r, t, b;
- m_lineedit->getTextMargins(&l, &t, &r, &b);
- return l;
-}
-
-void LineEditExtension::setLeftMargin(int m)
-{
- int l, r, t, b;
- m_lineedit->getTextMargins(&l, &t, &r, &b);
- m_lineedit->setTextMargins(m, t, r, b);
-}
-
-int LineEditExtension::rightMargin() const
-{
- int l, r, t, b;
- m_lineedit->getTextMargins(&l, &t, &r, &b);
- return r;
-}
-
-void LineEditExtension::setRightMargin(int m)
-{
- int l, r, t, b;
- m_lineedit->getTextMargins(&l, &t, &r, &b);
- m_lineedit->setTextMargins(l, t, m, b);
-}
-
-int LineEditExtension::topMargin() const
-{
- int l, r, t, b;
- m_lineedit->getTextMargins(&l, &t, &r, &b);
- return t;
-}
-
-void LineEditExtension::setTopMargin(int m)
-{
- int l, r, t, b;
- m_lineedit->getTextMargins(&l, &t, &r, &b);
- m_lineedit->setTextMargins(l, m, r, b);
-}
-
-int LineEditExtension::bottomMargin() const
-{
- int l, r, t, b;
- m_lineedit->getTextMargins(&l, &t, &r, &b);
- return b;
-}
-
-void LineEditExtension::setBottomMargin(int m)
-{
- int l, r, t, b;
- m_lineedit->getTextMargins(&l, &t, &r, &b);
- m_lineedit->setTextMargins(l, t, r, m);
-}
-
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/extended/lineedit.h b/examples/declarative/qtquick1/cppextensions/referenceexamples/extended/lineedit.h
deleted file mode 100644
index fa8c75df78..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/extended/lineedit.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#ifndef LINEEDIT_H
-#define LINEEDIT_H
-
-#include <QLineEdit>
-
-class LineEditExtension : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(int leftMargin READ leftMargin WRITE setLeftMargin NOTIFY marginsChanged)
- Q_PROPERTY(int rightMargin READ rightMargin WRITE setRightMargin NOTIFY marginsChanged)
- Q_PROPERTY(int topMargin READ topMargin WRITE setTopMargin NOTIFY marginsChanged)
- Q_PROPERTY(int bottomMargin READ bottomMargin WRITE setBottomMargin NOTIFY marginsChanged)
-public:
- LineEditExtension(QObject *);
-
- int leftMargin() const;
- void setLeftMargin(int);
-
- int rightMargin() const;
- void setRightMargin(int);
-
- int topMargin() const;
- void setTopMargin(int);
-
- int bottomMargin() const;
- void setBottomMargin(int);
-signals:
- void marginsChanged();
-
-private:
- QLineEdit *m_lineedit;
-};
-
-#endif // LINEEDIT_H
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/extended/main.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/extended/main.cpp
deleted file mode 100644
index 3c580396f2..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/extended/main.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
-**
-** 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 <QApplication>
-#include <QDeclarativeEngine>
-#include <QDeclarativeComponent>
-#include <QDebug>
-#include <QLineEdit>
-#include "lineedit.h"
-
-int main(int argc, char ** argv)
-{
- QApplication app(argc, argv);
-
- qmlRegisterExtendedType<QLineEdit, LineEditExtension>("People", 1,0, "QLineEdit");
-
- QDeclarativeEngine engine;
- QDeclarativeComponent component(&engine, QUrl("qrc:example.qml"));
- QLineEdit *edit = qobject_cast<QLineEdit *>(component.create());
-
- if (edit) {
- edit->show();
- return app.exec();
- } else {
- qWarning() << component.errors();
- return 0;
- }
-}
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/birthdayparty.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/birthdayparty.cpp
deleted file mode 100644
index 11e408ff3e..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/birthdayparty.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** 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 "birthdayparty.h"
-
-BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_host(0)
-{
-}
-
-Person *BirthdayParty::host() const
-{
- return m_host;
-}
-
-void BirthdayParty::setHost(Person *c)
-{
- m_host = c;
-}
-
-QDeclarativeListProperty<Person> BirthdayParty::guests()
-{
- return QDeclarativeListProperty<Person>(this, m_guests);
-}
-
-int BirthdayParty::guestCount() const
-{
- return m_guests.count();
-}
-
-Person *BirthdayParty::guest(int index) const
-{
- return m_guests.at(index);
-}
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/birthdayparty.h b/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/birthdayparty.h
deleted file mode 100644
index 491903adc5..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/birthdayparty.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#ifndef BIRTHDAYPARTY_H
-#define BIRTHDAYPARTY_H
-
-#include <QObject>
-#include <QDeclarativeListProperty>
-#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_CLASSINFO("DefaultProperty", "guests")
-public:
- BirthdayParty(QObject *parent = 0);
-
- Person *host() const;
- void setHost(Person *);
-
- QDeclarativeListProperty<Person> guests();
- int guestCount() const;
- Person *guest(int) const;
-
-private:
- Person *m_host;
- QList<Person *> m_guests;
-};
-
-
-#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/example.qml b/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/example.qml
deleted file mode 100644
index 8c098f8332..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/example.qml
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** 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 People 1.0
-
-// ![0]
-BirthdayParty {
- host: Boy {
- name: "Bob Jones"
- shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 }
- }
-
- Boy {
- name: "Leo Hodges"
- shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 }
- }
- // ![1]
- Boy {
- name: "Jack Smith"
- shoe {
- size: 8
- color: "blue"
- brand: "Puma"
- price: 19.95
- }
- }
- // ![1]
- Girl {
- name: "Anne Brown"
- shoe.size: 7
- shoe.color: "red"
- shoe.brand: "Marc Jacobs"
- shoe.price: 699.99
- }
-}
-// ![0]
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/grouped.pro b/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/grouped.pro
deleted file mode 100644
index ca6deeac4a..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/grouped.pro
+++ /dev/null
@@ -1,17 +0,0 @@
-TEMPLATE = app
-TARGET = grouped
-DEPENDPATH += .
-INCLUDEPATH += .
-QT += declarative
-
-# Input
-SOURCES += main.cpp \
- person.cpp \
- birthdayparty.cpp
-HEADERS += person.h \
- birthdayparty.h
-RESOURCES += grouped.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/grouped
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS grouped.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/grouped
-INSTALLS += target sources
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/grouped.qrc b/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/grouped.qrc
deleted file mode 100644
index e2fa01d5e7..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/grouped.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>example.qml</file>
-</qresource>
-</RCC>
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/main.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/main.cpp
deleted file mode 100644
index de7d714c52..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/main.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** 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 <QCoreApplication>
-#include <QDeclarativeEngine>
-#include <QDeclarativeComponent>
-#include <QDebug>
-#include "birthdayparty.h"
-#include "person.h"
-
-int main(int argc, char ** argv)
-{
- QCoreApplication app(argc, argv);
-
- qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
- qmlRegisterType<ShoeDescription>();
- qmlRegisterType<Person>();
- qmlRegisterType<Boy>("People", 1,0, "Boy");
- qmlRegisterType<Girl>("People", 1,0, "Girl");
-
- QDeclarativeEngine engine;
- QDeclarativeComponent component(&engine, QUrl("qrc:example.qml"));
- BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
-
- if (party && party->host()) {
- qWarning() << party->host()->name() << "is having a birthday!";
-
- if (qobject_cast<Boy *>(party->host()))
- qWarning() << "He is inviting:";
- else
- qWarning() << "She is inviting:";
-
- Person *bestShoe = 0;
- for (int ii = 0; ii < party->guestCount(); ++ii) {
- Person *guest = party->guest(ii);
- qWarning() << " " << guest->name();
-
- if (!bestShoe || bestShoe->shoe()->price() < guest->shoe()->price())
- bestShoe = guest;
- }
- if (bestShoe)
- qWarning() << bestShoe->name() << "is wearing the best shoes!";
-
- } else {
- qWarning() << component.errors();
- }
-
- return 0;
-}
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/person.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/person.cpp
deleted file mode 100644
index 7afcdc6ca6..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/person.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-/****************************************************************************
-**
-** 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 "person.h"
-
-ShoeDescription::ShoeDescription(QObject *parent)
-: QObject(parent), m_size(0), m_price(0)
-{
-}
-
-int ShoeDescription::size() const
-{
- return m_size;
-}
-
-void ShoeDescription::setSize(int s)
-{
- m_size = s;
-}
-
-QColor ShoeDescription::color() const
-{
- return m_color;
-}
-
-void ShoeDescription::setColor(const QColor &c)
-{
- m_color = c;
-}
-
-QString ShoeDescription::brand() const
-{
- return m_brand;
-}
-
-void ShoeDescription::setBrand(const QString &b)
-{
- m_brand = b;
-}
-
-qreal ShoeDescription::price() const
-{
- return m_price;
-}
-
-void ShoeDescription::setPrice(qreal p)
-{
- m_price = p;
-}
-
-Person::Person(QObject *parent)
-: QObject(parent)
-{
-}
-
-QString Person::name() const
-{
- return m_name;
-}
-
-void Person::setName(const QString &n)
-{
- m_name = n;
-}
-
-ShoeDescription *Person::shoe()
-{
- return &m_shoe;
-}
-
-
-Boy::Boy(QObject * parent)
-: Person(parent)
-{
-}
-
-
-Girl::Girl(QObject * parent)
-: Person(parent)
-{
-}
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/person.h b/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/person.h
deleted file mode 100644
index dea715bacb..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/grouped/person.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#ifndef PERSON_H
-#define PERSON_H
-
-#include <QObject>
-#include <QColor>
-
-class ShoeDescription : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(int size READ size WRITE setSize)
- Q_PROPERTY(QColor color READ color WRITE setColor)
- Q_PROPERTY(QString brand READ brand WRITE setBrand)
- Q_PROPERTY(qreal price READ price WRITE setPrice)
-public:
- ShoeDescription(QObject *parent = 0);
-
- int size() const;
- void setSize(int);
-
- QColor color() const;
- void setColor(const QColor &);
-
- QString brand() const;
- void setBrand(const QString &);
-
- qreal price() const;
- void setPrice(qreal);
-private:
- int m_size;
- QColor m_color;
- QString m_brand;
- qreal m_price;
-};
-
-class Person : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString name READ name WRITE setName)
-// ![1]
- Q_PROPERTY(ShoeDescription *shoe READ shoe)
-// ![1]
-public:
- Person(QObject *parent = 0);
-
- QString name() const;
- void setName(const QString &);
-
- ShoeDescription *shoe();
-private:
- QString m_name;
- ShoeDescription m_shoe;
-};
-
-class Boy : public Person
-{
- Q_OBJECT
-public:
- Boy(QObject * parent = 0);
-};
-
-class Girl : public Person
-{
- Q_OBJECT
-public:
- Girl(QObject * parent = 0);
-};
-
-#endif // PERSON_H
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/birthdayparty.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/birthdayparty.cpp
deleted file mode 100644
index 52a1cc7e20..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/birthdayparty.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
-**
-** 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 "birthdayparty.h"
-
-BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_host(0)
-{
-}
-
-// ![0]
-Person *BirthdayParty::host() const
-{
- return m_host;
-}
-
-void BirthdayParty::setHost(Person *c)
-{
- m_host = c;
-}
-
-QDeclarativeListProperty<Person> BirthdayParty::guests()
-{
- return QDeclarativeListProperty<Person>(this, m_guests);
-}
-
-int BirthdayParty::guestCount() const
-{
- return m_guests.count();
-}
-
-Person *BirthdayParty::guest(int index) const
-{
- return m_guests.at(index);
-}
-
-void BirthdayParty::invite(const QString &name)
-{
- Person *person = new Person(this);
- person->setName(name);
- m_guests.append(person);
-}
-// ![0]
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/birthdayparty.h b/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/birthdayparty.h
deleted file mode 100644
index e49afdb78d..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/birthdayparty.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#ifndef BIRTHDAYPARTY_H
-#define BIRTHDAYPARTY_H
-
-#include <QObject>
-#include <QDeclarativeListProperty>
-#include "person.h"
-
-class BirthdayParty : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(Person *host READ host WRITE setHost)
- Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
-public:
- BirthdayParty(QObject *parent = 0);
-
- Person *host() const;
- void setHost(Person *);
-
- QDeclarativeListProperty<Person> guests();
- int guestCount() const;
- Person *guest(int) const;
-
-// ![0]
- Q_INVOKABLE void invite(const QString &name);
-// ![0]
-
-private:
- Person *m_host;
- QList<Person *> m_guests;
-};
-
-#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/example.qml b/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/example.qml
deleted file mode 100644
index f4673e0a36..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/example.qml
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************************
-**
-** 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 1.0
-import People 1.0
-
-// ![0]
-BirthdayParty {
- host: Person {
- name: "Bob Jones"
- shoeSize: 12
- }
- guests: [
- Person { name: "Leo Hodges" },
- Person { name: "Jack Smith" },
- Person { name: "Anne Brown" }
- ]
-
- Component.onCompleted: invite("William Green")
-}
-// ![0]
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/main.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/main.cpp
deleted file mode 100644
index d037d88f20..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/main.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** 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 <QCoreApplication>
-#include <QDeclarativeEngine>
-#include <QDeclarativeComponent>
-#include <QDebug>
-#include "birthdayparty.h"
-#include "person.h"
-
-int main(int argc, char ** argv)
-{
- QCoreApplication app(argc, argv);
-
- qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
- qmlRegisterType<Person>("People", 1,0, "Person");
-
- QDeclarativeEngine engine;
- QDeclarativeComponent component(&engine, QUrl("qrc:example.qml"));
- BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
-
- if (party && party->host()) {
- qWarning() << party->host()->name() << "is having a birthday!";
- qWarning() << "They are inviting:";
- for (int ii = 0; ii < party->guestCount(); ++ii)
- qWarning() << " " << party->guest(ii)->name();
- } else {
- qWarning() << component.errors();
- }
-
- return 0;
-}
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/methods.pro b/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/methods.pro
deleted file mode 100644
index c516049fe2..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/methods.pro
+++ /dev/null
@@ -1,18 +0,0 @@
-TEMPLATE = app
-TARGET = methods
-DEPENDPATH += .
-INCLUDEPATH += .
-QT += declarative qtquick1
-
-# Input
-SOURCES += main.cpp \
- person.cpp \
- birthdayparty.cpp
-HEADERS += person.h \
- birthdayparty.h
-RESOURCES += methods.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/methods
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS methods.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/methods
-INSTALLS += target sources
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/methods.qrc b/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/methods.qrc
deleted file mode 100644
index e2fa01d5e7..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/methods.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>example.qml</file>
-</qresource>
-</RCC>
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/person.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/person.cpp
deleted file mode 100644
index 30d1e46e5a..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/person.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** 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 "person.h"
-
-Person::Person(QObject *parent)
-: QObject(parent), m_shoeSize(0)
-{
-}
-
-QString Person::name() const
-{
- return m_name;
-}
-
-void Person::setName(const QString &n)
-{
- m_name = n;
-}
-
-int Person::shoeSize() const
-{
- return m_shoeSize;
-}
-
-void Person::setShoeSize(int s)
-{
- m_shoeSize = s;
-}
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/person.h b/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/person.h
deleted file mode 100644
index dd3ad4d188..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/methods/person.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#ifndef PERSON_H
-#define PERSON_H
-
-#include <QObject>
-
-class Person : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString name READ name WRITE setName)
- Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
-public:
- Person(QObject *parent = 0);
-
- QString name() const;
- void setName(const QString &);
-
- int shoeSize() const;
- void setShoeSize(int);
-private:
- QString m_name;
- int m_shoeSize;
-};
-
-#endif // PERSON_H
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/birthdayparty.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/birthdayparty.cpp
deleted file mode 100644
index d944b9f3ac..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/birthdayparty.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** 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 "birthdayparty.h"
-
-BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_host(0)
-{
-}
-
-// ![0]
-Person *BirthdayParty::host() const
-{
- return m_host;
-}
-
-void BirthdayParty::setHost(Person *c)
-{
- m_host = c;
-}
-
-QDeclarativeListProperty<Person> BirthdayParty::guests()
-{
- return QDeclarativeListProperty<Person>(this, m_guests);
-}
-
-int BirthdayParty::guestCount() const
-{
- return m_guests.count();
-}
-
-Person *BirthdayParty::guest(int index) const
-{
- return m_guests.at(index);
-}
-// ![0]
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/birthdayparty.h b/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/birthdayparty.h
deleted file mode 100644
index 2c3d128b6d..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/birthdayparty.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#ifndef BIRTHDAYPARTY_H
-#define BIRTHDAYPARTY_H
-
-#include <QObject>
-#include <QDeclarativeListProperty>
-#include "person.h"
-
-// ![0]
-class BirthdayParty : public QObject
-{
- Q_OBJECT
-// ![0]
-// ![1]
- Q_PROPERTY(Person *host READ host WRITE setHost)
-// ![1]
-// ![2]
- Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
-// ![2]
-// ![3]
-public:
- BirthdayParty(QObject *parent = 0);
-
- Person *host() const;
- void setHost(Person *);
-
- QDeclarativeListProperty<Person> guests();
- int guestCount() const;
- Person *guest(int) const;
-
-private:
- Person *m_host;
- QList<Person *> m_guests;
-};
-// ![3]
-
-#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/example.qml b/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/example.qml
deleted file mode 100644
index 36ee952243..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/example.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** 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 People 1.0
-
-// ![0]
-BirthdayParty {
- host: Person {
- name: "Bob Jones"
- shoeSize: 12
- }
- guests: [
- Person { name: "Leo Hodges" },
- Person { name: "Jack Smith" },
- Person { name: "Anne Brown" }
- ]
-}
-// ![0]
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/main.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/main.cpp
deleted file mode 100644
index d037d88f20..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/main.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** 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 <QCoreApplication>
-#include <QDeclarativeEngine>
-#include <QDeclarativeComponent>
-#include <QDebug>
-#include "birthdayparty.h"
-#include "person.h"
-
-int main(int argc, char ** argv)
-{
- QCoreApplication app(argc, argv);
-
- qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
- qmlRegisterType<Person>("People", 1,0, "Person");
-
- QDeclarativeEngine engine;
- QDeclarativeComponent component(&engine, QUrl("qrc:example.qml"));
- BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
-
- if (party && party->host()) {
- qWarning() << party->host()->name() << "is having a birthday!";
- qWarning() << "They are inviting:";
- for (int ii = 0; ii < party->guestCount(); ++ii)
- qWarning() << " " << party->guest(ii)->name();
- } else {
- qWarning() << component.errors();
- }
-
- return 0;
-}
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/person.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/person.cpp
deleted file mode 100644
index 30d1e46e5a..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/person.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** 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 "person.h"
-
-Person::Person(QObject *parent)
-: QObject(parent), m_shoeSize(0)
-{
-}
-
-QString Person::name() const
-{
- return m_name;
-}
-
-void Person::setName(const QString &n)
-{
- m_name = n;
-}
-
-int Person::shoeSize() const
-{
- return m_shoeSize;
-}
-
-void Person::setShoeSize(int s)
-{
- m_shoeSize = s;
-}
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/person.h b/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/person.h
deleted file mode 100644
index dd3ad4d188..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/person.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#ifndef PERSON_H
-#define PERSON_H
-
-#include <QObject>
-
-class Person : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString name READ name WRITE setName)
- Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
-public:
- Person(QObject *parent = 0);
-
- QString name() const;
- void setName(const QString &);
-
- int shoeSize() const;
- void setShoeSize(int);
-private:
- QString m_name;
- int m_shoeSize;
-};
-
-#endif // PERSON_H
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/properties.pro b/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/properties.pro
deleted file mode 100644
index 4f0ff882b3..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/properties.pro
+++ /dev/null
@@ -1,18 +0,0 @@
-TEMPLATE = app
-TARGET = properties
-DEPENDPATH += .
-INCLUDEPATH += .
-QT += declarative qtquick1
-
-# Input
-SOURCES += main.cpp \
- person.cpp \
- birthdayparty.cpp
-HEADERS += person.h \
- birthdayparty.h
-RESOURCES += properties.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/properties
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS properties.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/properties
-INSTALLS += target sources
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/properties.qrc b/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/properties.qrc
deleted file mode 100644
index e2fa01d5e7..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/properties/properties.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>example.qml</file>
-</qresource>
-</RCC>
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/referenceexamples.pro b/examples/declarative/qtquick1/cppextensions/referenceexamples/referenceexamples.pro
deleted file mode 100644
index 505cefd331..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/referenceexamples.pro
+++ /dev/null
@@ -1,14 +0,0 @@
-TEMPLATE = subdirs
-
-SUBDIRS += \
- adding \
- attached \
- binding \
- coercion \
- default \
- extended \
- grouped \
- properties \
- signal \
- valuesource \
- methods
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/referenceexamples.qmlproject b/examples/declarative/qtquick1/cppextensions/referenceexamples/referenceexamples.qmlproject
deleted file mode 100644
index 2bb4016996..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/referenceexamples.qmlproject
+++ /dev/null
@@ -1,14 +0,0 @@
-import QmlProject 1.0
-
-Project {
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/birthdayparty.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/birthdayparty.cpp
deleted file mode 100644
index 5ee36d2c9a..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/birthdayparty.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
-**
-** 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 "birthdayparty.h"
-
-BirthdayPartyAttached::BirthdayPartyAttached(QObject *object)
-: QObject(object)
-{
-}
-
-QDate BirthdayPartyAttached::rsvp() const
-{
- return m_rsvp;
-}
-
-void BirthdayPartyAttached::setRsvp(const QDate &d)
-{
- m_rsvp = d;
-}
-
-
-BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_host(0)
-{
-}
-
-Person *BirthdayParty::host() const
-{
- return m_host;
-}
-
-void BirthdayParty::setHost(Person *c)
-{
- m_host = c;
-}
-
-QDeclarativeListProperty<Person> BirthdayParty::guests()
-{
- return QDeclarativeListProperty<Person>(this, m_guests);
-}
-
-int BirthdayParty::guestCount() const
-{
- return m_guests.count();
-}
-
-Person *BirthdayParty::guest(int index) const
-{
- return m_guests.at(index);
-}
-
-void BirthdayParty::startParty()
-{
- QTime time = QTime::currentTime();
- emit partyStarted(time);
-}
-
-BirthdayPartyAttached *BirthdayParty::qmlAttachedProperties(QObject *object)
-{
- return new BirthdayPartyAttached(object);
-}
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/birthdayparty.h b/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/birthdayparty.h
deleted file mode 100644
index 45ad4f0acf..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/birthdayparty.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#ifndef BIRTHDAYPARTY_H
-#define BIRTHDAYPARTY_H
-
-#include <QObject>
-#include <QDate>
-#include <qdeclarative.h>
-#include "person.h"
-
-class BirthdayPartyAttached : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp)
-public:
- BirthdayPartyAttached(QObject *object);
-
- QDate rsvp() const;
- void setRsvp(const QDate &);
-
-private:
- QDate m_rsvp;
-};
-
-class BirthdayParty : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(Person *host READ host WRITE setHost)
- Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
- Q_CLASSINFO("DefaultProperty", "guests")
-public:
- BirthdayParty(QObject *parent = 0);
-
- Person *host() const;
- void setHost(Person *);
-
- QDeclarativeListProperty<Person> guests();
- int guestCount() const;
- Person *guest(int) const;
-
- static BirthdayPartyAttached *qmlAttachedProperties(QObject *);
-
- void startParty();
-// ![0]
-signals:
- void partyStarted(const QTime &time);
-// ![0]
-
-private:
- Person *m_host;
- QList<Person *> m_guests;
-};
-QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES)
-
-#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/example.qml b/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/example.qml
deleted file mode 100644
index 811272c7b3..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/example.qml
+++ /dev/null
@@ -1,72 +0,0 @@
-/****************************************************************************
-**
-** 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 People 1.0
-
-// ![0]
-BirthdayParty {
- onPartyStarted: console.log("This party started rockin' at " + time);
-// ![0]
-
- host: Boy {
- name: "Bob Jones"
- shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 }
- }
-
- Boy {
- name: "Leo Hodges"
- BirthdayParty.rsvp: "2009-07-06"
- shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 }
- }
- Boy {
- name: "Jack Smith"
- shoe { size: 8; color: "blue"; brand: "Puma"; price: 19.95 }
- }
- Girl {
- name: "Anne Brown"
- BirthdayParty.rsvp: "2009-07-01"
- shoe.size: 7
- shoe.color: "red"
- shoe.brand: "Marc Jacobs"
- shoe.price: 699.99
- }
-// ![1]
-}
-// ![1]
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/main.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/main.cpp
deleted file mode 100644
index 7c6ec36a01..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/main.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-**
-** 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 <QCoreApplication>
-#include <QDeclarativeEngine>
-#include <QDeclarativeComponent>
-#include <QDebug>
-#include "birthdayparty.h"
-#include "person.h"
-
-int main(int argc, char ** argv)
-{
- QCoreApplication app(argc, argv);
-
- qmlRegisterType<BirthdayPartyAttached>();
- qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
- qmlRegisterType<ShoeDescription>();
- qmlRegisterType<Person>();
- qmlRegisterType<Boy>("People", 1,0, "Boy");
- qmlRegisterType<Girl>("People", 1,0, "Girl");
-
- QDeclarativeEngine engine;
- QDeclarativeComponent component(&engine, QUrl("qrc:example.qml"));
- BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
-
- if (party && party->host()) {
- qWarning() << party->host()->name() << "is having a birthday!";
-
- if (qobject_cast<Boy *>(party->host()))
- qWarning() << "He is inviting:";
- else
- qWarning() << "She is inviting:";
-
- for (int ii = 0; ii < party->guestCount(); ++ii) {
- Person *guest = party->guest(ii);
-
- QDate rsvpDate;
- QObject *attached =
- qmlAttachedPropertiesObject<BirthdayParty>(guest, false);
- if (attached)
- rsvpDate = attached->property("rsvp").toDate();
-
- if (rsvpDate.isNull())
- qWarning() << " " << guest->name() << "RSVP date: Hasn't RSVP'd";
- else
- qWarning() << " " << guest->name() << "RSVP date:" << qPrintable(rsvpDate.toString());
- }
-
- party->startParty();
- } else {
- qWarning() << component.errors();
- }
-
- return 0;
-}
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/person.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/person.cpp
deleted file mode 100644
index 7afcdc6ca6..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/person.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-/****************************************************************************
-**
-** 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 "person.h"
-
-ShoeDescription::ShoeDescription(QObject *parent)
-: QObject(parent), m_size(0), m_price(0)
-{
-}
-
-int ShoeDescription::size() const
-{
- return m_size;
-}
-
-void ShoeDescription::setSize(int s)
-{
- m_size = s;
-}
-
-QColor ShoeDescription::color() const
-{
- return m_color;
-}
-
-void ShoeDescription::setColor(const QColor &c)
-{
- m_color = c;
-}
-
-QString ShoeDescription::brand() const
-{
- return m_brand;
-}
-
-void ShoeDescription::setBrand(const QString &b)
-{
- m_brand = b;
-}
-
-qreal ShoeDescription::price() const
-{
- return m_price;
-}
-
-void ShoeDescription::setPrice(qreal p)
-{
- m_price = p;
-}
-
-Person::Person(QObject *parent)
-: QObject(parent)
-{
-}
-
-QString Person::name() const
-{
- return m_name;
-}
-
-void Person::setName(const QString &n)
-{
- m_name = n;
-}
-
-ShoeDescription *Person::shoe()
-{
- return &m_shoe;
-}
-
-
-Boy::Boy(QObject * parent)
-: Person(parent)
-{
-}
-
-
-Girl::Girl(QObject * parent)
-: Person(parent)
-{
-}
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/person.h b/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/person.h
deleted file mode 100644
index 032eca3c17..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/person.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#ifndef PERSON_H
-#define PERSON_H
-
-#include <QObject>
-#include <QColor>
-
-class ShoeDescription : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(int size READ size WRITE setSize)
- Q_PROPERTY(QColor color READ color WRITE setColor)
- Q_PROPERTY(QString brand READ brand WRITE setBrand)
- Q_PROPERTY(qreal price READ price WRITE setPrice)
-public:
- ShoeDescription(QObject *parent = 0);
-
- int size() const;
- void setSize(int);
-
- QColor color() const;
- void setColor(const QColor &);
-
- QString brand() const;
- void setBrand(const QString &);
-
- qreal price() const;
- void setPrice(qreal);
-private:
- int m_size;
- QColor m_color;
- QString m_brand;
- qreal m_price;
-};
-
-class Person : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString name READ name WRITE setName)
- Q_PROPERTY(ShoeDescription *shoe READ shoe)
-public:
- Person(QObject *parent = 0);
-
- QString name() const;
- void setName(const QString &);
-
- ShoeDescription *shoe();
-private:
- QString m_name;
- ShoeDescription m_shoe;
-};
-
-class Boy : public Person
-{
- Q_OBJECT
-public:
- Boy(QObject * parent = 0);
-};
-
-class Girl : public Person
-{
- Q_OBJECT
-public:
- Girl(QObject * parent = 0);
-};
-
-#endif // PERSON_H
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/signal.pro b/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/signal.pro
deleted file mode 100644
index 7feed89a73..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/signal.pro
+++ /dev/null
@@ -1,17 +0,0 @@
-TEMPLATE = app
-TARGET = signal
-DEPENDPATH += .
-INCLUDEPATH += .
-QT += declarative
-
-# Input
-SOURCES += main.cpp \
- person.cpp \
- birthdayparty.cpp
-HEADERS += person.h \
- birthdayparty.h
-RESOURCES += signal.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/signal
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS signal.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/signal
-INSTALLS += target sources
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/signal.qrc b/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/signal.qrc
deleted file mode 100644
index e2fa01d5e7..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/signal/signal.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>example.qml</file>
-</qresource>
-</RCC>
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/birthdayparty.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/birthdayparty.cpp
deleted file mode 100644
index b2408565c0..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/birthdayparty.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-/****************************************************************************
-**
-** 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 "birthdayparty.h"
-
-BirthdayPartyAttached::BirthdayPartyAttached(QObject *object)
-: QObject(object)
-{
-}
-
-QDate BirthdayPartyAttached::rsvp() const
-{
- return m_rsvp;
-}
-
-void BirthdayPartyAttached::setRsvp(const QDate &d)
-{
- m_rsvp = d;
-}
-
-
-BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_host(0)
-{
-}
-
-Person *BirthdayParty::host() const
-{
- return m_host;
-}
-
-void BirthdayParty::setHost(Person *c)
-{
- m_host = c;
-}
-
-QDeclarativeListProperty<Person> BirthdayParty::guests()
-{
- return QDeclarativeListProperty<Person>(this, m_guests);
-}
-
-int BirthdayParty::guestCount() const
-{
- return m_guests.count();
-}
-
-Person *BirthdayParty::guest(int index) const
-{
- return m_guests.at(index);
-}
-
-void BirthdayParty::startParty()
-{
- QTime time = QTime::currentTime();
- emit partyStarted(time);
-}
-
-QString BirthdayParty::announcement() const
-{
- return QString();
-}
-
-void BirthdayParty::setAnnouncement(const QString &speak)
-{
- qWarning() << qPrintable(speak);
-}
-
-BirthdayPartyAttached *BirthdayParty::qmlAttachedProperties(QObject *object)
-{
- return new BirthdayPartyAttached(object);
-}
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/birthdayparty.h b/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/birthdayparty.h
deleted file mode 100644
index 5d561da807..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/birthdayparty.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#ifndef BIRTHDAYPARTY_H
-#define BIRTHDAYPARTY_H
-
-#include <QObject>
-#include <QDate>
-#include <QDebug>
-#include <qdeclarative.h>
-#include "person.h"
-
-class BirthdayPartyAttached : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp)
-public:
- BirthdayPartyAttached(QObject *object);
-
- QDate rsvp() const;
- void setRsvp(const QDate &);
-
-private:
- QDate m_rsvp;
-};
-
-class BirthdayParty : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(Person *host READ host WRITE setHost)
- Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
-// ![0]
- Q_PROPERTY(QString announcement READ announcement WRITE setAnnouncement)
-// ![0]
- Q_CLASSINFO("DefaultProperty", "guests")
-public:
- BirthdayParty(QObject *parent = 0);
-
- Person *host() const;
- void setHost(Person *);
-
- QDeclarativeListProperty<Person> guests();
- int guestCount() const;
- Person *guest(int) const;
-
- QString announcement() const;
- void setAnnouncement(const QString &);
-
- static BirthdayPartyAttached *qmlAttachedProperties(QObject *);
-
- void startParty();
-signals:
- void partyStarted(const QTime &time);
-
-private:
- Person *m_host;
- QList<Person *> m_guests;
-};
-QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES)
-
-#endif // BIRTHDAYPARTY_H
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/example.qml b/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/example.qml
deleted file mode 100644
index e050b62409..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/example.qml
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************************
-**
-** 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 People 1.0
-
-// ![0]
-BirthdayParty {
- HappyBirthdaySong on announcement { name: "Bob Jones" }
-// ![0]
-
- onPartyStarted: console.log("This party started rockin' at " + time);
-
-
- host: Boy {
- name: "Bob Jones"
- shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 }
- }
-
- Boy {
- name: "Leo Hodges"
- BirthdayParty.rsvp: "2009-07-06"
- shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 }
- }
- Boy {
- name: "Jack Smith"
- shoe { size: 8; color: "blue"; brand: "Puma"; price: 19.95 }
- }
- Girl {
- name: "Anne Brown"
- BirthdayParty.rsvp: "2009-07-01"
- shoe.size: 7
- shoe.color: "red"
- shoe.brand: "Marc Jacobs"
- shoe.price: 699.99
- }
-
-// ![1]
-}
-// ![1]
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp
deleted file mode 100644
index 3e52cb2721..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
-**
-** 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 "happybirthdaysong.h"
-#include <QTimer>
-
-HappyBirthdaySong::HappyBirthdaySong(QObject *parent)
-: QObject(parent), m_line(-1)
-{
- setName(QString());
- QTimer *timer = new QTimer(this);
- QObject::connect(timer, SIGNAL(timeout()), this, SLOT(advance()));
- timer->start(1000);
-}
-
-void HappyBirthdaySong::setTarget(const QDeclarativeProperty &p)
-{
- m_target = p;
-}
-
-QString HappyBirthdaySong::name() const
-{
- return m_name;
-}
-
-void HappyBirthdaySong::setName(const QString &name)
-{
- m_name = name;
-
- m_lyrics.clear();
- m_lyrics << "Happy birthday to you,";
- m_lyrics << "Happy birthday to you,";
- m_lyrics << "Happy birthday dear " + m_name + ",";
- m_lyrics << "Happy birthday to you!";
- m_lyrics << "";
-}
-
-void HappyBirthdaySong::advance()
-{
- m_line = (m_line + 1) % m_lyrics.count();
-
- m_target.write(m_lyrics.at(m_line));
-}
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/happybirthdaysong.h b/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/happybirthdaysong.h
deleted file mode 100644
index 9721350435..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/happybirthdaysong.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#ifndef HAPPYBIRTHDAYSONG_H
-#define HAPPYBIRTHDAYSONG_H
-
-#include <QDeclarativePropertyValueSource>
-#include <QDeclarativeProperty>
-#include <qdeclarative.h>
-
-#include <QStringList>
-
-// ![0]
-class HappyBirthdaySong : public QObject, public QDeclarativePropertyValueSource
-{
- Q_OBJECT
- Q_INTERFACES(QDeclarativePropertyValueSource)
-// ![0]
- Q_PROPERTY(QString name READ name WRITE setName)
-// ![1]
-public:
- HappyBirthdaySong(QObject *parent = 0);
-
- virtual void setTarget(const QDeclarativeProperty &);
-// ![1]
-
- QString name() const;
- void setName(const QString &);
-
-private slots:
- void advance();
-
-private:
- int m_line;
- QStringList m_lyrics;
- QDeclarativeProperty m_target;
- QString m_name;
-// ![2]
-};
-// ![2]
-
-#endif // HAPPYBIRTHDAYSONG_H
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/main.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/main.cpp
deleted file mode 100644
index d4440b0353..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/main.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/****************************************************************************
-**
-** 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 <QCoreApplication>
-#include <QDeclarativeEngine>
-#include <QDeclarativeComponent>
-#include <QDebug>
-#include "birthdayparty.h"
-#include "happybirthdaysong.h"
-#include "person.h"
-
-int main(int argc, char ** argv)
-{
- QCoreApplication app(argc, argv);
-
- qmlRegisterType<BirthdayPartyAttached>();
- qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
- qmlRegisterType<HappyBirthdaySong>("People", 1,0, "HappyBirthdaySong");
- qmlRegisterType<ShoeDescription>();
- qmlRegisterType<Person>();
- qmlRegisterType<Boy>("People", 1,0, "Boy");
- qmlRegisterType<Girl>("People", 1,0, "Girl");
-
- QDeclarativeEngine engine;
- QDeclarativeComponent component(&engine, QUrl("qrc:example.qml"));
- BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
-
- if (party && party->host()) {
- qWarning() << party->host()->name() << "is having a birthday!";
-
- if (qobject_cast<Boy *>(party->host()))
- qWarning() << "He is inviting:";
- else
- qWarning() << "She is inviting:";
-
- for (int ii = 0; ii < party->guestCount(); ++ii) {
- Person *guest = party->guest(ii);
-
- QDate rsvpDate;
- QObject *attached =
- qmlAttachedPropertiesObject<BirthdayParty>(guest, false);
- if (attached)
- rsvpDate = attached->property("rsvp").toDate();
-
- if (rsvpDate.isNull())
- qWarning() << " " << guest->name() << "RSVP date: Hasn't RSVP'd";
- else
- qWarning() << " " << guest->name() << "RSVP date:" << qPrintable(rsvpDate.toString());
- }
-
- party->startParty();
- } else {
- qWarning() << component.errors();
- }
-
- return app.exec();
-}
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/person.cpp b/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/person.cpp
deleted file mode 100644
index 7afcdc6ca6..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/person.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-/****************************************************************************
-**
-** 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 "person.h"
-
-ShoeDescription::ShoeDescription(QObject *parent)
-: QObject(parent), m_size(0), m_price(0)
-{
-}
-
-int ShoeDescription::size() const
-{
- return m_size;
-}
-
-void ShoeDescription::setSize(int s)
-{
- m_size = s;
-}
-
-QColor ShoeDescription::color() const
-{
- return m_color;
-}
-
-void ShoeDescription::setColor(const QColor &c)
-{
- m_color = c;
-}
-
-QString ShoeDescription::brand() const
-{
- return m_brand;
-}
-
-void ShoeDescription::setBrand(const QString &b)
-{
- m_brand = b;
-}
-
-qreal ShoeDescription::price() const
-{
- return m_price;
-}
-
-void ShoeDescription::setPrice(qreal p)
-{
- m_price = p;
-}
-
-Person::Person(QObject *parent)
-: QObject(parent)
-{
-}
-
-QString Person::name() const
-{
- return m_name;
-}
-
-void Person::setName(const QString &n)
-{
- m_name = n;
-}
-
-ShoeDescription *Person::shoe()
-{
- return &m_shoe;
-}
-
-
-Boy::Boy(QObject * parent)
-: Person(parent)
-{
-}
-
-
-Girl::Girl(QObject * parent)
-: Person(parent)
-{
-}
-
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/person.h b/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/person.h
deleted file mode 100644
index 032eca3c17..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/person.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-#ifndef PERSON_H
-#define PERSON_H
-
-#include <QObject>
-#include <QColor>
-
-class ShoeDescription : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(int size READ size WRITE setSize)
- Q_PROPERTY(QColor color READ color WRITE setColor)
- Q_PROPERTY(QString brand READ brand WRITE setBrand)
- Q_PROPERTY(qreal price READ price WRITE setPrice)
-public:
- ShoeDescription(QObject *parent = 0);
-
- int size() const;
- void setSize(int);
-
- QColor color() const;
- void setColor(const QColor &);
-
- QString brand() const;
- void setBrand(const QString &);
-
- qreal price() const;
- void setPrice(qreal);
-private:
- int m_size;
- QColor m_color;
- QString m_brand;
- qreal m_price;
-};
-
-class Person : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString name READ name WRITE setName)
- Q_PROPERTY(ShoeDescription *shoe READ shoe)
-public:
- Person(QObject *parent = 0);
-
- QString name() const;
- void setName(const QString &);
-
- ShoeDescription *shoe();
-private:
- QString m_name;
- ShoeDescription m_shoe;
-};
-
-class Boy : public Person
-{
- Q_OBJECT
-public:
- Boy(QObject * parent = 0);
-};
-
-class Girl : public Person
-{
- Q_OBJECT
-public:
- Girl(QObject * parent = 0);
-};
-
-#endif // PERSON_H
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/valuesource.pro b/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/valuesource.pro
deleted file mode 100644
index 64034a1fe8..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/valuesource.pro
+++ /dev/null
@@ -1,19 +0,0 @@
-TEMPLATE = app
-TARGET = valuesource
-DEPENDPATH += .
-INCLUDEPATH += .
-QT += declarative
-
-# Input
-SOURCES += main.cpp \
- person.cpp \
- birthdayparty.cpp \
- happybirthdaysong.cpp
-HEADERS += person.h \
- birthdayparty.h \
- happybirthdaysong.h
-RESOURCES += valuesource.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/valuesource
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS valuesource.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/valuesource
-INSTALLS += target sources
diff --git a/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/valuesource.qrc b/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/valuesource.qrc
deleted file mode 100644
index e2fa01d5e7..0000000000
--- a/examples/declarative/qtquick1/cppextensions/referenceexamples/valuesource/valuesource.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>example.qml</file>
-</qresource>
-</RCC>