aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Adams <christopher.adams@nokia.com>2012-07-26 10:51:50 +1000
committerQt by Nokia <qt-info@nokia.com>2012-07-27 06:09:11 +0200
commit0408dcd6a9d45e110610c6ed14987189d4e16c90 (patch)
treefee551951507b599a3c96093cecbf8cb795774c4
parent54c2d685512fdeac2d5b6eeaf25ed738c4fd99ba (diff)
Update whatsnew documentation with value-type improvements
Value types are now supported as property types. QtQuick provides several new value types. Subproperty modification write-back semantics have been fixed for variant properties. Change-Id: Ic47a8401178e6f8bbd5037b6929d7afd5e3cffe6 Reviewed-by: Bea Lam <bea.lam@nokia.com>
-rw-r--r--src/qml/doc/src/whatsnew.qdoc9
-rw-r--r--src/quick/doc/src/whatsnew.qdoc46
2 files changed, 53 insertions, 2 deletions
diff --git a/src/qml/doc/src/whatsnew.qdoc b/src/qml/doc/src/whatsnew.qdoc
index d66d78d5ec..253c89c34f 100644
--- a/src/qml/doc/src/whatsnew.qdoc
+++ b/src/qml/doc/src/whatsnew.qdoc
@@ -71,8 +71,13 @@ has now been replaced by the new QtQml and QtQuick C++ modules. See the
\li QML properties of type \l var and \l variant can now hold pixmaps. See \l {Scarce Resources in JavaScript} for more information.
\li Value type improvements:
\list
- \li QColor is now a value type. The red, green, blue and alpha channels of a \l color property can be accessed via \c r, \c g, \c b and \c a properties.
- \li Improved support for QVector4D, now constructible in QML via \c Qt.vector4d().
+ \li QML now supports defining properties of value type basic types within QML documents. Supported types include
+ QSizeF, QPointF and QRectF as \c size, \c point and \c rect respectively.
+ \li QColor is now a value type provided by the QtQuick module. The red, green, blue and alpha channels
+ of a \l color property can be accessed via \c r, \c g, \c b and \c a properties.
+ \li Factory functions for various value types have been added to the \c Qt object exposed to QML.
+ Some of those functions require the QtQuick module to be imported in order to return valid values.
+ See the QtQuick 2.0 release notes for more information about these functions.
\endlist
\li Support for sequence types QList<int>, QList<qreal>, QList<bool>, QList<QUrl>,
QList<QString> and QStringList has been improved. QObjects can define Q_PROPERTYs of
diff --git a/src/quick/doc/src/whatsnew.qdoc b/src/quick/doc/src/whatsnew.qdoc
index 8eff21e387..4b6ea364c3 100644
--- a/src/quick/doc/src/whatsnew.qdoc
+++ b/src/quick/doc/src/whatsnew.qdoc
@@ -353,6 +353,52 @@ the window loses focus.
\endlist
\endlist
+\section2 Property types
+
+Support for various math and geometry-related value types, including QVector2D, QVector3D, QVector4D,
+QMatrix4x4 and QQuaternion, as well as QColor and QFont, are now provided by QtQuick. Properties of
+these types can be declared in QML documents via the property syntax where the type name is \c vector2d,
+\c vector3d, \c vector4d, \c matrix4x4, \c quaternion, \c color and \c font respectively.
+
+QtQuick also provides implementation for the various value type factory or utility functions of the
+\c Qt object which return or operate on values of the above types. The functions are:
+\table
+ \header
+ \li Value type
+ \li Functions
+
+ \row
+ \li color
+ \li Qt.rgba(), Qt.hsla(), Qt.tint(), Qt.lighter(), Qt.darker(), Qt.colorEqual()
+
+ \row
+ \li font
+ \li Qt.font(), Qt.fontFamilies()
+
+ \row
+ \li vector2d
+ \li Qt.vector2d()
+
+ \row
+ \li vector3d
+ \li Qt.vector3d()
+
+ \row
+ \li vector4d
+ \li Qt.vector4d()
+
+ \row
+ \li matrix4x4
+ \li Qt.matrix4x4()
+
+ \row
+ \li quaternion
+ \li Qt.quaternion()
+\endtable
+
+The \c Qt.rgba(), \c Qt.hsla(), \c Qt.tint(), \c Qt.lighter(), \c Qt.darker()
+and \c Qt.fontFamilies() functions already existed in \c QtDeclarative prior
+to QtQuick 2.0; the other functions are all new in QtQuick 2.0.
\section1 Qt 5.0 - Additional QML Modules