diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-11-23 08:32:26 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-11-23 08:32:26 (GMT) |
commit | 8d263b7cbf6b0bd17deeb8b56c90e0232057b832 (patch) | |
tree | 023d6961a41fca55cc0e6739742603b9ea10d618 /doc/src/declarative/globalobject.qdoc | |
parent | 9294be6c644739c5a15b26c7d85c56ba4aece0ca (diff) | |
parent | e0597765a6c3ea4ad6ae83d83166376bf1f4f1ea (diff) | |
download | Qt-8d263b7cbf6b0bd17deeb8b56c90e0232057b832.zip Qt-8d263b7cbf6b0bd17deeb8b56c90e0232057b832.tar.gz Qt-8d263b7cbf6b0bd17deeb8b56c90e0232057b832.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'doc/src/declarative/globalobject.qdoc')
-rw-r--r-- | doc/src/declarative/globalobject.qdoc | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc index e983ad0..e3c8b9a 100644 --- a/doc/src/declarative/globalobject.qdoc +++ b/doc/src/declarative/globalobject.qdoc @@ -64,7 +64,7 @@ files. The Qt object contains all enums in the Qt namespace. For example, you can access the AlignLeft member of the Qt::AlignmentFlag enum with \c Qt.AlignLeft. -For a full list of enums, see the Qt Namespace documentation. +For a full list of enums, see the \l{Qt Namespace} documentation. \section2 Types The Qt object also contains helper functions for creating objects of specific @@ -88,20 +88,20 @@ This function returns a Color with the specified \c red, \c green, \c blue and \ This function returns a Color with the specified \c hue, \c saturation, \c lightness and \c alpha components. All components should be in the range 0-1 inclusive. \section3 Qt.rect(int x, int y, int width, int height) -This function returns a Rect with the top-left corner at \c x,\c y and the specified \c width and \c height. +This function returns a Rect with the top-left corner at \c x, \c y and the specified \c width and \c height. \section3 Qt.point(int x, int y) This function returns a Point with the specified \c x and \c y coordinates. \section3 Qt.size(int width, int height) -This function returns as Size with the specified width and height. +This function returns as Size with the specified \c width and \c height. \section3 Qt.vector3d(real x, real y, real z) -This function returns a Vector3D with the specified x, y and z. +This function returns a Vector3D with the specified \c x, \c y and \c z. \section2 Functions The Qt object also contains the following miscellaneous functions which expose Qt functionality for use in QML. \section3 Qt.lighter(color baseColor) This function returns a color 50% lighter than \c baseColor. See QColor::lighter() for further details. \section3 Qt.darker(color baseColor) -This function returns a color 50% darker than \c baseColor. See QColor::lighter() for further details. +This function returns a color 50% darker than \c baseColor. See QColor::darker() for further details. \section3 Qt.tint(color baseColor, color tintColor) This function allows tinting one color with another. @@ -117,6 +117,16 @@ This function returns a color 50% darker than \c baseColor. See QColor::lighter( \section3 Qt.closestAngle(number fromAngle, number toAngle) This function returns an equivalent angle to toAngle, such that the difference between fromAngle and toAngle is never more than 180 degrees. This is useful when animating angles using a NumberAnimation, which does not know about equivalent angles, when you always want to take the shortest path. +For example, the following would rotate myItem counterclockwise from 350 degrees to 10 degrees, for a total of 340 degrees of rotation. +\qml +NumberAnimation { target: myItem; property: "rotation"; from: 350; to: 10 } +\endqml + +while the following would rotate myItem clockwise from 350 degrees to 370 degrees (which is visually equivilant to 10 degrees), for a total of 20 degrees of rotation. +\qml +NumberAnimation { target: myItem; property: "rotation"; from: 350; to: Qt.closetAngle(350, 10) } +\endqml + \section3 Qt.playSound(url soundLocation) This function plays the audio file located at \c soundLocation. Only .wav files are supported. |