diff options
author | Geir Vattekar <geir.vattekar@nokia.com> | 2012-05-07 13:06:02 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-09 00:56:16 +0200 |
commit | 727180c98472d94ec393e8fb15bb0938ddacb2a0 (patch) | |
tree | 04426756896b1ec840f7f68bdcca8451bd09644c /src/quick/items | |
parent | 0b1ab6ba5553ecd0ba485d0d4a1aead83482fb46 (diff) |
Doc: Moving Qt Quick docs for new doc structure
-moved documentation from
doc/src/qtquick2
doc/src/localstorage
doc/src/particles
to src/quick/doc/
-fixed qdocconf file
-fixed snippets, images, and other qdoc errors related to the new
directories
-fixed links in the main Qt Quick page
Change-Id: Ie3408c2624f623c17de07e5635d5c7284d02b973
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'src/quick/items')
21 files changed, 83 insertions, 83 deletions
diff --git a/src/quick/items/qquickanimatedimage.cpp b/src/quick/items/qquickanimatedimage.cpp index 1d4adf9b83..1c1c253513 100644 --- a/src/quick/items/qquickanimatedimage.cpp +++ b/src/quick/items/qquickanimatedimage.cpp @@ -82,7 +82,7 @@ QT_BEGIN_NAMESPACE \b Note: Unlike images, animated images are not cached or shared internally. \clearfloat - \snippet doc/src/snippets/qml/animatedimage.qml document + \snippet doc/snippets/qml/animatedimage.qml document \sa BorderImage, Image */ diff --git a/src/quick/items/qquickborderimage.cpp b/src/quick/items/qquickborderimage.cpp index 67ae3fa739..b4efa508b3 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/src/snippets/qml/borderimage/normal-image.qml normal image + \snippet doc/snippets/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/src/snippets/qml/borderimage/borderimage-scaled.qml scaled border image + \snippet doc/snippets/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/src/snippets/qml/borderimage/borderimage-tiled.qml tiled border image + \snippet doc/snippets/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 3316169741..0aee026533 100644 --- a/src/quick/items/qquickdrag.cpp +++ b/src/quick/items/qquickdrag.cpp @@ -106,7 +106,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/src/snippets/qml/drag.qml 0 + \snippet doc/snippets/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 d82f08b806..dcb484cd82 100644 --- a/src/quick/items/qquickflickable.cpp +++ b/src/quick/items/qquickflickable.cpp @@ -533,7 +533,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/src/snippets/qml/flickable.qml document + \snippet doc/snippets/qml/flickable.qml document \clearfloat @@ -595,9 +595,9 @@ is finished. These properties are typically used to draw a scrollbar. For example: - \snippet doc/src/snippets/qml/flickableScrollbar.qml 0 + \snippet doc/snippets/qml/flickableScrollbar.qml 0 \dots 8 - \snippet doc/src/snippets/qml/flickableScrollbar.qml 1 + \snippet doc/snippets/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/src/snippets/qml/flickable.qml document + \snippet doc/snippets/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 5183bbcd5f..39e5765a7a 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/src/snippets/qml/flipable/flipable.qml 0 + \snippet doc/snippets/qml/flipable/flipable.qml 0 \image flipable.gif diff --git a/src/quick/items/qquickgridview.cpp b/src/quick/items/qquickgridview.cpp index 0518fccd10..1be285bcf6 100644 --- a/src/quick/items/qquickgridview.cpp +++ b/src/quick/items/qquickgridview.cpp @@ -1169,7 +1169,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/src/snippets/qml/gridview/ContactModel.qml 0 + \snippet doc/snippets/qml/gridview/ContactModel.qml 0 \div {class="float-right"} \inlineimage gridview-simple.png @@ -1183,9 +1183,9 @@ void QQuickGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte (containing \l Image and \l Text elements) for its delegate. \clearfloat - \snippet doc/src/snippets/qml/gridview/gridview.qml import + \snippet doc/snippets/qml/gridview/gridview.qml import \codeline - \snippet doc/src/snippets/qml/gridview/gridview.qml classdocs simple + \snippet doc/snippets/qml/gridview/gridview.qml classdocs simple \div {class="float-right"} \inlineimage gridview-highlight.png @@ -1198,7 +1198,7 @@ void QQuickGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte into a separate \c contactDelegate component. \clearfloat - \snippet doc/src/snippets/qml/gridview/gridview.qml classdocs advanced + \snippet doc/snippets/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. @@ -1212,7 +1212,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/src/snippets/qml/gridview/gridview.qml isCurrentItem + \snippet doc/snippets/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 @@ -1310,7 +1310,7 @@ void QQuickGridView::setHighlightFollowsCurrentItem(bool autoHighlight) It is attached to each instance of the delegate. - \snippet doc/src/snippets/qml/gridview/gridview.qml isCurrentItem + \snippet doc/snippets/qml/gridview/gridview.qml isCurrentItem */ /*! @@ -1322,7 +1322,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/src/snippets/qml/gridview/gridview.qml delayRemove + \snippet doc/snippets/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. @@ -1430,7 +1430,7 @@ void QQuickGridView::setHighlightFollowsCurrentItem(bool autoHighlight) Here is a highlight with its motion defined by a \l {SpringAnimation} item: - \snippet doc/src/snippets/qml/gridview/gridview.qml highlightFollowsCurrentItem + \snippet doc/snippets/qml/gridview/gridview.qml highlightFollowsCurrentItem */ diff --git a/src/quick/items/qquickimage.cpp b/src/quick/items/qquickimage.cpp index 64c8ba1e55..cc4a95ddde 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/src/snippets/qml/image.qml document + \snippet doc/snippets/qml/image.qml document \beginfloatleft \image declarative-qtlogo.png diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 88663411a9..a38b8bd514 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/src/snippets/qml/rotation.qml 0 + \snippet doc/snippets/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/src/snippets/qml/keynavigation.qml 0 + \snippet doc/snippets/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/src/snippets/qml/keys/keys-pressed.qml key item + \snippet doc/snippets/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/src/snippets/qml/keys/keys-handler.qml key item + \snippet doc/snippets/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/src/snippets/qml/layoutmirroring.qml 0 + \snippet doc/snippets/qml/layoutmirroring.qml 0 \image layoutmirroring.png diff --git a/src/quick/items/qquickitemanimation.cpp b/src/quick/items/qquickitemanimation.cpp index 3e84eb6115..dec8e1151e 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/src/snippets/qml/parentanimation.qml 0 + \snippet doc/snippets/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 @@ -424,7 +424,7 @@ QAbstractAnimationJob* QQuickParentAnimation::transition(QQuickStateActions &act In the following snippet we animate the addition of a right anchor to a \l Rectangle: - \snippet doc/src/snippets/qml/anchoranimation.qml 0 + \snippet doc/snippets/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 c1f1e515ff..954a0f6dfa 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/src/snippets/declarative/viewtransitions/viewtransitions-basic.qml 0 + \snippet doc/snippets/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/src/snippets/declarative/viewtransitions/viewtransitions-delayedbyindex.qml 0 + \snippet doc/snippets/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/src/snippets/declarative/viewtransitions/viewtransitions-intermediatemove.qml 0 + \snippet doc/snippets/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/src/snippets/declarative/viewtransitions/viewtransitions-pathanim.qml 0 + \snippet doc/snippets/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/src/snippets/declarative/viewtransitions/viewtransitions-basic.qml 0 + \snippet doc/snippets/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/src/snippets/declarative/viewtransitions/viewtransitions-interruptedgood.qml 0 + \snippet doc/snippets/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/src/snippets/declarative/viewtransitions/viewtransitions-scriptactionbad.qml 0 + \snippet doc/snippets/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/src/snippets/declarative/viewtransitions/viewtransitions-scriptactiongood.qml 0 + \snippet doc/snippets/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 c29b1c5ee5..a7f267a969 100644 --- a/src/quick/items/qquicklistview.cpp +++ b/src/quick/items/qquicklistview.cpp @@ -1661,13 +1661,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/src/snippets/qml/listview/ContactModel.qml 0 + \snippet doc/snippets/qml/listview/ContactModel.qml 0 Another component can display this model data in a ListView, like this: - \snippet doc/src/snippets/qml/listview/listview.qml import + \snippet doc/snippets/qml/listview/listview.qml import \codeline - \snippet doc/src/snippets/qml/listview/listview.qml classdocs simple + \snippet doc/snippets/qml/listview/listview.qml classdocs simple \image listview-simple.png @@ -1678,7 +1678,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/src/snippets/qml/listview/listview.qml classdocs advanced + \snippet doc/snippets/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, @@ -1693,7 +1693,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/src/snippets/qml/listview/listview.qml isCurrentItem + \snippet doc/snippets/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 @@ -1758,7 +1758,7 @@ QQuickListView::~QQuickListView() This property may be used to adjust the appearance of the current item, for example: - \snippet doc/src/snippets/qml/listview/listview.qml isCurrentItem + \snippet doc/snippets/qml/listview/listview.qml isCurrentItem */ /*! @@ -1805,7 +1805,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/src/snippets/qml/listview/listview.qml delayRemove + \snippet doc/snippets/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. @@ -1915,7 +1915,7 @@ QQuickListView::~QQuickListView() Here is a highlight with its motion defined by a \l {SpringAnimation} item: - \snippet doc/src/snippets/qml/listview/listview.qml highlightFollowsCurrentItem + \snippet doc/snippets/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 diff --git a/src/quick/items/qquickloader.cpp b/src/quick/items/qquickloader.cpp index 54e426098d..1d01cb10bc 100644 --- a/src/quick/items/qquickloader.cpp +++ b/src/quick/items/qquickloader.cpp @@ -174,7 +174,7 @@ qreal QQuickLoaderPrivate::getImplicitHeight() const Here is a Loader that loads "Page1.qml" as a component when the \l MouseArea is clicked: - \snippet doc/src/snippets/qml/loader/simple.qml 0 + \snippet doc/snippets/qml/loader/simple.qml 0 The loaded item can be accessed using the \l item property. @@ -206,8 +206,8 @@ qreal QQuickLoaderPrivate::getImplicitHeight() const \li sizeloader.qml \li sizeitem.qml \row - \li \snippet doc/src/snippets/qml/loader/sizeloader.qml 0 - \li \snippet doc/src/snippets/qml/loader/sizeitem.qml 0 + \li \snippet doc/snippets/qml/loader/sizeloader.qml 0 + \li \snippet doc/snippets/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. @@ -226,8 +226,8 @@ qreal QQuickLoaderPrivate::getImplicitHeight() const \li application.qml \li MyItem.qml \row - \li \snippet doc/src/snippets/qml/loader/connections.qml 0 - \li \snippet doc/src/snippets/qml/loader/MyItem.qml 0 + \li \snippet doc/snippets/qml/loader/connections.qml 0 + \li \snippet doc/snippets/qml/loader/MyItem.qml 0 \endtable Alternatively, since \c MyItem.qml is loaded within the scope of the @@ -253,8 +253,8 @@ qreal QQuickLoaderPrivate::getImplicitHeight() const \li application.qml \li KeyReader.qml \row - \li \snippet doc/src/snippets/qml/loader/focus.qml 0 - \li \snippet doc/src/snippets/qml/loader/KeyReader.qml 0 + \li \snippet doc/snippets/qml/loader/focus.qml 0 + \li \snippet doc/snippets/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 7fd6da14c1..d2c9dd9162 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/src/snippets/qml/mousearea/mousearea.qml import + \snippet doc/snippets/qml/mousearea/mousearea.qml import \codeline - \snippet doc/src/snippets/qml/mousearea/mousearea.qml intro + \snippet doc/snippets/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/src/snippets/qml/mousearea/mousearea.qml intro-extended + \snippet doc/snippets/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/src/snippets/qml/mousearea/mousearea.qml mousebuttons + \snippet doc/snippets/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/src/snippets/qml/mousearea/mousearea.qml drag + \snippet doc/snippets/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/src/snippets/qml/mousearea/mouseareadragfilter.qml dragfilter + \snippet doc/snippets/qml/mousearea/mouseareadragfilter.qml dragfilter */ diff --git a/src/quick/items/qquickmultipointtoucharea.cpp b/src/quick/items/qquickmultipointtoucharea.cpp index 7ab0d3cea3..ed13ecc9ab 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/src/snippets/qml/multipointtoucharea/multipointtoucharea.qml 0 + \snippet doc/snippets/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 78e9ee9174..5f912f98f4 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/src/snippets/qml/pathview/ContactModel.qml 0 + \snippet doc/snippets/qml/pathview/ContactModel.qml 0 This data can be represented as a PathView, like this: - \snippet doc/src/snippets/qml/pathview/pathview.qml 0 + \snippet doc/snippets/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/src/snippets/qml/pathview/pathview.qml 1 + \snippet doc/snippets/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/src/snippets/qml/pathview/pathview.qml 1 + \snippet doc/snippets/qml/pathview/pathview.qml 1 */ /*! @@ -1120,7 +1120,7 @@ bool QQuickPathView::isFlicking() const item in the delegate. Here is an example delegate: - \snippet doc/src/snippets/qml/pathview/pathview.qml 1 + \snippet doc/snippets/qml/pathview/pathview.qml 1 */ QQmlComponent *QQuickPathView::delegate() const { diff --git a/src/quick/items/qquickpositioners.cpp b/src/quick/items/qquickpositioners.cpp index 37c3ef1224..a51cb86c29 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/src/snippets/qml/column/vertical-positioner.qml document + \snippet doc/snippets/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/src/snippets/qml/column/column-transitions.qml document + \snippet doc/snippets/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/src/snippets/qml/row/row.qml document + \snippet doc/snippets/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/src/snippets/qml/grid/grid.qml document + \snippet doc/snippets/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/src/snippets/qml/flow.qml flow item + \snippet doc/snippets/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 81289e8c49..a3948f1041 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/src/snippets/qml/gradient.qml code + \snippet doc/snippets/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/src/snippets/qml/rectangle/rectangle.qml document + \snippet doc/snippets/qml/rectangle/rectangle.qml document \clearfloat \section1 Performance @@ -370,7 +370,7 @@ void QQuickRectangle::doUpdate() \inlineimage rect-border-width.png \enddiv - \snippet doc/src/snippets/qml/rectangle/rect-border-width.qml 0 + \snippet doc/snippets/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/src/snippets/qml/rectangle/rectangle-gradient.qml rectangles + \snippet doc/snippets/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/src/snippets/qml/rectangle/rectangle-colors.qml rectangles + \snippet doc/snippets/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 f83b9f068a..97ab386841 100644 --- a/src/quick/items/qquickrepeater.cpp +++ b/src/quick/items/qquickrepeater.cpp @@ -79,9 +79,9 @@ QQuickRepeaterPrivate::~QQuickRepeaterPrivate() The following Repeater creates three instances of a \l Rectangle item within a \l Row: - \snippet doc/src/snippets/qml/repeaters/repeater.qml import + \snippet doc/snippets/qml/repeaters/repeater.qml import \codeline - \snippet doc/src/snippets/qml/repeaters/repeater.qml simple + \snippet doc/snippets/qml/repeaters/repeater.qml simple \image repeater-simple.png @@ -96,7 +96,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/src/snippets/qml/repeaters/repeater.qml layout + \snippet doc/snippets/qml/repeaters/repeater.qml layout \image repeater.png @@ -243,7 +243,7 @@ void QQuickRepeater::setModel(const QVariant &model) \table \row - \li \snippet doc/src/snippets/qml/repeaters/repeater.qml index + \li \snippet doc/snippets/qml/repeaters/repeater.qml index \li \image repeater-index.png \endtable @@ -254,7 +254,7 @@ void QQuickRepeater::setModel(const QVariant &model) \table \row - \li \snippet doc/src/snippets/qml/repeaters/repeater.qml modeldata + \li \snippet doc/snippets/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 09057b3d4f..1985da8deb 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/src/snippets/qml/parentchange.qml 0 + \snippet doc/snippets/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/src/snippets/qml/anchorchanges.qml 0 + \snippet doc/snippets/qml/anchorchanges.qml 0 \image anchorchanges.png diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp index 104a6ab67c..b6ccc5ec17 100644 --- a/src/quick/items/qquicktext.cpp +++ b/src/quick/items/qquicktext.cpp @@ -1246,7 +1246,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/src/snippets/qml/text/onLinkActivated.qml 0 + \snippet doc/snippets/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/qquickvisualdatamodel.cpp b/src/quick/items/qquickvisualdatamodel.cpp index 5046b1afe0..bd3ac20b5e 100644 --- a/src/quick/items/qquickvisualdatamodel.cpp +++ b/src/quick/items/qquickvisualdatamodel.cpp @@ -93,7 +93,7 @@ QHash<QObject*, QQuickVisualDataModelAttached*> QQuickVisualDataModelAttached::a The example below illustrates using a VisualDataModel with a ListView. - \snippet doc/src/snippets/qml/visualdatamodel.qml 0 + \snippet doc/snippets/qml/visualdatamodel.qml 0 */ QQuickVisualDataModelPrivate::QQuickVisualDataModelPrivate(QQmlContext *ctxt) @@ -329,10 +329,10 @@ void QQuickVisualDataModel::setDelegate(QQmlComponent *delegate) the new directory's contents. \c main.cpp: - \snippet doc/src/snippets/qml/visualdatamodel_rootindex/main.cpp 0 + \snippet doc/snippets/qml/visualdatamodel_rootindex/main.cpp 0 \c view.qml: - \snippet doc/src/snippets/qml/visualdatamodel_rootindex/view.qml 0 + \snippet doc/snippets/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 @@ -530,7 +530,7 @@ QQuickVisualDataGroup *QQuickVisualDataModelPrivate::group_at( The following example illustrates using groups to select items in a model. - \snippet doc/src/snippets/qml/visualdatagroup.qml 0 + \snippet doc/snippets/qml/visualdatagroup.qml 0 */ QQmlListProperty<QQuickVisualDataGroup> QQuickVisualDataModel::groups() |