From 888a02ec4a338f3edefe6e4287173a600cd2dd37 Mon Sep 17 00:00:00 2001 From: Xingtao Zhang Date: Tue, 8 Jan 2013 23:34:22 +0000 Subject: [PATCH] Doc: Updated docs for examples and etc - Corrected several \snippet paths and \example paths. - Added missing example images. - Marked several commands as code. - Updated the exampledirs variable for qtqml. Done-with: Venugopal Shivashankar Task-number: QTBUG-28898 Change-Id: I24aac17821f54de4bd5129c45b5bf96dc0f114b2 Reviewed-by: Liang Qi --- examples/qml/i18n/doc/src/i18n.qdoc | 7 ++ examples/qml/plugins/doc/src/qmlpluginex.qdoc | 2 +- .../doc/images/qml-xmlhttprequest-example.png | Bin 0 -> 20934 bytes .../quick/imageelements/doc/src/imageelements.qdoc | 2 +- .../particles/affectors/doc/src/affectors.qdoc | 36 ++++---- .../customparticle/doc/src/customparticle.qdoc | 12 +-- .../quick/particles/emitters/doc/src/emitters.qdoc | 14 +-- .../imageparticle/doc/src/imageparticle.qdoc | 14 +-- .../quick/particles/system/doc/src/system.qdoc | 12 +-- .../touchinteraction/doc/src/touchinteraction.qdoc | 2 +- .../slideswitch/doc/src/example-slideswitch.qdoc | 4 +- examples/quick/views/doc/src/views.qdoc | 30 +++---- src/imports/localstorage/plugin.cpp | 2 +- src/imports/xmllistmodel/qqmlxmllistmodel.cpp | 2 +- src/qml/doc/images/button-types.png | Bin 0 -> 738 bytes src/qml/doc/qtqml.qdocconf | 2 +- .../doc/src/cppintegration/extending-tutorial.qdoc | 98 ++++++++++----------- src/qml/doc/src/documents/topic.qdoc | 6 +- src/qml/doc/src/modules/cppplugins.qdoc | 8 +- src/qml/qml/qqmlextensionplugin.cpp | 8 +- src/quick/doc/src/advtutorial.qdoc | 72 +++++++-------- src/quick/doc/src/appdevguide/deployment.qdoc | 8 +- src/quick/doc/src/concepts/input/textinput.qdoc | 4 +- .../doc/src/concepts/modelviewsdata/cppmodels.qdoc | 24 ++--- src/quick/doc/src/dynamicview-tutorial.qdoc | 64 +++++++------- src/quick/doc/src/tutorial.qdoc | 34 +++---- src/quick/items/qquicklistview.cpp | 4 +- src/quick/util/qquickimageprovider.cpp | 6 +- src/quick/util/qquickpackage.cpp | 6 +- src/quick/util/qquicktransition.cpp | 2 +- 30 files changed, 246 insertions(+), 239 deletions(-) create mode 100644 examples/qml/xmlhttprequest/doc/images/qml-xmlhttprequest-example.png create mode 100644 src/qml/doc/images/button-types.png diff --git a/examples/qml/i18n/doc/src/i18n.qdoc b/examples/qml/i18n/doc/src/i18n.qdoc index 888a981..b04c38e 100644 --- a/examples/qml/i18n/doc/src/i18n.qdoc +++ b/examples/qml/i18n/doc/src/i18n.qdoc @@ -35,14 +35,21 @@ The files are created/updated by running: +\code lupdate i18n.qml -ts i18n/base.ts +\endcode Translations for new languages are created by copying i18n/base.ts to i18n/qml_.ts The .ts files can then be edited with Linguist: +\code linguist i18n/qml_fr.ts +\endcode The run-time translation files are then generated by running: +\code lrelease i18n/*.ts +\endcode + */ diff --git a/examples/qml/plugins/doc/src/qmlpluginex.qdoc b/examples/qml/plugins/doc/src/qmlpluginex.qdoc index 464f42a..320bc1d 100644 --- a/examples/qml/plugins/doc/src/qmlpluginex.qdoc +++ b/examples/qml/plugins/doc/src/qmlpluginex.qdoc @@ -27,7 +27,7 @@ /*! \title QML Plugin Example - \example plugins + \example qml/plugins \brief This example creates a C++ plugin extension by subclassing QQmlExtensionPlugin. diff --git a/examples/qml/xmlhttprequest/doc/images/qml-xmlhttprequest-example.png b/examples/qml/xmlhttprequest/doc/images/qml-xmlhttprequest-example.png new file mode 100644 index 0000000000000000000000000000000000000000..f5856134273f65680f386dc503d8be442697d27b GIT binary patch literal 20934 zcmeIac{rA9+c$h6TuFuuDKaG_LrRpHBvDAl5|S}8CG$*~5>X@}nWuyj2`NGYWhz7F z5*agRdVgBa^W5vcpZopZ?|rxJ{r>uFTh_8xb)DyV9LK)@ru_`nR6o9zY9|$eK-hXh zMM;Z5AThzOXd)^8ir}Jmf342Z(ey8EJuArlu=Md6g=4uYOomZP+qg-#aP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(r zj6Vi%xc2q#bM}An;JBzL2MjgA;w*co6;H{<$iOf-GIGSUCPbn8_?9d`Qc)}9`5AWX zSc0((P=ZUtm?$*6fdT?}F~}3lTm)`l%fpMTbQwRZs2DIb@OO8lrYgSMhfWca6u2S? z5R%C?p~@xe1r_Dihj^(62@~cDq0vfKsx;`X3Ew+%_)5~SbXjut$ojcc-H(ez`R`{pHeAEyg*kYtjxMSgEdINV3|5 zpOI>31TPy+)te=k8+C()UE|cRPx3P4>q@cFboe!xX%&1fj))#!!_c2=`PVVW;tnO+ zfbHDUv;q8~N>1fpeV$&EO;pE(%hKE0pL5T<#&LlaMv+R~%d2bC?c**|?2%&y+k9`l z7T$AP^;_Jn+&0yM&s9CA=kG4O`&s@~JzrOiCwgW{a9b!NRjm!%Bhetd(#$LP#LKVu z%~p^4FIL<56PT$sag`>-2wuO?^Tq#J*Z3!^+4G+WYZSV4oBG}9)=82m6=-zn%;2`y znpV3qlOAt*(qJ|qwWV6opOc@CsGX}*Sxi@|n!b&=X|Yl9@#9*~kPPd%cWqW;_tp7& z%ZM#jVpJ4?fz>aq#C|1)6E1`+FdsWzYx-$&0WM^R?RD>8<=vADBhL34%mS)Svb7bj za#HRi4t$?+mrS%1+xhO>w#?r`HKv6PW~S=~TiX2D3=zJ)|G1Xmm%I_`=EKZoUl3k5 pb{`WaehkRuIw%7C5d3 QQuickXmlListRange; For example, if there is an XML document like this: - \quotefile qml/xmlrole.xml + \quotefile qml/xmlrole.qml Here are some valid XPath expressions for XmlRole queries on this document: \snippet qml/xmlrole.qml 0 diff --git a/src/qml/doc/images/button-types.png b/src/qml/doc/images/button-types.png new file mode 100644 index 0000000000000000000000000000000000000000..6990d7c190d2754a74dc1d4ec11998e78e8d1597 GIT binary patch literal 738 zcmeAS@N?(olHy`uVBq!ia0vp^DL_1pg9%73zqLycNHG^Xd4_OsaNK_A{{YD4Ebxdd zW?se4C<(4*Ef zj!nxuPV(9`ah*JtFV^g=^7c{g8mS8VR}A%XcYVcH>Mi!X`Dk5G^@0CKA{sU_Br_gk z>S2}OHV{kDIY0}62jR2J-FC10)}&|`Ne}xDL>#ytasK?qsG~<+ztoo8^`En^|D=kX zT+)7f*-1Aab^du>aN?-aZaw8!bJm^y{o6)nQ{u##l@?FFmTvV~o^E#f@y4>r`L1ct zk^=27@82AAE$`D>z3sPm?8f;SU{r$XCyE^*&Bi3j4ON2dox$;|^ z@oe9>tcQ2W^gjB#_gl~UUv_cvK)DNBzp%~Acy;>2$@mY{@V-Om#T7uiYU8U9ZV-B0 z_?9b%0FojIFB zTx#MW< sZ~NQasFi is exposed to QML: -\snippet examples/quick/modelviews/objectlistmodel/dataobject.h 0 +\snippet quick/models/objectlistmodel/dataobject.h 0 \dots 4 -\snippet examples/quick/modelviews/objectlistmodel/dataobject.h 1 +\snippet quick/models/objectlistmodel/dataobject.h 1 \codeline -\snippet examples/quick/modelviews/objectlistmodel/main.cpp 0 +\snippet quick/models/objectlistmodel/main.cpp 0 \dots The QObject* is available as the \c modelData property. As a convenience, @@ -84,7 +84,7 @@ the properties of the object are also made available directly in the delegate's context. Here, \c view.qml references the \c DataModel properties in the ListView delegate: -\snippet examples/quick/modelviews/objectlistmodel/view.qml 0 +\snippet quick/models/objectlistmodel/view.qml 0 Note the use of the fully qualified access to the \c color property. The properties of the object are not replicated in the \c model @@ -124,21 +124,21 @@ Here is an application with a QAbstractListModel subclass named \c AnimalModel that has \e type and \e size roles. It reimplements QAbstractItemModel::roleNames() to set the role names for accessing the properties via QML: -\snippet examples/quick/modelviews/abstractitemmodel/model.h 0 +\snippet quick/models/abstractitemmodel/model.h 0 \dots -\snippet examples/quick/modelviews/abstractitemmodel/model.h 1 +\snippet quick/models/abstractitemmodel/model.h 1 \dots -\snippet examples/quick/modelviews/abstractitemmodel/model.h 2 +\snippet quick/models/abstractitemmodel/model.h 2 \codeline -\snippet examples/quick/modelviews/abstractitemmodel/model.cpp 0 +\snippet quick/models/abstractitemmodel/model.cpp 0 \codeline -\snippet examples/quick/modelviews/abstractitemmodel/main.cpp 0 +\snippet quick/models/abstractitemmodel/main.cpp 0 \dots This model is displayed by a ListView delegate that accesses the \e type and \e size roles: -\snippet examples/quick/modelviews/abstractitemmodel/view.qml 0 +\snippet quick/models/abstractitemmodel/view.qml 0 QML views are automatically updated when the model changes. Remember the model must follow the standard rules for model changes and notify the view when diff --git a/src/quick/doc/src/dynamicview-tutorial.qdoc b/src/quick/doc/src/dynamicview-tutorial.qdoc index 3edfdc6..12497ef 100644 --- a/src/quick/doc/src/dynamicview-tutorial.qdoc +++ b/src/quick/doc/src/dynamicview-tutorial.qdoc @@ -39,10 +39,10 @@ data to dynamically sort all items in a view. Tutorial chapters: \list 1 -\li \l {tutorials/dynamicview/dynamicview1}{A Simple ListView and Delegate} -\li \l {tutorials/dynamicview/dynamicview2}{Dragging View Items} -\li \l {tutorials/dynamicview/dynamicview3}{Moving Dragged Items} -\li \l {tutorials/dynamicview/dynamicview4}{Sorting Items} +\li \l {quick/tutorials/dynamicview/dynamicview1}{A Simple ListView and Delegate} +\li \l {quick/tutorials/dynamicview/dynamicview2}{Dragging View Items} +\li \l {quick/tutorials/dynamicview/dynamicview3}{Moving Dragged Items} +\li \l {quick/tutorials/dynamicview/dynamicview4}{Sorting Items} \endlist All the code in this tutorial can be found in Qt's \c examples/quick/tutorials/dynamicview @@ -57,19 +57,19 @@ directory. \previouspage QML Dynamic View Ordering Tutorial \nextpage QML Dynamic View Ordering Tutorial 2 - Dragging View Items -\example tutorials/dynamicview/dynamicview1 +\example quick/tutorials/dynamicview/dynamicview1 We begin our application by defining a ListView, a model which will provide data to the view, and a delegate which provides a template for constructing items in the view. The code for the ListView and delegate looks like this: -\snippet tutorials/dynamicview/dynamicview1/dynamicview.qml 0 +\snippet quick/tutorials/dynamicview/dynamicview1/dynamicview.qml 0 The model is defined in a separate QML file which looks like this: -\snippet tutorials/dynamicview/dynamicview1/PetsModel.qml 0 -\snippet tutorials/dynamicview/dynamicview1/PetsModel.qml 1 +\snippet quick/tutorials/dynamicview/dynamicview1/PetsModel.qml 0 +\snippet quick/tutorials/dynamicview/dynamicview1/PetsModel.qml 1 \section2 Walkthrough @@ -79,11 +79,11 @@ is the template from which each item in the ListView is constructed. The \c name, \c age, \c type, and \c size variables referenced in the delegate are sourced from the model data. The names correspond to roles defined in the model. -\snippet tutorials/dynamicview/dynamicview1/dynamicview.qml 1 +\snippet quick/tutorials/dynamicview/dynamicview1/dynamicview.qml 1 The second part of the application is the ListView itself to which we bind the model and delegate. -\snippet tutorials/dynamicview/dynamicview1/dynamicview.qml 2 +\snippet quick/tutorials/dynamicview/dynamicview1/dynamicview.qml 2 */ /*! @@ -94,13 +94,13 @@ The second part of the application is the ListView itself to which we bind the m \previouspage QML Dynamic View Ordering Tutorial 1 - A Simple ListView and Delegate \nextpage QML Dynamic View Ordering Tutorial 3 - Moving Dragged Items -\example tutorials/dynamicview/dynamicview2 +\example quick/tutorials/dynamicview/dynamicview2 Now that we have a visible list of items we want to be able to interact with them. We'll start by extending the delegate so the visible content can be dragged up and down the screen. The updated delegate looks like this: -\snippet tutorials/dynamicview/dynamicview2/dynamicview.qml 0 +\snippet quick/tutorials/dynamicview/dynamicview2/dynamicview.qml 0 \section2 Walkthrough @@ -109,8 +109,8 @@ for mouse events and will allow us to drag the delegate's content item. It also a container for the content item which is important as a delegate's root item is positioned by the view and cannot be moved by other means. -\snippet tutorials/dynamicview/dynamicview2/dynamicview.qml 1 -\snippet tutorials/dynamicview/dynamicview2/dynamicview.qml 2 +\snippet quick/tutorials/dynamicview/dynamicview2/dynamicview.qml 1 +\snippet quick/tutorials/dynamicview/dynamicview2/dynamicview.qml 2 Dragging the content item is enabled by binding it to the MouseArea's \l {QtQuick2::MouseArea::drag.target}{drag.target} property. Because we still want the view to be @@ -120,14 +120,14 @@ timeout has expired it is interpreted as moving the list and if it moves after i dragging an item. To make it more obvious to the user when an item can be dragged we'll change the background color of the content item when the timeout has expired. -\snippet tutorials/dynamicview/dynamicview2/dynamicview.qml 3 +\snippet quick/tutorials/dynamicview/dynamicview2/dynamicview.qml 3 The other thing we'll need to do before an item can be dragged is to unset any anchors on the content item so it can be freely moved around. We do this in a state change that is triggered when the delegate item is held, at the same time we can reparent the content item to the root item so that is above other items in the stacking order and isn't obscured as it is dragged around. -\snippet tutorials/dynamicview/dynamicview2/dynamicview.qml 4 +\snippet quick/tutorials/dynamicview/dynamicview2/dynamicview.qml 4 */ @@ -139,16 +139,16 @@ so that is above other items in the stacking order and isn't obscured as it is d \previouspage QML Dynamic View Ordering Tutorial 2 - Dragging View Items \nextpage QML Dynamic View Ordering Tutorial 4 - Sorting Items -\example examples/quick/tutorials/dynamicview/dynamicview3 +\example quick/tutorials/dynamicview/dynamicview3 The next step in our application to move items within the list as they're dragged so that we can re-order the list. To achieve this we introduce three new elements to our application; VisualDataModel, \l Drag and DropArea. -\snippet tutorials/dynamicview/dynamicview3/dynamicview.qml 0 -\snippet tutorials/dynamicview/dynamicview3/dynamicview.qml 1 -\snippet tutorials/dynamicview/dynamicview3/dynamicview.qml 2 -\snippet tutorials/dynamicview/dynamicview3/dynamicview.qml 5 +\snippet quick/tutorials/dynamicview/dynamicview3/dynamicview.qml 0 +\snippet quick/tutorials/dynamicview/dynamicview3/dynamicview.qml 1 +\snippet quick/tutorials/dynamicview/dynamicview3/dynamicview.qml 2 +\snippet quick/tutorials/dynamicview/dynamicview3/dynamicview.qml 5 \section2 Walkthrough @@ -156,7 +156,7 @@ In order to re-order the view we need to determine when one item has been dragge the Drag attached property we can generate events that are sent to the scene graph whenever the item it is attached to moves. -\snippet tutorials/dynamicview/dynamicview3/dynamicview.qml 1 +\snippet quick/tutorials/dynamicview/dynamicview3/dynamicview.qml 1 Drag events are only sent while the active property is true, so in this example the first event would be sent when the delegate was held with additional event sents when dragging. The @@ -167,7 +167,7 @@ Then we use a DropArea in each view item to determine when the hot spot of the d intersects another item, when a drag enters one of these DropAreas we can move the dragged item to the index of the item it was dragged over. -\snippet tutorials/dynamicview/dynamicview3/dynamicview.qml 3 +\snippet quick/tutorials/dynamicview/dynamicview3/dynamicview.qml 3 To move the items within the view we use a VisualDataModel. The VisualDataModel element is used by the view elements to instantiate delegate items from model data and when constructed explicitly can @@ -181,7 +181,7 @@ To utilize a VisualDataModel with a ListView we bind it to the \l {QtQuick2::Lis property of the view and bind the \l {QtQuick2::VisualDataModel::model}{model} and \l {QtQuick2::VisualDataModel::delegate}{delegate} to the VisualDataModel. -\snippet tutorials/dynamicview/dynamicview3/dynamicview.qml 4 +\snippet quick/tutorials/dynamicview/dynamicview3/dynamicview.qml 4 */ @@ -192,13 +192,13 @@ property of the view and bind the \l {QtQuick2::VisualDataModel::model}{model} a \contentspage QML Dynamic View Ordering Tutorial \previouspage QML Dynamic View Ordering Tutorial 3 - Moving Dragged Items -\example tutorials/dynamicview/dynamicview4 +\example quick/tutorials/dynamicview/dynamicview4 Drag and drop isn't the only way items in a view can be re-ordered, using a VisualDataModel it is also possible to sort items based on model data. To do that we extend our VisualDataModel instance like this: -\snippet tutorials/dynamicview/dynamicview4/dynamicview.qml 0 +\snippet quick/tutorials/dynamicview/dynamicview4/dynamicview.qml 0 \section2 Walkthrough @@ -209,8 +209,8 @@ we want items to first be added to an unsorted group from where we can transfer position in the items group. To do that we clear includeByDefault on the items group and set it on a new group name 'unsorted'. -\snippet tutorials/dynamicview/dynamicview4/dynamicview.qml 1 -\snippet tutorials/dynamicview/dynamicview4/dynamicview.qml 2 +\snippet quick/tutorials/dynamicview/dynamicview4/dynamicview.qml 1 +\snippet quick/tutorials/dynamicview/dynamicview4/dynamicview.qml 2 We sort the items by first finding the position in the items group to insert the first unsorted item and then transfer the item to the items group before moving it to the pre-determined index and @@ -221,19 +221,19 @@ with the \l {QtQuick2::VisualDataModel::get} {get} function. Through the model handle we can access the same model data that is available in a delegate instance of that item and compare against other items to determine relative position. -\snippet tutorials/dynamicview/dynamicview4/dynamicview.qml 3 +\snippet quick/tutorials/dynamicview/dynamicview4/dynamicview.qml 3 The lessThan argument to the sort function is a comparsion function which will determine the order of the list. In this example it can be one of the following: -\snippet tutorials/dynamicview/dynamicview4/dynamicview.qml 4 +\snippet quick/tutorials/dynamicview/dynamicview4/dynamicview.qml 4 A sort is triggered whenever new items are added to the unsorted VisualDataGroup which we are notified of by the \l {QtQuick2::VisualDataGroup::onChanged}{onChanged} handler. If no sort function is currently selected we simply transfer all items from the unsorted group to the items group, otherwise we call sort with the selected sort function. -\snippet tutorials/dynamicview/dynamicview4/dynamicview.qml 5 +\snippet quick/tutorials/dynamicview/dynamicview4/dynamicview.qml 5 Finally when the selected sort order changes we can trigger a full re-sort of the list by moving all items from the items group to the unsorted group, which will trigger the @@ -241,6 +241,6 @@ all items from the items group to the unsorted group, which will trigger the items group in correct order. Note that the \l {QtQuick2::VisualDataGroup::onChanged}{onChanged} handler will not be invoked recursively so there's no issue with it being invoked during a sort. -\snippet tutorials/dynamicview/dynamicview4/dynamicview.qml 6 +\snippet quick/tutorials/dynamicview/dynamicview4/dynamicview.qml 6 */ diff --git a/src/quick/doc/src/tutorial.qdoc b/src/quick/doc/src/tutorial.qdoc index 619f754..22b2cdb 100644 --- a/src/quick/doc/src/tutorial.qdoc +++ b/src/quick/doc/src/tutorial.qdoc @@ -59,7 +59,7 @@ Tutorial chapters: \title QML Tutorial 1 - Basic Types \contentspage QML Tutorial \previouspage QML Tutorial -\nextpage QML Tutorial 2 - QML Component +\nextpage QML Tutorial 2 - QML Components This first program is a very simple "Hello world" example that introduces some basic QML concepts. The picture below is a screenshot of this program. @@ -68,7 +68,7 @@ The picture below is a screenshot of this program. Here is the QML code for the application: -\snippet tutorials/helloworld/tutorial1.qml 0 +\snippet quick/tutorials/helloworld/tutorial1.qml 0 \section1 Walkthrough @@ -77,11 +77,11 @@ Here is the QML code for the application: First, we need to import the types that we need for this example. Most QML files will import the built-in QML types (like \l{Rectangle}, \l{Image}, ...) that come with Qt, using: -\snippet tutorials/helloworld/tutorial1.qml 3 +\snippet quick/tutorials/helloworld/tutorial1.qml 3 \section2 Rectangle element -\snippet tutorials/helloworld/tutorial1.qml 1 +\snippet quick/tutorials/helloworld/tutorial1.qml 1 We declare a root element of type \l{Rectangle}. It is one of the basic building blocks you can use to create an application in QML. We give it an \c{id} to be able to refer to it later. In this case, we call it "page". @@ -90,7 +90,7 @@ The \l{Rectangle} element contains many other properties (such as \c x and \c y) \section2 Text element -\snippet tutorials/helloworld/tutorial1.qml 2 +\snippet quick/tutorials/helloworld/tutorial1.qml 2 We add a \l Text element as a child of the root Rectangle element that displays the text 'Hello world!'. @@ -133,37 +133,37 @@ The component's filename must always start with a capital letter. Here is the QML code for \c Cell.qml: -\snippet tutorials/helloworld/Cell.qml 0 +\snippet quick/tutorials/helloworld/Cell.qml 0 \section1 Walkthrough \section2 The Cell Component -\snippet tutorials/helloworld/Cell.qml 1 +\snippet quick/tutorials/helloworld/Cell.qml 1 The root element of our component is an \l Item with the \c id \e container. An \l Item is the most basic visual element in QML and is often used as a container for other elements. -\snippet tutorials/helloworld/Cell.qml 4 +\snippet quick/tutorials/helloworld/Cell.qml 4 We declare a \c cellColor property. This property is accessible from \e outside our component, this allows us to instantiate the cells with different colors. This property is just an alias to an existing property - the color of the rectangle that compose the cell (see \l{Property Binding in QML}). -\snippet tutorials/helloworld/Cell.qml 5 +\snippet quick/tutorials/helloworld/Cell.qml 5 We want our component to also have a signal that we call \e clicked with a \e cellColor parameter of type \e color. We will use this signal to change the color of the text in the main QML file later. -\snippet tutorials/helloworld/Cell.qml 2 +\snippet quick/tutorials/helloworld/Cell.qml 2 Our cell component is basically a colored rectangle with the \c id \e rectangle. The \c anchors.fill property is a convenient way to set the size of an element. In this case the rectangle will have the same size as its parent (see \l{anchor-layout}{Anchor-Based Layout}). -\snippet tutorials/helloworld/Cell.qml 3 +\snippet quick/tutorials/helloworld/Cell.qml 3 In order to change the color of the text when clicking on a cell, we create a \l MouseArea element with the same size as its parent. @@ -175,11 +175,11 @@ When this signal is triggered we want to emit our own \e clicked signal with the In our main QML file, we use our \c Cell component to create the color picker: -\snippet tutorials/helloworld/tutorial2.qml 0 +\snippet quick/tutorials/helloworld/tutorial2.qml 0 We create the color picker by putting 6 cells with different colors in a grid. -\snippet tutorials/helloworld/tutorial2.qml 1 +\snippet quick/tutorials/helloworld/tutorial2.qml 1 When the \e clicked signal of our cell is triggered, we want to set the color of the text to the \e cellColor passed as a parameter. We can react to any signal of our component through a property of the name \e 'onSignalName' (see \l{Signal Attributes}). @@ -190,7 +190,7 @@ We can react to any signal of our component through a property of the name \e 'o \inqmlmodule QtQuick 2 \title QML Tutorial 3 - States and Transitions \contentspage QML Tutorial -\previouspage QML Tutorial 2 - QML Component +\previouspage QML Tutorial 2 - QML Components In this chapter, we make this example a little bit more dynamic by introducing states and transitions. @@ -200,11 +200,11 @@ We want our text to move to the bottom of the screen, rotate and become red when Here is the QML code: -\snippet tutorials/helloworld/tutorial3.qml 0 +\snippet quick/tutorials/helloworld/tutorial3.qml 0 \section1 Walkthrough -\snippet tutorials/helloworld/tutorial3.qml 2 +\snippet quick/tutorials/helloworld/tutorial3.qml 2 First, we create a new \e down state for our text element. This state will be activated when the \l MouseArea is pressed, and deactivated when it is released. @@ -213,7 +213,7 @@ The \e down state includes a set of property changes from our implicit \e {defau (the items as they were initially defined in the QML). Specifically, we set the \c y property of the text to \c 160, the rotation to \c 180 and the \c color to red. -\snippet tutorials/helloworld/tutorial3.qml 3 +\snippet quick/tutorials/helloworld/tutorial3.qml 3 Because we don't want the text to appear at the bottom instantly but rather move smoothly, we add a transition between our two states. diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp index 4d081c9..c475469 100644 --- a/src/quick/items/qquicklistview.cpp +++ b/src/quick/items/qquicklistview.cpp @@ -2183,7 +2183,7 @@ void QQuickListView::setOrientation(QQuickListView::Orientation orientation) each section. - \snippet examples/quick/modelviews/listview/sections.qml 0 + \snippet quick/views/listview/sections.qml 0 \image qml-listview-sections-example.png @@ -2194,7 +2194,7 @@ void QQuickListView::setOrientation(QQuickListView::Orientation orientation) differing sections will result in a section header being created even if that section exists elsewhere. - \sa {quick/modelviews/listview}{ListView examples} + \sa {quick/views/listview}{ListView examples} */ QQuickViewSection *QQuickListView::sectionCriteria() { diff --git a/src/quick/util/qquickimageprovider.cpp b/src/quick/util/qquickimageprovider.cpp index 3c5610f..55625a9 100644 --- a/src/quick/util/qquickimageprovider.cpp +++ b/src/quick/util/qquickimageprovider.cpp @@ -169,7 +169,7 @@ QImage QQuickTextureFactory::image() const an image provider named "colors", and the images to be loaded are "yellow" and "red", respectively: - \snippet examples/qml/imageprovider/imageprovider-example.qml 0 + \snippet qml/imageprovider/imageprovider-example.qml 0 When these images are loaded by QML, it looks for a matching image provider and calls its requestImage() or requestPixmap() method (depending on its @@ -180,9 +180,9 @@ QImage QQuickTextureFactory::image() const requested by the above QML. This implementation dynamically generates QPixmap images that are filled with the requested color: - \snippet examples/qml/imageprovider/imageprovider.cpp 0 + \snippet qml/imageprovider/imageprovider.cpp 0 \codeline - \snippet examples/qml/imageprovider/imageprovider.cpp 1 + \snippet qml/imageprovider/imageprovider.cpp 1 To make this provider accessible to QML, it is registered with the QML engine with a "colors" identifier: diff --git a/src/quick/util/qquickpackage.cpp b/src/quick/util/qquickpackage.cpp index a54d3b0..f41bca5 100644 --- a/src/quick/util/qquickpackage.cpp +++ b/src/quick/util/qquickpackage.cpp @@ -65,15 +65,15 @@ QT_BEGIN_NAMESPACE delegate it should appear in. This allows an item to move between views. - \snippet examples/quick/modelviews/package/Delegate.qml 0 + \snippet quick/views/package/Delegate.qml 0 These named items are used as the delegates by the two views who reference the special \l{VisualDataModel::parts} property to select a model which provides the chosen delegate. - \snippet examples/quick/modelviews/package/view.qml 0 + \snippet quick/views/package/view.qml 0 - \sa {quick/modelviews/package}{Package example}, {declarative/photoviewer}{Photo Viewer example}, QtQml + \sa {quick/views/package}{Package example}, {quick/demos/photoviewer}{Photo Viewer example}, QtQml */ /*! diff --git a/src/quick/util/qquicktransition.cpp b/src/quick/util/qquicktransition.cpp index 4aeb15b..166ba17 100644 --- a/src/quick/util/qquicktransition.cpp +++ b/src/quick/util/qquicktransition.cpp @@ -435,7 +435,7 @@ bool QQuickTransition::running() const This property holds a list of the animations to be run for this transition. - \snippet examples/qml/dynamicscene/dynamicscene.qml top-level transitions + \snippet qml/dynamicscene/dynamicscene.qml top-level transitions The top-level animations are run in parallel. To run them sequentially, define them within a SequentialAnimation: -- 2.7.4