From 8ce181129ada6d4e5df7109b2f062b01d1d50d4f Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Fri, 16 Oct 2009 19:14:17 +1000 Subject: Doc --- doc/src/declarative/globalobject.qdoc | 63 +++++++++++++++++++++++++++++++ doc/src/declarative/pics/qml-scope.png | Bin 0 -> 34888 bytes doc/src/declarative/propertybinding.qdoc | 1 - doc/src/declarative/qtbinding.qdoc | 2 + doc/src/declarative/scope.qdoc | 41 +++++++++++++++++++- 5 files changed, 104 insertions(+), 3 deletions(-) create mode 100644 doc/src/declarative/globalobject.qdoc create mode 100644 doc/src/declarative/pics/qml-scope.png diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc new file mode 100644 index 0000000..18bcd69 --- /dev/null +++ b/doc/src/declarative/globalobject.qdoc @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! +\page qmlglobalobject.html +\title QML Global Object + +Contains all the properties of the ECMAScript global object, plus: + +\list +\o Qt +\o createQmlObject +\o createComponent +\o XMLHttpRequest +\o openDatabase +\endlist + + +\section1 Qt Object + +\section1 Asynchronous JavaScript and XML + +\section1 Offline Storage API + +*/ diff --git a/doc/src/declarative/pics/qml-scope.png b/doc/src/declarative/pics/qml-scope.png new file mode 100644 index 0000000..05403db Binary files /dev/null and b/doc/src/declarative/pics/qml-scope.png differ diff --git a/doc/src/declarative/propertybinding.qdoc b/doc/src/declarative/propertybinding.qdoc index 4cf08d8..50cbf2d 100644 --- a/doc/src/declarative/propertybinding.qdoc +++ b/doc/src/declarative/propertybinding.qdoc @@ -98,6 +98,5 @@ of bindings. In some advanced cases, it is necessary to create bindings explici \l Binding element. One such example is included in the \l {Passing Data Between C++ and QML} documentation. -\sa {QML/C++ Data Binding} */ diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc index e925227..f6fe069 100644 --- a/doc/src/declarative/qtbinding.qdoc +++ b/doc/src/declarative/qtbinding.qdoc @@ -44,6 +44,7 @@ \target qtbinding \title Using QML in C++ Applications +\section1 TODO \list \o QmlEngine and QmlComponent \o QmlContext and data @@ -51,6 +52,7 @@ \o QAbstractItemModel Data models \endlist +\section1 Overview The QML mechanisms of data binding can also be used to bind Qt C++ objects. The data binding framework is based on Qt's property system (see the Qt documentation for more details on this system). If a binding is meant to be dynamic (where changes in one object are reflected in another object), \c NOTIFY must be specified for the property being tracked. If \c NOTIFY is not specified, any binding to that property will be an 'intialization' binding (the tracking object will be updated only once with the initial value of the tracked object). diff --git a/doc/src/declarative/scope.qdoc b/doc/src/declarative/scope.qdoc index c35f3e3..4c613df 100644 --- a/doc/src/declarative/scope.qdoc +++ b/doc/src/declarative/scope.qdoc @@ -43,7 +43,44 @@ \page qmlscope.html \title QML Scope -QML is a \e {dynamically scoped} language. \l {Property Binding}s and \l {ECMAScript Blocks} -are executed +\l {Property Binding}s and \l {ECMAScript Blocks} are executed in a scope chain automatically +established by QML when constructing a component instance. QML is a \e {dynamically scoped} +language. Different object instances instantiated from the same component can exist in +dramatically different scope chains. +\image qml-scope.png + +\section1 Variable object + +Where local variables are stored. Not really applicable to bindings. + +\section1 QML Scope object + +Principally for the \c parent property. + +\code +Item { + anchors.fill: parent +} +\endcode + +vs + +\code +Item { + anchors.fill: this.parent +} +\endcode + +\section1 QML Component chain + +Principally for propogating properties around the component. + +\section1 QmlContext chain + +App provided data. + +\section1 QML Global Object + +Contains all the properties ECMAScript defines, plus some QML ones. Documented \l {QML Global Object}. */ -- cgit v0.12