aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/src/qtquick2/qtdeclarative.qdoc180
-rw-r--r--doc/src/qtquick2/qtquick2.qdoc38
-rw-r--r--src/qml/doc/src/bindings/c++models.qdoc (renamed from src/qml/doc/src/c++models.qdoc)0
-rw-r--r--src/qml/doc/src/bindings/integrating.qdoc (renamed from src/qml/doc/src/integrating.qdoc)0
-rw-r--r--src/qml/doc/src/bindings/properties-methods-signals.qdoc (renamed from src/qml/doc/src/qmltypes.qdoc)331
-rw-r--r--src/qml/doc/src/bindings/qmlbindings.qdoc70
-rw-r--r--src/qml/doc/src/bindings/qmlplugins.qdoc (renamed from src/qml/doc/src/qmlplugins.qdoc)4
-rw-r--r--src/qml/doc/src/bindings/qmltypes.qdoc356
-rw-r--r--src/qml/doc/src/bindings/qtbinding.qdoc (renamed from src/qml/doc/src/qtbinding.qdoc)0
-rw-r--r--src/qml/doc/src/engine/qmlengine.qdoc (renamed from src/qml/doc/src/qmlengine.qdoc)5
-rw-r--r--src/qml/doc/src/engine/qmlruntime.qdoc (renamed from src/qml/doc/src/qmlruntime.qdoc)0
-rw-r--r--src/qml/doc/src/engine/qtjavascript.qdoc (renamed from src/qml/doc/src/qtjavascript.qdoc)0
-rw-r--r--src/qml/doc/src/qml/basictypes.qdoc (renamed from src/qml/doc/src/basictypes.qdoc)2
-rw-r--r--src/qml/doc/src/qml/codingconventions.qdoc (renamed from src/qml/doc/src/codingconventions.qdoc)0
-rw-r--r--src/qml/doc/src/qml/dynamicobjects.qdoc (renamed from src/qml/doc/src/dynamicobjects.qdoc)0
-rw-r--r--src/qml/doc/src/qml/hostenvironment.qdoc (renamed from src/qml/doc/src/hostenvironment.qdoc)0
-rw-r--r--src/qml/doc/src/qml/javascriptblocks.qdoc (renamed from src/qml/doc/src/javascriptblocks.qdoc)0
-rw-r--r--src/qml/doc/src/qml/jsfunctionlist.qdoc (renamed from src/qml/doc/src/jsfunctionlist.qdoc)0
-rw-r--r--src/qml/doc/src/qml/network.qdoc (renamed from src/qml/doc/src/network.qdoc)0
-rw-r--r--src/qml/doc/src/qml/performance.qdoc (renamed from src/qml/doc/src/performance.qdoc)0
-rw-r--r--src/qml/doc/src/qml/propertybinding.qdoc (renamed from src/qml/doc/src/propertybinding.qdoc)0
-rw-r--r--src/qml/doc/src/qml/qmlcomponents.qdoc (renamed from src/qml/doc/src/qmlcomponents.qdoc)0
-rw-r--r--src/qml/doc/src/qml/qmldocument.qdoc (renamed from src/qml/doc/src/qmldocument.qdoc)0
-rw-r--r--src/qml/doc/src/qml/qmli18n.qdoc (renamed from src/qml/doc/src/qmli18n.qdoc)0
-rw-r--r--src/qml/doc/src/qml/qmllanguage-modules.qdoc (renamed from src/qml/doc/src/modules.qdoc)4
-rw-r--r--src/qml/doc/src/qml/qmllanguage-signal-handler.qdoc (renamed from src/qml/doc/src/qmlevents.qdoc)2
-rw-r--r--src/qml/doc/src/qml/qmllanguage.qdoc76
-rw-r--r--src/qml/doc/src/qml/scope.qdoc (renamed from src/qml/doc/src/scope.qdoc)0
-rw-r--r--src/qml/doc/src/qml/security.qdoc (renamed from src/qml/doc/src/security.qdoc)0
-rw-r--r--src/qml/doc/src/qmllanguage.qdoc86
-rw-r--r--src/qml/doc/src/tutorials/extending-tutorial.qdoc (renamed from src/qml/doc/src/extending-tutorial.qdoc)0
-rw-r--r--src/qml/doc/src/types/globalobject.qdoc (renamed from src/qml/doc/src/globalobject.qdoc)0
-rw-r--r--src/qml/doc/src/types/qmldate.qdoc (renamed from src/qml/doc/src/qmldate.qdoc)0
-rw-r--r--src/qml/doc/src/types/qmlnumber.qdoc (renamed from src/qml/doc/src/qmlnumber.qdoc)0
-rw-r--r--src/quick/doc/qtquick.qdocconf8
-rw-r--r--src/quick/doc/src/qtdeclarative.qdoc176
-rw-r--r--src/quick/doc/src/states.qdoc2
-rw-r--r--src/quick/doc/src/uicreation.qdoc89
38 files changed, 740 insertions, 689 deletions
diff --git a/doc/src/qtquick2/qtdeclarative.qdoc b/doc/src/qtquick2/qtdeclarative.qdoc
deleted file mode 100644
index fcba1fec64..0000000000
--- a/doc/src/qtquick2/qtdeclarative.qdoc
+++ /dev/null
@@ -1,180 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** GNU Free Documentation License
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms
-** and conditions contained in a signed written agreement between you
-** and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
-\title Qt Quick
-\page qtquick-reference.html
-\inqmlmodule QtQuick 2
-\ingroup qt-gui-concepts
-\ingroup overviews
-
-\brief Qt Quick provides a declarative framework for building highly
-dynamic applications.
-
-For App Developers and Designers, who want to deliver apps with amazing user
-experience, Qt provides the QML language, the Qt Quick Elements, and tools in Qt
-Creator that make it faster than ever to transform your brilliant idea into a
-winning App across mobile, embedded, and desktop platforms.
-
-\target qtquick-overviews
-\div {class="threecolumn_area"}
- \div {class="heading"}
- QML Topics
- \enddiv
- QML is a declarative language for creating flexible and reusable
- components. The QML runtime powers QML based applications. The runtime
- includes a QML engine, JavaScript engine, and mechanism to bind to the Qt
- Framework.
-
- \div {class=" threecolumn_piece"}
- \div {class="heading"}
- QML Essentials
- \enddiv
- \list
- \li \l{QML Components}{Components}
- \li \l{Properties and Property Binding in QML}{Properties and Property Binding}
- \li \l{JavaScript Expressions in QML}{JavaScript Code}
- \li \l{QML Signal and Handler Event System}{Signal and Handler Event System}
- \li \l{QML Modules}{Modules}
- \endlist
- \list
- \li \l{What's New in Qt Quick 2}{What's New in Qt Quick}
- \endlist
- \enddiv
- \div {class="threecolumn_piece"}
- \div {class="heading"}
- QML Engine
- \enddiv
- \list
- \li \l{The QML Engine}
- \li \l{QML Global Object}
- \li \l{Dynamic Object Management in QML}{Dynamic Object Management}
- \li \l{QML Performance}{Performance}
- \endlist
- \enddiv
- \div {class=" threecolumn_piece"}
- \div {class="heading"}
- Reference
- \enddiv
- \list
- \li \l{QML Syntax}
- \li \l{QML Basic Types}{Data Types}
- \li \l{QML Coding Conventions}{Coding Conventions}
- \li \l{QML Security}{Security Model}
- \li \l{QML Scope}{Scope Model}
- \li \l{QML Documents}{Documents}
- \endlist
- \enddiv
- \div {class="threecolumn_piece"}
- \div {class="heading"}
- QML Bindings with Qt C++
- \enddiv
- \list
- \li \l{Creating QML Types}
- \li \l{QML Plugins}
- \li \l{Exposing C++ Models}
- \li \l{Integrating QML Code with Existing Qt UI Code}{Qt Gui Porting Information}
- \endlist
- \enddiv
- \div {class=" threecolumn_piece"}
- \div {class="heading"}
- Tools
- \enddiv
- \list
- \li \l{QML Internationalization}{Internationalization}
- \li \l{QtQuickTest Reference Documentation}
- \li \l{Debugging QML}
- \endlist
- \enddiv
-\enddiv
-\div {class="threecolumn_area"}
- \div {class="heading"}
- Qt Quick Elements
- \enddiv
- Qt Quick Elements features graphical elements, user input system,
- animation system, and data visualization through models and delegates.
- \div {class="threecolumn_piece"}
- \div {class="heading"}
- Graphics and Special Effects
- \enddiv
- \list
- \li \l{Basic Elements}{Basic Elements}
- \li \l{Painting with Canvas API}
- \li \l{Using the Qt Quick Particle System}{Particle Effects}
- \li \l{Shader Effects in QML}{Shader Effects}
- \endlist
- \enddiv
- \div {class="threecolumn_piece"}
- \div {class="heading"}
- Anchoring and Layouts
- \enddiv
- \list
- \li \l{Component Layouts}
- \li \l{Layouts with Anchors}
- \li \l{Right-to-left User Interfaces}{Right-to-left User Interfaces}
- \endlist
- \enddiv
- \div {class="threecolumn_piece"}
- \div {class="heading"}
- Mouse and Keyboard Input
- \enddiv
- \list
- \li \l{Mouse Events}{Mouse Events}
- \li \l{Text Handling and Validators}{Text Handling and Validators}
- \li \l{Keyboard Focus in QML}{Keyboard Focus}
- \endlist
- \enddiv
- \div {class="threecolumn_piece"}
- \div {class="heading"}
- States and Transitions
- \enddiv
- \list
- \li \l{States}{States}
- \li \l{QML Animation and Transitions}{Animation and Transitions}
- \endlist
- \enddiv
- \div {class="threecolumn_piece"}
- \div {class="heading"}
- Data with Models and Views
- \enddiv
- \list
- \li {Models and Views}
- \endlist
- \enddiv
- \div {class="threecolumn_piece"}
- \div {class="heading"}
- Data Storage and Resources
- \enddiv
- \list
- \li \l{Local Storage}{SQL Local Storage}
- \li \l{Resource Loading and Network Transparency in QML}{Resources and Network Transparency}
- \endlist
- \enddiv
-\enddiv
-
-*/
-
diff --git a/doc/src/qtquick2/qtquick2.qdoc b/doc/src/qtquick2/qtquick2.qdoc
deleted file mode 100644
index 20361adb16..0000000000
--- a/doc/src/qtquick2/qtquick2.qdoc
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** GNU Free Documentation License
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms
-** and conditions contained in a signed written agreement between you
-** and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \qmlmodule QtQuick 2
- \title QML Module QtQuick 2
-
- \brief The QML Elements
-
- This QML module contains all the QML elements that are
- instantiated as objects of C++ classes in the QtQml
- module. These elements work with the Scenegraph renderer and
- their own canvas.
- */
diff --git a/src/qml/doc/src/c++models.qdoc b/src/qml/doc/src/bindings/c++models.qdoc
index e2f2f32b5c..e2f2f32b5c 100644
--- a/src/qml/doc/src/c++models.qdoc
+++ b/src/qml/doc/src/bindings/c++models.qdoc
diff --git a/src/qml/doc/src/integrating.qdoc b/src/qml/doc/src/bindings/integrating.qdoc
index 83dcaeae74..83dcaeae74 100644
--- a/src/qml/doc/src/integrating.qdoc
+++ b/src/qml/doc/src/bindings/integrating.qdoc
diff --git a/src/qml/doc/src/qmltypes.qdoc b/src/qml/doc/src/bindings/properties-methods-signals.qdoc
index b75c191616..2aa11e9a50 100644
--- a/src/qml/doc/src/qmltypes.qdoc
+++ b/src/qml/doc/src/bindings/properties-methods-signals.qdoc
@@ -25,96 +25,11 @@
**
****************************************************************************/
/*!
-\page qml-c++types.html
-\title Creating QML Types
-\brief exposing Qt C++ types into the QML engine
-
-The \l{The QML Engine}{QML engine} can instantiate any Qt C++ construct
-such as \l{The Property System}{properties}, functions, and data models into
-the QML context allowing the constructs to be accessible from within QML.
-
-\target register-c++-type
-\section1 Register a Type
-
- In an application or a \l{QML Plugins}{plugin}, the \c qmlRegisterType
- template will register a class to the QML engine.
-
-\code
-template<typename T>
-int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
-\endcode
-
- \l qmlRegisterType() registers the C++ type \a T with the QML system, and
- makes it available to the QML context under the name \c qmlName in library
- \c uri version \c versionMajor.versionMinor. The \c qmlName can be the same
- as the C++ type name.
-
- Suppose that a \c Person class defined in a C++ is to be exposed into the
- QML context. The class must be a subclass of \l{QObject} and have a default
- constructor. The \l{The Property System}{properties} created with the
- Q_PROPERTY macro are visible in the QML context as well.
- \snippet declarative/cppextensions/referenceexamples/adding/person.h 0
-
- The application registers the class to the runtime with the
- \l{qmlRegisterType()}.
-
- \snippet declarative/cppextensions/referenceexamples/adding/main.cpp 0
-
- The Person type is then imported with the \c "People 1.0" module and its
- properties are accessible in a QML file.
-\snippet declarative/cppextensions/referenceexamples/adding/example.qml 0
-
- The \l {Extending QML - Adding Types Example}{Adding Types} example
- demonstrates as usage of the \l qmlRegisterType().
-
- Alternatively, these functions provide a way for other types of C++ types
- to be visible in the QML context.
- \list
- \li \l qmlRegisterModuleApi() is suited for registering either a QJSValue
- or QObject module API (shared instance) into a namespace
- \li \l qmlRegisterUncreatableType() is suited for attached
- properties and enum types.
- \li \l qmlRegisterTypeNotAvailable() is for
- reserving a namespace and suited for generating useful errors.
- \li \l qmlRegisterInterface() - for registering base or abstract classes for
- \l{qml-c++-coercion}{coercion and inheritance}. This is useful for general
- Qt objects or \l{Qt Objects and Interfaces}{pointers} to objects.
- \li \l qmlRegisterExtendedType() - for \l{qml-c++-extension}{extended types}
- \endlist
-
- \section2 Qt Objects and Interfaces
- QML can bind to complex objects such as pointers to objects or lists. As QML
- is typesafe, the \l{The QML Engine}{QML engine} ensures that only
- valid types are assigned to these properties.
-
- The QML engine treats pointers to objects or Qt interfaces the same
- way as regular properties. Thus, the lists or pointers are created as
- properties using the Q_PROPERTY() macro.
-
- \snippet examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h 1
-
- The \c host is an \l{qml-expose-properties}{exposed property} that can bind
- to objects or lists of objects. The property type, in this case \c Person,
- must be \l{register-c++-type}{registered} into the runtime.
-
- QML also supports assigning Qt interfaces. To assign to a property whose
- type is a Qt interface pointer, the interface must also be registered with
- QML. As they cannot be instantiated directly, registering a Qt interface is
- different from registering a new QML type. The following function is used
- instead:
-
- \code
- template<typename T>
- int qmlRegisterInterface(const char *typeName)
- \endcode
-
- This function registers the C++ interface \a T with the QML system as \a
- typeName.
-
- Following registration, QML can \l{qml-c++-coercion}{coerce} objects that
- implement this interface for assignment to appropriately typed properties.
-
+\page qml-properties-signals-methods.html
+\title C++ Properties, Methods, and Signals in QML
+\brief Exposing C++ properties, methods, and signals to QML
\target qml-expose-properties
+
\section1 Exposing Qt C++ Properties
The \l{The QML Engine}{QML engine} utilizes Qt's
@@ -545,243 +460,5 @@ Q_PROPERTY(int size READ size CONSTANT)
void invite(const QString &name);
\endcode
-\section1 Type Revisions and Versions
-
- Type revisions and versions allow new properties or methods to exist in the
- new version while remaining compatible with previous versions.
-
- Consider these two QML files:
- \code
- // main.qml
- import QtQuick 1.0
- Item {
- id: root
- MyComponent {}
- }
- \endcode
-
- \code
- // MyComponent.qml
- import MyModule 1.0
- CppItem {
- value: root.x
- }
- \endcode
- where \c CppItem maps to the C++ class \c QCppItem.
-
- If the author of QCppItem adds a \c root property to QCppItem in a new
- version of the module, \c root.x now resolves to a different value because
- \c root is also the \c id of the top level component. The author could
- specify that the new \c root property is available from a specific minor
- version. This permits new properties and features to be added to existing
- elements without breaking existing programs.
-
- The REVISION tag is used to mark the \c root property as added in revision 1
- of the class. Methods such as Q_INVOKABLE's, signals and slots can also be
- tagged for a revision using the \c Q_REVISION(x) macro:
-
- \code
- class CppElement : public BaseObject
- {
- Q_OBJECT
- Q_PROPERTY(int root READ root WRITE setRoot NOTIFY rootChanged REVISION 1)
-
- signals:
- Q_REVISION(1) void rootChanged();
- };
- \endcode
-
- To register the new class revision to a particular version the following function is used:
-
- \code
- template<typename T, int metaObjectRevision>
- int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
- \endcode
-
- To register \c CppElement version 1 for \c {MyModule 1.1}:
-
- \code
- qmlRegisterType<QCppElement,1>("MyModule", 1, 1, "CppElement")
- \endcode
-
- \c root is only available when MyModule 1.1 is imported.
-
- For the same reason, new elements introduced in later versions should use
- the minor version argument of qmlRegisterType.
-
- This feature of the language allows for behavioural changes to be made
- without breaking existing applications. Consequently QML module authors
- should always remember to document what changed between minor versions, and
- QML module users should check that their application still runs correctly
- before deploying an updated import statement.
-
- You may also register the revision of a base class that your module depends upon
- using the qmlRegisterRevision() function:
-
- \code
- template<typename T, int metaObjectRevision>
- int qmlRegisterRevision(const char *uri, int versionMajor, int versionMinor)
- \endcode
-
- For example, if \c BaseObject is changed and now has a revision 1, you can specify that
- your module uses the new revision:
-
- \code
- qmlRegisterRevision<BaseObject,1>("MyModule", 1, 1);
- \endcode
-
- This is useful when deriving from base classes not declared as part of your
- module, e.g. when extending classes from the QtQuick library.
-
- The revision feature of QML allows for behavioral changes without breaking
- existing applications. Consequently, QML module authors should always
- remember to document what changed between minor versions, and QML module
- users should check that their application still runs correctly before
- deploying an updated import statement.
-
-\target qml-c++-coercion
-\section1 Inheritance and Coercion
-
- QML supports C++ inheritance hierarchies and can freely coerce between
- known, valid object types. This enables the creation of common base classes
- that allow the assignment of specialized classes to object or list
- properties.
-
- \snippet examples/declarative/cppextensions/referenceexamples/coercion/example.qml 0
-
- The QML snippet shown above assigns a \c Boy object to the \c
- BirthdayParty's \c host property, and assigns three other objects to the \c
- guests property. Both the \c host and the \c guests properties binds to the
- \c Person type, but the assignment is valid as both the \c Boy and \c Girl
- objects inherit from \c Person.
-
- To assign to a property, the property's type must have been
- \l{register-c++-type}{registered} to the \l{The QML Engine}{declarative
- runtime}. If a type that acts purely as a base class that cannot be
- instantiated from QML needs to be registered as well. The
- \l qmlRegisterType() is useful for this occasion.
-
- \code
- template<typename T>
- int qmlRegisterType()
- \endcode
-
- This function registers the C++ type \a T with the QML system. The
- parameterless call to the template function qmlRegisterType() does not
- define a mapping between the C++ class and a QML element name, so the type
- is not instantiable from QML, but it is available for type coercion.
-
- \snippet examples/declarative/cppextensions/referenceexamples/coercion/main.cpp 0
- \snippet examples/declarative/cppextensions/referenceexamples/coercion/main.cpp register boy girl
- The \c Person class is registered withouth the parameters. Both the
- \c Boy and \c Girl class derive from the \c Person class.
-
- Type \a T must inherit QObject, but there are no restrictions on whether it
- is concrete or the signature of its constructor.
-
- QML will automatically coerce C++ types when assigning to either an object
- property, or to a list property. Only if coercion fails does an assignment
- error occur.
-
- The \l{Extending QML - Inheritance and Coercion Example}{Inheritance and Coercion Example}
- shows the complete code used to create the \c Boy and \c Girl types.
-
-\target qml-c++-extension
-\section1 Extension Objects
-
- \snippet examples/declarative/cppextensions/referenceexamples/extended/example.qml 0
-
- The \c leftMargin property is a new property to an existing C++ type,
- \l QLineEdit, without modifying its source code.
-
- When integrating existing classes and technology into QML, APIs will
- often need tweaking to fit better into the declarative environment.
- Although the best results are usually obtained by modifying the original
- classes directly, if this is either not possible or is complicated by some
- other concerns, extension objects allow limited extension possibilities
- without direct modifications.
-
- \e{Extension objects} add additional properties to an existing type.
- Extension objects can only add properties, not signals or methods. An
- extended type definition allows the programmer to supply an additional type,
- known as the \e{extension type}, when registering the class. The
- properties are transparently merged with the original target class when used
- from within QML.
-
- The \l qmlRegisterExtendedType() is for registering extended types. Note
- that it has two forms.
- \code
- template<typename T, typename ExtendedT>
- int qmlRegisterExtendedType(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
-
- template<typename T, typename ExtendedT>
- int qmlRegisterExtendedType()
- \endcode
- functions should be used instead of the regular \c qmlRegisterType() variations.
- The arguments are identical to the corresponding non-extension registration functions,
- except for the ExtendedT parameter which is the type
- of the extension object.
-
- An extension class is a regular QObject, with a constructor that takes a
- QObject pointer. However, the extension class creation is delayed until the
- first extended property is accessed. The extension class is created and the
- target object is passed in as the parent. When the property on the original
- is accessed, the corresponding property on the extension object is used
- instead.
-
- The \l{Extending QML - Extension Objects}{Extension Objects} example
- demonstrates a usage of extension objects.
-
-\section1 Property Value Sources
-
-\snippet examples/declarative/cppextensions/referenceexamples/valuesource/example.qml 0
-\snippet examples/declarative/cppextensions/referenceexamples/valuesource/example.qml 1
-
-The QML snippet shown above applies a property value source to the \c announcement property.
-A property value source generates a value for a property that changes over time.
-
-Property value sources are most commonly used to do animation. Rather than
-constructing an animation object and manually setting the animation's "target"
-property, a property value source can be assigned directly to a property of any
-type and automatically set up this association.
-
-The example shown here is rather contrived: the \c announcement property of the
-\c BirthdayParty object is a string that is printed every time it is assigned and
-the \c HappyBirthdaySong value source generates the lyrics of the song
-"Happy Birthday".
-
-\snippet examples/declarative/cppextensions/referenceexamples/valuesource/birthdayparty.h 0
-
-Normally, assigning an object to a string property would not be allowed. In
-the case of a property value source, rather than assigning the object instance
-itself, the QML engine sets up an association between the value source and
-the property.
-
-Property value sources are special types that derive from the
-QQmlPropertyValueSource base class. This base class contains a single method,
-QQmlPropertyValueSource::setTarget(), that the QML engine invokes when
-associating the property value source with a property. The relevant part of
-the \c HappyBirthdaySong type declaration looks like this:
-
-\snippet examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.h 0
-\snippet examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.h 1
-\snippet examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.h 2
-
-In all other respects, property value sources are regular QML types. They must
-be registered with the QML engine using the same macros as other types, and can
-contain properties, signals and methods just like other types.
-
-When a property value source object is assigned to a property, QML first tries
-to assign it normally, as though it were a regular QML type. Only if this
-assignment fails does the engine call the \l {QQmlPropertyValueSource::}{setTarget()} method. This allows
-the type to also be used in contexts other than just as a value source.
-
-\l {Extending QML - Property Value Source Example} shows the complete code used
-to implement the \c HappyBirthdaySong property value source.
-
-\section1 Optimization and Other Considerations
-
-The \l{qml-engine-optimization}{ QML Engine} article suggests possible
-optimization considerations as memory management and QVariant type usages.
*/
diff --git a/src/qml/doc/src/bindings/qmlbindings.qdoc b/src/qml/doc/src/bindings/qmlbindings.qdoc
new file mode 100644
index 0000000000..b2adb3a6d4
--- /dev/null
+++ b/src/qml/doc/src/bindings/qmlbindings.qdoc
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qml-plugin.html
+\title QML Plugins and C++ Binding
+\brief Provides an engine for running QML code
+
+To add functionality that is beyond QML and modules, C++ types are registered to
+the runtime as plugins. For example, to add a full network manager into
+QML, classes that utilize Qt Network classes may be registered into the runtime
+and loaded as a QML type.
+
+Additional C++ types are also available in applications through this mechanism.
+
+\section1 C++ Types as QML Types
+
+The QML engine can instantiate any Qt C++ construct such as properties,
+functions, and data models into the QML context allowing the constructs to be
+accessible from within QML.
+
+ \list
+ \li \l{C++ Types as QML Types}
+ \li \l{C++ Properties, Methods, and Signals in QML}
+ \endlist
+
+\section1 Registering a Plugin
+The QML engine can run Qt C++ applications by registering types into the runtime
+and by loading C++ code as plugins. Plugins are imported and labeled as modules
+and its content are available as types.
+
+ To write a QML extension plugin:
+ \list 1
+ \li Subclass QDeclarativeExtensionPlugin
+ \li Implement QDeclarativeExtensionPlugin's registerTypes() method
+ \li Register types with qmlRegisterType()
+ \li Export the class using the Q_EXPORT_PLUGIN2() macro
+ \li Write a project file for the plugin
+ \li Add the files to the project
+ \endlist
+
+ The QML Plugins page details the process using example code.
+ \list
+ \li \l{QML Plugins}
+ \endlist
+*/
diff --git a/src/qml/doc/src/qmlplugins.qdoc b/src/qml/doc/src/bindings/qmlplugins.qdoc
index b81c4c5ae1..08704ac9a9 100644
--- a/src/qml/doc/src/qmlplugins.qdoc
+++ b/src/qml/doc/src/bindings/qmlplugins.qdoc
@@ -82,7 +82,7 @@
The \c TimeModel class receives a \c{1.0} version of this plugin library, as
a QML type called \c Time. The Q_ASSERT() macro can ensure the module is
imported correctly by any QML components that use this plugin. The
- \l{Creating QML Types} article has more information about registering C++
+ \l{C++ Types as QML Types} article has more information about registering C++
types into the runtime.
For this example, the TimeExample source directory is in
@@ -124,7 +124,7 @@
\list
\li \l {Tutorial: Writing QML extensions with C++} - contains a chapter
on creating QML plugins.
- \li \l{Creating QML Types} - information about registering C++ types into
+ \li \l{C++ Types as QML Types} - information about registering C++ types into
the runtime.
\li \l{How to Create Qt Plugins} - information about Qt plugins
\endlist
diff --git a/src/qml/doc/src/bindings/qmltypes.qdoc b/src/qml/doc/src/bindings/qmltypes.qdoc
new file mode 100644
index 0000000000..b4c52988cb
--- /dev/null
+++ b/src/qml/doc/src/bindings/qmltypes.qdoc
@@ -0,0 +1,356 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+/*!
+\page qml-c++types.html
+\title C++ Types as QML Types
+\brief exposing Qt C++ types into the QML engine
+
+The \l{The QML Engine}{QML engine} can instantiate any Qt C++ construct
+such as \l{The Property System}{properties}, functions, and data models into
+the QML context allowing the constructs to be accessible from within QML.
+
+\target register-c++-type
+\section1 Register a Type
+
+ In an application or a \l{QML Plugins}{plugin}, the \c qmlRegisterType
+ template will register a class to the QML engine.
+
+\code
+template<typename T>
+int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
+\endcode
+
+ \l qmlRegisterType() registers the C++ type \a T with the QML system, and
+ makes it available to the QML context under the name \c qmlName in library
+ \c uri version \c versionMajor.versionMinor. The \c qmlName can be the same
+ as the C++ type name.
+
+ Suppose that a \c Person class defined in a C++ is to be exposed into the
+ QML context. The class must be a subclass of \l{QObject} and have a default
+ constructor. The \l{The Property System}{properties} created with the
+ Q_PROPERTY macro are visible in the QML context as well.
+ \snippet declarative/cppextensions/referenceexamples/adding/person.h 0
+
+ The application registers the class to the runtime with the
+ \l{qmlRegisterType()}.
+
+ \snippet declarative/cppextensions/referenceexamples/adding/main.cpp 0
+
+ The Person type is then imported with the \c "People 1.0" module and its
+ properties are accessible in a QML file.
+\snippet declarative/cppextensions/referenceexamples/adding/example.qml 0
+
+ The \l {Extending QML - Adding Types Example}{Adding Types} example
+ demonstrates as usage of the \l qmlRegisterType().
+
+ Alternatively, these functions provide a way for other types of C++ types
+ to be visible in the QML context.
+ \list
+ \li \l qmlRegisterModuleApi() is suited for registering either a QJSValue
+ or QObject module API (shared instance) into a namespace
+ \li \l qmlRegisterUncreatableType() is suited for attached
+ properties and enum types.
+ \li \l qmlRegisterTypeNotAvailable() is for
+ reserving a namespace and suited for generating useful errors.
+ \li \l qmlRegisterInterface() - for registering base or abstract classes for
+ \l{qml-c++-coercion}{coercion and inheritance}. This is useful for general
+ Qt objects or \l{Qt Objects and Interfaces}{pointers} to objects.
+ \li \l qmlRegisterExtendedType() - for \l{qml-c++-extension}{extended types}
+ \endlist
+
+ \section2 Qt Objects and Interfaces
+ QML can bind to complex objects such as pointers to objects or lists. As QML
+ is typesafe, the \l{The QML Engine}{QML engine} ensures that only
+ valid types are assigned to these properties.
+
+ The QML engine treats pointers to objects or Qt interfaces the same
+ way as regular properties. Thus, the lists or pointers are created as
+ properties using the Q_PROPERTY() macro.
+
+ \snippet examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h 1
+
+ The \c host is an \l{qml-expose-properties}{exposed property} that can bind
+ to objects or lists of objects. The property type, in this case \c Person,
+ must be \l{register-c++-type}{registered} into the runtime.
+
+ QML also supports assigning Qt interfaces. To assign to a property whose
+ type is a Qt interface pointer, the interface must also be registered with
+ QML. As they cannot be instantiated directly, registering a Qt interface is
+ different from registering a new QML type. The following function is used
+ instead:
+
+ \code
+ template<typename T>
+ int qmlRegisterInterface(const char *typeName)
+ \endcode
+
+ This function registers the C++ interface \a T with the QML system as \a
+ typeName.
+
+ Following registration, QML can \l{qml-c++-coercion}{coerce} objects that
+ implement this interface for assignment to appropriately typed properties.
+
+\section1 Type Revisions and Versions
+
+ Type revisions and versions allow new properties or methods to exist in the
+ new version while remaining compatible with previous versions.
+
+ Consider these two QML files:
+ \code
+ // main.qml
+ import QtQuick 1.0
+ Item {
+ id: root
+ MyComponent {}
+ }
+ \endcode
+
+ \code
+ // MyComponent.qml
+ import MyModule 1.0
+ CppItem {
+ value: root.x
+ }
+ \endcode
+ where \c CppItem maps to the C++ class \c QCppItem.
+
+ If the author of QCppItem adds a \c root property to QCppItem in a new
+ version of the module, \c root.x now resolves to a different value because
+ \c root is also the \c id of the top level component. The author could
+ specify that the new \c root property is available from a specific minor
+ version. This permits new properties and features to be added to existing
+ elements without breaking existing programs.
+
+ The REVISION tag is used to mark the \c root property as added in revision 1
+ of the class. Methods such as Q_INVOKABLE's, signals and slots can also be
+ tagged for a revision using the \c Q_REVISION(x) macro:
+
+ \code
+ class CppElement : public BaseObject
+ {
+ Q_OBJECT
+ Q_PROPERTY(int root READ root WRITE setRoot NOTIFY rootChanged REVISION 1)
+
+ signals:
+ Q_REVISION(1) void rootChanged();
+ };
+ \endcode
+
+ To register the new class revision to a particular version the following function is used:
+
+ \code
+ template<typename T, int metaObjectRevision>
+ int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
+ \endcode
+
+ To register \c CppElement version 1 for \c {MyModule 1.1}:
+
+ \code
+ qmlRegisterType<QCppElement,1>("MyModule", 1, 1, "CppElement")
+ \endcode
+
+ \c root is only available when MyModule 1.1 is imported.
+
+ For the same reason, new elements introduced in later versions should use
+ the minor version argument of qmlRegisterType.
+
+ This feature of the language allows for behavioural changes to be made
+ without breaking existing applications. Consequently QML module authors
+ should always remember to document what changed between minor versions, and
+ QML module users should check that their application still runs correctly
+ before deploying an updated import statement.
+
+ You may also register the revision of a base class that your module depends upon
+ using the qmlRegisterRevision() function:
+
+ \code
+ template<typename T, int metaObjectRevision>
+ int qmlRegisterRevision(const char *uri, int versionMajor, int versionMinor)
+ \endcode
+
+ For example, if \c BaseObject is changed and now has a revision 1, you can specify that
+ your module uses the new revision:
+
+ \code
+ qmlRegisterRevision<BaseObject,1>("MyModule", 1, 1);
+ \endcode
+
+ This is useful when deriving from base classes not declared as part of your
+ module, e.g. when extending classes from the QtQuick library.
+
+ The revision feature of QML allows for behavioral changes without breaking
+ existing applications. Consequently, QML module authors should always
+ remember to document what changed between minor versions, and QML module
+ users should check that their application still runs correctly before
+ deploying an updated import statement.
+
+\target qml-c++-coercion
+\section1 Inheritance and Coercion
+
+ QML supports C++ inheritance hierarchies and can freely coerce between
+ known, valid object types. This enables the creation of common base classes
+ that allow the assignment of specialized classes to object or list
+ properties.
+
+ \snippet examples/declarative/cppextensions/referenceexamples/coercion/example.qml 0
+
+ The QML snippet shown above assigns a \c Boy object to the \c
+ BirthdayParty's \c host property, and assigns three other objects to the \c
+ guests property. Both the \c host and the \c guests properties binds to the
+ \c Person type, but the assignment is valid as both the \c Boy and \c Girl
+ objects inherit from \c Person.
+
+ To assign to a property, the property's type must have been
+ \l{register-c++-type}{registered} to the \l{The QML Engine}{declarative
+ runtime}. If a type that acts purely as a base class that cannot be
+ instantiated from QML needs to be registered as well. The
+ \l qmlRegisterType() is useful for this occasion.
+
+ \code
+ template<typename T>
+ int qmlRegisterType()
+ \endcode
+
+ This function registers the C++ type \a T with the QML system. The
+ parameterless call to the template function qmlRegisterType() does not
+ define a mapping between the C++ class and a QML element name, so the type
+ is not instantiable from QML, but it is available for type coercion.
+
+ \snippet examples/declarative/cppextensions/referenceexamples/coercion/main.cpp 0
+ \snippet examples/declarative/cppextensions/referenceexamples/coercion/main.cpp register boy girl
+ The \c Person class is registered withouth the parameters. Both the
+ \c Boy and \c Girl class derive from the \c Person class.
+
+ Type \a T must inherit QObject, but there are no restrictions on whether it
+ is concrete or the signature of its constructor.
+
+ QML will automatically coerce C++ types when assigning to either an object
+ property, or to a list property. Only if coercion fails does an assignment
+ error occur.
+
+ The \l{Extending QML - Inheritance and Coercion Example}{Inheritance and Coercion Example}
+ shows the complete code used to create the \c Boy and \c Girl types.
+
+\target qml-c++-extension
+\section1 Extension Objects
+
+ \snippet examples/declarative/cppextensions/referenceexamples/extended/example.qml 0
+
+ The \c leftMargin property is a new property to an existing C++ type,
+ \l QLineEdit, without modifying its source code.
+
+ When integrating existing classes and technology into QML, APIs will
+ often need tweaking to fit better into the declarative environment.
+ Although the best results are usually obtained by modifying the original
+ classes directly, if this is either not possible or is complicated by some
+ other concerns, extension objects allow limited extension possibilities
+ without direct modifications.
+
+ \e{Extension objects} add additional properties to an existing type.
+ Extension objects can only add properties, not signals or methods. An
+ extended type definition allows the programmer to supply an additional type,
+ known as the \e{extension type}, when registering the class. The
+ properties are transparently merged with the original target class when used
+ from within QML.
+
+ The \l qmlRegisterExtendedType() is for registering extended types. Note
+ that it has two forms.
+ \code
+ template<typename T, typename ExtendedT>
+ int qmlRegisterExtendedType(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
+
+ template<typename T, typename ExtendedT>
+ int qmlRegisterExtendedType()
+ \endcode
+ functions should be used instead of the regular \c qmlRegisterType() variations.
+ The arguments are identical to the corresponding non-extension registration functions,
+ except for the ExtendedT parameter which is the type
+ of the extension object.
+
+ An extension class is a regular QObject, with a constructor that takes a
+ QObject pointer. However, the extension class creation is delayed until the
+ first extended property is accessed. The extension class is created and the
+ target object is passed in as the parent. When the property on the original
+ is accessed, the corresponding property on the extension object is used
+ instead.
+
+ The \l{Extending QML - Extension Objects}{Extension Objects} example
+ demonstrates a usage of extension objects.
+
+\section1 Property Value Sources
+
+\snippet examples/declarative/cppextensions/referenceexamples/valuesource/example.qml 0
+\snippet examples/declarative/cppextensions/referenceexamples/valuesource/example.qml 1
+
+The QML snippet shown above applies a property value source to the \c announcement property.
+A property value source generates a value for a property that changes over time.
+
+Property value sources are most commonly used to do animation. Rather than
+constructing an animation object and manually setting the animation's "target"
+property, a property value source can be assigned directly to a property of any
+type and automatically set up this association.
+
+The example shown here is rather contrived: the \c announcement property of the
+\c BirthdayParty object is a string that is printed every time it is assigned and
+the \c HappyBirthdaySong value source generates the lyrics of the song
+"Happy Birthday".
+
+\snippet examples/declarative/cppextensions/referenceexamples/valuesource/birthdayparty.h 0
+
+Normally, assigning an object to a string property would not be allowed. In
+the case of a property value source, rather than assigning the object instance
+itself, the QML engine sets up an association between the value source and
+the property.
+
+Property value sources are special types that derive from the
+QQmlPropertyValueSource base class. This base class contains a single method,
+QQmlPropertyValueSource::setTarget(), that the QML engine invokes when
+associating the property value source with a property. The relevant part of
+the \c HappyBirthdaySong type declaration looks like this:
+
+\snippet examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.h 0
+\snippet examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.h 1
+\snippet examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.h 2
+
+In all other respects, property value sources are regular QML types. They must
+be registered with the QML engine using the same macros as other types, and can
+contain properties, signals and methods just like other types.
+
+When a property value source object is assigned to a property, QML first tries
+to assign it normally, as though it were a regular QML type. Only if this
+assignment fails does the engine call the \l {QQmlPropertyValueSource::}{setTarget()} method. This allows
+the type to also be used in contexts other than just as a value source.
+
+\l {Extending QML - Property Value Source Example} shows the complete code used
+to implement the \c HappyBirthdaySong property value source.
+
+\section1 Optimization and Other Considerations
+
+The \l{qml-engine-optimization}{ QML Engine} article suggests possible
+optimization considerations as memory management and QVariant type usages.
+
+*/
diff --git a/src/qml/doc/src/qtbinding.qdoc b/src/qml/doc/src/bindings/qtbinding.qdoc
index 49a856527c..49a856527c 100644
--- a/src/qml/doc/src/qtbinding.qdoc
+++ b/src/qml/doc/src/bindings/qtbinding.qdoc
diff --git a/src/qml/doc/src/qmlengine.qdoc b/src/qml/doc/src/engine/qmlengine.qdoc
index d99e1f3aba..fca3b984ff 100644
--- a/src/qml/doc/src/qmlengine.qdoc
+++ b/src/qml/doc/src/engine/qmlengine.qdoc
@@ -26,7 +26,6 @@
****************************************************************************/
/*!
-\target qmlengine
\page qmlengine.html
\ingroup qml-features
\title The QML Engine
@@ -233,7 +232,7 @@ specified in QML files, plugins, or applications.
side, all QML object data is automatically made available to the meta-object
system and can be accessed from C++.
- The \l{Creating QML Types} article covers the topic of exposing Qt functions
+ The \l{C++ Types as QML Types} article covers the topic of exposing Qt functions
and properties to the declarative engine.
\section2 Calling Functions
@@ -392,7 +391,7 @@ specified in QML files, plugins, or applications.
changes. If you are using custom types in QML, make sure their properties
have NOTIFY signals so that they can be used in property bindings.
- The \l{Creating QML Types} article covers the topic of exposing Qt
+ The \l{C++ Types as QML Types} article covers the topic of exposing Qt
properties to the runtime. For more information, the
\l{Tutorial: Writing QML extensions with C++}{Writing QML extensions with C++}
tutorial demonstrates basic usage patterns.
diff --git a/src/qml/doc/src/qmlruntime.qdoc b/src/qml/doc/src/engine/qmlruntime.qdoc
index 831323474f..831323474f 100644
--- a/src/qml/doc/src/qmlruntime.qdoc
+++ b/src/qml/doc/src/engine/qmlruntime.qdoc
diff --git a/src/qml/doc/src/qtjavascript.qdoc b/src/qml/doc/src/engine/qtjavascript.qdoc
index a7ffc8550a..a7ffc8550a 100644
--- a/src/qml/doc/src/qtjavascript.qdoc
+++ b/src/qml/doc/src/engine/qtjavascript.qdoc
diff --git a/src/qml/doc/src/basictypes.qdoc b/src/qml/doc/src/qml/basictypes.qdoc
index c3ce47a226..8ba7cc460e 100644
--- a/src/qml/doc/src/basictypes.qdoc
+++ b/src/qml/doc/src/qml/basictypes.qdoc
@@ -37,7 +37,7 @@
\annotatedlist qmlbasictypes
To create additional types, such as data types created in C++, read the
- \l{Creating QML Types} article.
+ \l{C++ Types as QML Types} article.
*/
/*!
diff --git a/src/qml/doc/src/codingconventions.qdoc b/src/qml/doc/src/qml/codingconventions.qdoc
index 04af57012a..04af57012a 100644
--- a/src/qml/doc/src/codingconventions.qdoc
+++ b/src/qml/doc/src/qml/codingconventions.qdoc
diff --git a/src/qml/doc/src/dynamicobjects.qdoc b/src/qml/doc/src/qml/dynamicobjects.qdoc
index 6437ced886..6437ced886 100644
--- a/src/qml/doc/src/dynamicobjects.qdoc
+++ b/src/qml/doc/src/qml/dynamicobjects.qdoc
diff --git a/src/qml/doc/src/hostenvironment.qdoc b/src/qml/doc/src/qml/hostenvironment.qdoc
index b0d9118944..b0d9118944 100644
--- a/src/qml/doc/src/hostenvironment.qdoc
+++ b/src/qml/doc/src/qml/hostenvironment.qdoc
diff --git a/src/qml/doc/src/javascriptblocks.qdoc b/src/qml/doc/src/qml/javascriptblocks.qdoc
index 886289d9b7..886289d9b7 100644
--- a/src/qml/doc/src/javascriptblocks.qdoc
+++ b/src/qml/doc/src/qml/javascriptblocks.qdoc
diff --git a/src/qml/doc/src/jsfunctionlist.qdoc b/src/qml/doc/src/qml/jsfunctionlist.qdoc
index 35abc0a92c..35abc0a92c 100644
--- a/src/qml/doc/src/jsfunctionlist.qdoc
+++ b/src/qml/doc/src/qml/jsfunctionlist.qdoc
diff --git a/src/qml/doc/src/network.qdoc b/src/qml/doc/src/qml/network.qdoc
index 049bdddf5a..049bdddf5a 100644
--- a/src/qml/doc/src/network.qdoc
+++ b/src/qml/doc/src/qml/network.qdoc
diff --git a/src/qml/doc/src/performance.qdoc b/src/qml/doc/src/qml/performance.qdoc
index f6e56c9b71..f6e56c9b71 100644
--- a/src/qml/doc/src/performance.qdoc
+++ b/src/qml/doc/src/qml/performance.qdoc
diff --git a/src/qml/doc/src/propertybinding.qdoc b/src/qml/doc/src/qml/propertybinding.qdoc
index 3c764c4df3..3c764c4df3 100644
--- a/src/qml/doc/src/propertybinding.qdoc
+++ b/src/qml/doc/src/qml/propertybinding.qdoc
diff --git a/src/qml/doc/src/qmlcomponents.qdoc b/src/qml/doc/src/qml/qmlcomponents.qdoc
index bf95aba72f..bf95aba72f 100644
--- a/src/qml/doc/src/qmlcomponents.qdoc
+++ b/src/qml/doc/src/qml/qmlcomponents.qdoc
diff --git a/src/qml/doc/src/qmldocument.qdoc b/src/qml/doc/src/qml/qmldocument.qdoc
index 89a5bbd57b..89a5bbd57b 100644
--- a/src/qml/doc/src/qmldocument.qdoc
+++ b/src/qml/doc/src/qml/qmldocument.qdoc
diff --git a/src/qml/doc/src/qmli18n.qdoc b/src/qml/doc/src/qml/qmli18n.qdoc
index b65c001e8e..b65c001e8e 100644
--- a/src/qml/doc/src/qmli18n.qdoc
+++ b/src/qml/doc/src/qml/qmli18n.qdoc
diff --git a/src/qml/doc/src/modules.qdoc b/src/qml/doc/src/qml/qmllanguage-modules.qdoc
index e8cf792908..d32ce10b65 100644
--- a/src/qml/doc/src/modules.qdoc
+++ b/src/qml/doc/src/qml/qmllanguage-modules.qdoc
@@ -26,9 +26,9 @@
****************************************************************************/
/*!
-\page qml-modules.html
+\page qmllanguage-modules.html
\title QML Modules
-\brief creating and setting up QML modules
+\brief creating and importing QML modules
\section1 Modules
diff --git a/src/qml/doc/src/qmlevents.qdoc b/src/qml/doc/src/qml/qmllanguage-signal-handler.qdoc
index e47554ce45..59efab867f 100644
--- a/src/qml/doc/src/qmlevents.qdoc
+++ b/src/qml/doc/src/qml/qmllanguage-signal-handler.qdoc
@@ -125,6 +125,6 @@ Connections element may connect a signal from the runtime to another signal or
method.
For complete information on events from the runtime or creating signals from the
-runtime, read the \l{The QML Engine} and the \l{Creating QML Types} articles.
+runtime, read the \l{The QML Engine} and the \l{C++ Types as QML Types} articles.
*/
diff --git a/src/qml/doc/src/qml/qmllanguage.qdoc b/src/qml/doc/src/qml/qmllanguage.qdoc
new file mode 100644
index 0000000000..a76c5b8d4b
--- /dev/null
+++ b/src/qml/doc/src/qml/qmllanguage.qdoc
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+/*!
+\page qmllanguage.html
+\ingroup qt-gui-concepts
+\ingroup overviews
+\title QML - the Declarative Language
+\brief Provides a declarative language for building highly
+dynamic applications.
+
+QML is a declarative language for creating flexible and reusable types. The
+language features property binding, signal and handler event system, and a
+mechanism to bind to the Qt Framework. JavaScript expressions bind to properties
+to create dynamic applications.
+
+\section1 Types and Properties
+ \list
+ \li \l{QML Types and Properties}
+ \endlist
+
+\section1 Event System
+ \list
+ \li \l{QML Signal and Handler Event System}{Signal and Handler Event System}
+ \endlist
+
+\section1 JavaScript Expressions
+ \list
+ \li \l{JavaScript Expressions}
+ \endlist
+
+\section1 Imports and Namespaces
+ \list
+ \li \l{QML Modules}{Modules}
+ \endlist
+
+\section1 Tools and Debugging
+ \list
+ \li \l{Debugging QML}
+ \li \l{QtQuickTest Reference Documentation}
+ \endlist
+
+\section1 Reference
+ \list
+ \li \l{QML Internationalization}{Internationalization}
+ \li \l{QML Coding Conventions}{Coding Conventions}
+ \li \l{QML Security}{Security Model}
+ \li \l{QML Scope}{Scope Model}
+ \li \l{QML Documents}{Documents}
+ \li \l{QML Syntax}
+ \li \l{QML Performance}{Performance}
+ \endlist
+*/
diff --git a/src/qml/doc/src/scope.qdoc b/src/qml/doc/src/qml/scope.qdoc
index 15cebc735d..15cebc735d 100644
--- a/src/qml/doc/src/scope.qdoc
+++ b/src/qml/doc/src/qml/scope.qdoc
diff --git a/src/qml/doc/src/security.qdoc b/src/qml/doc/src/qml/security.qdoc
index 190d6930c5..190d6930c5 100644
--- a/src/qml/doc/src/security.qdoc
+++ b/src/qml/doc/src/qml/security.qdoc
diff --git a/src/qml/doc/src/qmllanguage.qdoc b/src/qml/doc/src/qmllanguage.qdoc
new file mode 100644
index 0000000000..a4cc1845d8
--- /dev/null
+++ b/src/qml/doc/src/qmllanguage.qdoc
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+/*!
+\page qmllanguage.html
+\ingroup qt-gui-concepts
+\ingroup overviews
+\title QML
+\brief Provides a declarative language for building highly
+dynamic applications.
+
+QML is a declarative language for creating flexible and reusable types. The
+language features property binding, signal and handler event system, and a
+mechanism to bind to the Qt Framework. JavaScript expressions bind to properties
+to create dynamic applications.
+
+
+\list
+ \li QML Introduction
+\endlist
+
+\section1 Types and Properties
+ \list
+ \li \l{QML Basic Types}{Basic Types}
+ \li QML Types
+ \li \l{QML Components}{Components}
+ \li \l{Properties and Property Binding in QML}{Properties and Property Binding}
+ \li \l{QML Syntax}
+ \endlist
+
+\section1 Event System
+ \list
+ \li \l{QML Signal and Handler Event System}{Signal and Handler Event System}
+ \endlist
+
+\section1 JavaScript Expressions
+ \list
+ \li \l{List of JavaScript Objects and Functions}
+ \li \l{JavaScript Expressions in QML}{JavaScript Reference}
+ \endlist
+
+\section1 Imports and Namespaces
+ \list
+ \li \l{QML Modules}{Modules}
+ \endlist
+
+\section1 Managing QML Objects
+ \list
+ \li \l{Dynamic Object Management in QML}{Dynamic Object Management}
+ \li \l{QML Performance}{Performance}
+ \endlist
+
+\section1 Reference
+ \list
+ \li \l{QML Internationalization}{Internationalization}
+ \li \l{QtQuickTest Reference Documentation}
+ \li \l{Debugging QML}
+ \li \l{QML Coding Conventions}{Coding Conventions}
+ \li \l{QML Security}{Security Model}
+ \li \l{QML Scope}{Scope Model}
+ \li \l{QML Documents}{Documents}
+ \endlist
+*/
diff --git a/src/qml/doc/src/extending-tutorial.qdoc b/src/qml/doc/src/tutorials/extending-tutorial.qdoc
index b5958d9d43..b5958d9d43 100644
--- a/src/qml/doc/src/extending-tutorial.qdoc
+++ b/src/qml/doc/src/tutorials/extending-tutorial.qdoc
diff --git a/src/qml/doc/src/globalobject.qdoc b/src/qml/doc/src/types/globalobject.qdoc
index 26a974cf2e..26a974cf2e 100644
--- a/src/qml/doc/src/globalobject.qdoc
+++ b/src/qml/doc/src/types/globalobject.qdoc
diff --git a/src/qml/doc/src/qmldate.qdoc b/src/qml/doc/src/types/qmldate.qdoc
index 3931aa6e45..3931aa6e45 100644
--- a/src/qml/doc/src/qmldate.qdoc
+++ b/src/qml/doc/src/types/qmldate.qdoc
diff --git a/src/qml/doc/src/qmlnumber.qdoc b/src/qml/doc/src/types/qmlnumber.qdoc
index 47dc0338c0..47dc0338c0 100644
--- a/src/qml/doc/src/qmlnumber.qdoc
+++ b/src/qml/doc/src/types/qmlnumber.qdoc
diff --git a/src/quick/doc/qtquick.qdocconf b/src/quick/doc/qtquick.qdocconf
index 811a9f17c7..551bf926b7 100644
--- a/src/quick/doc/qtquick.qdocconf
+++ b/src/quick/doc/qtquick.qdocconf
@@ -88,3 +88,11 @@ exampledirs += ../../../examples \
snippets
imagedirs += images
+
+#add qml sources because of dependencies
+headerdirs += ../../qml
+sourcedirs += ../../qml
+exampledirs += ../../qml/snippets \
+ ../../qml
+
+imagedirs += ../../qml
diff --git a/src/quick/doc/src/qtdeclarative.qdoc b/src/quick/doc/src/qtdeclarative.qdoc
index 3a7eebc663..417b2cf105 100644
--- a/src/quick/doc/src/qtdeclarative.qdoc
+++ b/src/quick/doc/src/qtdeclarative.qdoc
@@ -36,144 +36,52 @@
dynamic applications.
For App Developers and Designers, who want to deliver apps with amazing user
-experience, Qt provides the QML language, the Qt Quick Elements, and tools in Qt
+experience, Qt provides the QML language, the Qt Quick types, and tools in Qt
Creator that make it faster than ever to transform your brilliant idea into a
winning App across mobile, embedded, and desktop platforms.
\target qtquick-overviews
-\div {class="threecolumn_area"}
- \div {class="heading"}
- QML Topics
- \enddiv
- QML is a declarative language for creating flexible and reusable
- components. The QML runtime powers QML based applications. The runtime
- includes a QML engine, JavaScript engine, and mechanism to bind to the Qt
- Framework.
-
- \div {class=" threecolumn_piece"}
- \div {class="heading"}
- QML Essentials
- \enddiv
- \list
- \li \l{QML Components}{Components}
- \li \l{Properties and Property Binding in QML}{Properties and Property Binding}
- \li \l{JavaScript Expressions in QML}{JavaScript Code}
- \li \l{QML Signal and Handler Event System}{Signal and Handler Event System}
- \li \l{QML Modules}{Modules}
- \endlist
- \list
- \li \l{What's New in Qt Quick 2}{What's New in Qt Quick}
- \endlist
- \enddiv
- \div {class="threecolumn_piece"}
- \div {class="heading"}
- QML Engine
- \enddiv
- \list
- \li \l{The QML Engine}
- \li \l{QML Global Object}
- \li \l{Dynamic Object Management in QML}{Dynamic Object Management}
- \li \l{QML Performance}{Performance}
- \endlist
- \enddiv
- \div {class=" threecolumn_piece"}
- \div {class="heading"}
- Reference
- \enddiv
- \list
- \li \l{QML Syntax}
- \li \l{QML Basic Types}{Data Types}
- \li \l{QML Coding Conventions}{Coding Conventions}
- \li \l{QML Security}{Security Model}
- \li \l{QML Scope}{Scope Model}
- \li \l{QML Documents}{Documents}
- \endlist
- \enddiv
- \div {class="threecolumn_piece"}
- \div {class="heading"}
- QML Bindings with Qt C++
- \enddiv
- \list
- \li \l{Creating QML Types}
- \li \l{QML Plugins}
- \li \l{Exposing C++ Models}
- \li \l{Integrating QML Code with Existing Qt UI Code}{Qt Gui Porting Information}
- \endlist
- \enddiv
- \div {class=" threecolumn_piece"}
- \div {class="heading"}
- Tools
- \enddiv
- \list
- \li \l{QML Internationalization}{Internationalization}
- \li \l{QtQuickTest Reference Documentation}
- \li \l{Debugging QML}
- \endlist
- \enddiv
-\enddiv
-\div {class="threecolumn_area"}
- \div {class="heading"}
- Qt Quick Elements
- \enddiv
- Qt Quick Elements features graphical elements, user input system,
- animation system, and data visualization through models and delegates.
- \div {class="threecolumn_piece"}
- \div {class="heading"}
- Graphics and Special Effects
- \enddiv
- \list
- \li \l{Basic Elements}{Basic Elements}
- \li \l{Painting with Canvas API}
- \li \l{Using the Qt Quick Particle System}{Particle Effects}
- \li \l{Shader Effects in QML}{Shader Effects}
- \endlist
- \enddiv
- \div {class="threecolumn_piece"}
- \div {class="heading"}
- Anchoring and Layouts
- \enddiv
- \list
- \li \l{Item Layouts}
- \li \l{Layouts with Anchors}
- \li \l{Right-to-left User Interfaces}{Right-to-left User Interfaces}
- \endlist
- \enddiv
- \div {class="threecolumn_piece"}
- \div {class="heading"}
- Mouse and Keyboard Input
- \enddiv
- \list
- \li \l{Mouse Events}{Mouse Events}
- \li \l{Text Handling and Validators}{Text Handling and Validators}
- \li \l{Keyboard Focus in QML}{Keyboard Focus}
- \endlist
- \enddiv
- \div {class="threecolumn_piece"}
- \div {class="heading"}
- States and Transitions
- \enddiv
- \list
- \li \l{States}
- \li \l{Animation and Transitions}
- \endlist
- \enddiv
- \div {class="threecolumn_piece"}
- \div {class="heading"}
- Data with Models and Views
- \enddiv
- \list
- \li \l{Models and Views}
- \endlist
- \enddiv
- \div {class="threecolumn_piece"}
- \div {class="heading"}
- Data Storage and Resources
- \enddiv
- \list
- \li \l{Local Storage}{SQL Local Storage}
- \endlist
- \enddiv
-\enddiv
+\section1 QML - the Declarative Language
+
+ QML is a declarative language for creating flexible and reusable types.
+ The QML runtime powers QML based applications. The runtime includes a QML
+ engine, JavaScript engine, and mechanism to bind to C++ types.
+
+ \list
+ \li \l{QML - the Declarative Language}{QML} - the declarative language
+ \endlist
+
+\section1 Qt Quick User Interfaces
+
+Qt Quick features QML visual types, user input system, animation system, and data visualization through models and delegates.
+
+ \list
+ \li \l{UI Creation with Qt Quick}
+ \endlist
+
+\section1 QML Engine
+There is a QML engine which runs QML applications. It includes C++ classes
+that loads and initializes QML code and a JavaScript engine for running
+expressions.
+ \list
+ \li \l{The QML Engine}
+ \li \l{Qt Declarative UI Runtime}{Declarative Runtime}
+ \endlist
+
+\section1 SQL Local Storage
+
+The SQL Local Storage provides a JavaScript interface to an SQLite database.
+To use, import the \c QtQuick.LocalStorage module into a namespace with the
+\c as keyword.
+
+\code
+import QtQuick.LocalStorage 2.0 as Sql
+\endcode
+
+The SQL Local Storage page has more information about the interface.
+\list
+ \li \l{Local Storage}{SQL Local Storage}
+\endlist
*/
diff --git a/src/quick/doc/src/states.qdoc b/src/quick/doc/src/states.qdoc
index 1b75a1b7ba..13d2d82412 100644
--- a/src/quick/doc/src/states.qdoc
+++ b/src/quick/doc/src/states.qdoc
@@ -27,7 +27,7 @@
/*!
\page qtquick-states.html
-\title States
+\title Qt Quick States
\brief Creating and setting states
\target qmlstates
diff --git a/src/quick/doc/src/uicreation.qdoc b/src/quick/doc/src/uicreation.qdoc
new file mode 100644
index 0000000000..8757c30c01
--- /dev/null
+++ b/src/quick/doc/src/uicreation.qdoc
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+
+\page qtquick-uicreation.html
+\title UI Creation with Qt Quick
+
+Qt Quick features graphical types, user input system, animation system, and data
+visualization through models and delegates.
+
+\section1 Import the QtQuick Types
+Qt Quick module contains several submodules which implement application user
+interfaces.
+
+\list
+\li QtQuick - provides the visual types necessary for building dynamic user interfaces
+\li QtQuick.Particles - a particle system for creating special effects
+\li QtQuick.XmlListModel - for constructing a model from an XML data source
+\endlist
+
+To use the types in the modules, import the modules.
+\code
+import QtQuick 2.0
+import QtQuick.Particles 2.0
+import QtQuick.XmlListModel 2.0
+\endcode
+
+\section1 Graphics and Special Effects
+ \list
+ \li \l{Basic Elements}{Basic Elements}
+ \li \l{Painting with Canvas API}
+ \li \l{Using the Qt Quick Particle System}{Particle Effects}
+ \li \l{Shader Effects in QML}{Shader Effects}
+ \endlist
+
+\section1 Anchoring and Layouts
+ \list
+ \li \l{Item Layouts}
+ \li \l{Layouts with Anchors}
+ \li \l{Right-to-left User Interfaces}{Right-to-left User Interfaces}
+ \endlist
+
+\section1 Mouse and Keyboard Input
+
+ \list
+ \li \l{Mouse Events}{Mouse Events}
+ \li \l{Text Handling and Validators}{Text Handling and Validators}
+ \li \l{Keyboard Focus in QML}{Keyboard Focus}
+ \endlist
+
+\section1 States and Transitions
+
+ \list
+ \li \l{Qt Quick States}{States}
+ \li \l{Animation and Transitions}
+ \endlist
+
+\section1 Data with Models and Views
+
+\list
+\li \l{Models and Views}
+\endlist
+
+*/