aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/src/qtqml.qdoc
diff options
context:
space:
mode:
authorJerome Pasion <jerome.pasion@digia.com>2013-04-17 17:19:35 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-23 12:53:48 +0200
commit32c54e57098b6799f41a3654a670a68619922f9e (patch)
tree86cf70e109e4a19628547d96e7fb13f6f2c46991 /src/qml/doc/src/qtqml.qdoc
parent28b6c39af1c3e919e83ddace18a5252c4423431b (diff)
Doc: Refactored and focused the Qt QML documentation.
Before it wasn't clear to what the module provided, especially with the coupling of Qt QML and Qt Quick. The doc is centered around these documentation: -QML refernce: the language syntax and the application constructs -JavaScript environment: the environment provided by the module -Integration with C++: more about the engine and the C++ API -QML Types and Classes reference (created by \qmlmodule and \module) The distinction are made in the directory and the section titles in the Qt QML landing page. Change-Id: I033bfcbf8368b94ffa5ee4b1225bee74347f53eb Reviewed-by: Martin Smith <martin.smith@digia.com>
Diffstat (limited to 'src/qml/doc/src/qtqml.qdoc')
-rw-r--r--src/qml/doc/src/qtqml.qdoc201
1 files changed, 72 insertions, 129 deletions
diff --git a/src/qml/doc/src/qtqml.qdoc b/src/qml/doc/src/qtqml.qdoc
index 05a33f351a..3cb6fcec38 100644
--- a/src/qml/doc/src/qtqml.qdoc
+++ b/src/qml/doc/src/qtqml.qdoc
@@ -30,159 +30,102 @@
\title Qt QML
\brief The Qt QML module defines and implements the QML language
-\section1 Overview of the Qt QML Module
-
-The Qt QML module provides a framework for developing applications and
-libraries with the QML language. It defines and implements the language
-and engine infrastructure, and provides an API to enable application
+The Qt QML module provides a framework for developing applications and libraries
+with the \l{The QML Language}{QML language}. It defines and implements the
+language and engine infrastructure, and provides an API to enable application
developers to extend the QML language with custom types and integrate QML code
with JavaScript and C++.
-The Qt QML module provides both the \c QtQml QML module, which supplies
-\l{Qt QML QML Types}{a set of core QML types} for creating QML
-applications, and the \c QtQml C++ module, which supplies \l{Qt QML C++ Classes}{a set of C++
-APIs} for extending QML applications with custom types and integrating C++
-implementations with QML applications.
-
-Note that the Qt QML module provides only the language and infrastructure
-for the QML, and does not provide a visual canvas or rendering engine for
-creating user interfaces. These are provided instead by the
-\l{Qt Quick} module, which provides many visual components,
-model/view support, an animation framework and much more for building user
-interfaces with QML.
+Note that while the Qt QML module provides the language and infrastructure
+for QML applications, the \l{Qt Quick} module provides many visual components,
+model-view support, an animation framework, and much more for building user
+interfaces.
For those new to QML and Qt Quick, please see
\l{qtquick-applicationdevelopers.html}{QML Application Developer Resources}
for an introduction to writing QML applications.
+\section1 Getting Started
-\section1 Qt QML Module Documentation
+To include the definitions of the module's classes, use the
+following directive:
-\list
- \li \l{qtqml-cppclasses-topic.html}{Important C++ Classes}
- \list
- \li \l{QQmlEngine}
- \li \l{QQmlContext}
- \li \l{QQmlComponent}
- \li \l{QQmlExpression}
- \endlist
-
- \li \l{qtqml-typesystem-topic.html}{The QML Type System}
- \list
- \li \l{qtqml-typesystem-basictypes.html}{Basic Types}
- \li \l{qtqml-typesystem-topic.html#javascript-types}{JavaScript Types}
- \li \l{qtqml-typesystem-objecttypes.html}{QML Object Types}
- \list
- \li \l{qtqml-documents-definetypes.html}{Defining Object Types from QML}
- \li \l{qtqml-cppintegration-definetypes.html}{Defining Object Types from C++}
- \endlist
- \endlist
-
- \li \l{qtqml-modules-topic.html}{QML Modules}
- \list
- \li \l{qtqml-modules-qmldir.html}{Specifying A QML Module}
- \li \l{qtqml-modules-topic.html#supported-qml-module-types}{Supported QML Module Types}
- \list
- \li \l{qtqml-modules-identifiedmodules.html}{Identified Modules}
- \li \l{qtqml-modules-legacymodules.html}{Legacy Modules}
- \endlist
- \li \l{qtqml-modules-cppplugins.html}{Providing Types and Functionality in a C++ Plugin}
- \endlist
-
- \li \l{qtqml-documents-topic.html}{QML Documents}
- \list
- \li \l{qtqml-documents-structure.html}{Structure of a QML Document}
- \li \l{Syntax of the QML Language}
- \li \l{qtqml-documents-definetypes.html}{Defining Object Types through QML Documents}
- \list
- \li \l{qtqml-documents-definetypes.html#defining-an-object-type-with-a-qml-file}{Defining an Object Type with a QML File}
- \li \l{qtqml-documents-definetypes.html#accessible-attributes-of-custom-types}{Accessible Attributes of Custom Types}
- \endlist
- \li \l{qtqml-documents-networktransparency.html}{Resource Loading and Network Transparency}
- \li \l{qtqml-documents-scope.html}{Scope and Naming Resolution}
- \endlist
-
- \li \l{qtqml-typereference-topic.html}{QML Types Provided by the Qt QML Module}
- \list
- \li \l{qtqml-typereference-topic.html#importing-qtqml}{Importing \c QtQml}
- \li \l{qtqml-typereference-topic.html#basic-types}{Basic Types}
- \li \l{qtqml-typereference-topic.html#object-types}{Object Types}
- \list
- \li \l{qtqml-typereference-topic.html#qtobject}{QtObject}
- \li \l{qtqml-typereference-topic.html#component}{Component}
- \endlist
- \endlist
-
- \li \l{qtqml-javascript-topic.html}{Integrating QML and JavaScript}
- \list
- \li \l{qtqml-javascript-expressions.html}{Using JavaScript Expressions with QML}
- \li \l{qtqml-javascript-dynamicobjectcreation.html}{Dynamic QML Object Creation from JavaScript}
- \li \l{qtqml-javascript-resources.html}{Defining JavaScript Resources In QML}
- \li \l{qtqml-javascript-imports.html}{Importing JavaScript Resources In QML}
- \li \l{qtqml-javascript-hostenvironment.html}{JavaScript Host Environment}
- \list
- \li \l{qtqml-javascript-hostenvironment.html#common-base}{Common Base}
- \li \l{qtqml-javascript-hostenvironment.html#qml-global-object}{QML Global Object}
- \li \l{qtqml-javascript-hostenvironment.html#javascript-objects-and-functions}{JavaScript Objects and Functions}
- \li \l{qtqml-javascript-hostenvironment.html#javascript-environment-restrictions}{JavaScript Environment Restrictions}
- \endlist
- \endlist
-
- \li \l{qtqml-cppintegration-topic.html}{Integrating QML and C++}
- \list
- \li \l{qtqml-cppintegration-exposecppattributes.html}{Exposing Attributes of C++ Classes to QML}
- \li \l{qtqml-cppintegration-definetypes.html}{Defining QML Types from C++}
- \li \l{qtqml-cppintegration-contextproperties.html}{Embedding C++ Objects into QML with Context Properties}
- \li \l{qtqml-cppintegration-interactqmlfromcpp.html}{Interacting with QML Objects from C++}
- \li \l{qtqml-cppintegration-data.html}{Data Type Conversion Between QML and C++}
- \endlist
+\code
+#include <QtQml>
+\endcode
-\endlist
+The QML types in Qt QML are available through the \c QtQML import. To use the
+types, add the following import statement to your .qml file:
+\code
+import QtQml 2.0
+\endcode
+
+
+To link against the module, add this line to your \l qmake \c
+.pro file:
+\code
+QT += qml
+\endcode
-\section1 Syntax of the QML Language
+\section1 QML and QML Types
+The Qt QML module contains the QML framework and important QML types used in
+applications. The constructs of QML are described in the \l{The QML Reference}.
+
+In addition to the \l{QML Basic Types}, the module comes with
+various QML object types:
\list
- \li \l{qtqml-syntax-basics.html}{QML Syntax Basics}
- \list
- \li \l{qtqml-syntax-imports.html}{Import Statements}
- \li \l{qtqml-syntax-basics.html#object-declarations}{Object Declarations}
- \list
- \li \l{qtqml-syntax-basics.html#child-objects}{Child Objects}
- \endlist
- \li \l{qtqml-syntax-basics.html#comments}{Comments}
- \endlist
-
- \li \l{qtqml-syntax-objectattributes.html}{QML Object Attributes}
- \list
- \li \l{qtqml-syntax-objectattributes.html#the-id-attribute}{The \e id Attribute}
- \li \l{qtqml-syntax-objectattributes.html#property-attributes}{Property Attributes}
- \li \l{qtqml-syntax-objectattributes.html#signal-attributes}{Signal Attributes}
- \li \l{qtqml-syntax-objectattributes.html#method-attributes}{Method Attributes}
- \li \l{qtqml-syntax-objectattributes.html#attached-properties-and-attached-signal-handlers}{Attached Properties and Attached Signal Handlers}
- \endlist
-
- \li \l{qtqml-syntax-propertybinding.html}{Property Binding}
- \li \l{qtqml-syntax-signals.html}{Signal and Handler Event System}
+\li \l Component
+\li \l QtObject
+\li \l Binding
+\li \l Connections
+\li \l Timer
\endlist
-\section1 Reference Documentation
+\section1 JavaScript Environment for QML Applications
+
+JavaScript expressions allow QML code to contain application logic. Qt QML
+provides the framework for running JavaScript expressions in QML and from C++.
+
+These sections are from \l{The QML Reference}.
+\l{qtqml-javascript-topic.html}{Integrating QML and JavaScript}
+ \list
+ \li \l{qtqml-javascript-expressions.html}{Using JavaScript Expressions with QML}
+ \li \l{qtqml-javascript-dynamicobjectcreation.html}{Dynamic QML Object Creation from JavaScript}
+ \li \l{qtqml-javascript-resources.html}{Defining JavaScript Resources In QML}
+ \li \l{qtqml-javascript-imports.html}{Importing JavaScript Resources In QML}
+ \li \l{qtqml-javascript-hostenvironment.html}{JavaScript Host Environment}
+ \endlist
+
+\section1 Integrating QML with C++ Applications
+
+The module also provides the framework for running QML applications.
+The QML framework allows QML code to contain JavaScript expressions and for
+the QML code to interact with C++ code.
-Additional Qt QML information:
\list
-\li \l{Qt QML C++ Classes} - the C++ API provided by the
- Qt QML module
-\li \l{Qt QML Release Notes} - list of changes and
- additions in the Qt QML module
+\li \l{Important C++ Classes Provided By The Qt QML Module}
+\li \l{Integrating QML and C++}
\endlist
+\section1 Guides and Other Information
+
Further information for writing QML applications:
\list
+\li \l{The QML Reference}
\li \l{QML Application Developer Resources}
- essential information for application development with QML and Qt Quick
-\li \l{Qt Quick} - documentation for the Qt Quick module, which provides a
- visual canvas, an animation framework, model/view components and more for
- building fluid user interfaces and applications with QML
+\li \l{Qt Quick} - a module which provides a set of QML types and C++ classes
+ for building user interfaces and applications with QML
+\li \l{Qt QML Release Notes} - list of changes and
+ additions in the Qt QML module
\endlist
-*/
+\section2 Reference
+\list
+\li \l{Qt QML C++ Classes}{C++ Classes}
+\li \l{Qt QML QML Types}{QML Types}
+\endlist
+
+*/