diff options
Diffstat (limited to 'doc/src/qtquick2')
-rw-r--r-- | doc/src/qtquick2/qtdeclarative.qdoc | 180 | ||||
-rw-r--r-- | doc/src/qtquick2/qtquick.qdoc | 52 | ||||
-rw-r--r-- | doc/src/qtquick2/whatsnew.qdoc | 167 |
3 files changed, 399 insertions, 0 deletions
diff --git a/doc/src/qtquick2/qtdeclarative.qdoc b/doc/src/qtquick2/qtdeclarative.qdoc new file mode 100644 index 0000000000..d9b9234c90 --- /dev/null +++ b/doc/src/qtquick2/qtdeclarative.qdoc @@ -0,0 +1,180 @@ +/**************************************************************************** +** +** 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{Qt Quick 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{QML 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{QML Mouse Events}{Mouse Events} + \li \l{QML 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{QML 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 \l{QML Models and Views}{Models and Views} + \endlist + \enddiv + \div {class="threecolumn_piece"} + \div {class="heading"} + Data Storage and Resources + \enddiv + \list + \li \l{QML 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/qtquick.qdoc b/doc/src/qtquick2/qtquick.qdoc new file mode 100644 index 0000000000..c38ef3c801 --- /dev/null +++ b/doc/src/qtquick2/qtquick.qdoc @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ + +/*! + \module QtQuick + \title Qt Quick Module + \ingroup modules + + \brief The Qt Quick module provides classes for embedding Qt Quick + in Qt/C++ applications. + + To include the definitions of the module's classes, use the + following directive: + + \code + #include <QtQuick> + \endcode + + To link against the module, add this line to your \l qmake \c + .pro file: + + \code + QT += quick + \endcode + + For more information on the Qt Quick module, see the + \l{Qt Quick} documentation. +*/ diff --git a/doc/src/qtquick2/whatsnew.qdoc b/doc/src/qtquick2/whatsnew.qdoc new file mode 100644 index 0000000000..1997a42a6b --- /dev/null +++ b/doc/src/qtquick2/whatsnew.qdoc @@ -0,0 +1,167 @@ +/**************************************************************************** +** +** 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 What's New in Qt Quick 2 +\page qtquick2-whatsnew.html +\inqmlmodule QtQuick 2 + +\section1 Qt 5.0.0 includes QtQuick 2.0 + +QtQuick 2.0 is a major update. + +\section2 SceneGraph renderer + +QtQuick 2 is based on an OpenGL scenegraph. The following +classes replace their equivalents in QtQuick 1: + +\list +\li QQuickView +\li QQuickCanvas +\li QQuickItem +\li QQuickPaintedItem +\endlist + +\section2 QML Engine/Language Improvements + +JS engine changed to V8. For most QML users this should not make a visible difference beyond performance improvements, however a lot of undefined behavior semantics may have changed as well. As always, it is recommended not to rely on undefined behavior. + +Parser and compiler optimizations. + +New binding optimizer. + +ValueType improvements: + - QColor is now a value type. The red, green, blue and alpha channels can be accessed via "r", "g", "b" and "a" properties + - Improved support for QVector4D, now constructible in QML via Qt.vector4d() + +Arbitrary functionality may be provided in a namespace through a Module API. See \l{qmlRegisterModuleApi()} for more information. + +JavaScript (.js) files may now import QML modules and other JavaScript files. See \l{Importing One JavaScript File From Another} for more information. + +A new property type "var" has been added which obsoletes the old "variant" property type. +Properties of the "var" type may hold JavaScript references. See \l{QML Basic Types} for more information. + +QML properties of type \c var and \c variant can now hold pixmaps. See \l{Scarce Resources in JavaScript} for more information + +QQmlExpression can now be directly (and more efficiently) constructed from a +QQmlScriptString. + +Support for certain sequence types (QList<int>, QList<qreal>, QList<bool>, QList<QUrl>, QList<QString> and QStringList) has been improved. +QObjects can define Q_PROPERTYs of these types which can be accessed transparently from JavaScript. See the section on +sequences in \l{Extending QML Functionalities using C++} for more information. + +\section2 Canvas Item + +The new \l Canvas item provides a HTML5 canvas like API, with some enhancements: +1) Supports 2 render targets: Canvas.Image and Canvas.FramebufferObject +2) Supports background thread rendering +3) Supports tiled canvas rendering + +The Canvas item supports most of the HTML5 context2d APIs, the API details please look at the canvas item documentation. + + +\section2 Particle System + +The \l{QtQuick.Particles 2}{QtQuick.Particles} module contains elements that can be composed to form 2D particle system. + + +\section2 Element API/Behavior Changes + +New \l SpriteImage element renders animated sprites and can transition between animations. +It uses the \l Sprite element to represent each animation. + +MouseArea now propagates clicked, doubleClicked and pressAndHold differently to pressed. +These will now be propagated to the highest-stacking-order enabled MouseArea which has a handler for them. +You can still ignore these events in the handler to let them pass through. +This behavior is triggered with the new property propagateComposedEvents. + +The Binding element can now be used as a value source, and will also restore any previously +set binding when its \e when clause becomes false. + +Flickable: added dragging, draggingHorizontally and draggingVerically properties. +Added topMargin, bottomMargin, leftMargin, rightMargin, xOrigin, yOrigin properties. + +Image has two new properties: horizontalAlignment and verticalAlignment. It also has a new value for +fillMode (Image.Pad) that does not transform the image. +Setting Image sourceSize.width and sourceSize.height will now fit the image to the size, maintaining aspect. + +Grid now has rowSpacing and columnSpacing properties. Spacing properties on positioners are now real numbers instead +of integers. + +Positioner (Row, Column, Grid, Flow) improvements: +\list +\li Transitions used for \c add and \c move now have improved features: they can access a ViewTransition attached property (see the ViewTransition documentation for examples) and can now animate arbitrary item properties (instead of being restricted to animating an item's position). +\li Items in a positioner now have attached properties that can be used to determine a subitem's location: Positioner.index, Positioner.isFirstItem, Positioner.isLastItem. +\endlist + +Loader improvements: + - "active" property added to Loader, to allow delaying instantiation of a Loader element's item property + - "setSource(JSObject)" method added to Loader to allow initial property values to be specified (similar to Component.createObject()) + - now only emits the \c sourceChanged signal when the source is changed and the +\c sourceComponentChanged signal when the sourceComponent is changed. It used to emit both signals when one of the properties was changed. + +Text improvements: + - a \c onLineLaidOut handler is called for every line during the layout process. This gives the opportunity to position and resize a line as it is being laid out. + - a \c doLayout method was added to trigger the layout from Javascript. + - now automatically switch to StyledText instead of RichText if textFormat is set to AutoText. + +TextEdit: + - the default value of the textFormat property is now PlainText instead of AutoText. + +TextInput has new wrapMode and verticalAlignment properties, and the positionAt function now takes +a y parameter. + +PathView now has a \c currentItem property + +ListView and GridView: + - Can now apply specified transitions whenever items are added, removed or moved in a view. + See the documentation for ViewTransition and ListView.add, ListView.addDisplaced, + GridView.add, GridView.addDisplaced etc. for details. + - These now have headerItem and footerItem properties (the instantiated header and footer items). + - In RightToLeft layout the preferredHighlightBegin/End are now also reversed. + +ListView section.labelPositioning property added to allow keeping the current section label +at the start and/or next section label at the end of the view. + +A new property type ("var") has been introduced which obsoletes "variant" properties in QML. +Properties of this type are equivalent to regular JavaScript variables. See the documentation +on \l{QML Basic Types} for more information about "var" properties. + +New elements have been added for contructing paths: PathArc, PathCurve, PathSvg. + +\section2 QtQuick 1 is now a separate library and module + +Writing C++ applications using QtQuick 1 specific API, i.e. QDeclarativeView or QDeclarativeItem +requires adding the "quick1" module to the .pro file, e.g. QT += quick1 + +QDeclarativeView and QDeclarativeItem headers are now in the QtQuick 1 module, i.e. +#include <QtQuick1/QDeclarativeView> +#include <QtQuick1/QDeclarativeItem> + +\sa {What's New in Qt Quick 1}{What's New in Qt Quick 1} + +*/ |