summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-05-01 06:11:54 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-05-01 06:11:54 (GMT)
commit6aeccc0f8b592d835d9ec32daecc0b5d104f132b (patch)
tree5d388c4c89a80d345176e15dd2019d8a2d6cc3e1 /src
parentea0284d0f4a3408d7c1219702214c263118ef52f (diff)
downloadQt-6aeccc0f8b592d835d9ec32daecc0b5d104f132b.zip
Qt-6aeccc0f8b592d835d9ec32daecc0b5d104f132b.tar.gz
Qt-6aeccc0f8b592d835d9ec32daecc0b5d104f132b.tar.bz2
doc
Diffstat (limited to 'src')
-rw-r--r--src/declarative/fx/qfxlayouts.cpp360
-rw-r--r--src/declarative/fx/qfxlistview.cpp4
-rw-r--r--src/declarative/fx/qfxmouseregion.cpp8
-rw-r--r--src/declarative/fx/qfxparticles.cpp166
-rw-r--r--src/declarative/fx/qfxpath.cpp36
-rw-r--r--src/declarative/fx/qfxrect.cpp58
6 files changed, 381 insertions, 251 deletions
diff --git a/src/declarative/fx/qfxlayouts.cpp b/src/declarative/fx/qfxlayouts.cpp
index 76afeb0..85b198e 100644
--- a/src/declarative/fx/qfxlayouts.cpp
+++ b/src/declarative/fx/qfxlayouts.cpp
@@ -127,15 +127,18 @@ void QFxBaseLayout::setMargin(int s)
\property QFxBaseLayout::move
\brief the transition when moving an item.
- \code
- <BaseLayout id="layout" y="0">
- <move>
- <Transition>
- <NumericAnimation properties="y" ease="easeOutBounce" />
- </Transition>
- </move>
- </BaseLayout>
- \endcode
+ \qml
+BaseLayout {
+ id: layout
+ y: 0
+ move: Transition {
+ NumericAnimation {
+ properties: "y"
+ ease: "easeOutBounce"
+ }
+ }
+}
+ \endqml
*/
QmlTransition *QFxBaseLayout::move() const
{
@@ -153,15 +156,21 @@ void QFxBaseLayout::setMove(QmlTransition *mt)
\property QFxBaseLayout::add
\brief the transition when adding an item.
- \code
- <BaseLayout id="layout" y="0">
- <add>
- <Transition >
- <NumericAnimation target="{layout.item}" properties="opacity" from="0" to="1" duration="500" />
- </Transition>
- </add>
- </BaseLayout>
- \endcode
+ \qml
+BaseLayout {
+ id: layout
+ y: 0
+ add: Transition {
+ NumericAnimation {
+ target: layout.item
+ properties: "opacity"
+ from: 0
+ to: 1
+ duration: 500
+ }
+ }
+}
+ \endqml
*/
QmlTransition *QFxBaseLayout::add() const
{
@@ -182,15 +191,21 @@ void QFxBaseLayout::setAdd(QmlTransition *add)
Note that the item may be 'removed' because its opacity is zero. This can make certain
transitions difficult to see.
- \code
- <BaseLayout id="layout" y="0">
- <remove>
- <Transition >
- <NumericAnimation target="{layout.item}" properties="opacity" from="1" to="0" duration="500" />
- </Transition>
- </remove>
- </BaseLayout>
- \endcode
+ \qml
+BaseLayout {
+ id: layout
+ y: 0
+ remove: Transition {
+ NumericAnimation {
+ target: layout.item
+ properties: "opacity"
+ from: 1
+ to: 0
+ duration: 500
+ }
+ }
+}
+ \endqml
*/
QmlTransition *QFxBaseLayout::remove() const
{
@@ -433,10 +448,10 @@ void QFxBaseLayout::applyRemove(const QList<QPair<QString, QVariant> >& changes,
QML_DEFINE_TYPE(QFxVerticalLayout, VerticalLayout);
/*!
\qmlclass VerticalLayout
- \brief The VerticalLayout element arranges its children in a vertical layout.
+ \brief The VerticalLayout item arranges its children in a vertical layout.
\inherits Item
- The VerticalLayout element arranges its child elements so that they are vertically
+ The VerticalLayout item arranges its child items so that they are vertically
aligned and not overlapping. Spacing between items can be added, as can a margin around all the items.
The below example lays out differently shaped rectangles using a VerticalLayout.
@@ -444,32 +459,34 @@ QML_DEFINE_TYPE(QFxVerticalLayout, VerticalLayout);
\row
\o \image verticalLayout_example.png
\o
- \code
- <VerticalLayout spacing="2">
- <Rect color="red" width="50" height="50"/>
- <Rect color="green" width="20" height="50"/>
- <Rect color="blue" width="50" height="20"/>
- </VerticalLayout>
- \endcode
+ \qml
+VerticalLayout {
+ spacing: 2
+ Rect { color: "red"; width: 50; height: 50 }
+ Rect { color: "green"; width: 20; height: 50 }
+ Rect { color: "blue"; width: 50; height: 20 }
+}
+ \endqml
\endtable
VerticalLayout also provides for transitions to be set when items are added, moved,
- or removed in the layout. Adding and removing apply both to elements which are deleted
+ or removed in the layout. Adding and removing apply both to items which are deleted
or have their position in the document changed so as to no longer be children of the layout,
- as well as to elements which have their opacity set to or from zero so as to appear or disappear.
+ as well as to items which have their opacity set to or from zero so as to appear or disappear.
\table
\row
\o \image verticalLayout_transition.gif
\o
- \code
- <VerticalLayout spacing="2">
- ...
- <remove>...</remove>
- <add>...</add>
- <move>...</move>
- </VerticalLayout>
- \endcode
+ \qml
+VerticalLayout {
+ spacing: 2
+ remove: ...
+ add: ...
+ move: ...
+ ...
+}
+ \endqml
\endtable
@@ -486,17 +503,20 @@ QML_DEFINE_TYPE(QFxVerticalLayout, VerticalLayout);
\row
\o \image layout-remove.gif
\o
- \code
- <VerticalLayout id="layout">
- <remove>
- <Transition >
- <NumericAnimation target="{layout.item}"
- properties="opacity" from="1" to="0"
- duration="500" />
- </Transition>
- </remove>
- </VerticalLayout>
- \endcode
+ \qml
+VerticalLayout {
+ id: layout
+ remove: Transition {
+ NumericAnimation {
+ target: layout.item
+ properties: "opacity"
+ from: 1
+ to: 0
+ duration: 500
+ }
+ }
+}
+ \endqml
\endtable
*/
@@ -510,17 +530,20 @@ QML_DEFINE_TYPE(QFxVerticalLayout, VerticalLayout);
\row
\o \image layout-add.gif
\o
- \code
- <VerticalLayout id="layout">
- <add>
- <Transition >
- <NumericAnimation target="{layout.item}"
- properties="opacity" from="0" to="1"
- duration="500" />
- </Transition>
- </add>
- </VerticalLayout>
- \endcode
+ \qml
+VerticalLayout {
+ id: layout
+ add: Transition {
+ NumericAnimation {
+ target: layout.item
+ properties: "opacity"
+ from: 0
+ to: 1
+ duration: 500
+ }
+ }
+}
+ \endqml
\endtable
*/
@@ -534,15 +557,17 @@ QML_DEFINE_TYPE(QFxVerticalLayout, VerticalLayout);
\row
\o \image layout-move.gif
\o
- \code
- <VerticalLayout id="layout">
- <move>
- <Transition>
- <NumericAnimation properties="y" ease="easeOutBounce" />
- </Transition>
- </move>
- </VerticalLayout>
- \endcode
+ \qml
+VerticalLayout {
+ id: layout
+ move: Transition {
+ NumericAnimation {
+ properties: "y"
+ ease: "easeOutBounce"
+ }
+ }
+}
+ \endqml
\endtable
*/
/*!
@@ -624,19 +649,20 @@ void QFxVerticalLayout::doLayout()
QML_DEFINE_TYPE(QFxHorizontalLayout,HorizontalLayout);
/*!
\qmlclass HorizontalLayout
- \brief The HorizontalLayout element arranges its children in a horizontal layout.
+ \brief The HorizontalLayout item arranges its children in a horizontal layout.
\inherits Item
- The HorizontalLayout element arranges its child elements so that they are horizontally aligned and not overlapping. Spacing can be added between the items, and a margin around all items can also be added. It also provides for transitions to be set when items are added, moved, or removed in the layout. Adding and removing apply both to elements which are deleted or have their position in the document changed so as to no longer be children of the layout, as well as to elements which have their opacity set to or from zero so as to appear or disappear.
+ The HorizontalLayout item arranges its child items so that they are horizontally aligned and not overlapping. Spacing can be added between the items, and a margin around all items can also be added. It also provides for transitions to be set when items are added, moved, or removed in the layout. Adding and removing apply both to items which are deleted or have their position in the document changed so as to no longer be children of the layout, as well as to items which have their opacity set to or from zero so as to appear or disappear.
The below example lays out differently shaped rectangles using a HorizontalLayout.
- \code
- <HorizontalLayout spacing="2">
- <Rect color="red" width="50" height="50"/>
- <Rect color="green" width="20" height="50"/>
- <Rect color="blue" width="50" height="20"/>
- </HorizontalLayout>
- \endcode
+ \qml
+HorizontalLayout {
+ spacing: 2
+ Rect { color: "red"; width: 50; height: 50 }
+ Rect { color: "green"; width: 20; height: 50 }
+ Rect { color: "blue"; width: 50; height: 20 }
+}
+ \endqml
\image horizontalLayout_example.png
*/
@@ -648,15 +674,20 @@ QML_DEFINE_TYPE(QFxHorizontalLayout,HorizontalLayout);
Note that if the item counts as removed because its opacity is zero it will not be visible during the transition unless you set the opacity in the transition, like in the below example.
- \code
- <HorizontalLayout id="layout">
- <remove>
- <Transition >
- <NumericAnimation target="{layout.item}" properties="opacity" from="1" to="0" duration="500" />
- </Transition>
- </remove>
- </HorizontalLayout>
- \endcode
+ \qml
+HorizontalLayout {
+ id: layout
+ remove: Transition {
+ NumericAnimation {
+ target: layout.item
+ properties: "opacity"
+ from: 1
+ to: 0
+ duration: 500
+ }
+ }
+}
+ \endqml
*/
/*!
@@ -665,15 +696,20 @@ QML_DEFINE_TYPE(QFxHorizontalLayout,HorizontalLayout);
Added can mean that either the object has been created or reparented, and thus is now a child or the layout, or that the object has had its opacity increased from zero, and thus is now visible.
- \code
- <HorizontalLayout id="layout">
- <add>
- <Transition >
- <NumericAnimation target="{layout.item}" properties="opacity" from="0" to="1" duration="500" />
- </Transition>
- </add>
- </HorizontalLayout>
- \endcode
+ \qml
+HorizontalLayout {
+ id: layout
+ add: Transition {
+ NumericAnimation {
+ target: layout.item
+ properties: "opacity"
+ from: 0
+ to: 1
+ duration: 500
+ }
+ }
+}
+ \endqml
*/
/*!
@@ -682,15 +718,17 @@ QML_DEFINE_TYPE(QFxHorizontalLayout,HorizontalLayout);
This can happen when other items are added or removed from the layout, or when items resize themselves.
- \code
- <HorizontalLayout id="layout">
- <move>
- <Transition>
- <NumericAnimation properties="x" ease="easeOutBounce" />
- </Transition>
- </move>
- </HorizontalLayout>
- \endcode
+ \qml
+HorizontalLayout {
+ id: layout
+ move: Transition {
+ NumericAnimation {
+ properties: "x"
+ ease: "easeOutBounce"
+ }
+ }
+}
+ \endqml
*/
/*!
@@ -776,21 +814,21 @@ QML_DEFINE_TYPE(QFxGridLayout,GridLayout);
/*!
\qmlclass GridLayout QFxGridLayout
- \brief The GridLayout element arranges its children in a grid layout.
+ \brief The GridLayout item arranges its children in a grid layout.
\inherits Item
- The GridLayout element arranges its child elements so that they are
+ The GridLayout item arranges its child items so that they are
aligned in a grid and are not overlapping. Spacing can be added
between the items, and a margin around all the items can also be
defined. It also provides for transitions to be set when items are
added, moved, or removed in the layout. Adding and removing apply
- both to elements which are deleted or have their position in the
+ both to items which are deleted or have their position in the
document changed so as to no longer be children of the layout, as
- well as to elements which have their opacity set to or from zero so
+ well as to items which have their opacity set to or from zero so
as to appear or disappear.
The GridLayout defaults to using four columns, and as many rows as
- are necessary to fit all the child elements. The number of rows
+ are necessary to fit all the child items. The number of rows
and/or the number of columns can be constrained by setting the rows
or columns properties. The grid layout calculates a grid with
rectangular cells of sufficient size to hold all items, and then
@@ -802,15 +840,17 @@ QML_DEFINE_TYPE(QFxGridLayout,GridLayout);
\row
\o \image gridLayout_example.png
\o
- \code
- <GridLayout columns="3" spacing="2">
- <Rect color="red" width="50" height="50"/>
- <Rect color="green" width="20" height="50"/>
- <Rect color="blue" width="50" height="20"/>
- <Rect color="cyan" width="50" height="50"/>
- <Rect color="magenta" width="10" height="10"/>
- </GridLayout>
- \endcode
+ \qml
+GridLayout {
+ columns: 3
+ spacing: 2
+ Rect { color: "red"; width: 50; height: 50 }
+ Rect { color: "green"; width: 20; height: 50 }
+ Rect { color: "blue"; width: 50; height: 20 }
+ Rect { color: "cyan"; width: 50; height: 50 }
+ Rect { color: "magenta"; width: 10; height: 10 }
+}
+ \endqml
\endtable
*/
/*!
@@ -826,15 +866,20 @@ QML_DEFINE_TYPE(QFxGridLayout,GridLayout);
zero it will not be visible during the transition unless you set
the opacity in the transition, like in the below example.
- \code
- <GridLayout id="layout">
- <remove>
- <Transition >
- <NumericAnimation target="{layout.item}" properties="opacity" from="1" to="0" duration="500" />
- </Transition>
- </remove>
- </GridLayout>
- \endcode
+ \qml
+GridLayout {
+ id: layout
+ remove: Transition {
+ NumericAnimation {
+ target: layout.item
+ properties: "opacity"
+ from: 1
+ to: 0
+ duration: 500
+ }
+ }
+}
+ \endqml
*/
/*!
@@ -846,15 +891,20 @@ QML_DEFINE_TYPE(QFxGridLayout,GridLayout);
object has had its opacity increased from zero, and thus is now
visible.
- \code
- <GridLayout id="layout">
- <add>
- <Transition >
- <NumericAnimation target="{layout.item}" properties="opacity" from="0" to="1" duration="500" />
- </Transition>
- </add>
- </GridLayout>
- \endcode
+ \qml
+GridLayout {
+ id: layout
+ add: Transition {
+ NumericAnimation {
+ target: layout.item
+ properties: "opacity"
+ from: 0
+ to: 1
+ duration: 500
+ }
+ }
+}
+ \endqml
*/
/*!
@@ -864,15 +914,17 @@ QML_DEFINE_TYPE(QFxGridLayout,GridLayout);
This can happen when other items are added or removed from the layout, or
when items resize themselves.
- \code
- <GridLayout id="layout">
- <move>
- <Transition>
- <NumericAnimation properties="x,y" ease="easeOutBounce" />
- </Transition>
- </move>
- </GridLayout>
- \endcode
+ \qml
+GridLayout {
+ id: layout
+ move: Transition {
+ NumericAnimation {
+ properties: "x,y"
+ ease: "easeOutBounce"
+ }
+ }
+}
+ \endqml
*/
/*!
diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp
index 98fa606..9d076d0 100644
--- a/src/declarative/fx/qfxlistview.cpp
+++ b/src/declarative/fx/qfxlistview.cpp
@@ -795,7 +795,7 @@ void QFxListViewPrivate::fixupX()
/*!
\qmlclass ListView
\inherits Flickable
- \brief The ListView element provides a list view of items provided by a model.
+ \brief The ListView item provides a list 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.
The items are laid out vertically or horizontally and may be flicked to scroll.
@@ -840,7 +840,7 @@ QFxListView::~QFxListView()
The C++ model object must be a \l QAbstractItemModel subclass, a \l VisualModel,
or a simple list.
- Models can also be created directly in QML, using the \l ListModel element.
+ Models can also be created directly in QML, using a \l ListModel.
*/
QVariant QFxListView::model() const
{
diff --git a/src/declarative/fx/qfxmouseregion.cpp b/src/declarative/fx/qfxmouseregion.cpp
index 3b318e3..a60ddc4 100644
--- a/src/declarative/fx/qfxmouseregion.cpp
+++ b/src/declarative/fx/qfxmouseregion.cpp
@@ -145,12 +145,12 @@ void QFxDrag::setYmax(int m)
/*!
\qmlclass MouseRegion
- \brief The MouseRegion element enables simple mouse handling.
+ \brief The MouseRegion item enables simple mouse handling.
\inherits Item
- A MouseRegion is typically used in conjunction with a visible element,
+ A MouseRegion is typically used in conjunction with a visible item,
where the MouseRegion effectively 'proxies' mouse handling for that
- element. For example, we can put a MouseRegion in a Rect that changes
+ item. For example, we can put a MouseRegion in a Rect that changes
the Rect color to red when clicked:
\snippet doc/src/snippets/declarative/mouseregion.qml 0
@@ -164,7 +164,7 @@ void QFxDrag::setYmax(int m)
For basic key handling, see \l KeyActions.
- MouseRegion is an invisible element: it is never painted.
+ MouseRegion is an invisible item: it is never painted.
\sa MouseEvent
*/
diff --git a/src/declarative/fx/qfxparticles.cpp b/src/declarative/fx/qfxparticles.cpp
index 16b3570..45de1a3 100644
--- a/src/declarative/fx/qfxparticles.cpp
+++ b/src/declarative/fx/qfxparticles.cpp
@@ -151,7 +151,7 @@ void QFxParticleMotion::destroy(QFxParticle &particle)
/*!
\qmlclass ParticleMotionLinear
- \brief The ParticleMotionLinear element moves particles linearly.
+ \brief The ParticleMotionLinear object moves particles linearly.
\sa Particles
*/
@@ -175,7 +175,7 @@ void QFxParticleMotionLinear::advance(QFxParticle &p, int interval)
/*!
\qmlclass ParticleMotionGravity
- \brief The ParticleMotionGravity element moves particles towards a point.
+ \brief The ParticleMotionGravity object moves particles towards a point.
\sa Particles
*/
@@ -234,23 +234,37 @@ void QFxParticleMotionGravity::advance(QFxParticle &p, int interval)
/*!
\qmlclass ParticleMotionWander
- \brief The ParticleMotionWander element moves particles in a somewhat random fashion.
+ \brief The ParticleMotionWander object moves particles in a somewhat random fashion.
The particles will continue roughly in the original direction, however will randomly
drift to each side.
The code below produces an effect similar to falling snow.
- \code
- <Rect width="240" height="320" color="black">
- <Particles y="0" width="{parent.width}" height="30"
- src="star.png" lifeSpan="5000" count="50"
- angle="70" angleDeviation="36"
- velocity="30" velocityDeviation="10">
- <ParticleMotionWander xvariance="30" pace="100"/>
- </Particles>
- </Rect>
- \endcode
+ \qml
+Rect {
+ width: 240
+ height: 320
+ color: "black"
+
+ Particles {
+ y: 0
+ width: parent.width
+ height: 30
+ src: "star.png"
+ lifeSpan: 5000
+ count: 50
+ angle: 70
+ angleDeviation: 36
+ velocity: 30
+ velocityDeviation: 10
+ ParticleMotionWander {
+ xvariance: 30
+ pace: 100
+ }
+ }
+}
+ \endqml
\sa Particles
*/
@@ -508,35 +522,59 @@ QML_DEFINE_TYPE(QFxParticles,Particles);
/*!
\qmlclass Particles
- \brief The Particles element generates and moves particles.
+ \brief The Particles object generates and moves particles.
\inherits Item
- The particles created by this element cannot be dealt with directly, they can only be controlled through the parameters of the Particles element. The particles are all the same pixmap, specified by the user.
+ The particles created by this object cannot be dealt with directly, they can only be controlled through the parameters of the Particles object. The particles are all the same pixmap, specified by the user.
- The particles are painted relative to the parent of the Particles element. Moving the
- Particles element will not move the particles already emitted.
+ The particles are painted relative to the parent of the Particles object. Moving the
+ Particles object will not move the particles already emitted.
The below example creates two differently behaving particle sources.
The top one has particles falling from the top like snow,
the lower one has particles expelled up like a fountain.
- \code
- <Rect width="240" height="320" color="black">
- <Particles y="0" width="{parent.width}" height="30"
- src="star.png" lifeSpan="5000" count="50"
- angle="70" angleDeviation="36"
- velocity="30" velocityDeviation="10">
- <ParticleMotionWander xvariance="30" pace="100"/>
- </Particles>
- <Particles y="300" x="120" width="1" height="1"
- src="star.png" lifeSpan="5000" count="200"
- angle="270" angleDeviation="45"
- velocity="50" velocityDeviation="30">
- <ParticleMotionGravity yattractor="1000"
- xattractor="0" acceleration="25"/>
- </Particles>
- </Rect>
- \endcode
+ \qml
+Rect {
+ width: 240
+ height: 320
+ color: "black"
+ Particles {
+ y: 0
+ width: parent.width
+ height: 30
+ src: "star.png"
+ lifeSpan: 5000
+ count: 50
+ angle: 70
+ angleDeviation: 36
+ velocity: 30
+ velocityDeviation: 10
+ ParticleMotionWander {
+ xvariance: 30
+ pace: 100
+ }
+ }
+ Particles {
+ y: 300
+ x: 120
+ width: 1
+ height: 1
+ src: "star.png"
+ lifeSpan: 5000
+ count: 200
+ angle: 270
+ angleDeviation: 45
+ velocity: 50
+ velocityDeviation: 30
+ ParticleMotionGravity {
+ yattractor: 1000
+ xattractor: 0
+ acceleration: 25
+ }
+ }
+}
+ \endqml
\image particles.gif
*/
@@ -658,9 +696,13 @@ void QFxParticles::setCount(int cnt)
example, the following creates particles whose lifeSpan will vary
from 150ms to 250ms:
- \code
- <Particles src="star.png" lifeSpan="200" lifeSpanDeviation="100"/>
- \endcode
+ \qml
+Particles {
+ src: "star.png"
+ lifeSpan: 200
+ lifeSpanDeviation: 100
+}
+ \endqml
*/
/*!
@@ -691,9 +733,13 @@ void QFxParticles::setLifeSpan(int ls)
example, the following creates particles whose lifeSpan will vary
from 150ms to 250ms:
-\code
-<Particles src="star.png" lifeSpan="200" lifeSpanDeviation="100"/>
-\endcode
+\qml
+Particles {
+ src: "star.png"
+ lifeSpan: 200
+ lifeSpanDeviation: 100
+}
+\endqml
\sa QFxParticles::lifeSpan
*/
@@ -765,9 +811,13 @@ void QFxParticles::setFadeOutDuration(int dur)
example, the following creates particles whose initial direction will
vary from 15 degrees to 105 degrees:
- \code
- <Particles src="star.png" angle="60" angleDeviation="90"/>
- \endcode
+ \qml
+Particles {
+ src: "star.png"
+ angle: 60
+ angleDeviation: 90
+}
+ \endqml
*/
/*!
@@ -796,9 +846,13 @@ void QFxParticles::setAngle(qreal angle)
example, the following creates particles whose initial direction will
vary from 15 degrees to 105 degrees:
-\code
-<Particles src="star.png" angle="60" angleDeviation="90"/>
-\endcode
+\qml
+Particles {
+ src: "star.png"
+ angle: 60
+ angleDeviation: 90
+}
+\endqml
\sa QFxParticles::angle
*/
@@ -824,9 +878,13 @@ void QFxParticles::setAngleDeviation(qreal dev)
example, the following creates particles whose initial velocity will
vary from 40 to 60.
- \code
- <Particles src="star.png" velocity="50" velocityDeviation="20"/>
- \endcode
+ \qml
+Particles {
+ src: "star.png"
+ velocity: 50
+ velocityDeviation: 20
+}
+ \endqml
*/
/*!
@@ -855,9 +913,13 @@ void QFxParticles::setVelocity(qreal velocity)
example, the following creates particles whose initial velocity will
vary from 40 to 60.
-\code
-<Particles src="star.png" velocity="50" velocityDeviation="20"/>
-\endcode
+\qml
+Particles {
+ src: "star.png"
+ velocity: 50
+ velocityDeviation: 20
+}
+\endqml
\sa QFxParticles::velocity
*/
diff --git a/src/declarative/fx/qfxpath.cpp b/src/declarative/fx/qfxpath.cpp
index 26aa10e..e11658c 100644
--- a/src/declarative/fx/qfxpath.cpp
+++ b/src/declarative/fx/qfxpath.cpp
@@ -57,9 +57,9 @@ QML_DEFINE_TYPE(QFxPathCubic,PathCubic);
/*!
\qmlclass PathElement
- \brief PathElement is the base path element.
+ \brief PathElement is the base path type.
- This element is the base for all path elements. It cannot
+ This type is the base for all path types. It cannot
be instantiated.
\sa Path, PathAttribute, PathPercent, PathLine, PathQuad, PathCubic
@@ -73,13 +73,13 @@ QML_DEFINE_TYPE(QFxPathCubic,PathCubic);
/*!
\qmlclass Path QFxPath
- \brief The Path element defines a path for use by \l PathView.
+ \brief A Path object defines a path for use by \l PathView.
A Path is composed of one or more path segments - PathLine, PathQuad,
PathCubic.
- The spacing of the items along the Path can be adjusted via the
- PathPercent element.
+ The spacing of the items along the Path can be adjusted via a
+ PathPercent object.
PathAttribute allows named attributes with values to be defined
along the path.
@@ -151,11 +151,11 @@ void QFxPath::setStartY(qreal y)
/*!
\qmlproperty list<PathElement> Path::pathElements
- This property holds the elements composing the path.
+ This property holds the objects composing the path.
\default
- A path can contain the following path elements:
+ A path can contain the following path objects:
\list
\i \l PathLine - a straight line to a given position.
\i \l PathQuad - a quadratic Bezier curve to a given position with a control point.
@@ -478,7 +478,7 @@ void QFxCurve::setY(qreal y)
\qmlclass PathAttribute
\brief The PathAttribute allows setting an attribute at a given position in a Path.
- The PathAttribute element allows attibutes consisting of a name and a
+ The PathAttribute object allows attibutes consisting of a name and a
value to be specified for the endpoints of path segments. The attributes
are exposed to the delegate as \l {Attached Properties}. The value of
an attribute at any particular point is interpolated from the PathAttributes
@@ -557,12 +557,12 @@ void QFxPathAttribute::setValue(qreal value)
The example below creates a path consisting of a straight line from
0,100 to 200,100:
- \code
+ \qml
Path {
startX: 0; startY: 100
PathLine { x: 200; y: 100 }
}
- \endcode
+ \endqml
\sa Path, PathQuad, PathCubic
*/
@@ -599,12 +599,12 @@ void QFxPathLine::addToPath(QPainterPath &path)
\row
\o \image declarative-pathquad.png
\o
- \code
+ \qml
Path {
startX: 0; startY: 0
PathQuad x: 200; y: 0; controlX: 100; controlY: 150 }
}
- \endcode
+ \endqml
\endtable
\sa Path, PathCubic, PathLine
@@ -683,7 +683,7 @@ void QFxPathQuad::addToPath(QPainterPath &path)
\row
\o \image declarative-pathcubic.png
\o
- \code
+ \qml
Path {
startX: 20; startY: 0
PathCubic {
@@ -691,7 +691,7 @@ void QFxPathQuad::addToPath(QPainterPath &path)
control2X: 210; control2Y: 90
}
}
- \endcode
+ \endqml
\endtable
\sa Path, PathQuad, PathLine
@@ -813,18 +813,18 @@ void QFxPathCubic::addToPath(QPainterPath &path)
\row
\o \image declarative-nopercent.png
\o
- \code
+ \qml
Path {
startX: 20; startY: 0
PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 }
PathLine { x: 150; y: 80 }
PathQuad { x: 180; y: 0; controlX: 200; controlY: 80 }
}
- \endcode
+ \endqml
\row
\o \image declarative-percent.png
\o
- \code
+ \qml
Path {
startX: 20; startY: 0
PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 }
@@ -834,7 +834,7 @@ void QFxPathCubic::addToPath(QPainterPath &path)
PathQuad { x: 180; y: 0; controlX: 200; controlY: 80 }
PathPercent { value: 1 }
}
- \endcode
+ \endqml
\endtable
\sa Path
diff --git a/src/declarative/fx/qfxrect.cpp b/src/declarative/fx/qfxrect.cpp
index 8aaddba..371aa0c 100644
--- a/src/declarative/fx/qfxrect.cpp
+++ b/src/declarative/fx/qfxrect.cpp
@@ -53,9 +53,9 @@ QML_DEFINE_TYPE(QFxPen,Pen);
\brief The QFxPen class provides a pen used for drawing rect borders on a QFxView.
Example:
- \code
+ \qml
Rect { pen.width: 2; pen.color: "red" ... }
- \endcode
+ \endqml
*/
/*! \property QFxPen::width
@@ -72,13 +72,13 @@ QML_DEFINE_TYPE(QFxPen,Pen);
color is most commonly specified in hexidecimal notation (#RRGGBB)
or as an \l {http://www.w3.org/TR/SVG/types.html#ColorKeywords}{SVG color keyword name}
(as defined by the World Wide Web Consortium). For example:
- \code
+ \qml
// rect with green border using hexidecimal notation
Rect { pen.color: "#00FF00" }
// rect with steelblue border using SVG color name
Rect { pen.color: "steelblue" }
- \endcode
+ \endqml
For the full set of ways to specify color, see Qt's QColor::setNamedColor documentation.
*/
@@ -96,14 +96,22 @@ QML_DEFINE_TYPE(QFxRect,Rect);
/*!
\qmlclass Rect QFxRect
- \brief The Rect element allows you to add rectangles to a scene.
+ \brief The Rect item allows you to add rectangles to a scene.
\inherits Item
- A Rect is painted having a solid fill (color) and an optional border (pen). You can also create rounded rectangles using the radius property.
-
- \code
- Rect { width: 100; height: 100; color: "red"; pen.color: "black"; pen.width: 5; radius: 10 }
- \endcode
+ A Rect is painted having a solid fill (color) and an optional border (pen).
+ You can also create rounded rectangles using the radius property.
+
+ \qml
+ Rect {
+ width: 100
+ height: 100
+ color: "red"
+ pen.color: "black"
+ pen.width: 5
+ radius: 10
+ }
+ \endqml
\image declarative-rect.png
*/
@@ -113,11 +121,19 @@ QML_DEFINE_TYPE(QFxRect,Rect);
\class QFxRect
\brief The QFxRect class provides a rect item that you can add to a QFxView.
- A Rect is painted having a solid fill (color) and an optional border (pen). You can also create rounded rectangles using the radius property.
-
- \code
- Rect { width: 100; height: 100; color: "red"; pen.color: "black"; pen.width: 5; radius: 10 }
- \endcode
+ A Rect is painted having a solid fill (color) and an optional border (pen).
+ You can also create rounded rectangles using the radius property.
+
+ \qml
+ Rect {
+ width: 100
+ height: 100
+ color: "red"
+ pen.color: "black"
+ pen.width: 5
+ radius: 10
+ }
+ \endqml
\image declarative-rect.png
@@ -216,13 +232,13 @@ void QFxRect::dump(int depth)
\qmlproperty color Rect::color
This property holds the color used to fill the rect.
- \code
+ \qml
// green rect using hexidecimal notation
Rect { color: "#00FF00" }
// steelblue rect using SVG color name
Rect { color: "steelblue" }
- \endcode
+ \endqml
*/
/*!
@@ -259,10 +275,10 @@ void QFxRect::setColor(const QColor &c)
This color will be drawn over the rect's color when the rect is painted. The tint color should usually be mostly transparent, or you will not be able to see the underlying color. The below example provides a slight red tint by having the tint color be pure red which is only 1/16th opaque.
- \code
+ \qml
Rect { x: 0; width: 80; height: 80; color: "lightsteelblue" }
Rect { x: 100; width: 80; height: 80; color: "lightsteelblue"; tintColor: "#10FF0000" }
- \endcode
+ \endqml
\image declarative-rect_tint.png
This attribute is not intended to be used with a single color over the lifetime of an user interface. It is most useful when a subtle change is intended to be conveyed due to some event; you can then use the tint color to more effectively tune the visible color.
@@ -320,13 +336,13 @@ QColor QFxRectPrivate::getColor()
This property allows for the easy construction of simple horizontal gradients. Other gradients may by formed by adding rotation to the rect. The gradient will blend linearly from the rect's main color to the color specified for gradient color.
- \code
+ \qml
Rect { y: 0; width: 80; height: 80; color: "lightsteelblue" }
Rect { y: 100; width: 80; height: 80; color: "lightsteelblue"; gradientColor="blue" }
Rect { rotation: 90; x: 80; y: 200; width: 80; height: 80; color="lightsteelblue"
gradientColor: "blue" }
// The x offset is needed because the rotation is from the top left corner
- \endcode
+ \endqml
\image declarative-rect_gradient.png
*/