diff options
author | Martin Smith <msmith@trolltech.com> | 2009-04-24 12:33:03 (GMT) |
---|---|---|
committer | Martin Smith <msmith@trolltech.com> | 2009-04-24 12:33:03 (GMT) |
commit | 63c10310c31587453ffb33fc9658ba21c751c69b (patch) | |
tree | bf282ab85f84d77d3046b78644c02c03ce6c8e98 /src/declarative | |
parent | f3af81e7dcff1d7bd3c8e5a80d33bce1426e04a2 (diff) | |
download | Qt-63c10310c31587453ffb33fc9658ba21c751c69b.zip Qt-63c10310c31587453ffb33fc9658ba21c751c69b.tar.gz Qt-63c10310c31587453ffb33fc9658ba21c751c69b.tar.bz2 |
qdoc: Corrected a few qdoc warnings.
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/fx/qfxitem.cpp | 290 | ||||
-rw-r--r-- | src/declarative/fx/qfxitem.h | 2 |
2 files changed, 278 insertions, 14 deletions
diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index 6b4c504..0ee734b 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -227,6 +227,11 @@ void QFxContents::setItem(QFxItem *item) */ /*! + \property QFxItem::activeFocus + This property indicates whether the item has the active focus. + */ + +/*! \fn void QFxItem::activeFocusChanged() This signal is emitted when this item gains active focus. @@ -433,17 +438,25 @@ QFxItem::~QFxItem() The default transform origin is \c TopLeft. */ + /*! \qmlproperty Item Item::parent This property holds the parent of the item. */ + +/*! + \property QFxItem::parent + This property holds the parent of the item. +*/ void QFxItem::setItemParent(QFxItem *parent) { setParent(parent); } /*! - XXX Playing around with view2view transitions. + \internal + \property QFxItem::moveToParent + Playing around with view2view transitions. */ void QFxItem::moveToParent(QFxItem *parent) { @@ -535,6 +548,19 @@ QFxItem *QFxItem::itemParent() const */ /*! + \property QFxItem::children + + This property contains the list of visual children of this item. +*/ + +/*! + \property QFxItem::resources + + This property contains non-visual resources that you want to + reference by name. +*/ + +/*! Returns true if all of the attributes set via QML have been set; otherwise returns false. @@ -707,6 +733,18 @@ void QFxItemPrivate::children_clear() data is a behind-the-scenes property: you should never need to explicitly specify it. */ + +/*! + \property QFxItem::data + + The data property is allows you to freely mix the visual children + and the non-visual resources of an item. If you assign a visual + item to the data list it becomes a child and if you assign any + other object type, it is added as a resource. + + data is a behind-the-scenes property: you should never need to + explicitly specify it. + */ QmlList<QObject *> *QFxItem::data() { Q_D(QFxItem); @@ -731,6 +769,11 @@ QFxContents *QFxItem::contents() return d->_contents; } +/*! + \internal + \property QFxItem::qmlItem +*/ + QFxItem *QFxItem::qmlItem() const { Q_D(const QFxItem); @@ -745,6 +788,15 @@ QFxItem *QFxItem::qmlItem() const item. Querying for the QML only has meaning if the QML has been dynamically set; otherwise an empty string is returned. */ + +/*! + \property QFxItem::qml + This property holds the dynamic QML for the item. + + This property is used for dynamically loading QML into the + item. Querying for the QML only has meaning if the QML has been + dynamically set; otherwise an empty string is returned. +*/ QString QFxItem::qml() const { Q_D(const QFxItem); @@ -851,6 +903,39 @@ void QFxItem::qmlLoaded() */ /*! + \property QFxItem::width + + Defines the item's width relative to its parent. + */ + +/*! + \property QFxItem::height + + Defines the item's height relative to its parent. + */ + +/*! + \property QFxItem::x + + The x coordinate of the item relative to its parent. +*/ + +/*! + \property QFxItem::y + + The y coordinate of the item relative to its parent. +*/ + +/*! + \property QFxItem::z + + The z coordinate of the item relative to its parent. + + A negative z coordinate means the item will be painted below its parent. +*/ + + +/*! \qmlproperty real Item::z Sets the stacking order of the item. By default the stacking order is 0. @@ -903,12 +988,6 @@ void QFxItem::qmlLoaded() \endqml \endtable */ -/*! - \property QFxItem::z - \brief The z coordinate of the item relative to its parent. - - A negative z coordinate means the item will be painted below its parent. -*/ void QFxItem::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) @@ -1002,6 +1081,13 @@ void QFxItemPrivate::handleHeightChange(int yoffset) When set, the item will be displayed flipped horizontally or vertically about its center. */ + +/*! + \property QFxItem::flipVertically + + When set, the item will be displayed flipped horizontally or vertically + about its center. + */ bool QFxItem::flipVertically() const { return flip() & VerticalFlip; @@ -1015,6 +1101,12 @@ void QFxItem::setFlipVertically(bool v) setFlip((QSimpleCanvasItem::Flip)(flip() & ~VerticalFlip)); } +/*! + \property QFxItem::flipHorizontally + + When set, the item will be displayed flipped horizontally or vertically + about its center. + */ bool QFxItem::flipHorizontally() const { return flip() & HorizontalFlip; @@ -1095,8 +1187,23 @@ QRectF QFxItem::sceneBoundingRect() const \endqml The identifier is available throughout to the \l {components}{component} - where it is declared. Two items in the same component - with the same identifier is invalid. + where it is declared. The identifier must be unique in thecomponent. +*/ + +/*! + \property QFxItem::id + This property holds the identifier for the item. + + The identifier can be used in bindings and other expressions to + refer to the item. For example: + + \qml + <Text id="myText" .../> + <Text text="{myText.text}"/> + \endqml + + The identifier is available throughout the \l {components}{component} + where it is declared. The identifier must be unique in thecomponent. */ QString QFxItem::id() const { @@ -1148,6 +1255,54 @@ QFxAnchorLine QFxItem::verticalCenter() const } /*! + \property QFxItem::top + + One of the anchor lines of the item. + + For more information see \l {anchor-layout}{Anchor Layouts}. +*/ + +/*! + \property QFxItem::bottom + + One of the anchor lines of the item. + + For more information see \l {anchor-layout}{Anchor Layouts}. +*/ + +/*! + \property QFxItem::left + + One of the anchor lines of the item. + + For more information see \l {anchor-layout}{Anchor Layouts}. +*/ + +/*! + \property QFxItem::right + + One of the anchor lines of the item. + + For more information see \l {anchor-layout}{Anchor Layouts}. +*/ + +/*! + \property QFxItem::horizontalCenter + + One of the anchor lines of the item. + + For more information see \l {anchor-layout}{Anchor Layouts}. +*/ + +/*! + \property QFxItem::verticalCenter + + One of the anchor lines of the item. + + For more information see \l {anchor-layout}{Anchor Layouts}. +*/ + +/*! \qmlproperty AnchorLine Item::top \qmlproperty AnchorLine Item::bottom \qmlproperty AnchorLine Item::left @@ -1216,8 +1371,8 @@ QFxAnchorLine QFxItem::verticalCenter() const For more information see \l {anchor-layout}{Anchor Layouts}. */ -/* - \property QFxItem::baseline +/*! + \property QFxItem::baselineOffset \brief The position of the item's baseline in global (scene) coordinates. The baseline of a Text item is the imaginary line on which the text @@ -1267,6 +1422,14 @@ void QFxItem::setBaselineOffset(int offset) \endqml \endtable */ + +/*! + \property QFxItem::rotation + This property holds the rotation of the item in degrees. + + This specifies how many degrees to rotate the item around its origin (0,0). + The default rotation is 0 degrees (i.e. not rotated at all). +*/ qreal QFxItem::rotation() const { Q_D(const QFxItem); @@ -1322,6 +1485,21 @@ void QFxItem::setRotation(qreal rotation) \endqml \endtable */ + +/*! + \property QFxItem::scale + This property holds the scale of the item. + + A scale of less than 1 means the item will be displayed smaller than + normal, and a scale of greater than 1 means the item will be + displayed larger than normal. A negative scale means the item will + be mirrored. + + By default, items are displayed at a scale of 1 (i.e. at their + normal size). + + Scaling is from the item's origin (0,0). +*/ qreal QFxItem::scale() const { return QSimpleCanvasItem::scale(); @@ -1370,6 +1548,16 @@ void QFxItem::setScale(qreal s) \endtable */ +/*! + \property QFxItem::opacity + + The opacity of the item. Opacity is specified as a number between 0 + (fully transparent) and 1 (fully opaque). The default is 1. + + Opacity is an \e inherited attribute. That is, the opacity is + also applied individually to child items. +*/ + qreal QFxItem::opacity() const { return QSimpleCanvasItem::visible(); @@ -1437,6 +1625,13 @@ QmlList<QObject *> *QFxItem::resources() \sa {states-transitions}{States and Transitions} */ + +/*! + \property QFxItem::states + This property holds a list of states defined by the item. + + \sa {states-transitions}{States and Transitions} +*/ QmlList<QmlState *>* QFxItem::states() { Q_D(QFxItem); @@ -1459,6 +1654,13 @@ QmlList<QmlState *>* QFxItem::states() \sa {states-transitions}{States and Transitions} */ + +/*! + \property QFxItem::transitions + This property holds a list of transitions defined by the item. + + \sa {states-transitions}{States and Transitions} +*/ QmlList<QmlTransition *>* QFxItem::transitions() { Q_D(QFxItem); @@ -1466,6 +1668,11 @@ QmlList<QmlTransition *>* QFxItem::transitions() } /*! + \internal + \property QFxItem::filter +*/ + +/*! \qmlproperty list<Filter> Item::filter This property holds a list of graphical filters to be applied to the item. @@ -1497,6 +1704,16 @@ QmlList<QmlTransition *>* QFxItem::transitions() */ /*! + \property QFxItem::clip + This property holds whether clipping is enabled. + + if clipping is enabled, an item will clip its own painting, as well + as the painting of its children, to its bounding rectangle. + + Non-rectangular clipping regions are not supported for performance reasons. +*/ + +/*! Returns the state with \a name. Returns 0 if no matching state is found. */ QmlState *QFxItem::findState(const QString &name) const @@ -1533,6 +1750,32 @@ QmlState *QFxItem::findState(const QString &name) const \sa {states-transitions}{States and Transitions} */ + +/*! + \property QFxItem::state + + This property holds the name of the current state of the item. + + This property is often used in scripts to change between states. For + example: + + \qml + <Script> + function toggle() { + if (button.state == 'On') + button.state = 'Off'; + else + button.state = 'On'; + } + </Script> + \endqml + + If the item is in its base state (i.e. no explicit state has been + set), \c state will be a blank string. Likewise, you can return an + item to its base state by setting its current state to \c ''. + + \sa {states-transitions}{States and Transitions} +*/ QString QFxItem::state() const { Q_D(const QFxItem); @@ -1554,6 +1797,13 @@ void QFxItem::setState(const QString &state) For more information see \l Transform. */ + +/*! + \property QFxItem::transform + This property holds the list of transformations to apply. + + For more information see \l Transform. +*/ QList<QFxTransform *> *QFxItem::transform() { Q_D(QFxItem); @@ -1561,6 +1811,16 @@ QList<QFxTransform *> *QFxItem::transform() } /*! + \property QFxItem::focus + This property holds the item's focus state. +*/ + +/*! + \property QFxItem::focusable + This property holds whether the item has focus state. +*/ + +/*! Returns true if the item is visible; otherwise returns false. An item is considered visible if its opacity is not 0. @@ -1571,11 +1831,15 @@ bool QFxItem::isVisible() const return d->visible; } -/*! - Sets the visibility of the item to \a visible. +/*! + \property QFxItem::visible + + This property specifies whether the item is visible or invisible. Setting visibility to false sets opacity to 0. Setting the visibility to true restores the opacity to its previous value. + + \sa isVisible() */ void QFxItem::setVisible(bool visible) { diff --git a/src/declarative/fx/qfxitem.h b/src/declarative/fx/qfxitem.h index c47a1e1..bfd493f 100644 --- a/src/declarative/fx/qfxitem.h +++ b/src/declarative/fx/qfxitem.h @@ -120,7 +120,7 @@ class Q_DECLARATIVE_EXPORT QFxItem : public QSimpleCanvasItem, public QmlParserS Q_PROPERTY(bool flipVertically READ flipVertically WRITE setFlipVertically) Q_PROPERTY(bool flipHorizontally READ flipHorizontally WRITE setFlipHorizontally) Q_PROPERTY(int height READ height WRITE setHeight NOTIFY heightChanged) - Q_PROPERTY(int baselineOffset READ baselineOffset WRITE setBaselineOffset NOTIFY baselineOffsetChanged ) + Q_PROPERTY(int baselineOffset READ baselineOffset WRITE setBaselineOffset NOTIFY baselineOffsetChanged) Q_PROPERTY(QFxAnchorLine left READ left) Q_PROPERTY(QFxAnchorLine right READ right) Q_PROPERTY(QFxAnchorLine horizontalCenter READ horizontalCenter) |