From ea0284d0f4a3408d7c1219702214c263118ef52f Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 1 May 2009 15:49:36 +1000 Subject: doc --- src/declarative/fx/qfxflipable.cpp | 58 ++++++++++++++++++------------- src/declarative/fx/qfxfocuspanel.cpp | 4 +-- src/declarative/fx/qfxfocusrealm.cpp | 2 +- src/declarative/fx/qfxgridview.cpp | 4 +-- src/declarative/fx/qfxhighlightfilter.cpp | 32 ++++++++++------- src/declarative/fx/qfximage.cpp | 28 ++++++++------- src/declarative/fx/qfxkeyactions.cpp | 34 +++++++++--------- src/declarative/fx/qfxkeyproxy.cpp | 4 +-- 8 files changed, 92 insertions(+), 74 deletions(-) diff --git a/src/declarative/fx/qfxflipable.cpp b/src/declarative/fx/qfxflipable.cpp index 81ed750..db390d2 100644 --- a/src/declarative/fx/qfxflipable.cpp +++ b/src/declarative/fx/qfxflipable.cpp @@ -64,34 +64,44 @@ public: /*! \qmlclass Flipable QFxFlipable - \brief The Flipable element provides a surface that can be flipped. + \brief The Flipable item provides a surface that can be flipped. \inherits Item Flipable allows you to specify a front and a back and then flip between those sides. - \code - - - - - - - - - - - - - - - - - - - - - - \endcode + \qml +Flipable { + id: flipable + width: 40 + height: 40 + axis: Axis { + startX: 20 + startY: 0 + endX: 20 + endY: 40 + } + front: Image { src: "front.png" } + back: Image { src: "back.png" } + states: [ + State { + name: "back" + SetProperty { + target: flipable + property: "rotation" + value: 180 + } + } + ] + transitions: [ + Transition { + NumericAnimation { + easing: "easeInOutQuad" + properties: "rotation" + } + } + ] +} + \endqml \image flipable.gif */ diff --git a/src/declarative/fx/qfxfocuspanel.cpp b/src/declarative/fx/qfxfocuspanel.cpp index 67c456e..5d62e66 100644 --- a/src/declarative/fx/qfxfocuspanel.cpp +++ b/src/declarative/fx/qfxfocuspanel.cpp @@ -47,7 +47,7 @@ QML_DEFINE_TYPE(QFxFocusPanel,FocusPanel); /*! \qmlclass FocusPanel - \brief The FocusPanel element explicitly creates a focus panel. + \brief The FocusPanel object explicitly creates a focus panel. \inherits Item Focus panels assist in keyboard focus handling when building QML @@ -73,7 +73,7 @@ QFxFocusPanel::~QFxFocusPanel() /*! \qmlproperty bool FocusPanel::active - Sets whether the element is the active focus panel. + Sets whether the object is the active focus panel. */ bool QFxFocusPanel::isActive() const diff --git a/src/declarative/fx/qfxfocusrealm.cpp b/src/declarative/fx/qfxfocusrealm.cpp index da3f1b2..07849fa 100644 --- a/src/declarative/fx/qfxfocusrealm.cpp +++ b/src/declarative/fx/qfxfocusrealm.cpp @@ -47,7 +47,7 @@ QML_DEFINE_TYPE(QFxFocusRealm,FocusRealm); /*! \qmlclass FocusRealm - \brief The FocusRealm element explicitly creates a focus realm. + \brief The FocusRealm object explicitly creates a focus realm. \inherits Item Focus realms assist in keyboard focus handling when building reusable QML diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/fx/qfxgridview.cpp index b8acea2..8416234 100644 --- a/src/declarative/fx/qfxgridview.cpp +++ b/src/declarative/fx/qfxgridview.cpp @@ -647,7 +647,7 @@ void QFxGridViewPrivate::updateCurrent(int modelIndex) /*! \qmlclass GridView \inherits Flickable - \brief The GridView element provides a grid view of items provided by a model. + \brief The GridView item provides a grid view of items provided by a model. The model is typically provided by a QAbstractListModel "C++ model object", but can also be created directly in QML. @@ -706,7 +706,7 @@ QFxGridView::~QFxGridView() The C++ model object must be a \l QListModelInterface subclass, a \l VisualModel, or a simple list. - Models can also be created directly in QML, using the \l ListModel element. For example: + Models can also be created directly in QML, using the \l ListModel object. For example: \code diff --git a/src/declarative/fx/qfxhighlightfilter.cpp b/src/declarative/fx/qfxhighlightfilter.cpp index 70b50cd..862a698 100644 --- a/src/declarative/fx/qfxhighlightfilter.cpp +++ b/src/declarative/fx/qfxhighlightfilter.cpp @@ -73,18 +73,24 @@ public: \brief The Highlight filter adds a highlight to an item. \inherits Filter - \code - - - - - - - - - - \endcode + \qml +Text { + id: highlighttext + color: "red" + font.size: 32 + text: "Highlight" + filter: Highlight { + source: "pics/highlight.png" + xOffset: NumericAnimation { + running: true + repeat: true + from: 320 + to: -320 + duration: 2000 + } + } +} + \endqml \image highlight.gif Highlighting is only supported when Qt Declarative is compiled for OpenGL ES 2.0. @@ -114,7 +120,7 @@ QFxHighlightFilter::~QFxHighlightFilter() } /*! - \qmlproperty string Highlight::src + \qmlproperty string Highlight::source This property holds the URL of the image to be used as the highlight. */ diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp index 1361d68..53c6137 100644 --- a/src/declarative/fx/qfximage.cpp +++ b/src/declarative/fx/qfximage.cpp @@ -60,36 +60,38 @@ QML_DEFINE_TYPE(QFxImage,Image); \brief The Image element allows you to add bitmaps to a scene. \inherits Item - The Image element supports untransformed, stretched, grid-scaled and tiled images. For an explanation of grid-scaling see the scaleGrid property description or the QFxScaleGrid class description. + The Image element supports untransformed, stretched, grid-scaled and tiled images. + For an explanation of grid-scaling see the scaleGrid property description + or the QFxScaleGrid class description. Examples: \table \row \o \image declarative-qtlogo1.png \o Untransformed - \code + \qml Image { source: "pics/qtlogo.png" } - \endcode + \endqml \row \o \image declarative-qtlogo2.png \o Stretched - \code + \qml Image { width: 160; height: 160; source: "pics/qtlogo.png" } - \endcode + \endqml \row \o \image declarative-qtlogo4.png \o Grid-scaled - \code + \qml Image { scaleGrid.left: 20; scaleGrid.right: 10 scaleGrid.top: 14; scaleGrid.bottom: 14 width: 160; height: 160; source: "pics/qtlogo.png" } - \endcode + \endqml \row \o \image declarative-qtlogo3.png \o Tiled - \code + \qml Image { tile: true; width: 160; height: 160; source: "pics/qtlogo.png" } - \endcode + \endqml \endtable */ @@ -101,9 +103,9 @@ QML_DEFINE_TYPE(QFxImage,Image); \ingroup group_coreitems Example: - \code + \qml Image { source: "pics/star.png" } - \endcode + \endqml A QFxImage object can be instantiated in Qml using the tag \l Image. */ @@ -198,13 +200,13 @@ QFxScaleGrid *QFxImage::scaleGrid() bitmap file to its size. If tiling is enabled, the bitmap is repeated as a set of unscaled tiles, clipped to the size of the Image. - \code + \qml Item { Image { source: "tile.png" } Image { x: 80; width: 100; height: 100; src: "tile.png" } Image { x: 190; width: 100; height: 100; tile: true; src: "tile.png" } } - \endcode + \endqml \image declarative-image_tile.png If both tiling and the scaleGrid are set, tiling takes precedence. diff --git a/src/declarative/fx/qfxkeyactions.cpp b/src/declarative/fx/qfxkeyactions.cpp index 52a013a..a07f047 100644 --- a/src/declarative/fx/qfxkeyactions.cpp +++ b/src/declarative/fx/qfxkeyactions.cpp @@ -169,22 +169,22 @@ void QFxKeyActionsPrivate::setBit(int b, bool v) /*! \qmlclass KeyActions - \brief The KeyActions element enables simple key handling. + \brief The KeyActions item enables simple key handling. \inherits Item KeyActions is typically used in basic key handling scenarios where writing JavaScript key handling routines would be unnecessarily complicated. The - KeyActions element has a collection of properties that correspond to a - selection of common keys. When a given key is pressed, the element executes + KeyActions item has a collection of properties that correspond to a + selection of common keys. When a given key is pressed, the item executes the action script assigned to the matching property. If no action has - been set the KeyActions element does nothing. + been set the KeyActions item does nothing. To receive (and susequently respond to) key presses, the KeyActions class - must be in the current focus chain, just like any other element. + must be in the current focus chain, just like any other item. For basic mouse handling, see \l MouseRegion. - KeyActions is an invisible element: it is never painted. + KeyActions is an invisible item: it is never painted. */ QFxKeyActions::QFxKeyActions(QFxItem *parent) : QFxItem(parent), d(new QFxKeyActionsPrivate) @@ -221,7 +221,7 @@ void QFxKeyActionsPrivate::setKeyExpr(Qt::Key k, const QString &expr) \qmlproperty bool KeyActions::enabled Enables or disables KeyActions' key handling. When not enabled, the - KeyActions instance does not respond to any key presses. The element is + KeyActions instance does not respond to any key presses. The item is enabled by default. */ bool QFxKeyActions::enabled() const @@ -244,9 +244,9 @@ void QFxKeyActions::setEnabled(bool e) The action to take for the given letter. The following example sets actions for the 'c' and 'x' keys. - \code + \qml KeyActions { keyC: "print('c is for cookie')"; keyX: "print('I like cookies')" } - \endcode + \endqml */ QString QFxKeyActions::key_A() const { @@ -518,9 +518,9 @@ void QFxKeyActions::setKey_Z(const QString &s) The action to take for the given arrow key. The following example sets actions for the left and right arrow keys. - \code + \qml KeyActions { leftArrow: "print('You pressed left')"; rightArrow: "print('You pressed right')" } - \endcode + \endqml */ QString QFxKeyActions::key_Left() const @@ -569,9 +569,9 @@ void QFxKeyActions::setKey_Down(const QString &s) The action to take for the given number key. The following example sets actions for the '5' and '6' keys. - \code + \qml KeyActions { digit5: "print('5 is a prime number')"; digit6: "print('6 is a composite number')"; focus: true } - \endcode + \endqml */ QString QFxKeyActions::key_0() const @@ -744,9 +744,9 @@ void QFxKeyActions::setKey_Space(const QString &s) The action to take for the given utility key. The following example sets an action for the space key. - \code + \qml KeyActions { space: "print('Space pressed')" } - \endcode + \endqml */ /*! @@ -765,9 +765,9 @@ void QFxKeyActions::setKey_Space(const QString &s) The action to take for the given device key. The following example sets an action for the hangup key. - \code + \qml KeyActions { hangup: "print('Go away now')" } - \endcode + \endqml */ QString QFxKeyActions::key_Back() const diff --git a/src/declarative/fx/qfxkeyproxy.cpp b/src/declarative/fx/qfxkeyproxy.cpp index 6d92441..6d9c6ab 100644 --- a/src/declarative/fx/qfxkeyproxy.cpp +++ b/src/declarative/fx/qfxkeyproxy.cpp @@ -47,7 +47,7 @@ QML_DEFINE_TYPE(QFxKeyProxy,KeyProxy); /*! \qmlclass KeyProxy - \brief The KeyProxy element proxies key presses to a number of other elements. + \brief The KeyProxy item proxies key presses to a number of other items. \inherits Item */ @@ -55,7 +55,7 @@ QML_DEFINE_TYPE(QFxKeyProxy,KeyProxy); /*! \internal \class QFxKeyProxy - \brief The QFxKeyProxy class proxies key presses to a number of other elements. + \brief The QFxKeyProxy class proxies key presses to a number of other items. \ingroup group_utility */ -- cgit v0.12