Commit c291efff authored by Casper van Donderen's avatar Casper van Donderen Committed by Qt by Nokia

Remove the usage of deprecated qdoc macros.

QDoc now has support for Doxygen style commands for italics, bold
and list items. This change applies that change in QDoc to the
actual documentation.

Task-number: QTBUG-24578
Change-Id: I62d203f21df63a95ee236e578b10418fd9680707
Reviewed-by: default avatarJerome Pasion <jerome.pasion@nokia.com>
parent ada9dd41
......@@ -36,7 +36,7 @@ This tutorial walks step-by-step through the creation of a full application usin
It assumes that you already know the basics of QML (for example, from reading the
\l{QML Tutorial}{simple tutorial}).
In this tutorial we write a game, \i {Same Game}, based on the Same Game application
In this tutorial we write a game, \e {Same Game}, based on the Same Game application
included in the declarative \c examples directory, which looks like this:
\image declarative-samegame.png
......@@ -53,10 +53,10 @@ control QML elements.
Tutorial chapters:
\list 1
\o \l {declarative/tutorials/samegame/samegame1}{Creating the Game Canvas and Blocks}
\o \l {declarative/tutorials/samegame/samegame2}{Populating the Game Canvas}
\o \l {declarative/tutorials/samegame/samegame3}{Implementing the Game Logic}
\o \l {declarative/tutorials/samegame/samegame4}{Finishing Touches}
\li \l {declarative/tutorials/samegame/samegame1}{Creating the Game Canvas and Blocks}
\li \l {declarative/tutorials/samegame/samegame2}{Populating the Game Canvas}
\li \l {declarative/tutorials/samegame/samegame3}{Implementing the Game Logic}
\li \l {declarative/tutorials/samegame/samegame4}{Finishing Touches}
\endlist
All the code in this tutorial can be found in Qt's \c examples/declarative/tutorials/samegame
......@@ -168,18 +168,18 @@ and moves the new block to its position on the game canvas. This involves severa
\list
\o \l {QML:Qt::createComponent()}{Qt.createComponent()} is called to
\li \l {QML:Qt::createComponent()}{Qt.createComponent()} is called to
generate an element from \c Block.qml. If the component is ready,
we can call \c createObject() to create an instance of the \c Block
item.
\o If \c createObject() returned null (i.e. if there was an error
\li If \c createObject() returned null (i.e. if there was an error
while loading the object), print the error information.
\o Place the block in its position on the board and set its width and
\li Place the block in its position on the board and set its width and
height. Also, store it in the blocks array for future reference.
\o Finally, print error information to the console if the component
\li Finally, print error information to the console if the component
could not be loaded for some reason (for example, if the file is
missing).
......@@ -228,11 +228,11 @@ until it is won or lost.
To do this, we have added the following functions to \c samegame.js:
\list
\o \c{handleClick(x,y)}
\o \c{floodFill(xIdx,yIdx,type)}
\o \c{shuffleDown()}
\o \c{victoryCheck()}
\o \c{floodMoveCheck(xIdx, yIdx, type)}
\li \c{handleClick(x,y)}
\li \c{floodFill(xIdx,yIdx,type)}
\li \c{shuffleDown()}
\li \c{victoryCheck()}
\li \c{floodMoveCheck(xIdx, yIdx, type)}
\endlist
As this is a tutorial about QML, not game design, we will only discuss \c handleClick() and \c victoryCheck() below since they interface directly with the QML elements. Note that although the game logic here is written in JavaScript, it could have been written in C++ and then exposed to QML.
......@@ -459,10 +459,10 @@ makes it very easy to fetch and display XML based data such as RSS in a QML appl
By following this tutorial you've seen how you can write a fully functional application in QML:
\list
\o Build your application with \l {{QML Elements}}{QML elements}
\o Add application logic \l{JavaScript Expressions in QML}{with JavaScript code}
\o Add animations with \l {Behavior}{Behaviors} and \l{QML States}{states}
\o Store persistent application data using, for example, the \l{Offline Storage API} or \l XMLHttpRequest
\li Build your application with \l {{QML Elements}}{QML elements}
\li Add application logic \l{JavaScript Expressions in QML}{with JavaScript code}
\li Add animations with \l {Behavior}{Behaviors} and \l{QML States}{states}
\li Store persistent application data using, for example, the \l{Offline Storage API} or \l XMLHttpRequest
\endlist
There is so much more to learn about QML that we haven't been able to cover in this tutorial. Check out all the
......
......@@ -39,10 +39,10 @@ data to dynamically sort all items in a view.
Tutorial chapters:
\list 1
\o \l {declarative/tutorials/dynamicview/dynamicview1}{A Simple ListView and Delegate}
\o \l {declarative/tutorials/dynamicview/dynamicview2}{Dragging View Items}
\o \l {declarative/tutorials/dynamicview/dynamicview3}{Moving Dragged Items}
\o \l {declarative/tutorials/dynamicview/dynamicview4}{Sorting Items}
\li \l {declarative/tutorials/dynamicview/dynamicview1}{A Simple ListView and Delegate}
\li \l {declarative/tutorials/dynamicview/dynamicview2}{Dragging View Items}
\li \l {declarative/tutorials/dynamicview/dynamicview3}{Moving Dragged Items}
\li \l {declarative/tutorials/dynamicview/dynamicview4}{Sorting Items}
\endlist
All the code in this tutorial can be found in Qt's \c examples/declarative/tutorials/dynamicview
......
......@@ -37,12 +37,12 @@ The code for this example can be found in the \c examples/declarative/ui-compone
The elements that compose the switch are:
\list
\o a \c on property (the interface to interact with the switch),
\o two images (the background image and the knob),
\o two mouse regions for user interation (on the background image and on the knob),
\o two states (a \i on state and a \i off state),
\o two functions or slots to react to the user interation (\c toggle() and \c dorelease()),
\o and a transition that describe how to go from one state to the other.
\li a \c on property (the interface to interact with the switch),
\li two images (the background image and the knob),
\li two mouse regions for user interation (on the background image and on the knob),
\li two states (an \e on state and an \e off state),
\li two functions or slots to react to the user interation (\c toggle() and \c dorelease()),
\li and a transition that describe how to go from one state to the other.
\endlist
\section1 Switch.qml
......@@ -93,8 +93,8 @@ in the \c dorelease() function that is called in the \c onReleased property.
We define the two states of the switch:
\list
\o In the \i on state the knob is on the right (\c x position is 78) and the \c on property is \c true.
\o In the \i off state the knob is on the left (\c x position is 1) and the \c on property is \c false.
\li In the \e on state the knob is on the right (\c x position is 78) and the \c on property is \c true.
\li In the \e off state the knob is on the left (\c x position is 1) and the \c on property is \c false.
\endlist
For more information on states see \l{qmlstates}{QML States}.
......@@ -106,13 +106,13 @@ We add two JavaScript functions to our switch:
\snippet examples/declarative/ui-components/slideswitch/content/Switch.qml 2
This first function is called when the background image or the knob are clicked. We simply want the switch to toggle between the two
states (\i on and \i off).
states (\e on and \e off).
\snippet examples/declarative/ui-components/slideswitch/content/Switch.qml 3
This second function is called when the knob is released and we want to make sure that the knob does not end up between states
(neither \i on nor \i off). If it is the case call the \c toggle() function otherwise we do nothing.
(neither \e on nor \e off). If it is the case call the \c toggle() function otherwise we do nothing.
For more information on scripts see \l{JavaScript Expressions in QML}.
......
This diff is collapsed.
......@@ -46,9 +46,9 @@ The tutorial's source code is located in the $QTDIR/examples/declarative/tutoria
Tutorial chapters:
\list 1
\o \l {QML Tutorial 1 - Basic Types}{Basic Types}
\o \l {QML Tutorial 2 - QML Components}{QML Components}
\o \l {QML Tutorial 3 - States and Transitions}{States and Transitions}
\li \l {QML Tutorial 1 - Basic Types}{Basic Types}
\li \l {QML Tutorial 2 - QML Components}{QML Components}
\li \l {QML Tutorial 3 - States and Transitions}{States and Transitions}
\endlist
*/
......@@ -97,7 +97,7 @@ We add a \l Text element as a child of the root Rectangle element that displays
The \c y property is used to position the text vertically at 30 pixels from the top of its parent.
The \c anchors.horizontalCenter property refers to the horizontal center of an element.
In this case, we specify that our text element should be horizontally centered in the \i page element (see \l{anchor-layout}{Anchor-Based Layout}).
In this case, we specify that our text element should be horizontally centered in the \e page element (see \l{anchor-layout}{Anchor-Based Layout}).
The \c font.pointSize and \c font.bold properties are related to fonts and use the \l{dot properties}{dot notation}.
......@@ -141,24 +141,24 @@ Here is the QML code for \c Cell.qml:
\snippet examples/declarative/tutorials/helloworld/Cell.qml 1
The root element of our component is an \l Item with the \c id \i container.
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 examples/declarative/tutorials/helloworld/Cell.qml 4
We declare a \c cellColor property. This property is accessible from \i outside our component, this allows us
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 examples/declarative/tutorials/helloworld/Cell.qml 5
We want our component to also have a signal that we call \i clicked with a \i cellColor parameter of type \i color.
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 examples/declarative/tutorials/helloworld/Cell.qml 2
Our cell component is basically a colored rectangle with the \c id \i rectangle.
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}).
......@@ -168,8 +168,8 @@ In this case the rectangle will have the same size as its parent (see \l{anchor-
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.
A \l MouseArea defines a signal called \i clicked.
When this signal is triggered we want to emit our own \i clicked signal with the color as parameter.
A \l MouseArea defines a signal called \e clicked.
When this signal is triggered we want to emit our own \e clicked signal with the color as parameter.
\section2 The main QML file
......@@ -181,8 +181,8 @@ We create the color picker by putting 6 cells with different colors in a grid.
\snippet examples/declarative/tutorials/helloworld/tutorial2.qml 1
When the \i clicked signal of our cell is triggered, we want to set the color of the text to the \i cellColor passed as a parameter.
We can react to any signal of our component through a property of the name \i 'onSignalName' (see \l{Signal Handlers}).
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 Handlers}).
*/
/*!
......@@ -206,10 +206,10 @@ Here is the QML code:
\snippet examples/declarative/tutorials/helloworld/tutorial3.qml 2
First, we create a new \i down state for our text element.
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.
The \i down state includes a set of property changes from our implicit \i {default state}
The \e down state includes a set of property changes from our implicit \e {default state}
(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.
......@@ -219,9 +219,9 @@ Because we don't want the text to appear at the bottom instantly but rather move
we add a transition between our two states.
\c from and \c to define the states between which the transition will run.
In this case, we want a transition from the default state to our \i down state.
In this case, we want a transition from the default state to our \li down state.
Because we want the same transition to be run in reverse when changing back from the \i down state to the default state,
Because we want the same transition to be run in reverse when changing back from the \e down state to the default state,
we set \c reversible to \c true.
This is equivalent to writing the two transitions separately.
......
......@@ -74,9 +74,9 @@ using the Local Storage API.
\section3 db = openDatabaseSync(identifier, version, description, estimated_size, callback(db))
Returns the database identified by \i identifier. If the database does not already exist, it
is created, and the function \i callback is called with the database as a parameter. \i description
and \i estimated_size are written to the INI file (described below), but are otherwise currently
Returns the database identified by \e identifier. If the database does not already exist, it
is created, and the function \e callback is called with the database as a parameter. \e description
and \e estimated_size are written to the INI file (described below), but are otherwise currently
unused.
May throw exception with code property SQLException.DATABASE_ERR, or SQLException.VERSION_ERR.
......@@ -84,51 +84,51 @@ May throw exception with code property SQLException.DATABASE_ERR, or SQLExceptio
When a database is first created, an INI file is also created specifying its characteristics:
\table
\header \o \bold {Key} \o \bold {Value}
\row \o Name \o The name of the database passed to \c openDatabase()
\row \o Version \o The version of the database passed to \c openDatabase()
\row \o Description \o The description of the database passed to \c openDatabase()
\row \o EstimatedSize \o The estimated size (in bytes) of the database passed to \c openDatabase()
\row \o Driver \o Currently "QSQLITE"
\header \li \b {Key} \li \b {Value}
\row \li Name \li The name of the database passed to \c openDatabase()
\row \li Version \li The version of the database passed to \c openDatabase()
\row \li Description \li The description of the database passed to \c openDatabase()
\row \li EstimatedSize \li The estimated size (in bytes) of the database passed to \c openDatabase()
\row \li Driver \li Currently "QSQLITE"
\endtable
This data can be used by application tools.
\section3 db.changeVersion(from, to, callback(tx))
This method allows you to perform a \i{Scheme Upgrade}.
This method allows you to perform a \e{Scheme Upgrade}.
If the current version of \i db is not \i from, then an exception is thrown.
If the current version of \e db is not \e from, then an exception is thrown.
Otherwise, a database transaction is created and passed to \i callback. In this function,
you can call \i executeSql on \i tx to upgrade the database.
Otherwise, a database transaction is created and passed to \e callback. In this function,
you can call \e executeSql on \e tx to upgrade the database.
May throw exception with code property SQLException.DATABASE_ERR or SQLException.UNKNOWN_ERR.
\section3 db.transaction(callback(tx))
This method creates a read/write transaction and passed to \i callback. In this function,
you can call \i executeSql on \i tx to read and modify the database.
This method creates a read/write transaction and passed to \e callback. In this function,
you can call \e executeSql on \e tx to read and modify the database.
If the callback throws exceptions, the transaction is rolled back.
\section3 db.readTransaction(callback(tx))
This method creates a read-only transaction and passed to \i callback. In this function,
you can call \i executeSql on \i tx to read the database (with SELECT statements).
This method creates a read-only transaction and passed to \e callback. In this function,
you can call \e executeSql on \e tx to read the database (with SELECT statements).
\section3 results = tx.executeSql(statement, values)
This method executes a SQL \i statement, binding the list of \i values to SQL positional parameters ("?").
This method executes a SQL \e statement, binding the list of \e values to SQL positional parameters ("?").
It returns a results object, with the following properties:
\table
\header \o \bold {Type} \o \bold {Property} \o \bold {Value} \o \bold {Applicability}
\row \o int \o rows.length \o The number of rows in the result \o SELECT
\row \o var \o rows.item(i) \o Function that returns row \i i of the result \o SELECT
\row \o int \o rowsAffected \o The number of rows affected by a modification \o UPDATE, DELETE
\row \o string \o insertId \o The id of the row inserted \o INSERT
\header \li \b {Type} \li \b {Property} \li \b {Value} \li \b {Applicability}
\row \li int \li rows.length \li The number of rows in the result \li SELECT
\row \li var \li rows.item(i) \li Function that returns row \e i of the result \li SELECT
\row \li int \li rowsAffected \li The number of rows affected by a modification \li UPDATE, DELETE
\row \li string \li insertId \li The id of the row inserted \li INSERT
\endtable
May throw exception with code property SQLException.DATABASE_ERR, SQLException.SYNTAX_ERR, or SQLException.UNKNOWN_ERR.
......
......@@ -88,7 +88,7 @@
Item { width: 100.45; height: 150.82 }
\endqml
\bold{Note:} In QML all reals are stored in double precision, \l
\b{Note:} In QML all reals are stored in double precision, \l
{http://en.wikipedia.org/wiki/IEEE_754} {IEEE floating point}
format.
......@@ -331,12 +331,12 @@
A font type has the properties of a QFont. The properties are:
\list
\o \c string font.family
\o \c bool font.bold
\o \c bool font.italic
\o \c bool font.underline
\o \c real font.pointSize
\o \c int font.pixelSize
\li \c string font.family
\li \c bool font.bold
\li \c bool font.italic
\li \c bool font.underline
\li \c real font.pointSize
\li \c int font.pixelSize
\endlist
Example:
......@@ -357,9 +357,9 @@
are:
\list
\o \c slot action.trigger - invoke the action
\o \c bool action.enabled - true if the action is enabled
\o \c string action.text - the text associated with the action
\li \c slot action.trigger - invoke the action
\li \c bool action.enabled - true if the action is enabled
\li \c string action.text - the text associated with the action
\endlist
Actions are used like this:
......@@ -462,7 +462,7 @@
array containing a single function element instead.
It is important to note that changes in regular properties of JavaScript
objects assigned to a var property will \bold{not} trigger updates of bindings
objects assigned to a var property will \b{not} trigger updates of bindings
that access them. The example below will display "The car has 4 wheels" as
the change to the wheels property will not cause the reevaluation of the
binding assigned to the "text" property:
......@@ -536,8 +536,8 @@
Finally, the \c variant type can also hold:
\list
\o An array of \l {QML Basic Types}{basic type} values
\o A map of key-value pairs with \l {QML Basic Types}{basic-type} values
\li An array of \l {QML Basic Types}{basic type} values
\li A map of key-value pairs with \l {QML Basic Types}{basic-type} values
\endlist
For example, below is an \c items array and an \c attributes map. Their
......@@ -561,12 +561,12 @@
\endqml
While this is a convenient way to store array and map-type values, you
must be aware that the \c items and \c attributes properties above are \i not
must be aware that the \c items and \c attributes properties above are \e not
QML objects (and certainly not JavaScript object either) and the key-value
pairs in \c attributes are \i not QML properties. Rather, the \c items
pairs in \c attributes are \e not QML properties. Rather, the \c items
property holds an array of values, and \c attributes holds a set of key-value
pairs. Since they are stored as a set of values, instead of as an object,
their contents \i cannot be modified individually:
their contents \e cannot be modified individually:
\qml
Item {
......@@ -592,7 +592,7 @@
One way to "update" the contents of an array or map is to copy the property
to a JavaScript object, modify the copy as desired, and then reassign the
property to the updated copy. Note, however, that this is not efficient.
In the example below, which reassigns the \c attributes property, the \i entire
In the example below, which reassigns the \c attributes property, the \e entire
set of key-value pairs must be serialized and deserialized every time it is
copied between a JavaScript object and a QML property:
......@@ -615,7 +615,7 @@
within a JavaScript file.
JavaScript programmers should also note that when a JavaScript object is
copied to an array or map property, the \i contents of the object (that is,
copied to an array or map property, the \e contents of the object (that is,
its key-value properties) are copied, rather than the object itself. The
property does not hold a reference to the original JavaScript object, and
extra data such as the object's JavaScript prototype chain is also lost in
......
......@@ -41,7 +41,7 @@ models.
\section1 QStringList-based Model
A model may be a simple \l QStringList, which provides the contents of the list
via the \i modelData role.
via the \e modelData role.
Here is a ListView with a delegate that references its model item's
value using the \c modelData role:
......@@ -55,7 +55,7 @@ models.
The complete example is available in Qt's \l {declarative/modelviews/stringlistmodel}{examples/declarative/modelviews/stringlistmodel} directory.
\bold{Note:} There is no way for the view to know that the contents of a QStringList
\b{Note:} There is no way for the view to know that the contents of a QStringList
have changed. If the QStringList changes, it will be necessary to reset
the model by calling QQmlContext::setContextProperty() again.
......@@ -107,18 +107,18 @@ models.
\table
\header
\o Qt Role
\o QML Role Name
\li Qt Role
\li QML Role Name
\row
\o Qt::DisplayRole
\o display
\li Qt::DisplayRole
\li display
\row
\o Qt::DecorationRole
\o decoration
\li Qt::DecorationRole
\li decoration
\endtable
Here is an application with a QAbstractListModel subclass named \c AnimalModel
that has \i type and \i size roles. It calls QAbstractItemModel::setRoleNames() to set the
that has \e type and \e size roles. It calls QAbstractItemModel::setRoleNames() to set the
role names for accessing the properties via QML:
\snippet examples/declarative/modelviews/abstractitemmodel/model.h 0
......@@ -132,7 +132,7 @@ models.
\snippet examples/declarative/modelviews/abstractitemmodel/main.cpp 0
\dots
This model is displayed by a ListView delegate that accesses the \i type and \i size
This model is displayed by a ListView delegate that accesses the \e type and \e size
roles:
\snippet examples/declarative/modelviews/abstractitemmodel/view.qml 0
......@@ -152,10 +152,10 @@ models.
with models of type QAbstractItemModel:
\list
\o \i hasModelChildren role property to determine whether a node has child nodes.
\o \l VisualDataModel::rootIndex allows the root node to be specified
\o \l VisualDataModel::modelIndex() returns a QModelIndex which can be assigned to VisualDataModel::rootIndex
\o \l VisualDataModel::parentModelIndex() returns a QModelIndex which can be assigned to VisualDataModel::rootIndex
\li \e hasModelChildren role property to determine whether a node has child nodes.
\li \l VisualDataModel::rootIndex allows the root node to be specified
\li \l VisualDataModel::modelIndex() returns a QModelIndex which can be assigned to VisualDataModel::rootIndex
\li \l VisualDataModel::parentModelIndex() returns a QModelIndex which can be assigned to VisualDataModel::rootIndex
\endlist
\section1 Exposing C++ Data Models to QML
......@@ -169,7 +169,7 @@ created directly as elements within QML:
\table
\row
\o
\li
\code
class MyModelPlugin : public QQmlExtensionPlugin
{
......@@ -184,7 +184,7 @@ public:
Q_EXPORT_PLUGIN2(mymodelplugin, MyModelPlugin);
\endcode
\o
\li
\qml
MyModel {
id: myModel
......
......@@ -37,20 +37,20 @@ This document contains the QML coding conventions that we follow in our document
Through our documentation and examples, QML objects are always structured in the following order:
\list
\o id
\o property declarations
\o signal declarations
\o JavaScript functions
\o object properties
\o child objects
\o states
\o transitions
\li id
\li property declarations
\li signal declarations
\li JavaScript functions
\li object properties
\li child objects
\li states
\li transitions
\endlist
For better readability, we separate these different parts with an empty line.
For example, a hypothetical \i photo QML object would look like this:
For example, a hypothetical \e photo QML object would look like this:
\snippet doc/src/snippets/qml/codingconventions/photo.qml 0
......@@ -58,7 +58,7 @@ For example, a hypothetical \i photo QML object would look like this:
\section1 Grouped Properties
If using multiple properties from a group of properties,
we use the \i {group notation} rather than the \i {dot notation} to improve readability.
we use the \e {group notation} rather than the \e {dot notation} to improve readability.
For example, this:
......@@ -74,7 +74,7 @@ can be written like this:
QML and JavaScript do not enforce private properties like C++. There is a need
to hide these private properties, for example, when the properties are part of
the implementation. As a convention, private properties begin with two
\i underscore characters. For example, \c __area, is a property that is
\e underscore characters. For example, \c __area, is a property that is
accessible but is not meant for public use. Note that QML and JavaScript will
grant the user access to these properties.
......
......@@ -68,10 +68,10 @@ a \l Component object from this URL.
Once you have a \l Component, you can call its \l {Component::createObject()}{createObject()} method to create an instance of
the component. This function can take one or two arguments:
\list
\o The first is the parent for the new item. Since graphical items will not appear on the scene without a parent, it is
\li The first is the parent for the new item. Since graphical items will not appear on the scene without a parent, it is
recommended that you set the parent this way. However, if you wish to set the parent later you can safely pass \c null to
this function.
\o The second is optional and is a map of property-value items that define initial any property values for the item.
\li The second is optional and is a map of property-value items that define initial any property values for the item.
Property values specified by this argument are applied to the object before its creation is finalized, avoiding
binding errors that may occur if particular properties must be initialized to enable other property bindings.
when certain properties have been bound to before they have been set by the code. Additionally, there are small
......@@ -144,11 +144,11 @@ the bindings in the dynamic item will no longer work.
The actual creation context depends on how an item is created:
\list
\o If \l {QML:Qt::createComponent()}{Qt.createComponent()} is used, the creation context
\li If \l {QML:Qt::createComponent()}{Qt.createComponent()} is used, the creation context
is the QQmlContext in which this method is called
\o If \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()}
\li If \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()}
if called, the creation context is the context of the parent item passed to this method
\o If a \c {Component{}} item is defined and \l {Component::createObject()}{createObject()}
\li If a \c {Component{}} item is defined and \l {Component::createObject()}{createObject()}
is called on that item, the creation context is the context in which the \c Component is defined
\endlist
......@@ -177,12 +177,12 @@ component. Each instance runs a NumberAnimation, and when the animation has fini
\table
\row
\o \c application.qml
\o \c SelfDestroyingRect.qml
\li \c application.qml
\li \c SelfDestroyingRect.qml
\row
\o \snippet doc/src/snippets/qml/dynamicObjects-destroy.qml 0
\o \snippet doc/src/snippets/qml/SelfDestroyingRect.qml 0
\li \snippet doc/src/snippets/qml/dynamicObjects-destroy.qml 0
\li \snippet doc/src/snippets/qml/SelfDestroyingRect.qml 0
\endtable
......
......@@ -44,13 +44,13 @@ examples/declarative/tutorials/extending directory.
Tutorial chapters:
\list 1
\o \l{declarative/tutorials/extending/chapter1-basics}{Creating a New Type}
\o \l{declarative/tutorials/extending/chapter2-methods}{Connecting to C++ Methods and Signals}
\o \l{declarative/tutorials/extending/chapter3-bindings}{Property Binding}
\o \l{declarative/tutorials/extending/chapter4-customPropertyTypes}{Using Custom Property Types}
\o \l{declarative/tutorials/extending/chapter5-listproperties}{Using List Property Types}
\o \l{declarative/tutorials/extending/chapter6-plugins}{Writing an Extension Plugin}
\o \l{qml-extending-tutorial7.html}{In Summary}
\li \l{declarative/tutorials/extending/chapter1-basics}{Creating a New Type}
\li \l{declarative/tutorials/extending/chapter2-methods}{Connecting to C++ Methods and Signals}
\li \l{declarative/tutorials/extending/chapter3-bindings}{Property Binding}
\li \l{declarative/tutorials/extending/chapter4-customPropertyTypes}{Using Custom Property Types}
\li \l{declarative/tutorials/extending/chapter5-listproperties}{Using List Property Types}
\li \l{declarative/tutorials/extending/chapter6-plugins}{Writing an Extension Plugin}
\li \l{qml-extending-tutorial7.html}{In Summary}
\endlist
*/
......@@ -92,8 +92,8 @@ properties. Since QML makes extensive use of Qt's \l{Meta-Object System}{meta ob
this new class must:
\list
\o Inherit from QObject
\o Declare its properties using the Q_PROPERTY macro
\li Inherit from QObject
\li Declare its properties using the Q_PROPERTY macro
\endlist
Here is our \c PieChart class, defined in \c piechart.h:
......@@ -290,11 +290,11 @@ We can also use various other property types. QML has built-in support for the t
listed in the \l{QML Basic Types} documentation, which includes the following:
\list
\o bool, unsigned int, int, float, double, qreal
\o QString, QUrl, QColor
\o QDate, QTime, QDateTime
\o QPoint, QPointF, QSize, QSizeF, QRect, QRectF
\o QVariant
\li bool, unsigned int, int, float, double, qreal
\li QString, QUrl, QColor
\li QDate, QTime, QDateTime
\li QPoint, QPointF, QSize, QSizeF, QRect, QRectF
\li QVariant
\endlist
If we want to create a property whose type is not supported by QML by default,
......@@ -409,9 +409,9 @@ loading our own C++ application.
To create a plugin library, we need:
\list
\o A plugin class that registers our QML types
\o A project file that describes the plugin
\o A \l{Writing a qmldir file}{qmldir} file that tells the QML engine to load the plugin
\li A plugin class that registers our QML types
\li A project file that describes the plugin
\li A \l{Writing a qmldir file}{qmldir} file that tells the QML engine to load the plugin
\endlist
First, we create a plugin class named \c ChartsPlugin. It subclasses QQmlExtensionPlugin
......@@ -460,12 +460,12 @@ be used by \c app.qml without import statements.
In this tutorial, we've shown the basic steps for creating a QML extension:
\list
\o Define new QML types by subclassing QObject and registering them with qmlRegisterType()
\o Add callable methods using Q_INVOKABLE or Qt slots, and connect to Qt signals with an \c onSignal syntax
\o Add property bindings by defining \l{Qt's Property System}{NOTIFY} signals
\o Define custom property types if the built-in types are not sufficient
\o Define list property types using QQmlListProperty
\o Create a plugin library by defining a Qt plugin and writing a \c qmldir file
\li Define new QML types by subclassing QObject and registering them with qmlRegisterType()
\li Add callable methods using Q_INVOKABLE or Qt slots, and connect to Qt signals with an \c onSignal syntax
\li Add property bindings by defining \l{Qt's Property System}{NOTIFY} signals
\li Define custom property types if the built-in types are not sufficient
\li Define list property types using QQmlListProperty
\li Create a plugin library by defining a Qt plugin and writing a \c qmldir file
\endlist
......
......@@ -90,9 +90,9 @@ The following QGraphicsView options are recommended for optimal performance
of QML UIs:
\list
\o QGraphicsView::setOptimizationFlags(QGraphicsView::DontSavePainterState)
\o QGraphicsView::setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate)
\o QGraphicsScene::setItemIndexMethod(QGraphicsScene::NoIndex)
\li QGraphicsView::setOptimizationFlags(QGraphicsView::DontSavePainterState)
\li QGraphicsView::setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate)
\li QGraphicsScene::setItemIndexMethod(QGraphicsScene::NoIndex)
\endlist
\section2 Loading QGraphicsWidget Objects in QML
......
......@@ -200,8 +200,8 @@ in \c script.js:
\table
\row
\o \snippet doc/src/snippets/qml/integrating-javascript/connectjs.qml 0
\o \snippet doc/src/snippets/qml/integrating-javascript/script.js 0
\li \snippet doc/src/snippets/qml/integrating-javascript/connectjs.qml 0
\li \snippet doc/src/snippets/qml/integrating-javascript/script.js 0
\endtable
The \c jsFunction() will now be called whenever MouseArea's \c clicked signal is emitted.
......@@ -243,10 +243,10 @@ which in turn can call \c factorial() in \c factorial.js, as it has included
\table
\row
\o {1,2} \snippet doc/src/snippets/qml/integrating-javascript/includejs/app.qml 0
\o \snippet doc/src/snippets/qml/integrating-javascript/includejs/script.js 0
\li {1,2} \snippet doc/src/snippets/qml/integrating-javascript/includejs/app.qml 0
\li \snippet doc/src/snippets/qml/integrating-javascript/includejs/script.js 0
\row
\o \snippet doc/src/snippets/qml/integrating-javascript/includejs/factorial.js 0
\li \snippet doc/src/snippets/qml/integrating-javascript/includejs/factorial.js 0
\endtable
Notice that calling \l {QML:Qt::include()}{Qt.include()} imports all functions from
......@@ -280,9 +280,9 @@ via a module API; see qmlRegisterModuleApi() for more information.
Due to the ability of a JavaScript file to import another script or QML module in
this fashion in QtQuick 2.0, some extra semantics are defined:
\list