summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-04-28 03:56:45 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-04-28 03:56:45 (GMT)
commitbfe1ed3d92cc68e9ceeaa38803b77ed17cf93263 (patch)
tree636870c6a9b132590c1d083afec6720074b83d37 /doc/src/declarative
parent7a89d94c208347635fa0ad5c4da9bca4a9398f5c (diff)
downloadQt-bfe1ed3d92cc68e9ceeaa38803b77ed17cf93263.zip
Qt-bfe1ed3d92cc68e9ceeaa38803b77ed17cf93263.tar.gz
Qt-bfe1ed3d92cc68e9ceeaa38803b77ed17cf93263.tar.bz2
Move snippets to correct location
Diffstat (limited to 'doc/src/declarative')
-rw-r--r--doc/src/declarative/integrating.qdoc12
-rw-r--r--doc/src/declarative/qtbinding.qdoc26
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h55
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/graphicswidgets.pro13
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/main.qml32
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/qmldir1
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h54
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/shapesplugin.cpp61
-rw-r--r--doc/src/declarative/snippets/qtbinding/contextproperties/contextproperties.pro2
-rw-r--r--doc/src/declarative/snippets/qtbinding/contextproperties/main.cpp79
-rw-r--r--doc/src/declarative/snippets/qtbinding/contextproperties/main.qml15
-rw-r--r--doc/src/declarative/snippets/qtbinding/custompalette/custompalette.h80
-rw-r--r--doc/src/declarative/snippets/qtbinding/custompalette/custompalette.pro3
-rw-r--r--doc/src/declarative/snippets/qtbinding/custompalette/main.cpp62
-rw-r--r--doc/src/declarative/snippets/qtbinding/custompalette/main.qml22
-rw-r--r--doc/src/declarative/snippets/qtbinding/resources/example.qrc10
-rw-r--r--doc/src/declarative/snippets/qtbinding/resources/images/background.png0
-rw-r--r--doc/src/declarative/snippets/qtbinding/resources/main.cpp58
-rw-r--r--doc/src/declarative/snippets/qtbinding/resources/main.qml7
-rw-r--r--doc/src/declarative/snippets/qtbinding/resources/resources.pro4
-rw-r--r--doc/src/declarative/snippets/qtbinding/stopwatch/main.cpp63
-rw-r--r--doc/src/declarative/snippets/qtbinding/stopwatch/main.qml18
-rw-r--r--doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.cpp63
-rw-r--r--doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.h62
-rw-r--r--doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.pro3
25 files changed, 19 insertions, 786 deletions
diff --git a/doc/src/declarative/integrating.qdoc b/doc/src/declarative/integrating.qdoc
index 0051f09..1c07f8e 100644
--- a/doc/src/declarative/integrating.qdoc
+++ b/doc/src/declarative/integrating.qdoc
@@ -118,34 +118,34 @@ Here is an example. Suppose you have two classes, \c RedSquare and \c BlueCircle
that both inherit from QGraphicsWidget:
\c [graphicswidgets/redsquare.h]
-\snippet doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h 0
+\snippet doc/src/snippets/declarative/graphicswidgets/redsquare.h 0
\c [graphicswidgets/bluecircle.h]
-\snippet doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h 0
+\snippet doc/src/snippets/declarative/graphicswidgets/bluecircle.h 0
Then, create a plugin by subclassing QDeclarativeExtensionPlugin, and register the
types by calling qmlRegisterType(). Also export the plugin with Q_EXPORT_PLUGIN2.
\c [graphicswidgets/shapesplugin.cpp]
-\snippet doc/src/declarative/snippets/integrating/graphicswidgets/shapesplugin.cpp 0
+\snippet doc/src/snippets/declarative/graphicswidgets/shapesplugin.cpp 0
Now write a project file that creates the plugin:
\c [graphicswidgets/graphicswidgets.pro]
-\quotefile doc/src/declarative/snippets/integrating/graphicswidgets/graphicswidgets.pro
+\quotefile doc/src/snippets/declarative/graphicswidgets/graphicswidgets.pro
And add a \c qmldir file that includes the \c graphicswidgets plugin from the \c lib
subdirectory (as defined in the project file):
\c [graphicswidgets/qmldir]
-\quotefile doc/src/declarative/snippets/integrating/graphicswidgets/qmldir
+\quotefile doc/src/snippets/declarative/graphicswidgets/qmldir
Now, we can write a QML file that uses the \c RedSquare and \c BlueCircle widgets.
(As an example, we can also create \c QGraphicsWidget items if we import the \c Qt.widgets
module.)
\c [main.qml]
-\quotefile doc/src/declarative/snippets/integrating/graphicswidgets/main.qml
+\quotefile doc/src/snippets/declarative/graphicswidgets/main.qml
Here is a screenshot of the result:
diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc
index d024ff2..7d696d7 100644
--- a/doc/src/declarative/qtbinding.qdoc
+++ b/doc/src/declarative/qtbinding.qdoc
@@ -97,17 +97,17 @@ The following example shows how to expose a background color to a QML file throu
\row
\o
\c {// main.cpp}
-\snippet doc/src/declarative/snippets/qtbinding/contextproperties/main.cpp 0
+\snippet doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp 0
\o
\c {// main.qml}
-\snippet doc/src/declarative/snippets/qtbinding/contextproperties/main.qml 0
+\snippet doc/src/snippets/declarative/qtbinding/contextproperties/main.qml 0
\endtable
Or, if you want \c main.cpp to create the component without showing it in a QDeclarativeView, you could create an instance of QDeclarativeContext using QDeclarativeEngine::rootContext() instead:
-\snippet doc/src/declarative/snippets/qtbinding/contextproperties/main.cpp 1
+\snippet doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp 1
Context properties work just like normal properties in QML bindings - if the \c backgroundColor
context property in this example was changed to red, the component object instances would
@@ -135,15 +135,15 @@ allow QML to set values.
The following example creates a \c CustomPalette object, and sets it as the \c palette context
property.
-\snippet doc/src/declarative/snippets/qtbinding/custompalette/custompalette.h 0
+\snippet doc/src/snippets/declarative/qtbinding/custompalette/custompalette.h 0
-\snippet doc/src/declarative/snippets/qtbinding/custompalette/main.cpp 0
+\snippet doc/src/snippets/declarative/qtbinding/custompalette/main.cpp 0
The QML that follows references the palette object, and its properties, to set the appropriate
background and text colors. When the window is clicked, the palette's text color is changed, and
the window text will update accordingly.
-\snippet doc/src/declarative/snippets/qtbinding/custompalette/main.qml 0
+\snippet doc/src/snippets/declarative/qtbinding/custompalette/main.qml 0
To detect when a C++ property value - in this case the \c CustomPalette's \c text property -
changes, the property must have a corresponding NOTIFY signal. The NOTIFY signal specifies a signal
@@ -185,12 +185,12 @@ This example toggles the "Stopwatch" object on/off when the MouseArea is clicked
\row
\o
\c {// main.cpp}
-\snippet doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.h 0
-\snippet doc/src/declarative/snippets/qtbinding/stopwatch/main.cpp 0
+\snippet doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.h 0
+\snippet doc/src/snippets/declarative/qtbinding/stopwatch/main.cpp 0
\o
\c {// main.qml}
-\snippet doc/src/declarative/snippets/qtbinding/stopwatch/main.qml 0
+\snippet doc/src/snippets/declarative/qtbinding/stopwatch/main.qml 0
\endtable
@@ -258,16 +258,16 @@ QML content can be loaded from \l {The Qt Resource System} using the \e qrc: URL
For example:
\c [project/example.qrc]
-\quotefile doc/src/declarative/snippets/qtbinding/resources/example.qrc
+\quotefile doc/src/snippets/declarative/qtbinding/resources/example.qrc
\c [project/project.pro]
-\quotefile doc/src/declarative/snippets/qtbinding/resources/resources.pro
+\quotefile doc/src/snippets/declarative/qtbinding/resources/resources.pro
\c [project/main.cpp]
-\snippet doc/src/declarative/snippets/qtbinding/resources/main.cpp 0
+\snippet doc/src/snippets/declarative/qtbinding/resources/main.cpp 0
\c [project/main.qml]
-\snippet doc/src/declarative/snippets/qtbinding/resources/main.qml 0
+\snippet doc/src/snippets/declarative/qtbinding/resources/main.qml 0
*/
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h b/doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h
deleted file mode 100644
index 73d66b7..0000000
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-//![0]
-#include <QGraphicsWidget>
-#include <QPainter>
-
-class BlueCircle : public QGraphicsWidget
-{
- Q_OBJECT
-public:
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
- {
- painter->setPen(QColor(Qt::blue));
- painter->drawEllipse(0, 0, size().width(), size().height());
- }
-};
-//![0]
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/graphicswidgets.pro b/doc/src/declarative/snippets/integrating/graphicswidgets/graphicswidgets.pro
deleted file mode 100644
index 21c8a37..0000000
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/graphicswidgets.pro
+++ /dev/null
@@ -1,13 +0,0 @@
-TEMPLATE = lib
-CONFIG += qt plugin
-QT += declarative
-
-HEADERS += redsquare.h \
- bluecircle.h
-
-SOURCES += shapesplugin.cpp
-
-DESTDIR = lib
-OBJECTS_DIR = tmp
-MOC_DIR = tmp
-
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/main.qml b/doc/src/declarative/snippets/integrating/graphicswidgets/main.qml
deleted file mode 100644
index ffcf79d..0000000
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/main.qml
+++ /dev/null
@@ -1,32 +0,0 @@
-import Qt 4.7
-import Qt.widgets 4.7
-
-Rectangle {
- width: 200
- height: 200
-
- RedSquare {
- id: square
- width: 80
- height: 80
- }
-
- BlueCircle {
- anchors.left: square.right
- width: 80
- height: 80
- }
-
- QGraphicsWidget {
- anchors.top: square.bottom
- size.width: 80
- size.height: 80
- layout: QGraphicsLinearLayout {
- LayoutItem {
- preferredSize: "100x100"
- Rectangle { color: "yellow"; anchors.fill: parent }
- }
- }
- }
-}
-
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/qmldir b/doc/src/declarative/snippets/integrating/graphicswidgets/qmldir
deleted file mode 100644
index f94dad2..0000000
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/qmldir
+++ /dev/null
@@ -1 +0,0 @@
-plugin graphicswidgets lib
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h b/doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h
deleted file mode 100644
index 3050662..0000000
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-//![0]
-#include <QGraphicsWidget>
-#include <QPainter>
-
-class RedSquare : public QGraphicsWidget
-{
- Q_OBJECT
-public:
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
- {
- painter->fillRect(0, 0, size().width(), size().height(), QColor(Qt::red));
- }
-};
-//![0]
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/shapesplugin.cpp b/doc/src/declarative/snippets/integrating/graphicswidgets/shapesplugin.cpp
deleted file mode 100644
index 4c18ef3..0000000
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/shapesplugin.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-//![0]
-#include "redsquare.h"
-#include "bluecircle.h"
-
-#include <QtDeclarative/QDeclarativeExtensionPlugin>
-#include <QtDeclarative/qdeclarative.h>
-
-class ShapesPlugin : public QDeclarativeExtensionPlugin
-{
- Q_OBJECT
-public:
- void registerTypes(const char *uri) {
- qmlRegisterType<RedSquare>(uri, 1, 0, "RedSquare");
- qmlRegisterType<BlueCircle>(uri, 1, 0, "BlueCircle");
- }
-};
-
-#include "shapesplugin.moc"
-
-Q_EXPORT_PLUGIN2(shapesplugin, ShapesPlugin);
-//![0]
diff --git a/doc/src/declarative/snippets/qtbinding/contextproperties/contextproperties.pro b/doc/src/declarative/snippets/qtbinding/contextproperties/contextproperties.pro
deleted file mode 100644
index 68eeaf2..0000000
--- a/doc/src/declarative/snippets/qtbinding/contextproperties/contextproperties.pro
+++ /dev/null
@@ -1,2 +0,0 @@
-QT += declarative
-SOURCES += main.cpp
diff --git a/doc/src/declarative/snippets/qtbinding/contextproperties/main.cpp b/doc/src/declarative/snippets/qtbinding/contextproperties/main.cpp
deleted file mode 100644
index 4073a6c..0000000
--- a/doc/src/declarative/snippets/qtbinding/contextproperties/main.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QDeclarativeComponent>
-#include <QDeclarativeEngine>
-
-//![0]
-#include <QApplication>
-#include <QDeclarativeView>
-#include <QDeclarativeContext>
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QDeclarativeView view;
- QDeclarativeContext *context = view.rootContext();
- context->setContextProperty("backgroundColor",
- QColor(Qt::yellow));
-
- view.setSource(QUrl::fromLocalFile("main.qml"));
- view.show();
-
- return app.exec();
-}
-//![0]
-
-static void alternative()
-{
- // Alternatively, if we don't actually want to display main.qml:
-//![1]
- QDeclarativeEngine engine;
- QDeclarativeContext *windowContext = new QDeclarativeContext(engine.rootContext());
- windowContext->setContextProperty("backgroundColor", QColor(Qt::yellow));
-
- QDeclarativeComponent component(&engine, "main.qml");
- QObject *window = component.create(windowContext);
-//![1]
-}
-
-
diff --git a/doc/src/declarative/snippets/qtbinding/contextproperties/main.qml b/doc/src/declarative/snippets/qtbinding/contextproperties/main.qml
deleted file mode 100644
index 1053f73..0000000
--- a/doc/src/declarative/snippets/qtbinding/contextproperties/main.qml
+++ /dev/null
@@ -1,15 +0,0 @@
-//![0]
-import Qt 4.7
-
-Rectangle {
- width: 300
- height: 300
-
- color: backgroundColor
-
- Text {
- anchors.centerIn: parent
- text: "Hello Yellow World!"
- }
-}
-//![0]
diff --git a/doc/src/declarative/snippets/qtbinding/custompalette/custompalette.h b/doc/src/declarative/snippets/qtbinding/custompalette/custompalette.h
deleted file mode 100644
index d0d253a..0000000
--- a/doc/src/declarative/snippets/qtbinding/custompalette/custompalette.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QObject>
-#include <QColor>
-
-//![0]
-class CustomPalette : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QColor background READ background WRITE setBackground NOTIFY backgroundChanged)
- Q_PROPERTY(QColor text READ text WRITE setText NOTIFY textChanged)
-
-public:
- CustomPalette() : m_background(Qt::white), m_text(Qt::black) {}
-
- QColor background() const { return m_background; }
- void setBackground(const QColor &c) {
- if (c != m_background) {
- m_background = c;
- emit backgroundChanged();
- }
- }
-
- QColor text() const { return m_text; }
- void setText(const QColor &c) {
- if (c != m_text) {
- m_text = c;
- emit textChanged();
- }
- }
-
-signals:
- void textChanged();
- void backgroundChanged();
-
-private:
- QColor m_background;
- QColor m_text;
-};
-
-//![0]
diff --git a/doc/src/declarative/snippets/qtbinding/custompalette/custompalette.pro b/doc/src/declarative/snippets/qtbinding/custompalette/custompalette.pro
deleted file mode 100644
index e6af0d0..0000000
--- a/doc/src/declarative/snippets/qtbinding/custompalette/custompalette.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-QT += declarative
-HEADERS += custompalette.h
-SOURCES += main.cpp
diff --git a/doc/src/declarative/snippets/qtbinding/custompalette/main.cpp b/doc/src/declarative/snippets/qtbinding/custompalette/main.cpp
deleted file mode 100644
index dc651f6..0000000
--- a/doc/src/declarative/snippets/qtbinding/custompalette/main.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QApplication>
-#include <QDeclarativeView>
-#include <QDeclarativeContext>
-
-#include "custompalette.h"
-
-//![0]
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QDeclarativeView view;
- view.rootContext()->setContextProperty("palette", new CustomPalette);
-
- view.setSource(QUrl::fromLocalFile("main.qml"));
- view.show();
-
- return app.exec();
-}
-//![0]
-
diff --git a/doc/src/declarative/snippets/qtbinding/custompalette/main.qml b/doc/src/declarative/snippets/qtbinding/custompalette/main.qml
deleted file mode 100644
index f1a3b4f..0000000
--- a/doc/src/declarative/snippets/qtbinding/custompalette/main.qml
+++ /dev/null
@@ -1,22 +0,0 @@
-//![0]
-import Qt 4.7
-
-Rectangle {
- width: 240
- height: 320
- color: palette.background
-
- Text {
- anchors.centerIn: parent
- color: palette.text
- text: "Click me to change color!"
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: {
- palette.text = "blue";
- }
- }
-}
-//![0]
diff --git a/doc/src/declarative/snippets/qtbinding/resources/example.qrc b/doc/src/declarative/snippets/qtbinding/resources/example.qrc
deleted file mode 100644
index 5e49415..0000000
--- a/doc/src/declarative/snippets/qtbinding/resources/example.qrc
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE RCC>
-<RCC version="1.0">
-
-<qresource prefix="/">
- <file>main.qml</file>
- <file>images/background.png</file>
-</qresource>
-
-</RCC>
-
diff --git a/doc/src/declarative/snippets/qtbinding/resources/images/background.png b/doc/src/declarative/snippets/qtbinding/resources/images/background.png
deleted file mode 100644
index e69de29..0000000
--- a/doc/src/declarative/snippets/qtbinding/resources/images/background.png
+++ /dev/null
diff --git a/doc/src/declarative/snippets/qtbinding/resources/main.cpp b/doc/src/declarative/snippets/qtbinding/resources/main.cpp
deleted file mode 100644
index 5459b9e..0000000
--- a/doc/src/declarative/snippets/qtbinding/resources/main.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QApplication>
-#include <QDeclarativeView>
-#include <QDeclarativeContext>
-
-//![0]
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QDeclarativeView view;
- view.setSource(QUrl("qrc:/main.qml"));
- view.show();
-
- return app.exec();
-}
-//![0]
-
diff --git a/doc/src/declarative/snippets/qtbinding/resources/main.qml b/doc/src/declarative/snippets/qtbinding/resources/main.qml
deleted file mode 100644
index dfe923f..0000000
--- a/doc/src/declarative/snippets/qtbinding/resources/main.qml
+++ /dev/null
@@ -1,7 +0,0 @@
-//![0]
-import Qt 4.7
-
-Image {
- source: "images/background.png"
-}
-//![0]
diff --git a/doc/src/declarative/snippets/qtbinding/resources/resources.pro b/doc/src/declarative/snippets/qtbinding/resources/resources.pro
deleted file mode 100644
index cc01ee1..0000000
--- a/doc/src/declarative/snippets/qtbinding/resources/resources.pro
+++ /dev/null
@@ -1,4 +0,0 @@
-QT += declarative
-
-SOURCES += main.cpp
-RESOURCES += example.qrc
diff --git a/doc/src/declarative/snippets/qtbinding/stopwatch/main.cpp b/doc/src/declarative/snippets/qtbinding/stopwatch/main.cpp
deleted file mode 100644
index 537a288..0000000
--- a/doc/src/declarative/snippets/qtbinding/stopwatch/main.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "stopwatch.h"
-
-#include <QDeclarativeView>
-#include <QDeclarativeContext>
-#include <QApplication>
-
-//![0]
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QDeclarativeView view;
- view.rootContext()->setContextProperty("stopwatch",
- new Stopwatch);
-
- view.setSource(QUrl::fromLocalFile("main.qml"));
- view.show();
-
- return app.exec();
-}
-//![0]
-
diff --git a/doc/src/declarative/snippets/qtbinding/stopwatch/main.qml b/doc/src/declarative/snippets/qtbinding/stopwatch/main.qml
deleted file mode 100644
index 2efa542..0000000
--- a/doc/src/declarative/snippets/qtbinding/stopwatch/main.qml
+++ /dev/null
@@ -1,18 +0,0 @@
-//![0]
-import Qt 4.7
-
-Rectangle {
- width: 300
- height: 300
-
- MouseArea {
- anchors.fill: parent
- onClicked: {
- if (stopwatch.isRunning())
- stopwatch.stop()
- else
- stopwatch.start();
- }
- }
-}
-//![0]
diff --git a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.cpp b/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.cpp
deleted file mode 100644
index 4954a5f..0000000
--- a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "stopwatch.h"
-
-Stopwatch::Stopwatch()
- : m_running(false)
-{
-}
-
-bool Stopwatch::isRunning() const
-{
- return m_running;
-}
-
-void Stopwatch::start()
-{
- m_running = true;
-}
-
-void Stopwatch::stop()
-{
- m_running = false;
-}
-
diff --git a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.h b/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.h
deleted file mode 100644
index 8d17121..0000000
--- a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QObject>
-
-//![0]
-class Stopwatch : public QObject
-{
- Q_OBJECT
-public:
- Stopwatch();
-
- Q_INVOKABLE bool isRunning() const;
-
-public slots:
- void start();
- void stop();
-
-private:
- bool m_running;
-};
-
-//![0]
-
diff --git a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.pro b/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.pro
deleted file mode 100644
index d803e6a..0000000
--- a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-QT += declarative
-HEADERS += stopwatch.h
-SOURCES += main.cpp stopwatch.cpp