diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-05-01 05:39:07 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-05-01 05:39:07 (GMT) |
commit | c1830b72bc64cca5d5110ce084b580022ac8d3a0 (patch) | |
tree | dc2acd520574da78a92ac30e2414cd7201f6b70d /src | |
parent | 2d167da27db0de589a6d72b5cfb97f1faa273bb7 (diff) | |
download | Qt-c1830b72bc64cca5d5110ce084b580022ac8d3a0.zip Qt-c1830b72bc64cca5d5110ce084b580022ac8d3a0.tar.gz Qt-c1830b72bc64cca5d5110ce084b580022ac8d3a0.tar.bz2 |
doc
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/fx/qfxanchors.cpp | 4 | ||||
-rw-r--r-- | src/declarative/fx/qfxanimatedimageitem.cpp | 4 | ||||
-rw-r--r-- | src/declarative/fx/qfxblurfilter.cpp | 35 | ||||
-rw-r--r-- | src/declarative/fx/qfxcomponentinstance.cpp | 6 | ||||
-rw-r--r-- | src/declarative/fx/qfxcontentwrapper.cpp | 41 | ||||
-rw-r--r-- | src/declarative/fx/qfxevents.cpp | 33 | ||||
-rw-r--r-- | src/declarative/fx/qfxflickable.cpp | 2 |
7 files changed, 68 insertions, 57 deletions
diff --git a/src/declarative/fx/qfxanchors.cpp b/src/declarative/fx/qfxanchors.cpp index f537da9..540e1cb 100644 --- a/src/declarative/fx/qfxanchors.cpp +++ b/src/declarative/fx/qfxanchors.cpp @@ -151,7 +151,7 @@ void QFxAnchors::fillChanged() /*! \property QFxAnchors::fill - \brief what item the item should fill. + \brief which item the item should fill. This is a convenience property. It is the same as anchoring the left, right, top, and bottom to another item's left, right, top, and bottom. @@ -200,7 +200,7 @@ void QFxAnchors::setFill(QFxItem *f) /*! \property QFxAnchors::centeredIn - \brief what item the item should stay centered in the middle of. + \brief which item the item should stay centered in. This is a convenience property. It is the same as anchoring the horizontalCenter and verticalCenter to another item's horizontalCenter and verticalCenter. diff --git a/src/declarative/fx/qfxanimatedimageitem.cpp b/src/declarative/fx/qfxanimatedimageitem.cpp index 5a495e9..7a1cb7f 100644 --- a/src/declarative/fx/qfxanimatedimageitem.cpp +++ b/src/declarative/fx/qfxanimatedimageitem.cpp @@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE \row \o \image animatedimageitem.gif \o - \code + \qml Item { width: anim.width; height: anim.height+8 AnimatedImage { id: anim; source: "pics/games-anim.gif" } @@ -74,7 +74,7 @@ Item { x: (anim.width-width)*anim.currentFrame/(anim.frameCount-1) } } - \endcode + \endqml \endtable */ QML_DEFINE_TYPE(QFxAnimatedImageItem, AnimatedImage); diff --git a/src/declarative/fx/qfxblurfilter.cpp b/src/declarative/fx/qfxblurfilter.cpp index ad3eebc..2bad18c 100644 --- a/src/declarative/fx/qfxblurfilter.cpp +++ b/src/declarative/fx/qfxblurfilter.cpp @@ -64,25 +64,28 @@ public: \brief The Blur filter blurs an item and its contents. \inherits Filter - Blurring reduces the clarity of a visual element. The following example + Blurring reduces the clarity of a visual item. The following example shows an icon at a blur radius of 0, 5 and 10. \table \row \o - \code - <HorizontalLayout> - <Image src="icon.png"> - <filter><Blur radius="0" /></filter> - </Image> - <Image src="icon.png"> - <filter><Blur radius="5" /></filter> - </Image> - <Image src="icon.png"> - <filter><Blur radius="10" /></filter> - </Image> - </HorizontalLayout> - \endcode + \qml +HorizontalLayout { + Image { + src: "icon.png" + filter: Blur { radius: 0 } + } + Image { + src: "icon.png" + filter: Blur { radius: 5 } + } + Image { + src: "icon.png" + filter: Blur { radius: 10 } + } +} + \endqml \row \o \image blur_example.png \endtable @@ -110,7 +113,9 @@ QFxBlurFilter::~QFxBlurFilter() /*! \qmlproperty real Blur::radius - Sets the blur kernel radius. The larger the radius the more blurry the item will appear. A radius of 0 (or less) is equivalent to no blur. + Sets the blur kernel radius. + The larger the radius the more blurry the item will appear. + A radius of 0 (or less) is equivalent to no blur. */ /*! diff --git a/src/declarative/fx/qfxcomponentinstance.cpp b/src/declarative/fx/qfxcomponentinstance.cpp index 5fb5466..9645e77 100644 --- a/src/declarative/fx/qfxcomponentinstance.cpp +++ b/src/declarative/fx/qfxcomponentinstance.cpp @@ -58,9 +58,9 @@ QML_DEFINE_TYPE(QFxComponentInstance,ComponentInstance); /*! \qmlclass ComponentInstance QFxComponentInstance - \brief The ComponentInstance element allows you to instantiate a \l{qml-component.html} {Component}. + \brief The ComponentInstance item allows you to instantiate a \l{qml-component.html} {Component}. - \code + \qml Item { Component { id: RedSquare @@ -69,7 +69,7 @@ QML_DEFINE_TYPE(QFxComponentInstance,ComponentInstance); ComponentInstance { component: RedSquare } } - \endcode + \endqml */ QFxComponentInstance::QFxComponentInstance(QFxItem *parent) : QFxItem(*(new QFxComponentInstancePrivate), parent) diff --git a/src/declarative/fx/qfxcontentwrapper.cpp b/src/declarative/fx/qfxcontentwrapper.cpp index a155d2b..2b95ff6 100644 --- a/src/declarative/fx/qfxcontentwrapper.cpp +++ b/src/declarative/fx/qfxcontentwrapper.cpp @@ -108,22 +108,31 @@ QML_DEFINE_TYPE(QFxContent,Content); specified by Content. Example: - \code - <!--GroupBox component definition--> - <Rect width="{parent.width}" color="white" pen.width="2" pen.color="#adaeb0" radius="10" clip="false" height="{contents.height}"> - <VerticalLayout id="layout" width="{parent.width}"> - <Content/> - </VerticalLayout> - </Rect> - - <!--component use--> - <GroupBox> - <content> - <Text text="First Item"/> - ... - </content> - </GroupBox> - \endcode + \qml +// GroupBox component definition +Rect { + width: parent.width + color: "white" + pen.width: 2 + pen.color: "#adaeb0" + radius: 10 + clip: false + height: contents.height + VerticalLayout { + id: layout + width: parent.width + Content { } // content property will go here + } +} + +// component use +GroupBox { + content: Text { + text: "First Item" + ... + } +} + \endqml */ QT_END_NAMESPACE diff --git a/src/declarative/fx/qfxevents.cpp b/src/declarative/fx/qfxevents.cpp index 7d04f5d..195d1e5 100644 --- a/src/declarative/fx/qfxevents.cpp +++ b/src/declarative/fx/qfxevents.cpp @@ -44,17 +44,18 @@ QT_BEGIN_NAMESPACE /*! \qmlclass KeyEvent QFxKeyEvent - \brief The KeyEvent element provides information about a key event. + \brief The KeyEvent object provides information about a key event. For example, the following changes the Item's state property when the Enter key is pressed: - \code - <Item focus="true"> - <onKeyPress>if (event.key == Qt.Key_Enter) state = 'ShowDetails';</onKeyPress> - </Item> - \endcode - - The \l KeyActions element could also be used to achieve the above with + \qml +Item { + focus: true + onKeyPress: { if (event.key == Qt.Key_Enter) state = 'ShowDetails'; } +} + \endqml + + The \l KeyActions object could also be used to achieve the above with a clearer syntax. \sa KeyActions @@ -106,7 +107,7 @@ QT_BEGIN_NAMESPACE /*! \qmlclass MouseEvent QFxMouseEvent - \brief The MouseEvent element provides information about a mouse event. + \brief The MouseEvent object provides information about a mouse event. The position of the mouse can be found via the x and y properties. The button that caused the event is available via the button property. @@ -168,15 +169,11 @@ QT_BEGIN_NAMESPACE \endlist For example, to react to a Shift key + Left mouse button click: - \code - <MouseRegion> - <onClick> - <![CDATA[ - if (mouse.button == Qt.LeftButton && mouse.modifiers & Qt.ShiftModifier) doSomething(); - ]]> - </onclick> - </MouseRegion> - \endcode + \qml +MouseRegion { + onClick: { if (mouse.button == Qt.LeftButton && mouse.modifiers & Qt.ShiftModifier) doSomething(); } +} + \endqml */ QML_DEFINE_NOCREATE_TYPE(QFxKeyEvent); diff --git a/src/declarative/fx/qfxflickable.cpp b/src/declarative/fx/qfxflickable.cpp index 17e44e1..52b142b 100644 --- a/src/declarative/fx/qfxflickable.cpp +++ b/src/declarative/fx/qfxflickable.cpp @@ -226,7 +226,7 @@ QML_DEFINE_TYPE(QFxFlickable,Flickable); /*! \qmlclass Flickable - \brief The Flickable element provides a surface that can be "flicked". + \brief The Flickable item provides a surface that can be "flicked". \inherits Item Flickable places its children on a surface that can be dragged and flicked. |