aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2012-05-28 11:56:24 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-31 10:40:41 +0200
commit4c671c046e8140bfb8372aab2c38aabe82b102b0 (patch)
tree7a70a75a553dcc806372a6b43ea39da05191db8a /src/quick/items
parent0c7669b241aae96fca97acae0b628e627d5bfc4e (diff)
Fix doc snippets paths and parsing errors
qtqml.qdocconf and qtquick.qdocconf now refer to the correct snippets and source directories. Snippet paths in .qdoc and .cpp files have been updated to refer to the new shortened path references, e.g. \snippet qml/file.cpp instead of \snippet doc/src/snippets/qml/file.cpp. This also deletes snippets from src/qml/doc/snippets that belonged under src/quick/doc/snippets (and were already duplicated there anyway) and restores some snippet files that shouldn't have been deleted. Also fixes some inline snippets to use \code .. \endcode instead of \qml .. \endqml as they contained javascript or partial QML snippets that were causing parsing errors from qdoc. There are still snippet errors arising from qmlintro.qdoc as the qmlintro snippets directory that it refers to cannot be located. There are also two references to a removed snippet identifier in examples/qml/cppextensions/plugins/plugin.cpp that need to be fixed in conjunction with the related docs in a later commit as the relevant code has changed and the docs are now invalid. Task-number: QTBUG-25721 Change-Id: I50c665245a74c140470c58a32546591d187dfe4b Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Diffstat (limited to 'src/quick/items')
-rw-r--r--src/quick/items/qquickaccessibleattached.cpp7
-rw-r--r--src/quick/items/qquickanimatedimage.cpp2
-rw-r--r--src/quick/items/qquickborderimage.cpp6
-rw-r--r--src/quick/items/qquickdrag.cpp2
-rw-r--r--src/quick/items/qquickflickable.cpp8
-rw-r--r--src/quick/items/qquickflipable.cpp2
-rw-r--r--src/quick/items/qquickgridview.cpp16
-rw-r--r--src/quick/items/qquickimage.cpp2
-rw-r--r--src/quick/items/qquickitem.cpp10
-rw-r--r--src/quick/items/qquickitemanimation.cpp4
-rw-r--r--src/quick/items/qquickitemviewtransition.cpp16
-rw-r--r--src/quick/items/qquicklistview.cpp18
-rw-r--r--src/quick/items/qquickloader.cpp14
-rw-r--r--src/quick/items/qquickmousearea.cpp12
-rw-r--r--src/quick/items/qquickmultipointtoucharea.cpp2
-rw-r--r--src/quick/items/qquickpathview.cpp10
-rw-r--r--src/quick/items/qquickpositioners.cpp10
-rw-r--r--src/quick/items/qquickrectangle.cpp10
-rw-r--r--src/quick/items/qquickrepeater.cpp10
-rw-r--r--src/quick/items/qquickstateoperations.cpp4
-rw-r--r--src/quick/items/qquicktext.cpp2
-rw-r--r--src/quick/items/qquicktextedit.cpp4
-rw-r--r--src/quick/items/qquickvisualdatamodel.cpp8
23 files changed, 92 insertions, 87 deletions
diff --git a/src/quick/items/qquickaccessibleattached.cpp b/src/quick/items/qquickaccessibleattached.cpp
index 0ab96c184b..c07a60bd9a 100644
--- a/src/quick/items/qquickaccessibleattached.cpp
+++ b/src/quick/items/qquickaccessibleattached.cpp
@@ -98,13 +98,18 @@ QT_BEGIN_NAMESPACE
\qml
Item {
id: myButton
+
Text {
id: label
// ...
}
+
Accessible.name: label.text
Accessible.role: Accessible.Button
- funtion accessiblePressAction { ... }
+
+ function accessiblePressAction() {
+ //...
+ }
}
\endqml
diff --git a/src/quick/items/qquickanimatedimage.cpp b/src/quick/items/qquickanimatedimage.cpp
index 4fd7b99190..f93dc4aa28 100644
--- a/src/quick/items/qquickanimatedimage.cpp
+++ b/src/quick/items/qquickanimatedimage.cpp
@@ -83,7 +83,7 @@ QT_BEGIN_NAMESPACE
\b Note: Unlike images, animated images are not cached or shared internally.
\clearfloat
- \snippet doc/snippets/qml/animatedimage.qml document
+ \snippet qml/animatedimage.qml document
\sa BorderImage, Image
*/
diff --git a/src/quick/items/qquickborderimage.cpp b/src/quick/items/qquickborderimage.cpp
index 9c3992792e..015dca5809 100644
--- a/src/quick/items/qquickborderimage.cpp
+++ b/src/quick/items/qquickborderimage.cpp
@@ -100,7 +100,7 @@ QT_BEGIN_NAMESPACE
used to determine the parts of the image that will lie inside the unscaled corner
areas and the parts that will be stretched horizontally and vertically.
- \snippet doc/snippets/qml/borderimage/normal-image.qml normal image
+ \snippet qml/borderimage/normal-image.qml normal image
\clearfloat
\beginfloatleft
@@ -114,7 +114,7 @@ QT_BEGIN_NAMESPACE
is set to \l{BorderImage::verticalTileMode}{BorderImage.Stretch}, the parts of image
in regions 4 and 6 are stretched vertically.
- \snippet doc/snippets/qml/borderimage/borderimage-scaled.qml scaled border image
+ \snippet qml/borderimage/borderimage-scaled.qml scaled border image
\clearfloat
\beginfloatleft
@@ -128,7 +128,7 @@ QT_BEGIN_NAMESPACE
\l{BorderImage::verticalTileMode}{BorderImage.Repeat}, the parts of image in regions
4 and 6 are tiled so that they fill the space at the left and right of the element.
- \snippet doc/snippets/qml/borderimage/borderimage-tiled.qml tiled border image
+ \snippet qml/borderimage/borderimage-tiled.qml tiled border image
\clearfloat
In some situations, the width of regions 2 and 8 may not be an exact multiple of the width
diff --git a/src/quick/items/qquickdrag.cpp b/src/quick/items/qquickdrag.cpp
index bc9732b6b3..7768d73dca 100644
--- a/src/quick/items/qquickdrag.cpp
+++ b/src/quick/items/qquickdrag.cpp
@@ -112,7 +112,7 @@ public:
However, dragging is not limited to mouse drags, anything that can move an item
can generate drag events, this can include touch events, animations and bindings.
- \snippet doc/snippets/qml/drag.qml 0
+ \snippet qml/drag.qml 0
A drag can be terminated either by canceling it with Drag.cancel() or setting
Drag.active to false, or it can be terminated with a drop event by calling
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
index ba61ca4972..b6d80cdd9b 100644
--- a/src/quick/items/qquickflickable.cpp
+++ b/src/quick/items/qquickflickable.cpp
@@ -534,7 +534,7 @@ is finished.
The following example shows a small view onto a large image in which the
user can drag or flick the image in order to view different parts of it.
- \snippet doc/snippets/qml/flickable.qml document
+ \snippet qml/flickable.qml document
\clearfloat
@@ -596,9 +596,9 @@ is finished.
These properties are typically used to draw a scrollbar. For example:
- \snippet doc/snippets/qml/flickableScrollbar.qml 0
+ \snippet qml/flickableScrollbar.qml 0
\dots 8
- \snippet doc/snippets/qml/flickableScrollbar.qml 1
+ \snippet qml/flickableScrollbar.qml 1
\sa {declarative/ui-components/scrollbar}{scrollbar example}
*/
@@ -1507,7 +1507,7 @@ void QQuickFlickable::setBoundsBehavior(BoundsBehavior b)
The following snippet shows how these properties are used to display
an image that is larger than the Flickable item itself:
- \snippet doc/snippets/qml/flickable.qml document
+ \snippet qml/flickable.qml document
In some cases, the the content dimensions can be automatically set
using the \l {Item::childrenRect.width}{childrenRect.width}
diff --git a/src/quick/items/qquickflipable.cpp b/src/quick/items/qquickflipable.cpp
index 0231e84cf7..c2f487c9f2 100644
--- a/src/quick/items/qquickflipable.cpp
+++ b/src/quick/items/qquickflipable.cpp
@@ -113,7 +113,7 @@ public:
degrees to produce the flipping effect. When \c flipped is false, the
item reverts to the default state, in which the \c angle value is 0.
- \snippet doc/snippets/qml/flipable/flipable.qml 0
+ \snippet qml/flipable/flipable.qml 0
\image flipable.gif
diff --git a/src/quick/items/qquickgridview.cpp b/src/quick/items/qquickgridview.cpp
index 48d04bf7e7..932518489f 100644
--- a/src/quick/items/qquickgridview.cpp
+++ b/src/quick/items/qquickgridview.cpp
@@ -1167,7 +1167,7 @@ void QQuickGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte
The following example shows the definition of a simple list model defined
in a file called \c ContactModel.qml:
- \snippet doc/snippets/qml/gridview/ContactModel.qml 0
+ \snippet qml/gridview/ContactModel.qml 0
\div {class="float-right"}
\inlineimage gridview-simple.png
@@ -1181,9 +1181,9 @@ void QQuickGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte
(containing \l Image and \l Text elements) for its delegate.
\clearfloat
- \snippet doc/snippets/qml/gridview/gridview.qml import
+ \snippet qml/gridview/gridview.qml import
\codeline
- \snippet doc/snippets/qml/gridview/gridview.qml classdocs simple
+ \snippet qml/gridview/gridview.qml classdocs simple
\div {class="float-right"}
\inlineimage gridview-highlight.png
@@ -1196,7 +1196,7 @@ void QQuickGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte
into a separate \c contactDelegate component.
\clearfloat
- \snippet doc/snippets/qml/gridview/gridview.qml classdocs advanced
+ \snippet qml/gridview/gridview.qml classdocs advanced
The currently selected item is highlighted with a blue \l Rectangle using the \l highlight property,
and \c focus is set to \c true to enable keyboard navigation for the grid view.
@@ -1210,7 +1210,7 @@ void QQuickGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte
this attached property directly as \c GridView.isCurrentItem, while the child
\c contactInfo object must refer to this property as \c wrapper.GridView.isCurrentItem.
- \snippet doc/snippets/qml/gridview/gridview.qml isCurrentItem
+ \snippet qml/gridview/gridview.qml isCurrentItem
\note Views do not set the \l{Item::}{clip} property automatically.
If the view is not clipped by another item or the screen, it will be necessary
@@ -1308,7 +1308,7 @@ void QQuickGridView::setHighlightFollowsCurrentItem(bool autoHighlight)
It is attached to each instance of the delegate.
- \snippet doc/snippets/qml/gridview/gridview.qml isCurrentItem
+ \snippet qml/gridview/gridview.qml isCurrentItem
*/
/*!
@@ -1320,7 +1320,7 @@ void QQuickGridView::setHighlightFollowsCurrentItem(bool autoHighlight)
until an animation completes. The example delegate below ensures that the
animation completes before the item is removed from the list.
- \snippet doc/snippets/qml/gridview/gridview.qml delayRemove
+ \snippet qml/gridview/gridview.qml delayRemove
If a \l remove transition has been specified, it will not be applied until
delayRemove is returned to \c false.
@@ -1428,7 +1428,7 @@ void QQuickGridView::setHighlightFollowsCurrentItem(bool autoHighlight)
Here is a highlight with its motion defined by a \l {SpringAnimation} item:
- \snippet doc/snippets/qml/gridview/gridview.qml highlightFollowsCurrentItem
+ \snippet qml/gridview/gridview.qml highlightFollowsCurrentItem
*/
diff --git a/src/quick/items/qquickimage.cpp b/src/quick/items/qquickimage.cpp
index 8331d14d0a..d4a3cd5b0d 100644
--- a/src/quick/items/qquickimage.cpp
+++ b/src/quick/items/qquickimage.cpp
@@ -120,7 +120,7 @@ QQuickImagePrivate::QQuickImagePrivate()
The following example shows the simplest usage of the Image element.
- \snippet doc/snippets/qml/image.qml document
+ \snippet qml/image.qml document
\beginfloatleft
\image declarative-qtlogo.png
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index 0dd04e8d70..747f1a1da9 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -254,7 +254,7 @@ void QQuickItemPrivate::registerAccessorProperties()
rotations you must specify the axis to rotate around in addition to the origin point.
The following example shows various 3D-like rotations applied to an \l Image.
- \snippet doc/snippets/qml/rotation.qml 0
+ \snippet qml/rotation.qml 0
\image axisrotation.png
@@ -512,7 +512,7 @@ void QQuickItemKeyFilter::componentComplete()
The following example provides key navigation for a 2x2 grid of items:
- \snippet doc/snippets/qml/keynavigation.qml 0
+ \snippet qml/keynavigation.qml 0
The top-left item initially receives focus by setting \l {Item::}{focus} to
\c true. When an arrow key is pressed, the focus will move to the
@@ -937,13 +937,13 @@ bool QQuickKeysAttached::isConnected(const char *signalName)
be used to test for a certain key; in this case, the left cursor
key:
- \snippet doc/snippets/qml/keys/keys-pressed.qml key item
+ \snippet qml/keys/keys-pressed.qml key item
Some keys may alternatively be handled via specific signal properties,
for example \e onSelectPressed. These handlers automatically set
\e event.accepted to true.
- \snippet doc/snippets/qml/keys/keys-handler.qml key item
+ \snippet qml/keys/keys-handler.qml key item
See \l{Qt::Key}{Qt.Key} for the list of keyboard codes.
@@ -1485,7 +1485,7 @@ QQuickKeysAttached *QQuickKeysAttached::qmlAttachedProperties(QObject *obj)
from left to right by default, they are now positioned from right to left instead, as demonstrated
by the numbering and opacity of the items:
- \snippet doc/snippets/qml/layoutmirroring.qml 0
+ \snippet qml/layoutmirroring.qml 0
\image layoutmirroring.png
diff --git a/src/quick/items/qquickitemanimation.cpp b/src/quick/items/qquickitemanimation.cpp
index a0437b271e..03ada67c06 100644
--- a/src/quick/items/qquickitemanimation.cpp
+++ b/src/quick/items/qquickitemanimation.cpp
@@ -70,7 +70,7 @@ QT_BEGIN_NAMESPACE
the transition, ensures the item animates smoothly as it moves to
its new parent:
- \snippet doc/snippets/qml/parentanimation.qml 0
+ \snippet qml/parentanimation.qml 0
A ParentAnimation can contain any number of animations. These animations will
be run in parallel; to run them sequentially, define them within a
@@ -425,7 +425,7 @@ QAbstractAnimationJob* QQuickParentAnimation::transition(QQuickStateActions &act
In the following snippet we animate the addition of a right anchor to a \l Rectangle:
- \snippet doc/snippets/qml/anchoranimation.qml 0
+ \snippet qml/anchoranimation.qml 0
For convenience, when an AnchorAnimation is used in a \l Transition, it will
animate any AnchorChanges that have occurred during the state change.
diff --git a/src/quick/items/qquickitemviewtransition.cpp b/src/quick/items/qquickitemviewtransition.cpp
index aec4de43b6..d51d79230a 100644
--- a/src/quick/items/qquickitemviewtransition.cpp
+++ b/src/quick/items/qquickitemviewtransition.cpp
@@ -642,7 +642,7 @@ QQuickViewTransitionAttached::QQuickViewTransitionAttached(QObject *parent)
Here is a basic example of the use of view transitions. The view below specifies transitions for
the \c add and \c displaced properties, which will be run when items are added to the view:
- \snippet doc/snippets/qml/viewtransitions/viewtransitions-basic.qml 0
+ \snippet qml/viewtransitions/viewtransitions-basic.qml 0
When the space key is pressed, adding an item to the model, the new item will fade in and
increase in scale over 400 milliseconds as it is added to the view. Also, any item that is
@@ -728,7 +728,7 @@ QQuickViewTransitionAttached::QQuickViewTransitionAttached(QObject *parent)
each displaced item based on the difference between its index (provided by ViewTransition.index)
and the first removed index (provided by ViewTransition.targetIndexes):
- \snippet doc/snippets/qml/viewtransitions/viewtransitions-delayedbyindex.qml 0
+ \snippet qml/viewtransitions/viewtransitions-delayedbyindex.qml 0
Each displaced item delays its animation by an additional 100 milliseconds, producing a subtle
ripple-type effect when items are displaced by the add, like this:
@@ -748,7 +748,7 @@ QQuickViewTransitionAttached::QQuickViewTransitionAttached(QObject *parent)
animate to an intermediate position relative to its starting point for the transition, before
animating to its final position in the view:
- \snippet doc/snippets/qml/viewtransitions/viewtransitions-intermediatemove.qml 0
+ \snippet qml/viewtransitions/viewtransitions-intermediatemove.qml 0
Now, a displaced item will first move to a position of (20, 50) relative to its starting
position, and then to its final, correct position in the view:
@@ -764,7 +764,7 @@ QQuickViewTransitionAttached::QQuickViewTransitionAttached(QObject *parent)
a curved path. For example, the \c add transition in the previous example could be augmented with
a PathAnimation as follows: to animate newly added items along a path:
- \snippet doc/snippets/qml/viewtransitions/viewtransitions-pathanim.qml 0
+ \snippet qml/viewtransitions/viewtransitions-pathanim.qml 0
This animates newly added items along a path. Notice that each path is specified relative to
each item's final destination point, so that items inserted at different indexes start their
@@ -787,7 +787,7 @@ QQuickViewTransitionAttached::QQuickViewTransitionAttached(QObject *parent)
properties, this interruption may cause unwanted side effects. Consider the first example on this
page, repeated below for convenience:
- \snippet doc/snippets/qml/viewtransitions/viewtransitions-basic.qml 0
+ \snippet qml/viewtransitions/viewtransitions-basic.qml 0
If multiple items are added in rapid succession, without waiting for a previous transition
to finish, this is the result:
@@ -804,7 +804,7 @@ QQuickViewTransitionAttached::QQuickViewTransitionAttached(QObject *parent)
set to the end values specified in the \c add transition, effectively resetting these values
whenever an item is displaced. In this case, it means setting the item opacity and scale to 1.0:
- \snippet doc/snippets/qml/viewtransitions/viewtransitions-interruptedgood.qml 0
+ \snippet qml/viewtransitions/viewtransitions-interruptedgood.qml 0
Now, when an item's \c add transition is interrupted, its opacity and scale are animated to 1.0
upon displacement, avoiding the erroneous visual effects from before:
@@ -829,7 +829,7 @@ QQuickViewTransitionAttached::QQuickViewTransitionAttached(QObject *parent)
attached property, as it may not refer to the expected values at the time that the ScriptAction
is actually invoked. Consider the following example:
- \snippet doc/snippets/qml/viewtransitions/viewtransitions-scriptactionbad.qml 0
+ \snippet qml/viewtransitions/viewtransitions-scriptactionbad.qml 0
When the space key is pressed, three items are moved from index 5 to index 1. For each moved
item, the \c moveTransition sequence presumably animates the item's color to "yellow", then
@@ -847,7 +847,7 @@ QQuickViewTransitionAttached::QQuickViewTransitionAttached(QObject *parent)
In this instance, to avoid this issue, the view could set the property using a PropertyAction
instead:
- \snippet doc/snippets/qml/viewtransitions/viewtransitions-scriptactiongood.qml 0
+ \snippet qml/viewtransitions/viewtransitions-scriptactiongood.qml 0
When the transition is initialized, the PropertyAction \c target will be set to the respective
ViewTransition.item for the transition and will later run with the correct item target as
diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp
index 864c639f35..8ee3625775 100644
--- a/src/quick/items/qquicklistview.cpp
+++ b/src/quick/items/qquicklistview.cpp
@@ -1659,13 +1659,13 @@ void QQuickListViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte
The following example shows the definition of a simple list model defined
in a file called \c ContactModel.qml:
- \snippet doc/snippets/qml/listview/ContactModel.qml 0
+ \snippet qml/listview/ContactModel.qml 0
Another component can display this model data in a ListView, like this:
- \snippet doc/snippets/qml/listview/listview.qml import
+ \snippet qml/listview/listview.qml import
\codeline
- \snippet doc/snippets/qml/listview/listview.qml classdocs simple
+ \snippet qml/listview/listview.qml classdocs simple
\image listview-simple.png
@@ -1676,7 +1676,7 @@ void QQuickListViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte
An improved list view is shown below. The delegate is visually improved and is moved
into a separate \c contactDelegate component.
- \snippet doc/snippets/qml/listview/listview.qml classdocs advanced
+ \snippet qml/listview/listview.qml classdocs advanced
\image listview-highlight.png
The currently selected item is highlighted with a blue \l Rectangle using the \l highlight property,
@@ -1691,7 +1691,7 @@ void QQuickListViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte
this attached property directly as \c ListView.isCurrentItem, while the child
\c contactInfo object must refer to this property as \c wrapper.ListView.isCurrentItem.
- \snippet doc/snippets/qml/listview/listview.qml isCurrentItem
+ \snippet qml/listview/listview.qml isCurrentItem
\note Views do not enable \e clip automatically. If the view
is not clipped by another item or the screen, it will be necessary
@@ -1756,7 +1756,7 @@ QQuickListView::~QQuickListView()
This property may be used to adjust the appearance of the current item, for example:
- \snippet doc/snippets/qml/listview/listview.qml isCurrentItem
+ \snippet qml/listview/listview.qml isCurrentItem
*/
/*!
@@ -1803,7 +1803,7 @@ QQuickListView::~QQuickListView()
until an animation completes. The example delegate below ensures that the
animation completes before the item is removed from the list.
- \snippet doc/snippets/qml/listview/listview.qml delayRemove
+ \snippet qml/listview/listview.qml delayRemove
If a \l remove transition has been specified, it will not be applied until
delayRemove is returned to \c false.
@@ -1913,7 +1913,7 @@ QQuickListView::~QQuickListView()
Here is a highlight with its motion defined by a \l {SpringAnimation} item:
- \snippet doc/snippets/qml/listview/listview.qml highlightFollowsCurrentItem
+ \snippet qml/listview/listview.qml highlightFollowsCurrentItem
Note that the highlight animation also affects the way that the view
is scrolled. This is because the view moves to maintain the
@@ -2172,7 +2172,7 @@ void QQuickListView::setOrientation(QQuickListView::Orientation orientation)
each section.
- \snippet examples/declarative/modelviews/listview/sections.qml 0
+ \snippet examples/quick/modelviews/listview/sections.qml 0
\image qml-listview-sections-example.png
diff --git a/src/quick/items/qquickloader.cpp b/src/quick/items/qquickloader.cpp
index 2cde9effdc..843d0c18fd 100644
--- a/src/quick/items/qquickloader.cpp
+++ b/src/quick/items/qquickloader.cpp
@@ -173,7 +173,7 @@ qreal QQuickLoaderPrivate::getImplicitHeight() const
Here is a Loader that loads "Page1.qml" as a component when the
\l MouseArea is clicked:
- \snippet doc/snippets/qml/loader/simple.qml 0
+ \snippet qml/loader/simple.qml 0
The loaded item can be accessed using the \l item property.
@@ -205,8 +205,8 @@ qreal QQuickLoaderPrivate::getImplicitHeight() const
\li sizeloader.qml
\li sizeitem.qml
\row
- \li \snippet doc/snippets/qml/loader/sizeloader.qml 0
- \li \snippet doc/snippets/qml/loader/sizeitem.qml 0
+ \li \snippet qml/loader/sizeloader.qml 0
+ \li \snippet qml/loader/sizeitem.qml 0
\row
\li The red rectangle will be sized to the size of the root item.
\li The red rectangle will be 50x50, centered in the root item.
@@ -225,8 +225,8 @@ qreal QQuickLoaderPrivate::getImplicitHeight() const
\li application.qml
\li MyItem.qml
\row
- \li \snippet doc/snippets/qml/loader/connections.qml 0
- \li \snippet doc/snippets/qml/loader/MyItem.qml 0
+ \li \snippet qml/loader/connections.qml 0
+ \li \snippet qml/loader/MyItem.qml 0
\endtable
Alternatively, since \c MyItem.qml is loaded within the scope of the
@@ -252,8 +252,8 @@ qreal QQuickLoaderPrivate::getImplicitHeight() const
\li application.qml
\li KeyReader.qml
\row
- \li \snippet doc/snippets/qml/loader/focus.qml 0
- \li \snippet doc/snippets/qml/loader/KeyReader.qml 0
+ \li \snippet qml/loader/focus.qml 0
+ \li \snippet qml/loader/KeyReader.qml 0
\endtable
Once \c KeyReader.qml is loaded, it accepts key events and sets
diff --git a/src/quick/items/qquickmousearea.cpp b/src/quick/items/qquickmousearea.cpp
index 0ef19633df..30930c3cd8 100644
--- a/src/quick/items/qquickmousearea.cpp
+++ b/src/quick/items/qquickmousearea.cpp
@@ -354,9 +354,9 @@ bool QQuickMouseAreaPrivate::propagateHelper(QQuickMouseEvent *ev, QQuickItem *i
The following example uses a MouseArea in a \l Rectangle that changes
the \l Rectangle color to red when clicked:
- \snippet doc/snippets/qml/mousearea/mousearea.qml import
+ \snippet qml/mousearea/mousearea.qml import
\codeline
- \snippet doc/snippets/qml/mousearea/mousearea.qml intro
+ \snippet qml/mousearea/mousearea.qml intro
\clearfloat
Many MouseArea signals pass a \l{MouseEvent}{mouse} parameter that contains
@@ -366,7 +366,7 @@ bool QQuickMouseAreaPrivate::propagateHelper(QQuickMouseEvent *ev, QQuickItem *i
Here is an extension of the previous example that produces a different
color when the area is right clicked:
- \snippet doc/snippets/qml/mousearea/mousearea.qml intro-extended
+ \snippet qml/mousearea/mousearea.qml intro-extended
Behavioral Change in QtQuick 2.0
@@ -676,7 +676,7 @@ void QQuickMouseArea::setPropagateComposedEvents(bool prevent)
The code below displays "right" when the right mouse buttons is pressed:
- \snippet doc/snippets/qml/mousearea/mousearea.qml mousebuttons
+ \snippet qml/mousearea/mousearea.qml mousebuttons
\sa acceptedButtons
*/
@@ -1181,7 +1181,7 @@ bool QQuickMouseArea::setPressed(bool p)
The following example displays a \l Rectangle that can be dragged along the X-axis. The opacity
of the rectangle is reduced when it is dragged to the right.
- \snippet doc/snippets/qml/mousearea/mousearea.qml drag
+ \snippet qml/mousearea/mousearea.qml drag
\note Items cannot be dragged if they are anchored for the requested
\c drag.axis. For example, if \c anchors.left or \c anchors.right was set
@@ -1192,7 +1192,7 @@ bool QQuickMouseArea::setPressed(bool p)
If \c drag.filterChildren is set to true, a drag can override descendant MouseAreas. This
enables a parent MouseArea to handle drags, for example, while descendants handle clicks:
- \snippet doc/snippets/qml/mousearea/mouseareadragfilter.qml dragfilter
+ \snippet qml/mousearea/mouseareadragfilter.qml dragfilter
*/
diff --git a/src/quick/items/qquickmultipointtoucharea.cpp b/src/quick/items/qquickmultipointtoucharea.cpp
index 6f10ea77f1..fa6bb31767 100644
--- a/src/quick/items/qquickmultipointtoucharea.cpp
+++ b/src/quick/items/qquickmultipointtoucharea.cpp
@@ -309,7 +309,7 @@ void QQuickTouchPoint::setSceneY(qreal sceneY)
In the following example, we have two small rectangles that follow our touch points.
- \snippet doc/snippets/qml/multipointtoucharea/multipointtoucharea.qml 0
+ \snippet qml/multipointtoucharea/multipointtoucharea.qml 0
By default this property holds an empty list.
diff --git a/src/quick/items/qquickpathview.cpp b/src/quick/items/qquickpathview.cpp
index bf4f9960ce..393f83b34a 100644
--- a/src/quick/items/qquickpathview.cpp
+++ b/src/quick/items/qquickpathview.cpp
@@ -453,11 +453,11 @@ void QQuickPathViewPrivate::regenerate()
For example, if there is a simple list model defined in a file \c ContactModel.qml like this:
- \snippet doc/snippets/qml/pathview/ContactModel.qml 0
+ \snippet qml/pathview/ContactModel.qml 0
This data can be represented as a PathView, like this:
- \snippet doc/snippets/qml/pathview/pathview.qml 0
+ \snippet qml/pathview/pathview.qml 0
\image pathview.gif
@@ -490,7 +490,7 @@ void QQuickPathViewPrivate::regenerate()
this attached property directly as \c PathView.isCurrentItem, while the child
\c nameText object must refer to this property as \c wrapper.PathView.isCurrentItem.
- \snippet doc/snippets/qml/pathview/pathview.qml 1
+ \snippet qml/pathview/pathview.qml 1
\b Note that views do not enable \e clip automatically. If the view
is not clipped by another item or the screen, it will be necessary
@@ -552,7 +552,7 @@ QQuickPathView::~QQuickPathView()
This property may be used to adjust the appearance of the current item.
- \snippet doc/snippets/qml/pathview/pathview.qml 1
+ \snippet qml/pathview/pathview.qml 1
*/
/*!
@@ -1122,7 +1122,7 @@ bool QQuickPathView::isFlicking() const
item in the delegate.
Here is an example delegate:
- \snippet doc/snippets/qml/pathview/pathview.qml 1
+ \snippet qml/pathview/pathview.qml 1
*/
QQmlComponent *QQuickPathView::delegate() const
{
diff --git a/src/quick/items/qquickpositioners.cpp b/src/quick/items/qquickpositioners.cpp
index 52450b181d..b5816136cd 100644
--- a/src/quick/items/qquickpositioners.cpp
+++ b/src/quick/items/qquickpositioners.cpp
@@ -587,7 +587,7 @@ void QQuickPositionerAttached::setIsLastItem(bool isLastItem)
Below is a Column that contains three rectangles of various sizes:
- \snippet doc/snippets/qml/column/vertical-positioner.qml document
+ \snippet qml/column/vertical-positioner.qml document
The Column automatically positions these items in a vertical formation, like this:
@@ -616,7 +616,7 @@ void QQuickPositionerAttached::setIsLastItem(bool isLastItem)
For example, the Column below sets the \l move property to a specific \l Transition:
- \snippet doc/snippets/qml/column/column-transitions.qml document
+ \snippet qml/column/column-transitions.qml document
When the Space key is pressed, the \l {Item::visible}{visible} value of the green
\l Rectangle is toggled. As it appears and disappears, the blue \l Rectangle moves within
@@ -755,7 +755,7 @@ void QQuickColumn::reportConflictingAnchors()
Below is a Row that contains three rectangles of various sizes:
- \snippet doc/snippets/qml/row/row.qml document
+ \snippet qml/row/row.qml document
The Row automatically positions these items in a horizontal formation, like this:
@@ -993,7 +993,7 @@ void QQuickRow::reportConflictingAnchors()
For example, below is a Grid that contains five rectangles of various sizes:
- \snippet doc/snippets/qml/grid/grid.qml document
+ \snippet qml/grid/grid.qml document
The Grid automatically positions the child items in a grid formation:
@@ -1426,7 +1426,7 @@ void QQuickGrid::reportConflictingAnchors()
Below is a Flow that contains various \l Text items:
- \snippet doc/snippets/qml/flow.qml flow item
+ \snippet qml/flow.qml flow item
The Flow item automatically positions the child \l Text items side by
side, wrapping as necessary:
diff --git a/src/quick/items/qquickrectangle.cpp b/src/quick/items/qquickrectangle.cpp
index b5a03e88af..f4fe4714ea 100644
--- a/src/quick/items/qquickrectangle.cpp
+++ b/src/quick/items/qquickrectangle.cpp
@@ -207,7 +207,7 @@ void QQuickGradientStop::updateGradient()
with red, blending to yellow at one third of the height of the rectangle,
and ending with green:
- \snippet doc/snippets/qml/gradient.qml code
+ \snippet qml/gradient.qml code
\clearfloat
\section1 Performance and Limitations
@@ -309,7 +309,7 @@ int QQuickRectanglePrivate::doUpdateSlotIdx = -1;
The following example shows the effects of some of the common properties on a
Rectangle item, which in this case is used to create a square:
- \snippet doc/snippets/qml/rectangle/rectangle.qml document
+ \snippet qml/rectangle/rectangle.qml document
\clearfloat
\section1 Performance
@@ -370,7 +370,7 @@ void QQuickRectangle::doUpdate()
\inlineimage rect-border-width.png
\enddiv
- \snippet doc/snippets/qml/rectangle/rect-border-width.qml 0
+ \snippet qml/rectangle/rect-border-width.qml 0
\clearfloat
Here, the innermost rectangle's border is clipped on the bottom and right edges by its
@@ -394,7 +394,7 @@ QQuickPen *QQuickRectangle::border()
\inlineimage declarative-rect_gradient.png
\enddiv
- \snippet doc/snippets/qml/rectangle/rectangle-gradient.qml rectangles
+ \snippet qml/rectangle/rectangle-gradient.qml rectangles
\clearfloat
If both a gradient and a color are specified, the gradient will be used.
@@ -463,7 +463,7 @@ void QQuickRectangle::setRadius(qreal radius)
The following example shows rectangles with colors specified
using hexadecimal and named color notation:
- \snippet doc/snippets/qml/rectangle/rectangle-colors.qml rectangles
+ \snippet qml/rectangle/rectangle-colors.qml rectangles
\clearfloat
If both a gradient and a color are specified, the gradient will be used.
diff --git a/src/quick/items/qquickrepeater.cpp b/src/quick/items/qquickrepeater.cpp
index db58fba00c..fdba3aa21d 100644
--- a/src/quick/items/qquickrepeater.cpp
+++ b/src/quick/items/qquickrepeater.cpp
@@ -78,9 +78,9 @@ QQuickRepeaterPrivate::~QQuickRepeaterPrivate()
The following Repeater creates three instances of a \l Rectangle item within
a \l Row:
- \snippet doc/snippets/qml/repeaters/repeater.qml import
+ \snippet qml/repeaters/repeater.qml import
\codeline
- \snippet doc/snippets/qml/repeaters/repeater.qml simple
+ \snippet qml/repeaters/repeater.qml simple
\image repeater-simple.png
@@ -95,7 +95,7 @@ QQuickRepeaterPrivate::~QQuickRepeaterPrivate()
a Repeater to be used inside a layout. For example, the following Repeater's
items are stacked between a red rectangle and a blue rectangle:
- \snippet doc/snippets/qml/repeaters/repeater.qml layout
+ \snippet qml/repeaters/repeater.qml layout
\image repeater.png
@@ -242,7 +242,7 @@ void QQuickRepeater::setModel(const QVariant &model)
\table
\row
- \li \snippet doc/snippets/qml/repeaters/repeater.qml index
+ \li \snippet qml/repeaters/repeater.qml index
\li \image repeater-index.png
\endtable
@@ -253,7 +253,7 @@ void QQuickRepeater::setModel(const QVariant &model)
\table
\row
- \li \snippet doc/snippets/qml/repeaters/repeater.qml modeldata
+ \li \snippet qml/repeaters/repeater.qml modeldata
\li \image repeater-modeldata.png
\endtable
diff --git a/src/quick/items/qquickstateoperations.cpp b/src/quick/items/qquickstateoperations.cpp
index b6b055c359..6857e3f9b6 100644
--- a/src/quick/items/qquickstateoperations.cpp
+++ b/src/quick/items/qquickstateoperations.cpp
@@ -165,7 +165,7 @@ void QQuickParentChangePrivate::doChange(QQuickItem *targetParent, QQuickItem *s
When the \c blueRect is clicked, it changes to the "reparented" state: its parent is changed to \c redRect and it is
positioned at (10, 10) within the red rectangle, as specified in the ParentChange.
- \snippet doc/snippets/qml/parentchange.qml 0
+ \snippet qml/parentchange.qml 0
\image parentchange.png
@@ -572,7 +572,7 @@ void QQuickParentChange::rewind()
using AnchorChanges, and the top and bottom anchor margins using
PropertyChanges:
- \snippet doc/snippets/qml/anchorchanges.qml 0
+ \snippet qml/anchorchanges.qml 0
\image anchorchanges.png
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp
index 642409e84a..add789dff7 100644
--- a/src/quick/items/qquicktext.cpp
+++ b/src/quick/items/qquicktext.cpp
@@ -1247,7 +1247,7 @@ QQuickText::~QQuickText()
The link must be in rich text or HTML format and the
\a link string provides access to the particular link.
- \snippet doc/snippets/qml/text/onLinkActivated.qml 0
+ \snippet qml/text/onLinkActivated.qml 0
The example code will display the text
"The main website is at \l{http://qt.nokia.com}{Nokia Qt DF}."
diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp
index de5cff217d..5134376807 100644
--- a/src/quick/items/qquicktextedit.cpp
+++ b/src/quick/items/qquicktextedit.cpp
@@ -93,7 +93,7 @@ TextEdit {
Note that the TextEdit does not implement scrolling, following the cursor, or other behaviors specific
to a look-and-feel. For example, to add flickable scrolling that follows the cursor:
- \snippet snippets/declarative/texteditor.qml 0
+ \snippet qml/texteditor.qml 0
A particular look-and-feel might use smooth scrolling (eg. using SmoothedFollow), might have a visible
scrollbar, or a scrollbar that fades in to show location, etc.
@@ -105,7 +105,7 @@ TextEdit {
You can translate between cursor positions (characters from the start of the document) and pixel
points using positionAt() and positionToRectangle().
- \sa Text, TextInput, {declarative/text/textselection}{Text Selection example}
+ \sa Text, TextInput, {examples/quick/text/textselection}{Text Selection example}
*/
/*!
diff --git a/src/quick/items/qquickvisualdatamodel.cpp b/src/quick/items/qquickvisualdatamodel.cpp
index 0abcf81cb7..c0277cbb93 100644
--- a/src/quick/items/qquickvisualdatamodel.cpp
+++ b/src/quick/items/qquickvisualdatamodel.cpp
@@ -136,7 +136,7 @@ QQuickVisualDataModelParts::QQuickVisualDataModelParts(QQuickVisualDataModel *pa
The example below illustrates using a VisualDataModel with a ListView.
- \snippet doc/snippets/qml/visualdatamodel.qml 0
+ \snippet qml/visualdatamodel.qml 0
*/
QQuickVisualDataModelPrivate::QQuickVisualDataModelPrivate(QQmlContext *ctxt)
@@ -374,10 +374,10 @@ void QQuickVisualDataModel::setDelegate(QQmlComponent *delegate)
the new directory's contents.
\c main.cpp:
- \snippet doc/snippets/qml/visualdatamodel_rootindex/main.cpp 0
+ \snippet qml/visualdatamodel_rootindex/main.cpp 0
\c view.qml:
- \snippet doc/snippets/qml/visualdatamodel_rootindex/view.qml 0
+ \snippet qml/visualdatamodel_rootindex/view.qml 0
If the \l model is a QAbstractItemModel subclass, the delegate can also
reference a \c hasModelChildren property (optionally qualified by a
@@ -578,7 +578,7 @@ QQuickVisualDataGroup *QQuickVisualDataModelPrivate::group_at(
The following example illustrates using groups to select items in a model.
- \snippet doc/snippets/qml/visualdatagroup.qml 0
+ \snippet qml/visualdatagroup.qml 0
*/
QQmlListProperty<QQuickVisualDataGroup> QQuickVisualDataModel::groups()