summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-03-01 14:06:02 (GMT)
committeraxis <qt-info@nokia.com>2010-03-01 14:06:02 (GMT)
commit88a36e9e7e0e0bc09788c41ab6b968031dbc9154 (patch)
tree947663f695f54a0deb2724116f82d89fde761576 /doc/src
parent4be1e01c6faebe11bfe205c1b910049747b5c335 (diff)
parentca82ee4ee55e52c75326949148455af1095df014 (diff)
downloadQt-88a36e9e7e0e0bc09788c41ab6b968031dbc9154.zip
Qt-88a36e9e7e0e0bc09788c41ab6b968031dbc9154.tar.gz
Qt-88a36e9e7e0e0bc09788c41ab6b968031dbc9154.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-s60-public
Conflicts: configure mkspecs/common/symbian/symbian.conf qmake/generators/symbian/initprojectdeploy_symbian.cpp qmake/generators/symbian/symmake_abld.cpp qmake/generators/symbian/symmake_sbsv2.cpp src/plugins/plugins.pro
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/declarative/advtutorial.qdoc318
-rw-r--r--doc/src/declarative/advtutorial1.qdoc83
-rw-r--r--doc/src/declarative/advtutorial2.qdoc107
-rw-r--r--doc/src/declarative/advtutorial3.qdoc116
-rw-r--r--doc/src/declarative/advtutorial4.qdoc159
-rw-r--r--doc/src/declarative/animation.qdoc14
-rw-r--r--doc/src/declarative/basictypes.qdoc2
-rw-r--r--doc/src/declarative/declarativeui.qdoc12
-rw-r--r--doc/src/declarative/dynamicobjects.qdoc4
-rw-r--r--doc/src/declarative/elements.qdoc6
-rw-r--r--doc/src/declarative/example-slideswitch.qdoc4
-rw-r--r--doc/src/declarative/examples.qdoc6
-rw-r--r--doc/src/declarative/extending-examples.qdoc12
-rw-r--r--doc/src/declarative/extending.qdoc99
-rw-r--r--doc/src/declarative/focus.qdoc4
-rw-r--r--doc/src/declarative/globalobject.qdoc6
-rw-r--r--doc/src/declarative/integrating.qdoc12
-rw-r--r--doc/src/declarative/javascriptblocks.qdoc4
-rw-r--r--doc/src/declarative/measuring-performance.qdoc6
-rw-r--r--doc/src/declarative/modules.qdoc6
-rw-r--r--doc/src/declarative/network.qdoc8
-rw-r--r--doc/src/declarative/qdeclarativedebugging.qdoc (renamed from doc/src/declarative/qmldebugging.qdoc)2
-rw-r--r--doc/src/declarative/qdeclarativedocument.qdoc (renamed from doc/src/declarative/qmldocument.qdoc)6
-rw-r--r--doc/src/declarative/qdeclarativei18n.qdoc (renamed from doc/src/declarative/qmli18n.qdoc)2
-rw-r--r--doc/src/declarative/qdeclarativeintro.qdoc (renamed from doc/src/declarative/qmlintro.qdoc)2
-rw-r--r--doc/src/declarative/qdeclarativemodels.qdoc (renamed from doc/src/declarative/qmlmodels.qdoc)12
-rw-r--r--doc/src/declarative/qdeclarativereference.qdoc (renamed from doc/src/declarative/qmlreference.qdoc)10
-rw-r--r--doc/src/declarative/qdeclarativestates.qdoc (renamed from doc/src/declarative/qmlstates.qdoc)2
-rw-r--r--doc/src/declarative/qmlruntime.qdoc (renamed from doc/src/declarative/qmlviewer.qdoc)10
-rw-r--r--doc/src/declarative/qtbinding.qdoc78
-rw-r--r--doc/src/declarative/qtprogrammers.qdoc14
-rw-r--r--doc/src/declarative/scope.qdoc14
-rw-r--r--doc/src/declarative/tutorial.qdoc189
-rw-r--r--doc/src/declarative/tutorial1.qdoc97
-rw-r--r--doc/src/declarative/tutorial2.qdoc112
-rw-r--r--doc/src/declarative/tutorial3.qdoc86
-rw-r--r--doc/src/development/qmake-manual.qdoc11
-rw-r--r--doc/src/examples/scribble.qdoc5
-rw-r--r--doc/src/files-and-resources/datastreamformat.qdoc19
-rw-r--r--doc/src/frameworks-technologies/activeqt.qdoc2
-rw-r--r--doc/src/getting-started/installation.qdoc2
-rw-r--r--doc/src/index.qdoc2
-rw-r--r--doc/src/legal/3rdparty.qdoc44
-rw-r--r--doc/src/legal/commercialeditions.qdoc79
-rw-r--r--doc/src/legal/editions.qdoc4
-rw-r--r--doc/src/legal/licenses.qdoc2
-rw-r--r--doc/src/legal/opensourceedition.qdoc1
-rw-r--r--doc/src/modules.qdoc61
-rw-r--r--doc/src/platforms/emb-directfb-EmbLinux.qdoc8
-rw-r--r--doc/src/platforms/mac-differences.qdoc2
-rw-r--r--doc/src/qt4-intro.qdoc14
-rw-r--r--doc/src/snippets/code/doc_src_qmake-manual.qdoc13
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qscopedpointer.cpp2
-rw-r--r--doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp9
-rw-r--r--doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp49
-rw-r--r--doc/src/xml-processing/xml-patterns.qdoc3
56 files changed, 844 insertions, 1112 deletions
diff --git a/doc/src/declarative/advtutorial.qdoc b/doc/src/declarative/advtutorial.qdoc
index b16961c..b7d964c 100644
--- a/doc/src/declarative/advtutorial.qdoc
+++ b/doc/src/declarative/advtutorial.qdoc
@@ -40,8 +40,10 @@
****************************************************************************/
/*!
-\page advtutorial.html
-\title Advanced Tutorial
+\page qml-advtutorial.html
+\title QML Advanced Tutorial
+\brief A more advanced tutorial, showing how to use QML to create a game.
+\nextpage QML Advanced Tutorial 1 - Creating the Game Canvas and Blocks
This tutorial goes step-by-step through creating a full application using just QML.
It is assumed that you already know basic QML (such as from doing the simple tutorial) and the focus is on showing
@@ -59,10 +61,314 @@ to understand the extensions in the most recent Same Game demo, and even extend
Tutorial chapters:
\list
-\o \l {Advanced Tutorial 1 - Creating the Game Canvas and Blocks}
-\o \l {Advanced Tutorial 2 - Populating the Game Canvas}
-\o \l {Advanced Tutorial 3 - Implementing the Game Logic}
-\o \l {Advanced Tutorial 4 - Finishing Touches}
+\o \l {QML Advanced Tutorial 1 - Creating the Game Canvas and Blocks}
+\o \l {QML Advanced Tutorial 2 - Populating the Game Canvas}
+\o \l {QML Advanced Tutorial 3 - Implementing the Game Logic}
+\o \l {QML Advanced Tutorial 4 - Finishing Touches}
\endlist
+*/
+
+/*!
+\page qml-advtutorial1.html
+\title QML Advanced Tutorial 1 - Creating the Game Canvas and Blocks
+\contentspage QML Advanced Tutorial
+\previouspage QML Advanced Tutorial
+\nextpage QML Advanced Tutorial 2 - Populating the Game Canvas
+
+The first step is to create the items in your application. In Same Game we have a main game screen and the blocks that populate it.
+
+\image declarative-adv-tutorial1.png
+
+Here is the QML code for the basic elements. The game window:
+
+\snippet declarative/tutorials/samegame/samegame1/samegame.qml 0
+
+This gives you a basic game window, with room for the game canvas. A new game
+button and room to display the score. The one thing you may not recognize here
+is the \l SystemPalette item. This item provides access to the Qt system palette
+and is used to make the button look more like a system button (for exact native
+feel you would use a \l QPushButton). Since we want a fully functional button,
+we use the QML elements Text and MouseArea inside a Rectangle to assemble a
+button. Below is the code which we wrote to do this:
+
+\snippet declarative/tutorials/samegame/samegame1/Button.qml 0
+
+Note that this Button component was written to be fairly generic, in case we
+want to use a similarly styled button later.
+
+And here is a simple block:
+
+\snippet declarative/tutorials/samegame/samegame1/Block.qml 0
+
+Since it doesn't do anything yet it's very simple, just an image. As the
+tutorial progresses and the block starts doing things the file will become
+more than just an image. Note that we've set the image to be the size of the item.
+This will be used later, when we dynamically create and size the block items the image will be scaled automatically
+to the correct size.
+
+You should be familiar with all that goes on in these files so far. This is a
+very basic start and doesn't move at all - next we will populate the game canvas
+with some blocks.
+*/
+
+
+/*!
+\page qml-advtutorial2.html
+\title QML Advanced Tutorial 2 - Populating the Game Canvas
+\contentspage QML Advanced Tutorial
+\previouspage QML Advanced Tutorial 1 - Creating the Game Canvas and Blocks
+\nextpage QML Advanced Tutorial 3 - Implementing the Game Logic
+
+Now that we've written some basic elements, let's start writing the game. The
+first thing to do is to generate all of the blocks. Now we need to dynamically
+generate all of these blocks, because you have a new, random set of blocks
+every time. As they are dynamically generated every time the new game button is
+clicked, as opposed to on startup, we will be dynamically generating the blocks
+in the JavaScript, as opposed to using a \l Repeater.
+
+This adds enough script to justify a new file, \c{samegame.js}, the intial version
+of which is shown below
+
+\snippet declarative/tutorials/samegame/samegame2/samegame.js 0
+
+The gist of this code is that we create the blocks dynamically, as many as will fit, and then store them in an array for future reference.
+The \c initBoard function will be hooked up to the new game button soon, and should be fairly straight forward.
+
+The \c createBlock function is a lot bigger, and I'll explain it block by block.
+First we ensure that the component has been constructed. QML elements, including composite ones like the \c Block.qml
+that we've written, are never created directly in script. While there is a function to parse and create an arbitrary QML string,
+in the case where you are repeatedly creating the same item you will want to use the \c createComponent function. \c createComponent is
+a built-in function in the declarative JavaScript, and returns a component object.
+A component object prepares and stores a QML element (usually a composite element) for easy and efficient use.
+When the component is ready, you can create a new instance of the loaded QML with the \c createObject method.
+If the component is loaded remotely (over HTTP for example) then you will have to wait for the component to finish loading
+before calling \c createObject. Since we don't wait here (the waiting is asyncronous, the component object will send a signal to tell
+you when it's done) this code will only work if the block QML is a local file.
+
+As we aren't waiting for the component, the next block of code creates a game block with \c{component.createObject}.
+Since there could be an error in the QML file you are trying to load, success is not guaranteed.
+The first bit of error checkign code comes right after \c{createObject()}, to ensure that the object loaded correctly.
+If it did not load correctly the function returns false, but we don't have that hooked up to the main UI to indicate
+that something has gone wrong. Instead we print out error messages to the console, because an error here means an invalid
+QML file and should only happen while you are developing and testing the UI.
+
+Next we start to set up our dynamically created block.
+Because the \c{Block.qml} file is generic it needs to be placed in the main scene, and in the right place.
+This is why \c parent, \c x, \c y, \c width and \c height are set. We then store it in the board array for later use.
+
+Finally, we have some more error handling. You can only call \c{createObject} if the component has loaded.
+If it has not loaded, either it is still loading or there was an error loading (such as a missing file).
+Since we don't request remote files the problem is likely to be a missing or misplaced file.
+Again we print this to the console to aid debugging.
+
+You now have the code to create a field of blocks dynamically, like below:
+
+\image declarative-adv-tutorial2.png
+
+To hook this code up to the \e{New Game} button, you alter it as below:
+
+\snippet declarative/tutorials/samegame/samegame2/samegame.qml 1
+
+We have just replaced the \c{onClicked: console.log("Implement me!")} with \c{onClicked: initBoard()}.
+Note that in order to have the function available, you'll need to include the script in the main file,
+by adding a script element to it.
+
+\snippet declarative/tutorials/samegame/samegame2/samegame.qml 2
+
+With those two changes, and the script file, you are now dynamically creating a field of blocks you can play with.
+They don't do anything now though; the next chapter will add the game mechanics.
+*/
+
+/*!
+\page qml-advtutorial3.html
+\title QML Advanced Tutorial 3 - Implementing the Game Logic
+\contentspage QML Advanced Tutorial
+\previouspage QML Advanced Tutorial 2 - Populating the Game Canvas
+\nextpage QML Advanced Tutorial 4 - Finishing Touches
+
+First we add to the \c initBoard function clearing of the board before filling it up again, so that clicking new game won't leave the previous game
+lying around in the background. To the \c createComponent function we have added setting the type of the block to a number between
+one and three - it's fundamental to the game logic that the blocks be different types if you want a fun game.
+
+The main change was adding the following game logic functions:
+\list
+\o function \c{handleClick(x,y)}
+\o function \c{floodFill(xIdx,yIdx,type)}
+\o function \c{shuffleDown()}
+\o function \c{victoryCheck()}
+\o function \c{floodMoveCheck(xIdx, yIdx, type)}
+\endlist
+
+As this is a tutorial about QML, not game design, these functions will not be discussed in detail. The game logic here
+was written in script, but it could have been written in C++ and had these functions exposed in the same way (except probably faster).
+The interfacing of these functions and QML is what we will focus on. Of these functions, only \c handleClick and \c victoryCheck
+interface closely with the QML. Those functions are shown below (the rest are still in the code for this tutorial located at
+\c{$QTDIR/examples/declarative/tutorials/samegame}).
+
+\snippet declarative/tutorials/samegame/samegame3/samegame.js 1
+\snippet declarative/tutorials/samegame/samegame3/samegame.js 2
+
+You'll notice them referring to the \c gameCanvas item. This is an item that has been added to the QML for easier interfacing with the game logic.
+It is placed next to the background image and replaces the background as the item to create the blocks in.
+Its code is shown below:
+
+\snippet declarative/tutorials/samegame/samegame3/samegame.qml 1
+
+This item is the exact size of the board, contains a score property, and a mouse region for input.
+The blocks are now created as its children, and its size is used to determining the board size, so as to scale to the available screen size.
+Since it needs to bind its size to a multiple of \c tileSize, \c tileSize needs to be moved into a QML property and out of the script file.
+Note that it can still be accessed from the script.
+
+The mouse region simply calls \c{handleClick()}, which deals with the input events.
+Should those events cause the player to score, \c{gameCanvas.score} is updated.
+The score display text item has also been changed to bind its text property to \c{gamecanvas.score}.
+Note that if score was a global variable in the \c{samegame.js} file you could not bind to it. You can only bind to QML properties.
+
+\c victoryCheck() primarily updates the score variable. But it also pops up a dialog saying \e {Game Over} when the game is over.
+In this example we wanted a pure-QML, animated dialog, and since QML doesn't contain one, we wrote our own.
+Below is the code for the \c Dialog element, note how it's designed so as to be usable imperatively from within the script file (via the functions and signals):
+
+\snippet declarative/tutorials/samegame/samegame3/Dialog.qml 0
+
+And this is how it's used in the main QML file:
+
+\snippet declarative/tutorials/samegame/samegame3/samegame.qml 2
+
+Combined with the line of code in \c victoryCheck, this causes a dialog to appear when the game is over, informing the user of that fact.
+
+We now have a working game! The blocks can be clicked, the player can score, and the game can end (and then you start a new one).
+Below is a screenshot of what has been accomplished so far:
+
+\image declarative-adv-tutorial3.png
+
+Here is the QML code as it is now for the main file:
+
+\snippet declarative/tutorials/samegame/samegame3/samegame.qml 0
+
+And the code for the block:
+
+\snippet declarative/tutorials/samegame/samegame3/Block.qml 0
+
+The game works, but it's a little boring right now. Where are the smooth animated transitions? Where are the high scores?
+If you were a QML expert you could have written these in for the first iteration, but in this tutorial they've been saved
+until the next chapter - where your application becomes alive!
+*/
+
+/*!
+\page qml-advtutorial4.html
+\title QML Advanced Tutorial 4 - Finishing Touches
+\contentspage QML Advanced Tutorial
+\previouspage QML Advanced Tutorial 3 - Implementing the Game Logic
+
+Now we're going to do two things to liven the game up. Animate the blocks and add a web-based high score system.
+
+If you compare the \c samegame3 directory with \c samegame4, you'll noticed that we've cleaned the directory structure up.
+We now have a lot of files, and so they've been split up into folders - the most notable one being a content folder
+which we've placed all the QML but the main file.
+
+\section2 Animated Blocks
+
+The most vital animations are that the blocks move fluidly around the board. QML has many tools for fluid behavior,
+and in this case we're going to use the \l SpringFollow element. By having the script set \c targetX and \c targetY, instead of \c x
+and \c y directly, we can set the \c x and \c y of the block to a follow. \l SpringFollow is a property value source, which means
+that you can set a property to be one of these elements and it will automatically bind the property to the element's value.
+The SpringFollow's value follows another value over time, when the value it is tracking changes the SpringFollow's
+value will also change, but it will move smoothly there over time with a spring-like movement (based on the spring
+parameters specified). This is shown in the below snippet of code from \c Block.qml:
+
+\code
+ property int targetX: 0
+ property int targetY: 0
+
+ x: SpringFollow { source: targetX; spring: 2; damping: 0.2 }
+ y: SpringFollow { source: targetY; spring: 2; damping: 0.2 }
+\endcode
+
+We also have to change the \c{samegame.js} code, so that wherever it was setting the \c x or \c y it now sets \c targetX and \c targetY
+(including when creating the block). This simple change is all you need to get spring moving blocks that no longer teleport
+around the board. If you try doing just this though, you'll notice that they now never jump from one point to another, even in
+the initialization! This gives an odd effect of having them all slide out of the corner (0,0) on start up. We'd rather that they
+fall down from the top in rows. To do this, we disable the \c x follow (but not the \c y follow) and only enable it after we've set
+the \c x in the \c createBlock function. The above snippet now becomes:
+
+\snippet declarative/tutorials/samegame/samegame4/content/BoomBlock.qml 1
+
+The next-most vital animation is a smooth exit. For this animation, we'll use a \l Behavior element. A Behavior is also a property
+value source, and it is much like SpringFollow except that it doesn't model the behavior of a spring. You specify how a Behavior
+transitions using the standard animations. As we want the blocks to smoothly fade in and out we'll set a Behavior on the block
+image's opacity, like so:
+
+\snippet declarative/tutorials/samegame/samegame4/content/BoomBlock.qml 2
+
+Note that the \c{opacity: 0} makes it start out transparent. We could set the opacity in the script file when we create and destroy the blocks,
+but instead we use states (as this is useful for the next animation we'll implement). The below snippet is set on the root
+element of \c{Block.qml}:
+\code
+ property bool dying: false
+ states: [
+ State{ name: "AliveState"; when: spawned == true && dying == false
+ PropertyChanges { target: img; opacity: 1 }
+ }, State{ name: "DeathState"; when: dying == true
+ PropertyChanges { target: img; opacity: 0 }
+ }
+ ]
+\endcode
+
+Now it will automatically fade in, as we set spawned to true already when implementing the block movement animations.
+To fade out, we set 'dying' to true instead of setting opacity to 0 when a block is destroyed (in the \c floodFill function).
+
+The least vital animations are a cool-looking particle effect when they get destroyed. First we create a \l Particles element in
+the block, like so:
+
+\snippet declarative/tutorials/samegame/samegame4/content/BoomBlock.qml 3
+
+To fully understand this you'll want to look at the Particles element documentation, but it's important to note that emissionRate is set
+to zero, so that no particles are emitted normally.
+We next extend the 'dying' state, which creates a burst of particles by calling the burst method on the particles element. The code for the states now look
+like this:
+
+\snippet declarative/tutorials/samegame/samegame4/content/BoomBlock.qml 4
+
+And now the game should be beautifully animated and smooth, with a subtle (or not-so-subtle) animation added for all of the
+player's actions. The end result is shown below, with a different set of images to demonstrate basic themeing:
+
+\image declarative-adv-tutorial4.gif
+
+The basic theme change there is the result of simply replacing the images. This can be done at run time by setting the source property, so a further advanced feature to try on your own is to add a button which toggles between two different themes.
+
+\section2 Offline High Scores
+Another extension we might want for the game is some way of storing and retrieving high scores. This tutorial contains both online and offline high score storage.
+
+For better high score data, we want the name and time of the player. The time is obtained in the script fairly simply, but we
+have to ask the player for their name. We thus re-use the dialog QML file to pop up a dialog asking for the player's name (and
+if they exit this dialog without entering it they have a way to opt out of posting their high score). When the dialog is closed we store the name and high score, using the code below.
+
+\snippet declarative/tutorials/samegame/samegame4/content/samegame.js 2
+
+For offline storage, we use the HTML 5 offline storage JavaScript API to maintain a persistant SQL database unique to this application. This first line in this function calls the function for the web-based high scores, described later, if it has been setup. Next we create an offline storage database for the high scores using openDatabase and prepare the data and SQL query that we want to use to save it. The offline storage API uses SQL queries for data manipulation and retrival, and in the db.transaction call we use three SQL queries to initialize the database (if necessary), and then add to and retrieve high scores. To use the returned data, we turn it into a string with one line per row returned, and show a dialog containing that string. For a more detailed explanation of the offline storage API in QML, consult the global object documentation.
+
+This is one way of storing and displaying high scores locally, but not the only way. A more complex alternative would have been to create a high score dialog component, and pass the results to it for processing and display (instead of resusing the Dialog). This would allow a more themable dialog that could present the high scores better. If your QML is the UI for a C++ application, you could also have passed the score to a C++ function to store it locally in a variety of ways, including a simple format without SQL or in another SQL database.
+
+\section2 Web-based High Scores
+
+You've seen how to store high scores locally, but it is also easy to integrate a web enabled high score storage into your QML application. This tutorial also shows you how to communicate the high scores to a web server. The implementation we've done is very
+simple - the high score data is posted to a php script running on a server somewhere, and that server then stores it and
+displays it to visitors. You could request an XML or QML file from that same server, which contained and displayed the scores,
+but that's beyond the scope of this tutorial. The php script we've used is available in the examples directory.
+
+if the player entered their name we can send the data to the web service in the following snippet out of the script file:
+
+\snippet declarative/tutorials/samegame/samegame4/content/samegame.js 1
+
+This is the same \c XMLHttpRequest() as you'll find in browser JavaScript, and can be used in the same way to dynamically get XML
+or QML from the web service to display the high scores. We don't worry about the response in this case, we just post the high
+score data to the web server. If it had returned a QML file (or a URL to a QML file) you could instantiate it in much the same
+way as you did the blocks.
+
+An alternate way to access and submit web-based data would be to use QML elements designed for this purpose - XmlListModel
+makes it very easy to fetch and display XML based data such as RSS in a QML application (see the Flickr demo for an example).
+By following this tutorial you've now ben shown how to write a fully functional application in QML, with the application logic
+written in a script file and with both many fluid animations and being web-enabled. Congratulations, you should now be skilled
+enough to write entire applications in QML.
*/
diff --git a/doc/src/declarative/advtutorial1.qdoc b/doc/src/declarative/advtutorial1.qdoc
deleted file mode 100644
index 2c99819..0000000
--- a/doc/src/declarative/advtutorial1.qdoc
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
-\page advtutorial1.html
-\title Advanced Tutorial 1 - Creating the Game Canvas and Blocks
-
-The first step is to create the items in your application. In Same Game we have a main game screen and the blocks that populate it.
-
-\image declarative-adv-tutorial1.png
-
-Here is the QML code for the basic elements. The game window:
-
-\snippet declarative/tutorials/samegame/samegame1/samegame.qml 0
-
-This gives you a basic game window, with room for the game canvas. A new game
-button and room to display the score. The one thing you may not recognize here
-is the \l SystemPalette item. This item provides access to the Qt system palette
-and is used to make the button look more like a system button (for exact native
-feel you would use a \l QPushButton). Since we want a fully functional button,
-we use the QML elements Text and MouseArea inside a Rectangle to assemble a
-button. Below is the code which we wrote to do this:
-
-\snippet declarative/tutorials/samegame/samegame1/Button.qml 0
-
-Note that this Button component was written to be fairly generic, in case we
-want to use a similarly styled button later.
-
-And here is a simple block:
-
-\snippet declarative/tutorials/samegame/samegame1/Block.qml 0
-
-Since it doesn't do anything yet it's very simple, just an image. As the
-tutorial progresses and the block starts doing things the file will become
-more than just an image. Note that we've set the image to be the size of the item.
-This will be used later, when we dynamically create and size the block items the image will be scaled automatically
-to the correct size.
-
-You should be familiar with all that goes on in these files so far. This is a
-very basic start and doesn't move at all - next we will populate the game canvas
-with some blocks.
-
-[\l {advtutorial.html}{Advanced Tutorial}] [Next: \l {Advanced Tutorial 2 - Populating the Game Canvas}]
-*/
-
diff --git a/doc/src/declarative/advtutorial2.qdoc b/doc/src/declarative/advtutorial2.qdoc
deleted file mode 100644
index 4fe10c1..0000000
--- a/doc/src/declarative/advtutorial2.qdoc
+++ /dev/null
@@ -1,107 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
-\page advtutorial2.html
-\title Advanced Tutorial 2 - Populating the Game Canvas
-
-Now that we've written some basic elements, let's start writing the game. The
-first thing to do is to generate all of the blocks. Now we need to dynamically
-generate all of these blocks, because you have a new, random set of blocks
-every time. As they are dynamically generated every time the new game button is
-clicked, as opposed to on startup, we will be dynamically generating the blocks
-in the JavaScript, as opposed to using a \l Repeater.
-
-This adds enough script to justify a new file, \c{samegame.js}, the intial version
-of which is shown below
-
-\snippet declarative/tutorials/samegame/samegame2/samegame.js 0
-
-The gist of this code is that we create the blocks dynamically, as many as will fit, and then store them in an array for future reference.
-The \c initBoard function will be hooked up to the new game button soon, and should be fairly straight forward.
-
-The \c createBlock function is a lot bigger, and I'll explain it block by block.
-First we ensure that the component has been constructed. QML elements, including composite ones like the \c Block.qml
-that we've written, are never created directly in script. While there is a function to parse and create an arbitrary QML string,
-in the case where you are repeatedly creating the same item you will want to use the \c createComponent function. \c createComponent is
-a built-in function in the declarative JavaScript, and returns a component object.
-A component object prepares and stores a QML element (usually a composite element) for easy and efficient use.
-When the component is ready, you can create a new instance of the loaded QML with the \c createObject method.
-If the component is loaded remotely (over HTTP for example) then you will have to wait for the component to finish loading
-before calling \c createObject. Since we don't wait here (the waiting is asyncronous, the component object will send a signal to tell
-you when it's done) this code will only work if the block QML is a local file.
-
-As we aren't waiting for the component, the next block of code creates a game block with \c{component.createObject}.
-Since there could be an error in the QML file you are trying to load, success is not guaranteed.
-The first bit of error checkign code comes right after \c{createObject()}, to ensure that the object loaded correctly.
-If it did not load correctly the function returns false, but we don't have that hooked up to the main UI to indicate
-that something has gone wrong. Instead we print out error messages to the console, because an error here means an invalid
-QML file and should only happen while you are developing and testing the UI.
-
-Next we start to set up our dynamically created block.
-Because the \c{Block.qml} file is generic it needs to be placed in the main scene, and in the right place.
-This is why \c parent, \c x, \c y, \c width and \c height are set. We then store it in the board array for later use.
-
-Finally, we have some more error handling. You can only call \c{createObject} if the component has loaded.
-If it has not loaded, either it is still loading or there was an error loading (such as a missing file).
-Since we don't request remote files the problem is likely to be a missing or misplaced file.
-Again we print this to the console to aid debugging.
-
-You now have the code to create a field of blocks dynamically, like below:
-
-\image declarative-adv-tutorial2.png
-
-To hook this code up to the \e{New Game} button, you alter it as below:
-
-\snippet declarative/tutorials/samegame/samegame2/samegame.qml 1
-
-We have just replaced the \c{onClicked: console.log("Implement me!")} with \c{onClicked: initBoard()}.
-Note that in order to have the function available, you'll need to include the script in the main file,
-by adding a script element to it.
-
-\snippet declarative/tutorials/samegame/samegame2/samegame.qml 2
-
-With those two changes, and the script file, you are now dynamically creating a field of blocks you can play with.
-They don't do anything now though; the next chapter will add the game mechanics.
-
-[Previous: \l {Advanced Tutorial 1 - Creating the Game canvas and block}] [\l {advtutorial.html}{Advanced Tutorial}] [Next: \l {Advanced Tutorial 3 - Implementing the Game Logic}]
-
-*/
diff --git a/doc/src/declarative/advtutorial3.qdoc b/doc/src/declarative/advtutorial3.qdoc
deleted file mode 100644
index 0c53e74..0000000
--- a/doc/src/declarative/advtutorial3.qdoc
+++ /dev/null
@@ -1,116 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
-\page advtutorial3.html
-\title Advanced Tutorial 3 - Implementing the Game Logic
-
-First we add to the \c initBoard function clearing of the board before filling it up again, so that clicking new game won't leave the previous game
-lying around in the background. To the \c createComponent function we have added setting the type of the block to a number between
-one and three - it's fundamental to the game logic that the blocks be different types if you want a fun game.
-
-The main change was adding the following game logic functions:
-\list
-\o function \c{handleClick(x,y)}
-\o function \c{floodFill(xIdx,yIdx,type)}
-\o function \c{shuffleDown()}
-\o function \c{victoryCheck()}
-\o function \c{floodMoveCheck(xIdx, yIdx, type)}
-\endlist
-
-As this is a tutorial about QML, not game design, these functions will not be discussed in detail. The game logic here
-was written in script, but it could have been written in C++ and had these functions exposed in the same way (except probably faster).
-The interfacing of these functions and QML is what we will focus on. Of these functions, only \c handleClick and \c victoryCheck
-interface closely with the QML. Those functions are shown below (the rest are still in the code for this tutorial located at
-\c{$QTDIR/examples/declarative/tutorials/samegame}).
-
-\snippet declarative/tutorials/samegame/samegame3/samegame.js 1
-\snippet declarative/tutorials/samegame/samegame3/samegame.js 2
-
-You'll notice them referring to the \c gameCanvas item. This is an item that has been added to the QML for easier interfacing with the game logic.
-It is placed next to the background image and replaces the background as the item to create the blocks in.
-Its code is shown below:
-
-\snippet declarative/tutorials/samegame/samegame3/samegame.qml 1
-
-This item is the exact size of the board, contains a score property, and a mouse region for input.
-The blocks are now created as its children, and its size is used to determining the board size, so as to scale to the available screen size.
-Since it needs to bind its size to a multiple of \c tileSize, \c tileSize needs to be moved into a QML property and out of the script file.
-Note that it can still be accessed from the script.
-
-The mouse region simply calls \c{handleClick()}, which deals with the input events.
-Should those events cause the player to score, \c{gameCanvas.score} is updated.
-The score display text item has also been changed to bind its text property to \c{gamecanvas.score}.
-Note that if score was a global variable in the \c{samegame.js} file you could not bind to it. You can only bind to QML properties.
-
-\c victoryCheck() primarily updates the score variable. But it also pops up a dialog saying \e {Game Over} when the game is over.
-In this example we wanted a pure-QML, animated dialog, and since QML doesn't contain one, we wrote our own.
-Below is the code for the \c Dialog element, note how it's designed so as to be usable imperatively from within the script file (via the functions and signals):
-
-\snippet declarative/tutorials/samegame/samegame3/Dialog.qml 0
-
-And this is how it's used in the main QML file:
-
-\snippet declarative/tutorials/samegame/samegame3/samegame.qml 2
-
-Combined with the line of code in \c victoryCheck, this causes a dialog to appear when the game is over, informing the user of that fact.
-
-We now have a working game! The blocks can be clicked, the player can score, and the game can end (and then you start a new one).
-Below is a screenshot of what has been accomplished so far:
-
-\image declarative-adv-tutorial3.png
-
-Here is the QML code as it is now for the main file:
-
-\snippet declarative/tutorials/samegame/samegame3/samegame.qml 0
-
-And the code for the block:
-
-\snippet declarative/tutorials/samegame/samegame3/Block.qml 0
-
-The game works, but it's a little boring right now. Where are the smooth animated transitions? Where are the high scores?
-If you were a QML expert you could have written these in for the first iteration, but in this tutorial they've been saved
-until the next chapter - where your application becomes alive!
-
-[Previous: \l {Advanced Tutorial 2 - Populating the Game Canvas}] [\l {advtutorial.html}{Advanced Tutorial}] [Next: \l {Advanced Tutorial 4 - Finishing Touches}]
-
-*/
-
diff --git a/doc/src/declarative/advtutorial4.qdoc b/doc/src/declarative/advtutorial4.qdoc
deleted file mode 100644
index ca3b82f..0000000
--- a/doc/src/declarative/advtutorial4.qdoc
+++ /dev/null
@@ -1,159 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
-\page advtutorial4.html
-\title Advanced Tutorial 4 - Finishing Touches
-
-Now we're going to do two things to liven the game up. Animate the blocks and add a web-based high score system.
-
-If you compare the \c samegame3 directory with \c samegame4, you'll noticed that we've cleaned the directory structure up.
-We now have a lot of files, and so they've been split up into folders - the most notable one being a content folder
-which we've placed all the QML but the main file.
-
-\section2 Animated Blocks
-
-The most vital animations are that the blocks move fluidly around the board. QML has many tools for fluid behavior,
-and in this case we're going to use the \l SpringFollow element. By having the script set \c targetX and \c targetY, instead of \c x
-and \c y directly, we can set the \c x and \c y of the block to a follow. \l SpringFollow is a property value source, which means
-that you can set a property to be one of these elements and it will automatically bind the property to the element's value.
-The SpringFollow's value follows another value over time, when the value it is tracking changes the SpringFollow's
-value will also change, but it will move smoothly there over time with a spring-like movement (based on the spring
-parameters specified). This is shown in the below snippet of code from \c Block.qml:
-
-\code
- property int targetX: 0
- property int targetY: 0
-
- x: SpringFollow { source: targetX; spring: 2; damping: 0.2 }
- y: SpringFollow { source: targetY; spring: 2; damping: 0.2 }
-\endcode
-
-We also have to change the \c{samegame.js} code, so that wherever it was setting the \c x or \c y it now sets \c targetX and \c targetY
-(including when creating the block). This simple change is all you need to get spring moving blocks that no longer teleport
-around the board. If you try doing just this though, you'll notice that they now never jump from one point to another, even in
-the initialization! This gives an odd effect of having them all slide out of the corner (0,0) on start up. We'd rather that they
-fall down from the top in rows. To do this, we disable the \c x follow (but not the \c y follow) and only enable it after we've set
-the \c x in the \c createBlock function. The above snippet now becomes:
-
-\snippet declarative/tutorials/samegame/samegame4/content/BoomBlock.qml 1
-
-The next-most vital animation is a smooth exit. For this animation, we'll use a \l Behavior element. A Behavior is also a property
-value source, and it is much like SpringFollow except that it doesn't model the behavior of a spring. You specify how a Behavior
-transitions using the standard animations. As we want the blocks to smoothly fade in and out we'll set a Behavior on the block
-image's opacity, like so:
-
-\snippet declarative/tutorials/samegame/samegame4/content/BoomBlock.qml 2
-
-Note that the \c{opacity: 0} makes it start out transparent. We could set the opacity in the script file when we create and destroy the blocks,
-but instead we use states (as this is useful for the next animation we'll implement). The below snippet is set on the root
-element of \c{Block.qml}:
-\code
- property bool dying: false
- states: [
- State{ name: "AliveState"; when: spawned == true && dying == false
- PropertyChanges { target: img; opacity: 1 }
- }, State{ name: "DeathState"; when: dying == true
- PropertyChanges { target: img; opacity: 0 }
- }
- ]
-\endcode
-
-Now it will automatically fade in, as we set spawned to true already when implementing the block movement animations.
-To fade out, we set 'dying' to true instead of setting opacity to 0 when a block is destroyed (in the \c floodFill function).
-
-The least vital animations are a cool-looking particle effect when they get destroyed. First we create a \l Particles element in
-the block, like so:
-
-\snippet declarative/tutorials/samegame/samegame4/content/BoomBlock.qml 3
-
-To fully understand this you'll want to look at the Particles element documentation, but it's important to note that emissionRate is set
-to zero, so that no particles are emitted normally.
-We next extend the 'dying' state, which creates a burst of particles by calling the burst method on the particles element. The code for the states now look
-like this:
-
-\snippet declarative/tutorials/samegame/samegame4/content/BoomBlock.qml 4
-
-And now the game should be beautifully animated and smooth, with a subtle (or not-so-subtle) animation added for all of the
-player's actions. The end result is shown below, with a different set of images to demonstrate basic themeing:
-
-\image declarative-adv-tutorial4.gif
-
-The basic theme change there is the result of simply replacing the images. This can be done at run time by setting the source property, so a further advanced feature to try on your own is to add a button which toggles between two different themes.
-
-\section2 Offline High Scores
-Another extension we might want for the game is some way of storing and retrieving high scores. This tutorial contains both online and offline high score storage.
-
-For better high score data, we want the name and time of the player. The time is obtained in the script fairly simply, but we
-have to ask the player for their name. We thus re-use the dialog QML file to pop up a dialog asking for the player's name (and
-if they exit this dialog without entering it they have a way to opt out of posting their high score). When the dialog is closed we store the name and high score, using the code below.
-
-\snippet declarative/tutorials/samegame/samegame4/content/samegame.js 2
-
-For offline storage, we use the HTML 5 offline storage JavaScript API to maintain a persistant SQL database unique to this application. This first line in this function calls the function for the web-based high scores, described later, if it has been setup. Next we create an offline storage database for the high scores using openDatabase and prepare the data and SQL query that we want to use to save it. The offline storage API uses SQL queries for data manipulation and retrival, and in the db.transaction call we use three SQL queries to initialize the database (if necessary), and then add to and retrieve high scores. To use the returned data, we turn it into a string with one line per row returned, and show a dialog containing that string. For a more detailed explanation of the offline storage API in QML, consult the global object documentation.
-
-This is one way of storing and displaying high scores locally, but not the only way. A more complex alternative would have been to create a high score dialog component, and pass the results to it for processing and display (instead of resusing the Dialog). This would allow a more themable dialog that could present the high scores better. If your QML is the UI for a C++ application, you could also have passed the score to a C++ function to store it locally in a variety of ways, including a simple format without SQL or in another SQL database.
-
-\section2 Web-based High Scores
-
-You've seen how to store high scores locally, but it is also easy to integrate a web enabled high score storage into your QML application. This tutorial also shows you how to communicate the high scores to a web server. The implementation we've done is very
-simple - the high score data is posted to a php script running on a server somewhere, and that server then stores it and
-displays it to visitors. You could request an XML or QML file from that same server, which contained and displayed the scores,
-but that's beyond the scope of this tutorial. The php script we've used is available in the examples directory.
-
-if the player entered their name we can send the data to the web service in the following snippet out of the script file:
-
-\snippet declarative/tutorials/samegame/samegame4/content/samegame.js 1
-
-This is the same \c XMLHttpRequest() as you'll find in browser JavaScript, and can be used in the same way to dynamically get XML
-or QML from the web service to display the high scores. We don't worry about the response in this case, we just post the high
-score data to the web server. If it had returned a QML file (or a URL to a QML file) you could instantiate it in much the same
-way as you did the blocks.
-
-An alternate way to access and submit web-based data would be to use QML elements designed for this purpose - XmlListModel
-makes it very easy to fetch and display XML based data such as RSS in a QML application (see the Flickr demo for an example).
-
-By following this tutorial you've now ben shown how to write a fully functional application in QML, with the application logic
-written in a script file and with both many fluid animations and being web-enabled. Congratulations, you should now be skilled
-enough to write entire applications in QML.
-
-[Previous: \l {Advanced Tutorial 3 - Implementing the Game Logic}] [\l {advtutorial.html}{Advanced Tutorial}]
-*/
diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc
index d80c3fa..2b75211 100644
--- a/doc/src/declarative/animation.qdoc
+++ b/doc/src/declarative/animation.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
-\page qmlanimation.html
+\page qdeclarativeanimation.html
\title QML Animation
Animation in QML is done by animating properties of objects. Properties of type
@@ -72,9 +72,9 @@ Rectangle {
y: 0
y: SequentialAnimation {
repeat: true
- NumberAnimation { to: 200-img.height; easing: "easeOutBounce"; duration: 2000 }
+ NumberAnimation { to: 200-img.height; easing.type: "OutBounce"; duration: 2000 }
PauseAnimation { duration: 1000 }
- NumberAnimation { to: 0; easing: "easeOutQuad"; duration: 1000 }
+ NumberAnimation { to: 0; easing.type: "OutQuad"; duration: 1000 }
}
}
}
@@ -135,7 +135,7 @@ transitions: [
Transition {
NumberAnimation {
properties: "x,y"
- easing: "easeOutBounce"
+ easing.type: "OutBounce"
duration: 200
}
}
@@ -156,7 +156,7 @@ Transition {
SequentialAnimation {
NumberAnimation {
duration: 1000
- easing: "easeOutBounce"
+ easing.type: "OutBounce"
// animate myItem's x and y if they have changed in the state
target: myItem
properties: "x,y"
@@ -198,7 +198,7 @@ Transition {
ParallelAnimation {
NumberAnimation {
duration: 1000
- easing: "easeOutBounce"
+ easing.type: "OutBounce"
targets: box1
properties: "x,y"
}
@@ -226,7 +226,7 @@ Rectangle {
id: redRect
color: "red"
width: 100; height: 100
- x: Behavior { NumberAnimation { duration: 300; easing: "InOutQuad" } }
+ x: Behavior { NumberAnimation { duration: 300; easing.type: "InOutQuad" } }
}
\endqml
diff --git a/doc/src/declarative/basictypes.qdoc b/doc/src/declarative/basictypes.qdoc
index a260812..c60847e 100644
--- a/doc/src/declarative/basictypes.qdoc
+++ b/doc/src/declarative/basictypes.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
- \page qmlbasictypes.html
+ \page qdeclarativebasictypes.html
\title QML Basic Types
QML uses a set of property types, which are primitive within QML.
diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc
index 2bfc3d5..4b61bd9 100644
--- a/doc/src/declarative/declarativeui.qdoc
+++ b/doc/src/declarative/declarativeui.qdoc
@@ -73,8 +73,8 @@ completely new applications. QML is fully \l {Extending QML}{extensible from C+
\section1 Getting Started:
\list
\o \l {Introduction to the QML language}
-\o \l {Tutorial}{Tutorial: 'Hello World'}
-\o \l {advtutorial.html}{Tutorial: 'Same Game'}
+\o \l {QML Tutorial}{Tutorial: 'Hello World'}
+\o \l {QML Advanced Tutorial}{Tutorial: 'Same Game'}
\o \l {QML Examples and Walkthroughs}
\o \l {Using QML in C++ Applications}
\endlist
@@ -88,10 +88,10 @@ completely new applications. QML is fully \l {Extending QML}{extensible from C+
\o \l {Network Transparency}
\o \l {Data Models}
\o \l {anchor-layout.html}{Anchor-based Layout}
-\o \l {qmlstates.html}{States}
-\o \l {qmlanimation.html}{Animation}
-\o \l {qmlmodules.html}{Modules}
-\o \l {qmlfocus.html}{Keyboard Focus}
+\o \l {qdeclarativestates.html}{States}
+\o \l {qdeclarativeanimation.html}{Animation}
+\o \l {qdeclarativemodules.html}{Modules}
+\o \l {qdeclarativefocus.html}{Keyboard Focus}
\o \l {Extending types from QML}
\o \l {Dynamic Object Creation}
\endlist
diff --git a/doc/src/declarative/dynamicobjects.qdoc b/doc/src/declarative/dynamicobjects.qdoc
index 7a489c0..033c0d1 100644
--- a/doc/src/declarative/dynamicobjects.qdoc
+++ b/doc/src/declarative/dynamicobjects.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
-\page qmldynamicobjects.html
+\page qdeclarativedynamicobjects.html
\title Dynamic Object Management
QML has some support for dynamically loading and managing QML objects from
@@ -139,7 +139,7 @@ will not have an id in QML.
A restriction which you need to manage with dynamically created items,
is that the creation context must outlive the
-created item. The creation context is the QmlContext in which createComponent
+created item. The creation context is the QDeclarativeContext in which createComponent
was called, or the context in which the Component element, or the item used as the
second argument to createQmlObject, was specified. If the creation
context is destroyed before the dynamic item is, then bindings in the dynamic item will
diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc
index 682a2ac..1fd4dad 100644
--- a/doc/src/declarative/elements.qdoc
+++ b/doc/src/declarative/elements.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
-\page qmlelements.html
+\page qdeclarativeelements.html
\target elements
\title QML Elements
@@ -88,6 +88,8 @@ The following table lists the QML elements provided by the Qt Declarative module
\o \l Binding
\o \l ListModel, \l ListElement
\o \l VisualItemModel
+\o \l VisualDataModel
+\o \l Package
\o \l XmlListModel and XmlRole
\o \l DateTimeFormatter
\o \l NumberFormatter
@@ -96,7 +98,7 @@ The following table lists the QML elements provided by the Qt Declarative module
\o
\list
\o \l Script
-\o \l Connection
+\o \l Connections
\o \l Component
\o \l Timer
\o \l QtObject
diff --git a/doc/src/declarative/example-slideswitch.qdoc b/doc/src/declarative/example-slideswitch.qdoc
index d1b1066..42351c5 100644
--- a/doc/src/declarative/example-slideswitch.qdoc
+++ b/doc/src/declarative/example-slideswitch.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
-\page qmlexampletoggleswitch.html
+\page qdeclarativeexampletoggleswitch.html
\title QML Example - Toggle Switch
This example shows how to create a reusable switch component in QML.
@@ -121,7 +121,7 @@ states (\e on and \e off).
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 \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{qmljavascript.html}{JavaScript Blocks}.
+For more information on scripts see \l{qdeclarativejavascript.html}{JavaScript Blocks}.
\section2 Transition
\snippet examples/declarative/slideswitch/content/Switch.qml 7
diff --git a/doc/src/declarative/examples.qdoc b/doc/src/declarative/examples.qdoc
index 7de7a19..b7da508 100644
--- a/doc/src/declarative/examples.qdoc
+++ b/doc/src/declarative/examples.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
-\page qmlexamples.html
+\page qdeclarativeexamples.html
\title QML Examples and Walkthroughs
\section1 Running Examples and Demos
@@ -77,10 +77,10 @@ These will be documented, and demonstrate how to achieve various things in QML.
\o Elastic Dial
\o \image dial-example.gif
\row
- \o \l{qmlexampletoggleswitch.html}{Toggle Switch}
+ \o \l{qdeclarativeexampletoggleswitch.html}{Toggle Switch}
\o \image switch-example.gif
\row
- \o \l{Advanced Tutorial}{SameGame}
+ \o \l{QML Advanced Tutorial}{SameGame}
\o \image declarative-adv-tutorial4.gif
\endtable
diff --git a/doc/src/declarative/extending-examples.qdoc b/doc/src/declarative/extending-examples.qdoc
index b84ae0e..cc66838 100644
--- a/doc/src/declarative/extending-examples.qdoc
+++ b/doc/src/declarative/extending-examples.qdoc
@@ -69,7 +69,7 @@ Q_DECLARE_METATYPE() functionality.
The Person class implementation is quite basic. The property accessors simply
return members of the object instance.
-The implementation must also include the QML_DEFINE_TYPE() macro. This macro
+The implementation must also be registered using the QML_REGISTER_TYPE() macro. This macro
registers the Person class with QML as a type in the People library version 1.0,
and defines the mapping between the C++ and QML class names.
@@ -108,11 +108,11 @@ The class contains a member to store the celebrant object, and also a
QList<Person *> member.
In QML, the type of a list properties - and the guests property is a list of
-people - are all of type QmlListProperty<T>. QmlListProperty is simple value
+people - are all of type QDeclarativeListProperty<T>. QDeclarativeListProperty is simple value
type that contains a set of function pointers. QML calls these function
pointers whenever it needs to read from, write to or otherwise interact with
the list. In addition to concrete lists like the people list used in this
-example, the use of QmlListProperty allows for "virtual lists" and other advanced
+example, the use of QDeclarativeListProperty allows for "virtual lists" and other advanced
scenarios.
\section2 Define the BirthdayParty
@@ -160,13 +160,13 @@ previous example. However, as we have repurposed the People class as a common
base for Boy and Girl, we want to prevent it from being instantiated from QML
directly - an explicit Boy or Girl should be instantiated instead.
-\snippet examples/declarative/extending/coercion/person.cpp 0
+\snippet examples/declarative/extending/coercion/main.cpp 0
While we want to disallow instantiating Person from within QML, it still needs
to be registered with the QML engine, so that it can be used as a property type
and other types can be coerced to it. To register a type, without defining a
-named mapping into QML, we use the QML_DEFINE_NOCREATE_TYPE() macro instead of
-the QML_DEFINE_TYPE() macro used previously.
+named mapping into QML, we call the QML_REGISTER_NOCREATE_TYPE() macro instead of
+the QML_REGISTER_TYPE() macro used previously.
\section2 Define Boy and Girl
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc
index 0456f3f..5aaa7bd 100644
--- a/doc/src/declarative/extending.qdoc
+++ b/doc/src/declarative/extending.qdoc
@@ -72,24 +72,23 @@ Custom C++ types are made available to QML using these two macros:
\quotation
\code
#define QML_DECLARE_TYPE(T)
-#define QML_DEFINE_TYPE(URI,VMAJ,VMIN,QmlName,T)
+#define QML_REGISTER_TYPE(URI,VMAJ,VMIN,QDeclarativeName,T)
\endcode
Register the C++ type \a T with the QML system, and make it available in QML
-under the name \a QmlName in library URI version VMAJ.VMIN.
-\a T and \a QmlName may be the same.
+under the name \a QDeclarativeName in library URI version VMAJ.VMIN.
+\a T and \a QDeclarativeName may be the same.
Generally the QML_DECLARE_TYPE() macro should be included immediately following
-the type declaration (usually in its header file), and the QML_DEFINE_TYPE()
-macro in the implementation file. QML_DEFINE_TYPE() must not be present in
-a header file.
+the type declaration (usually in its header file), and the QML_REGISTER_TYPE()
+macro called by the implementation.
Type \a T must be a concrete type that inherits QObject and has a default
constructor.
\endquotation
Types can be registered by libraries (such as Qt does), application code,
-or by plugins (see QmlModulePlugin).
+or by plugins (see QDeclarativeExtensionPlugin).
Once registered, all of the \l {Qt's Property System}{properties} of a supported
type are available for use within QML. QML has intrinsic support for properties
@@ -153,15 +152,14 @@ from registering a new QML type. The following macros are used instead:
\quotation
\code
#define QML_DECLARE_INTERFACE(T)
- #define QML_DEFINE_INTERFACE(T)
+ #define QML_REGISTER_INTERFACE(T)
\endcode
Register the C++ interface \a T with the QML system.
Generally the QML_DECLARE_INTERFACE() macro should be included immediately
following the interface declaration (usually in its header file), and the
-QML_DEFINE_INTERFACE() macro in an implementation file. QML_DEFINE_INTERFACE()
-must not be present in a header file.
+QML_REGISTER_INTERFACE() macro called by the implementation.
Following registration, QML can coerce objects that implement this interface
for assignment to appropriately typed properties.
@@ -169,7 +167,7 @@ for assignment to appropriately typed properties.
The guests property is a list of \c Person objects. Properties that are lists
of objects or Qt interfaces are also declared with the Q_PROPERTY() macro, just
-like other properties. List properties must have the type \c {QmlListProperty<T>}.
+like other properties. List properties must have the type \c {QDeclarativeListProperty<T>}.
As with object properties, the type \a T must be registered with QML.
The guest property declaration looks like this:
@@ -194,7 +192,7 @@ type used in the previous section, but the assignment is valid as both the Boy
and Girl objects inherit from Person.
To assign to a property, the property's type must have been registered with QML.
-Both the QML_DEFINE_TYPE() and QML_DEFINE_INTERFACE() macros already shown can
+Both the QML_REGISTER_TYPE() and QML_REGISTER_INTERFACE() macros already shown can
be used to register a type with QML. Additionally, if a type that acts purely
as a base class that cannot be instantiated from QML needs to be
registered these macros can be used:
@@ -202,18 +200,17 @@ registered these macros can be used:
\quotation
\code
#define QML_DECLARE_TYPE(T)
- #define QML_DEFINE_NOCREATE_TYPE(T)
+ #define QML_REGISTER_NOCREATE_TYPE(T)
\endcode
-Register the C++ type \a T with the QML system. QML_DEFINE_NOCREATE_TYPE()
-differs from QML_DEFINE_TYPE() in that it does not define a mapping between the
+Register the C++ type \a T with the QML system. QML_REGISTER_NOCREATE_TYPE()
+differs from QML_REGISTER_TYPE() in that it does not define a mapping between the
C++ class and a QML element name, so the type is not instantiable from QML, but
it is available for type coercion.
Generally the QML_DECLARE_TYPE() macro should be included immediately following
the type declaration (usually in its header file), and the
-QML_DEFINE_NOCREATE_TYPE() macro in the implementation file.
-QML_DEFINE_NOCREATE_TYPE() must not be present in a header file.
+QML_REGISTER_NOCREATE_TYPE() macro called from the implementation.
Type \a T must inherit QObject, but there are no restrictions on whether it is
concrete or the signature of its constructor.
@@ -375,6 +372,37 @@ object will only be returned if it has previously been created.
\l {Extending QML - Attached Properties Example} shows the complete code used to
implement the rsvp attached property.
+\section1 Memory Management and QVariant types
+
+It is an elements responsibility to ensure that it does not access or return
+pointers to invalid objects. QML makes the following guarentees:
+
+\list
+\o An object assigned to an QObject (or QObject-derived) pointer property will be
+valid at the time of assignment.
+
+Following assignment, it is the responsibility of the class to subsequently guard
+this pointer, either through a class specific method or the generic QPointer class.
+
+\o An object assigned to a QVariant will be valid at the time of assignment.
+
+When assigning an object to a QVariant property, QML will always use a QMetaType::QObjectStar
+typed QVariant. It is the responsibility of the class to guard the pointer. A
+general rule when writing a class that uses QVariant properties is to check the
+type of the QVariant when it is set and if the type is not handled by your class,
+reset it to an invalid variant.
+
+\o An object assigned to a QObject (or QObject-derived) list property will be
+valid at the time of assignment.
+
+Following assignment, it is the responsibility of the class to subsequently guard
+this pointer, either through a class specific method or the generic QPointer class.
+\endlist
+
+Elements should assume that any QML assigned object can be deleted at any time, and
+respond accordingly. If documented as such an element need not continue to work in
+this situation, but it must not crash.
+
\section1 Signal Support
\snippet examples/declarative/extending/signal/example.qml 0
@@ -393,9 +421,8 @@ C++ signature:
\snippet examples/declarative/extending/signal/birthdayparty.h 0
In classes with multiple signals with the same name, only the final signal
-is accessible as a signal property. Although QML provides an element,
-\l Connection, for accessing the other signals it is less elegant. For the best
-QML API, class developers should avoid overloading signal names.
+is accessible as a signal property. Note that signals with the same name
+but different parameters cannot be distinguished.
Signal parameters become accessible by name to the assigned script. An
unnamed parameter cannot be accessed, so care should be taken to name all the
@@ -433,8 +460,8 @@ itself, the QML engine sets up an association between the value source and
the property.
Property value sources are special types that derive from the
-QmlPropertyValueSource base class. This base class contains a single method,
-QmlPropertyValueSource::setTarget(), that the QML engine invokes when
+QDeclarativePropertyValueSource base class. This base class contains a single method,
+QDeclarativePropertyValueSource::setTarget(), that the QML engine invokes when
associating the property value source with a property. The relevant part of
the HappyBirthday type declaration looks like this:
@@ -526,18 +553,6 @@ to be used in bindings should have a NOTIFY signal instead.
\l {Extending QML - Binding Example} shows the BirthdayParty example updated to
include NOTIFY signals for use in binding.
-\section1 Binding and Script Properties
-
-While generally no changes are needed to a C++ class to use property
-binding, sometimes more advanced interaction between the binding engine and
-an object is desirable. To facilitate this, there is a special exception
-in the bind engine for allowing an object to access the binding directly.
-
-If a binding is assigned to a property with a type of QmlBinding
-pointer (ie. \c {QmlBinding *}), each time the binding value changes,
-a QmlBinding instance is assigned to that property. The QmlBinding instance
-allows the object to read the binding and to evaluate the binding's current value.
-
\section1 Extension Objects
\snippet examples/declarative/extending/extended/example.qml 0
@@ -566,11 +581,11 @@ the appropriate property on the extension object is used instead.
When an extended type is installed, one of the
\code
- #define QML_DEFINE_EXTENDED_TYPE(URI, VMAJ, VFROM, VTO, QmlName,T, ExtendedT)
- #define QML_DEFINE_EXTENDED_NOCREATE_TYPE(T, ExtendedT)
+ #define QML_REGISTER_EXTENDED_TYPE(URI, VMAJ, VFROM, VTO, QDeclarativeName,T, ExtendedT)
+ #define QML_REGISTER_EXTENDED_NOCREATE_TYPE(T, ExtendedT)
\endcode
-macros should be used instead of the regular \c QML_DEFINE_TYPE or
-\c QML_DEFINE_NOCREATE_TYPE. The arguments are identical to the corresponding
+macros should be used instead of the regular \c QML_REGISTER_TYPE or
+\c QML_REGISTER_NOCREATE_TYPE. The arguments are identical to the corresponding
non-extension object macro, except for the ExtendedT parameter which is the type
of the extension object.
@@ -581,18 +596,18 @@ status of the QML engine. For example, it might be beneficial to delay
initializing some costly data structures until after all the properties have been
set.
-The QML engine defines an interface class called QmlParserStatus, which contains a
+The QML engine defines an interface class called QDeclarativeParserStatus, which contains a
number of virtual methods that are invoked at various stages during component
instantiation. To receive these notifications, an element implementation inherits
-QmlParserStatus and notifies the Qt meta system using the Q_INTERFACES() macro.
+QDeclarativeParserStatus and notifies the Qt meta system using the Q_INTERFACES() macro.
For example,
\code
-class Example : public QObject, public QmlParserStatus
+class Example : public QObject, public QDeclarativeParserStatus
{
Q_OBJECT
- Q_INTERFACES(QmlParserStatus)
+ Q_INTERFACES(QDeclarativeParserStatus)
public:
virtual void componentComplete()
{
diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc
index 6459a2e..d7e890c 100644
--- a/doc/src/declarative/focus.qdoc
+++ b/doc/src/declarative/focus.qdoc
@@ -41,7 +41,7 @@
/*!
\target qmlfocus
-\page qmlfocus.html
+\page qdeclarativefocus.html
\title Keyboard Focus in QML
When a key is pressed or released, a key event is generated and delivered to the
@@ -56,7 +56,7 @@ and to address some of the cases unique to fluid user interfaces, the QML items
When the user presses or releases a key, the following occurs:
\list 1
\o Qt receives the key action and generates a key event.
-\o If the Qt widget containing the \l QmlView has focus, the key event is delivered to it. Otherwise, regular Qt key handling continues.
+\o If the Qt widget containing the \l QDeclarativeView has focus, the key event is delivered to it. Otherwise, regular Qt key handling continues.
\o The key event is delivered by the scene to the QML \l Item with \e {active focus}. If no \l Item has \e {active focus}, the key event is \l {QEvent::ignore()}{ignored} and regular Qt key handling continues.
\o If the QML \l Item with \e {active focus} accepts the key event, propagation stops. Otherwise the event is "bubbled up", by recursively passing it to each \l Item's parent until either the event is accepted, or the root \l Item is reached.
diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc
index fb33664..c718a6d 100644
--- a/doc/src/declarative/globalobject.qdoc
+++ b/doc/src/declarative/globalobject.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
-\page qmlglobalobject.html
+\page qdeclarativeglobalobject.html
\title QML Global Object
Contains all the properties of the JavaScript global object, plus:
@@ -71,7 +71,7 @@ when the property has one of the following types:
\o Vector3D
\endlist
-There are also string based constructors for these types, see \l{qmlbasictypes.html}{Qml Types}.
+There are also string based constructors for these types, see \l{qdeclarativebasictypes.html}{Qml Types}.
\section3 Qt.rgba(qreal red, qreal green, qreal blue, qreal alpha)
This function returns a Color with the specified \c red, \c green, \c blue and \c alpha components. All components should be in the range 0-1 inclusive.
@@ -218,7 +218,7 @@ The \c openDatabase() and related functions
provide the ability to access local offline storage in an SQL database.
These databases are user-specific and QML-specific. They are stored in the \c Databases subdirectory
-of QmlEngine::offlineStoragePath(), currently as SQLite databases.
+of QDeclarativeEngine::offlineStoragePath(), currently as SQLite databases.
The API conforms to the Synchronous API of the HTML5 Web Database API,
\link http://www.w3.org/TR/2009/WD-webdatabase-20091029/ W3C Working Draft 29 October 2009\endlink.
diff --git a/doc/src/declarative/integrating.qdoc b/doc/src/declarative/integrating.qdoc
index b3d6306..c685d3d 100644
--- a/doc/src/declarative/integrating.qdoc
+++ b/doc/src/declarative/integrating.qdoc
@@ -49,16 +49,16 @@ add QML to your UI, without having to rewrite it.
\section1 Adding QML to a \l{QWidget} based UI
If you have an existing QWidget based UI you can simply write new custom
widgets in QML. To integrate them into your application you can create a
-QmlView widget, and load the QML file into that. You'll then have a new widget
+QDeclarativeView widget, and load the QML file into that. You'll then have a new widget
containing your declarative UI, and you can interact with it through the
-QmlView interface. The one drawback of this approach is that QmlView is a lot
+QDeclarativeView interface. The one drawback of this approach is that QDeclarativeView is a lot
heavier than a QWidget in terms of memory consumption and initialization speed,
and so having large numbers of them may lead to performance degredation.
For a smooth transition from a QWidget based UI to a QML based UI, simply
rewrite your widgets in QML one at a time, using the above method. When
all of your widgets are written in QML you can rewrite your main widget in
-QML, so as to load the other widgets in QML instead of using QmlViews. Then
+QML, so as to load the other widgets in QML instead of using QDeclarativeViews. Then
you just load the main QML file on startup.
Keep in mind that QWidgets were designed for different sorts of UIs than QML
@@ -70,7 +70,7 @@ of simple and dynamic elements.
\section1 Adding QML to a QGraphicsView based UI
If you have an existing Graphics View based UI you can create new
-items in QML, and use \l{QmlComponent} to create \l{QGraphicsObject}s
+items in QML, and use \l{QDeclarativeComponent} to create \l{QGraphicsObject}s
from the QML files. These \l{QGraphicsObject}s can then be placed into
your \l{QGraphicsScene} using \l{QGraphicsScene::addItem()} or by
reparenting them to an item already in the \l{QGraphicsScene}.
@@ -79,8 +79,8 @@ Example, for local QML files:
\code
QGraphicsScene* scene = new QGraphicsScene;
-QmlEngine *engine = new QmlEngine;
-QmlComponent component(engine, QUrl::fromLocalFile(filename));
+QDeclarativeEngine *engine = new QDeclarativeEngine;
+QDeclarativeComponent component(engine, QUrl::fromLocalFile(filename));
QGraphicsObject *object =
qobject_cast<QGraphicsObject *>(component.create());
scene->addItem(object);
diff --git a/doc/src/declarative/javascriptblocks.qdoc b/doc/src/declarative/javascriptblocks.qdoc
index cde8eb8..98183bb 100644
--- a/doc/src/declarative/javascriptblocks.qdoc
+++ b/doc/src/declarative/javascriptblocks.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
-\page qmljavascript.html
+\page qdeclarativejavascript.html
\title JavaScript Blocks
QML encourages building UIs declaratively, using \l {Property Binding} and the
@@ -124,7 +124,7 @@ The \c source property may reference a relative file, or an absolute path. In t
case of a relative file, the location is resolved relative to the location of the
\l {QML Document} that contains the \l Script element. If the script file is not
accessible, an error will occur. If the source is on a network resource, the
-enclosing QML document will remain in the \l {QmlComponent::status()}{waiting state}
+enclosing QML document will remain in the \l {QDeclarativeComponent::status()}{waiting state}
until the script has been retrieved.
\section1 Running Script at Startup
diff --git a/doc/src/declarative/measuring-performance.qdoc b/doc/src/declarative/measuring-performance.qdoc
index 8f6fe7d..cb608bf 100644
--- a/doc/src/declarative/measuring-performance.qdoc
+++ b/doc/src/declarative/measuring-performance.qdoc
@@ -71,14 +71,14 @@ Q_DEFINE_PERFORMANCE_METRIC(TextSize, "Text Size Calculation");
You could then use this category in the code:
\code
-void QmlGraphicsText::updateSize()
+void QDeclarativeText::updateSize()
{
- QmlPerfTimer<QmlPerf::TextSize> perf;
+ QDeclarativePerfTimer<QDeclarativePerf::TextSize> perf;
...
}
\endcode
-Because there is no cost for a QmlPerfTimer when Q_ENABLE_PERFORMANCE_LOG is not defined, this line can persist in the code and be used to help detect performance bottlenecks and regressions. See the QPerformanceLog documentation for more information on this performance framework.
+Because there is no cost for a QDeclarativePerfTimer when Q_ENABLE_PERFORMANCE_LOG is not defined, this line can persist in the code and be used to help detect performance bottlenecks and regressions. See the QPerformanceLog documentation for more information on this performance framework.
\section1 FPS Measurements
diff --git a/doc/src/declarative/modules.qdoc b/doc/src/declarative/modules.qdoc
index b2fd149..ab75f8d 100644
--- a/doc/src/declarative/modules.qdoc
+++ b/doc/src/declarative/modules.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
-\page qmlmodules.html
+\page qdeclarativemodules.html
\title Modules
A \bold module is a collection of QML types.
@@ -63,7 +63,7 @@ This makes available all types in Qt that were available in Qt 4.6, regardless o
actual version of Qt executing the QML. So even if Qt 4.7 adds a type that would conflict
with a type you defined while using 4.6, that type is not imported, so there is no conflict.
-Types defined by plugins are made using QmlModulePlugin. Installed plugins and QML files
+Types defined by plugins are made using QDeclarativeExtensionPlugin. Installed plugins and QML files
can both contribute types to the same module.
@@ -82,7 +82,7 @@ QML, a URI import is used:
import com.nokia.Example 1.0
\endcode
-Files imported in this way are found on the paths added by QmlEngine::addImportPath(),
+Files imported in this way are found on the paths added by QDeclarativeEngine::addImportPath(),
which by default only inludes \c $QTDIR/qml, so the above would make available those types
defined in \c $QTDIR/qml/com/nokia/Example which are specified as being in version 1.0.
Installed plugins and QML files can both contribute types to the same module.
diff --git a/doc/src/declarative/network.qdoc b/doc/src/declarative/network.qdoc
index fc4761e..e642257 100644
--- a/doc/src/declarative/network.qdoc
+++ b/doc/src/declarative/network.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
-\page qmlnetwork.html
+\page qdeclarativenetwork.html
\title Network Transparency
QML supports network transparency by using URLs (rather than file names) for all
@@ -128,9 +128,9 @@ See the \tt demos/declarative/flickr for a real demonstration of this.
\section1 Configuring the Network Access Manager
-All network access from QML is managed by a QNetworkAccessManager set on the QmlEngine which executes the QML.
+All network access from QML is managed by a QNetworkAccessManager set on the QDeclarativeEngine which executes the QML.
By default, this is an unmodified Qt QNetworkAccessManager. You may set a different manager using
-QmlEngine::setNetworkAccessManager() as appropriate for the policies of your application.
+QDeclarativeEngine::setNetworkAccessManager() as appropriate for the policies of your application.
For example, the \l qmlviewer tool sets a new QNetworkAccessManager which
trusts HTTP Expiry headers to avoid network cache checks, allows HTTP Pipelining, adds a persistent HTTP CookieJar,
a simple disk cache, and supports proxy settings.
@@ -143,7 +143,7 @@ the executable using \l{The Qt Resource System}. Using this, an executable can r
that is compiled into the executable:
\code
- QmlView *canvas = new QmlView;
+ QDeclarativeView *canvas = new QDeclarativeView;
canvas->setUrl(QUrl("qrc:/dial.qml"));
\endcode
diff --git a/doc/src/declarative/qmldebugging.qdoc b/doc/src/declarative/qdeclarativedebugging.qdoc
index 56bd7d2..3ef9ce7 100644
--- a/doc/src/declarative/qmldebugging.qdoc
+++ b/doc/src/declarative/qdeclarativedebugging.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
-\page qmldebugging.html
+\page qdeclarativedebugging.html
\title Debugging QML
\section1 Logging
diff --git a/doc/src/declarative/qmldocument.qdoc b/doc/src/declarative/qdeclarativedocument.qdoc
index 977b4ac..a210c98 100644
--- a/doc/src/declarative/qmldocument.qdoc
+++ b/doc/src/declarative/qdeclarativedocument.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
-\page qmldocuments.html
+\page qdeclarativedocuments.html
\title QML Documents
A QML document is a block of QML source code. QML documents generally correspond to files
@@ -87,7 +87,7 @@ document - such as \c Rectangle and \c ListView - including those made within an
import statements. QML does not import any modules by default, so at least one \c import
statement must be present or no elements will be available!
-A QML document defines a single, top-level \l {QmlComponent}{QML component}. A QML component
+A QML document defines a single, top-level \l {QDeclarativeComponent}{QML component}. A QML component
is a template that is interpreted by the QML runtime to create an object with some predefined
behaviour. As it is a template, a single QML component can be "run" multiple times to
produce several objects, each of which are said to be \e instances of the component.
@@ -186,5 +186,5 @@ Rectangle {
\endcode
\endtable
-\sa QmlComponent
+\sa QDeclarativeComponent
*/
diff --git a/doc/src/declarative/qmli18n.qdoc b/doc/src/declarative/qdeclarativei18n.qdoc
index 0803d6c..9c10a46 100644
--- a/doc/src/declarative/qmli18n.qdoc
+++ b/doc/src/declarative/qdeclarativei18n.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
-\page qmli18n.html
+\page qdeclarativei18n.html
\title QML Internationalization
\section1 Overview
diff --git a/doc/src/declarative/qmlintro.qdoc b/doc/src/declarative/qdeclarativeintro.qdoc
index b353e44..4d05a8c 100644
--- a/doc/src/declarative/qmlintro.qdoc
+++ b/doc/src/declarative/qdeclarativeintro.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
-\page qmlintroduction.html
+\page qdeclarativeintroduction.html
\title Introduction to the QML language
\tableofcontents
diff --git a/doc/src/declarative/qmlmodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc
index 4843a7b..c0e028e 100644
--- a/doc/src/declarative/qmlmodels.qdoc
+++ b/doc/src/declarative/qdeclarativemodels.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
-\page qmlmodels.html
+\page qdeclarativemodels.html
\target qmlmodels
\title Data Models
@@ -99,7 +99,7 @@ There are a number of QML elements that operate using data models:
\endlist
QML supports several types of data model, which may be provided by QML
-or C++ (via QmlContext::setContextProperty(), for example).
+or C++ (via QDeclarativeContext::setContextProperty(), for example).
\section1 QML Data Models
@@ -210,7 +210,7 @@ dataList.append("Fred");
dataList.append("Ginger");
dataList.appenf("Skipper");
-QmlContext *ctxt = view.rootContext();
+QDeclarativeContext *ctxt = view.rootContext();
ctxt->setContextProperty("myModel", QVariant::fromValue(&dataList));
\endcode
@@ -234,7 +234,7 @@ ListView {
\note There is no way for the view to know that the contents of a QStringList
have changed. If the QStringList is changed, it will be necessary to reset
-the model by calling QmlContext::setContextProperty() again.
+the model by calling QDeclarativeContext::setContextProperty() again.
\section2 QList<QObject*>
@@ -257,7 +257,7 @@ dataList.append(new DataObject("Item 2", "green"));
dataList.append(new DataObject("Item 3", "blue"));
dataList.append(new DataObject("Item 4", "yellow"));
-QmlContext *ctxt = view.rootContext();
+QDeclarativeContext *ctxt = view.rootContext();
ctxt->setContextProperty("myModel", QVariant::fromValue(dataList));
\endcode
@@ -282,7 +282,7 @@ ListView {
Note: There is no way for the view to know that the contents of a QList
have changed. If the QList is changed, it will be necessary to reset
-the model by calling QmlContext::setContextProperty() again.
+the model by calling QDeclarativeContext::setContextProperty() again.
\section1 Other Data Models
diff --git a/doc/src/declarative/qmlreference.qdoc b/doc/src/declarative/qdeclarativereference.qdoc
index 7caa402..01af7f5 100644
--- a/doc/src/declarative/qmlreference.qdoc
+++ b/doc/src/declarative/qdeclarativereference.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
- \page qmlreference.html
+ \page qdeclarativereference.html
\title QML Reference
\target qtdeclarativemainpage
@@ -65,8 +65,8 @@
Getting Started:
\list
\o \l {Introduction to the QML language}
- \o \l {tutorial}{Tutorial: 'Hello World'}
- \o \l {advtutorial.html}{Advanced Tutorial: 'Same Game'}
+ \o \l {QML Tutorial}{Tutorial: 'Hello World'}
+ \o \l {QML Advanced Tutorial}{Advanced Tutorial: 'Same Game'}
\o \l {QML Examples and Walkthroughs}
\endlist
@@ -80,8 +80,8 @@
\o \l {qmlmodels}{Data Models}
\o \l {anchor-layout}{Anchor-based Layout}
\o \l {qmlstates}{States}
- \o \l {qmlanimation.html}{Animation}
- \o \l {qmlmodules.html}{Modules}
+ \o \l {qdeclarativeanimation.html}{Animation}
+ \o \l {qdeclarativemodules.html}{Modules}
\o \l {qmlfocus}{Keyboard Focus}
\o \l {Extending types from QML}
\endlist
diff --git a/doc/src/declarative/qmlstates.qdoc b/doc/src/declarative/qdeclarativestates.qdoc
index 2118c2b..0fea6f8 100644
--- a/doc/src/declarative/qmlstates.qdoc
+++ b/doc/src/declarative/qdeclarativestates.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
-\page qmlstates.html
+\page qdeclarativestates.html
\target qmlstates
\title QML States
diff --git a/doc/src/declarative/qmlviewer.qdoc b/doc/src/declarative/qmlruntime.qdoc
index c2b29d3..6d3e109 100644
--- a/doc/src/declarative/qmlviewer.qdoc
+++ b/doc/src/declarative/qmlruntime.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
- \page qmlviewer.html
+ \page qmlruntime.html
\title Qt Declarative UI Viewer (qmlviewer)
\ingroup qttools
\keyword qmlviewer
@@ -82,17 +82,17 @@
a simple orientation property. The orientation can be set via the
settings menu in the application, or by pressing Ctrl+T to toggle it.
- To use this from within your QML file, import QmlViewer 1.0 and create a
+ To use this from within your QML file, import QDeclarativeViewer 1.0 and create a
Screen object. This object has a property, orientation, which can be either
Screen.Landscape or Screen.Portrait and which can be bound to in your
application. An example is below:
\code
- import QmlViewer 1.0 as QmlViewer
+ import QDeclarativeViewer 1.0 as QDeclarativeViewer
Item {
- QmlViewer.Screen { id: qmlviewerScreen }
- state: (qmlviewerScreen.orientation == QmlViewer.Screen.Landscape) ? 'landscape' : ''
+ QDeclarativeViewer.Screen { id: qmlviewerScreen }
+ state: (qmlviewerScreen.orientation == QDeclarativeViewer.Screen.Landscape) ? 'landscape' : ''
}
\endcode
diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc
index 732ff86..66d537d 100644
--- a/doc/src/declarative/qtbinding.qdoc
+++ b/doc/src/declarative/qtbinding.qdoc
@@ -46,50 +46,50 @@
\tableofcontents
-The QML API is split into three main classes - QmlEngine, QmlComponent and QmlContext.
-QmlEngine provides the environment in which QML is run, QmlComponent encapsulates
-\l {QML Documents}, and QmlContext allows applications to expose data to QML component instances.
+The QML API is split into three main classes - QDeclarativeEngine, QDeclarativeComponent and QDeclarativeContext.
+QDeclarativeEngine provides the environment in which QML is run, QDeclarativeComponent encapsulates
+\l {QML Documents}, and QDeclarativeContext allows applications to expose data to QML component instances.
-QML also includes a convenience API, QmlView, for applications that simply want to embed QML
-components into a new QGraphicsView. QmlView covers up many of the details discussed below.
-While QmlView is mainly intended for rapid prototyping it can have uses in production applications.
+QML also includes a convenience API, QDeclarativeView, for applications that simply want to embed QML
+components into a new QGraphicsView. QDeclarativeView covers up many of the details discussed below.
+While QDeclarativeView is mainly intended for rapid prototyping it can have uses in production applications.
If you are looking at retrofitting an existing Qt application with QML,
read \l{Integrating QML with existing Qt UI code}.
\section1 Basic Usage
-Every application requires at least one QmlEngine. A QmlEngine allows the configuration of
+Every application requires at least one QDeclarativeEngine. A QDeclarativeEngine allows the configuration of
global settings that apply to all the QML component instances - such as the QNetworkAccessManager
that is used for network communications, and the path used for persistent storage.
-Multiple QmlEngine's are only needed if the application requires these settings to differ
+Multiple QDeclarativeEngine's are only needed if the application requires these settings to differ
between QML component instances.
-\l {QML Documents} are loaded using the QmlComponent class. Each QmlComponent instance
-represents a single QML document. A QmlComponent can be passed a document URL, or raw text
+\l {QML Documents} are loaded using the QDeclarativeComponent class. Each QDeclarativeComponent instance
+represents a single QML document. A QDeclarativeComponent can be passed a document URL, or raw text
representing the content of the document. The document URL can be a local filesystem URL, or
any network URL supported by QNetworkAccessManager.
-QML component instances can then be created by calling the QmlComponent::create() method. Here's
+QML component instances can then be created by calling the QDeclarativeComponent::create() method. Here's
an example of loading a QML document, and creating an object from it.
\code
-QmlEngine *engine = new QmlEngine(parent);
-QmlComponent component(engine, QUrl("main.qml"));
+QDeclarativeEngine *engine = new QDeclarativeEngine(parent);
+QDeclarativeComponent component(engine, QUrl("main.qml"));
QObject *myObject = component.create();
\endcode
\section1 Exposing Data
-QML components are instantiated in a QmlContext. A context allows the application to expose data
-to the QML component instance. A single QmlContext can be used to instantiate all the objects
-used by an application, or several QmlContext can be created for more fine grained control over
-the data exposed to each instance. If a context is not passed to the QmlComponent::create()
-method, the QmlEngine's \l {QmlEngine::rootContext()}{root context} is used. Data exposed through
+QML components are instantiated in a QDeclarativeContext. A context allows the application to expose data
+to the QML component instance. A single QDeclarativeContext can be used to instantiate all the objects
+used by an application, or several QDeclarativeContext can be created for more fine grained control over
+the data exposed to each instance. If a context is not passed to the QDeclarativeComponent::create()
+method, the QDeclarativeEngine's \l {QDeclarativeEngine::rootContext()}{root context} is used. Data exposed through
the root context is available to all object instances.
\section1 Simple Data
-To expose data to a QML component instance, applications set \l {QmlContext::setContextProperty()}
+To expose data to a QML component instance, applications set \l {QDeclarativeContext::setContextProperty()}
{context properties} which are then accessible by name from QML \l {Property Binding}s and
\l {JavaScript Blocks}. The following example shows how to expose a background color to a QML
file.
@@ -99,11 +99,11 @@ file.
\o
\code
// main.cpp
-QmlContext *windowContext = new QmlContext(engine->rootContext());
+QDeclarativeContext *windowContext = new QDeclarativeContext(engine->rootContext());
windowContext->setContextProperty("backgroundColor",
QColor(Qt::lightsteelblue));
-QmlComponent component(&engine, "main.qml");
+QDeclarativeComponent component(&engine, "main.qml");
QObject *window = component.create(windowContext);
\endcode
\o
@@ -125,14 +125,14 @@ Rectangle {
Context properties work just like normal properties in QML bindings - if the \c backgroundColor
context property in the previous example was changed to red, the component object instances would
all be automatically updated. Note that it is the responsibility of the creator to delete any
-QmlContext it constructs. If the \c windowContext in the example above is no longer needed when
+QDeclarativeContext it constructs. If the \c windowContext in the example above is no longer needed when
the \c window component instantiation is destroyed, the \c windowContext must be destroyed
explicitly. The simplest way to ensure this is to set \c window as \c windowContext's parent.
-QmlContexts form a tree - each QmlContext except for the root context has a parent. Child
-QmlContexts effectively inherit the context properties present in their parents. This gives
+QDeclarativeContexts form a tree - each QDeclarativeContext except for the root context has a parent. Child
+QDeclarativeContexts effectively inherit the context properties present in their parents. This gives
applications more freedom in partitioning the data exposed to different QML object instances.
-If a QmlContext sets a context property that is also set in one of its parents, the new context
+If a QDeclarativeContext sets a context property that is also set in one of its parents, the new context
property shadows that in the parent. In The following example, the \c background context property
in \c {Context 1} shadows the \c background context property in the root context.
@@ -185,10 +185,10 @@ int main(int argc, char **argv)
{
// ...
- QmlContext *windowContext = new QmlContext(engine->rootContext());
+ QDeclarativeContext *windowContext = new QDeclarativeContext(engine->rootContext());
windowContext->setContextProperty("palette", new CustomPalette);
- QmlComponent component(&engine, "main.qml");
+ QDeclarativeComponent component(&engine, "main.qml");
QObject *window = component.create(windowContext);
}
\endcode
@@ -230,7 +230,7 @@ binding that does not have a NOTIFY signal will cause QML to issue a warning at
\section2 Dynamic Structured Data
If an application is too dynamic to structure data as compile-time QObject types, dynamically
-structured data can be constructed at runtime using the QmlPropertyMap class.
+structured data can be constructed at runtime using the QDeclarativePropertyMap class.
\section1 Calling C++ methods from QML
@@ -279,7 +279,7 @@ int main(int argc, char **argv)
{
// ...
- QmlContext *context = engine->rootContext();
+ QDeclarativeContext *context = engine->rootContext();
context->setContextProperty("ledBlinker", new LEDBlinker);
// ...
@@ -329,15 +329,15 @@ Of course, it is also possible to call \l {Adding new methods}{functions declare
\section1 Network Components
-If the URL passed to QmlComponent is a network resource, or if the QML document references a
-network resource, the QmlComponent has to fetch the network data before it is able to create
-objects. In this case, the QmlComponent will have a \l {QmlComponent::Loading}{Loading}
-\l {QmlComponent::status()}{status}. An application will have to wait until the component
-is \l {QmlComponent::Ready}{Ready} before calling \l {QmlComponent::create()}.
+If the URL passed to QDeclarativeComponent is a network resource, or if the QML document references a
+network resource, the QDeclarativeComponent has to fetch the network data before it is able to create
+objects. In this case, the QDeclarativeComponent will have a \l {QDeclarativeComponent::Loading}{Loading}
+\l {QDeclarativeComponent::status()}{status}. An application will have to wait until the component
+is \l {QDeclarativeComponent::Ready}{Ready} before calling \l {QDeclarativeComponent::create()}.
The following example shows how to load a QML file from a network resource. After creating
-the QmlComponent, it tests whether the component is loading. If it is, it connects to the
-QmlComponent::statusChanged() signal and otherwise calls the \c {continueLoading()} method
+the QDeclarativeComponent, it tests whether the component is loading. If it is, it connects to the
+QDeclarativeComponent::statusChanged() signal and otherwise calls the \c {continueLoading()} method
directly. This test is necessary, even for URLs that are known to be remote, just in case
the component has been cached and is ready immediately.
@@ -345,9 +345,9 @@ the component has been cached and is ready immediately.
MyApplication::MyApplication()
{
// ...
- component = new QmlComponent(engine, QUrl("http://www.example.com/main.qml"));
+ component = new QDeclarativeComponent(engine, QUrl("http://www.example.com/main.qml"));
if (component->isLoading())
- QObject::connect(component, SIGNAL(statusChanged(QmlComponent::Status)),
+ QObject::connect(component, SIGNAL(statusChanged(QDeclarativeComponent::Status)),
this, SLOT(continueLoading()));
else
continueLoading();
@@ -381,7 +381,7 @@ For example:
MyApplication::MyApplication()
{
// ...
- component = new QmlComponent(engine, QUrl("qrc:/main.qml"));
+ component = new QDeclarativeComponent(engine, QUrl("qrc:/main.qml"));
if (component->isError()) {
qWarning() << component->errors();
} else {
diff --git a/doc/src/declarative/qtprogrammers.qdoc b/doc/src/declarative/qtprogrammers.qdoc
index 343359c..ca1d596 100644
--- a/doc/src/declarative/qtprogrammers.qdoc
+++ b/doc/src/declarative/qtprogrammers.qdoc
@@ -61,7 +61,7 @@ QML provides direct access to the following concepts from Qt:
\o QAction - the \l {QML Basic Types}{action} type
\o QObject signals and slots - available as functions to call in JavaScript
\o QObject properties - available as variables in JavaScript
- \o QWidget - QmlView is a QML-displaying widget
+ \o QWidget - QDeclarativeView is a QML-displaying widget
\o Qt models - used directly in data binding (QAbstractItemModel and next generation QListModelInterface)
\endlist
@@ -84,14 +84,14 @@ QML Items also serve these purposes. Each is considered separately below.
\section2 Simple Widgets
-The most important rule to remember while implementing a new QmlGraphicsItem in C++
+The most important rule to remember while implementing a new QDeclarativeItem in C++
is that it should not contain any look and feel policies - leave that to the
QML usage of the item.
As an example, imagine you wanted a reusable Button item. If you therefore
-decided to write a QmlGraphicsItem subclass to implement a button,
+decided to write a QDeclarativeItem subclass to implement a button,
just as QToolButton subclasses QWidget for this purpose, following the rule above, your
-\c QmlGraphicsButton would not have any appearance - just the notions of enabled, triggering, etc.
+\c QDeclarativeButton would not have any appearance - just the notions of enabled, triggering, etc.
But there is already an object in Qt that does this: QAction.
@@ -103,13 +103,13 @@ The look and feel of an action - the appearance of the button, the transition be
and exactly how it respond to mouse, key, or touch input, should all be left for definition
in QML.
-It is illustrative to note that QmlGraphicsTextEdit is built upon QTextControl,
-QmlGraphicsWebView is built upon QWebPage, and ListView uses QListModelInterface,
+It is illustrative to note that QDeclarativeTextEdit is built upon QTextControl,
+QDeclarativeWebView is built upon QWebPage, and ListView uses QListModelInterface,
just as QTextEdit, QWebView, and QListView are built upon
those same UI-agnostic components.
The encapsulation of the look and feel that QWidgets gives is important, and for this
-the QML concept of \l {qmldocuments.html}{components} serves the same purpose. If you are building a complete
+the QML concept of \l {qdeclarativedocuments.html}{components} serves the same purpose. If you are building a complete
suite of applications which should have a consistent look and feel, you should build
a set of reusable components with the look and feel you desire.
diff --git a/doc/src/declarative/scope.qdoc b/doc/src/declarative/scope.qdoc
index f709335..218af89 100644
--- a/doc/src/declarative/scope.qdoc
+++ b/doc/src/declarative/scope.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
-\page qmlscope.html
+\page qdeclarativescope.html
\title QML Scope
\tableofcontents
@@ -348,14 +348,14 @@ Item {
}
\endcode
-\section1 QmlContext chain
+\section1 QDeclarativeContext chain
-The \l QmlContext chain allows C++ applications to pass data into QML applications.
-\l QmlComponent object instances created from C++ are passed a \l QmlContext in which they
-are created. Variables defined in this context appear in the scope chain. Each QmlContext
-also defines a parent context. Variables in child QmlContext's shadow those in its parent.
+The \l QDeclarativeContext chain allows C++ applications to pass data into QML applications.
+\l QDeclarativeComponent object instances created from C++ are passed a \l QDeclarativeContext in which they
+are created. Variables defined in this context appear in the scope chain. Each QDeclarativeContext
+also defines a parent context. Variables in child QDeclarativeContext's shadow those in its parent.
-Consider the following QmlContext tree.
+Consider the following QDeclarativeContext tree.
\image qml-context-tree.png
diff --git a/doc/src/declarative/tutorial.qdoc b/doc/src/declarative/tutorial.qdoc
index 825590c..98efe12 100644
--- a/doc/src/declarative/tutorial.qdoc
+++ b/doc/src/declarative/tutorial.qdoc
@@ -40,11 +40,13 @@
****************************************************************************/
/*!
-\page tutorial.html
-\title Tutorial
+\page qml-tutorial.html
+\title QML Tutorial
+\brief An introduction to the basic concepts and features of QML.
+\nextpage QML Tutorial 1 - Basic Types
-This tutorial gives an introduction to QML. It doesn't cover everything; the emphasis is on teaching the key principles,
-and features are introduced as needed.
+This tutorial gives an introduction to QML, the mark up language for Qt Quick. It doesn't cover everything;
+the emphasis is on teaching the key principles, and features are introduced as needed.
Through the different steps of this tutorial we will learn about QML basic types, we will create our own QML component
with properties and signals, and we will create a simple animation with the help of states and transitions.
@@ -56,9 +58,182 @@ The tutorial's source code is located in the $QTDIR/examples/declarative/tutoria
Tutorial chapters:
\list
-\o \l {Tutorial 1 - Basic Types}
-\o \l {Tutorial 2 - QML Component}
-\o \l {Tutorial 3 - States and Transitions}
+\o \l {QML Tutorial 1 - Basic Types}
+\o \l {QML Tutorial 2 - QML Component}
+\o \l {QML Tutorial 3 - States and Transitions}
\endlist
*/
+
+/*!
+\page qml-tutorial1.html
+\title QML Tutorial 1 - Basic Types
+\contentspage QML Tutorial
+\previouspage QML Tutorial
+\nextpage QML Tutorial 2 - QML Component
+
+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.
+
+\image declarative-tutorial1.png
+
+Here is the QML code for the application:
+
+\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 0
+
+\section1 Walkthrough
+
+\section2 Import
+
+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 with:
+
+\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 3
+
+\section2 Rectangle element
+
+\snippet examples/declarative/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 \e page.
+We also set the \c width, \c height and \c color properties.
+The \l{Rectangle} element contains many other properties (such as \c x and \c y), but these are left at their default values.
+
+\section2 Text element
+
+\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 2
+
+We add a \l Text element as a child of our root element that will display the text 'Hello world!'.
+
+The \c y property is used to position the text vertically at 30 pixels from the top of its parent.
+
+The \c font.pointSize and \c font.bold properties are related to fonts and use the \l{dot properties}{dot notation}.
+
+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 \e page element (see \l{anchor-layout}{Anchor-based Layout}).
+
+\section2 Viewing the example
+
+To view what you have created, run the qmlviewer (located in the \c bin directory) with your filename as the first argument.
+For example, to run the provided completed Tutorial 1 example from the install location, you would type:
+
+\code
+bin/qmlviewer $QTDIR/examples/declarative/tutorials/helloworld/tutorial1.qml
+\endcode
+*/
+
+/*!
+\page qml-tutorial2.html
+\title QML Tutorial 2 - QML Component
+\contentspage QML Tutorial
+\previouspage QML Tutorial 1 - Basic Types
+\nextpage QML Tutorial 3 - States and Transitions
+
+This chapter adds a color picker to change the color of the text.
+
+\image declarative-tutorial2.png
+
+Our color picker is made of six cells with different colors.
+To avoid writing the same code multiple times, we first create a new \c Cell component.
+A component provides a way of defining a new type that we can re-use in other QML files.
+A QML component is like a black-box and interacts with the outside world through properties, signals and slots and is generally
+defined in its own QML file (for more details, see \l {Defining new Components}).
+The component's filename must always start with a capital letter.
+
+Here is the QML code for \c Cell.qml:
+
+\snippet examples/declarative/tutorials/helloworld/Cell.qml 0
+
+\section1 Walkthrough
+
+\section2 The Cell Component
+
+\snippet examples/declarative/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 examples/declarative/tutorials/helloworld/Cell.qml 4
+
+We declare a \c color 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{intro-properties}{Properties}).
+
+\snippet examples/declarative/tutorials/helloworld/Cell.qml 5
+
+We want our component to also have a signal that we call \e clicked with a \e color parameter.
+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 \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 examples/declarative/tutorials/helloworld/Cell.qml 3
+
+In order to change the color of the text when clicking on a cell, we create a \l MouseRegion element with
+the same size as its parent.
+
+A \l MouseRegion 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
+
+In our main QML file, we use our \c Cell component to create the color picker:
+
+\snippet examples/declarative/tutorials/helloworld/tutorial2.qml 0
+
+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 \e clicked signal of our cell is triggered, we want to set the color of the text to the color 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}).
+*/
+
+/*!
+\page qml-tutorial3.html
+\title QML Tutorial 3 - States and Transitions
+\contentspage QML Tutorial
+\previouspage QML Tutorial 2 - QML Component
+
+In this chapter, we make this example a little bit more dynamic by introducing states and transitions.
+
+We want our text to move to the bottom of the screen, rotate and become red when clicked.
+
+\image declarative-tutorial3_animation.gif
+
+Here is the QML code:
+
+\snippet examples/declarative/tutorials/helloworld/tutorial3.qml 0
+
+\section1 Walkthrough
+
+\snippet examples/declarative/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 MouseRegion is pressed, and deactivated when it is released.
+
+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.
+
+\snippet examples/declarative/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.
+
+\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 \e down 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.
+
+The \l ParallelAnimation element makes sure that the two types of animations (number and color) start at the same time.
+We could also run them one after the other by using \l SequentialAnimation instead.
+
+For more details on states and transitions, see \l {QML States}.
+*/
diff --git a/doc/src/declarative/tutorial1.qdoc b/doc/src/declarative/tutorial1.qdoc
deleted file mode 100644
index 3a79a15..0000000
--- a/doc/src/declarative/tutorial1.qdoc
+++ /dev/null
@@ -1,97 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
-\page tutorial1.html
-\title Tutorial 1 - Basic Types
-
-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.
-
-\image declarative-tutorial1.png
-
-Here is the QML code for the application:
-
-\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 0
-
-\section1 Walkthrough
-
-\section2 Import
-
-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 with:
-
-\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 3
-
-\section2 Rectangle element
-
-\snippet examples/declarative/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 \e page.
-We also set the \c width, \c height and \c color properties.
-The \l{Rectangle} element contains many other properties (such as \c x and \c y), but these are left at their default values.
-
-\section2 Text element
-
-\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 2
-
-We add a \l Text element as a child of our root element that will display the text 'Hello world!'.
-
-The \c y property is used to position the text vertically at 30 pixels from the top of its parent.
-
-The \c font.pointSize and \c font.bold properties are related to fonts and use the \l{dot properties}{dot notation}.
-
-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 \e page element (see \l{anchor-layout}{Anchor-based Layout}).
-
-\section2 Viewing the example
-
-To view what you have created, run the qmlviewer (located in the \c bin directory) with your filename as the first argument.
-For example, to run the provided completed Tutorial 1 example from the install location, you would type:
-
-\code
-bin/qmlviewer $QTDIR/examples/declarative/tutorials/helloworld/tutorial1.qml
-\endcode
-
-[\l {Tutorial}] [Next: \l {Tutorial 2 - QML Component}]
-
-*/
diff --git a/doc/src/declarative/tutorial2.qdoc b/doc/src/declarative/tutorial2.qdoc
deleted file mode 100644
index e6391b4..0000000
--- a/doc/src/declarative/tutorial2.qdoc
+++ /dev/null
@@ -1,112 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
-\page tutorial2.html
-\title Tutorial 2 - QML Component
-
-This chapter adds a color picker to change the color of the text.
-
-\image declarative-tutorial2.png
-
-Our color picker is made of six cells with different colors.
-To avoid writing the same code multiple times, we first create a new \c Cell component.
-A component provides a way of defining a new type that we can re-use in other QML files.
-A QML component is like a black-box and interacts with the outside world through properties, signals and slots and is generally
-defined in its own QML file (for more details, see \l {Defining new Components}).
-The component's filename must always start with a capital letter.
-
-Here is the QML code for \c Cell.qml:
-
-\snippet examples/declarative/tutorials/helloworld/Cell.qml 0
-
-\section1 Walkthrough
-
-\section2 The Cell Component
-
-\snippet examples/declarative/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 examples/declarative/tutorials/helloworld/Cell.qml 4
-
-We declare a \c color 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{intro-properties}{Properties}).
-
-\snippet examples/declarative/tutorials/helloworld/Cell.qml 5
-
-We want our component to also have a signal that we call \e clicked with a \e color parameter.
-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 \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 examples/declarative/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.
-
-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
-
-In our main QML file, we use our \c Cell component to create the color picker:
-
-\snippet examples/declarative/tutorials/helloworld/tutorial2.qml 0
-
-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 \e clicked signal of our cell is triggered, we want to set the color of the text to the color 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}).
-
-[Previous: \l {Tutorial 1 - Basic Types}] [Next: \l {Tutorial 3 - States and Transitions}]
-
-*/
-
diff --git a/doc/src/declarative/tutorial3.qdoc b/doc/src/declarative/tutorial3.qdoc
deleted file mode 100644
index 8293ef8..0000000
--- a/doc/src/declarative/tutorial3.qdoc
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
-\page tutorial3.html
-\title Tutorial 3 - States and Transitions
-
-In this chapter, we make this example a little bit more dynamic by introducing states and transitions.
-
-We want our text to move to the bottom of the screen, rotate and become red when clicked.
-
-\image declarative-tutorial3_animation.gif
-
-Here is the QML code:
-
-\snippet examples/declarative/tutorials/helloworld/tutorial3.qml 0
-
-\section1 Walkthrough
-
-\snippet examples/declarative/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.
-
-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.
-
-\snippet examples/declarative/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.
-
-\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 \e down 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.
-
-The \l ParallelAnimation element makes sure that the two types of animations (number and color) start at the same time.
-We could also run them one after the other by using \l SequentialAnimation instead.
-
-For more details on states and transitions, see \l {QML States}.
-
-[Previous: \l {Tutorial 2 - QML Component}] [\l {Tutorial}]
-
-*/
diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc
index 4de944e..a960382 100644
--- a/doc/src/development/qmake-manual.qdoc
+++ b/doc/src/development/qmake-manual.qdoc
@@ -872,7 +872,7 @@
Developers using Visual Studio to write Qt applications can use the
Visual Studio integration facilities provided with the
- \l{Qt Commercial Editions} and do not need to worry about how
+ \l{Qt Commercial Edition} and do not need to worry about how
project dependencies are managed.
However, some developers may need to import an existing \c qmake project
@@ -1727,8 +1727,15 @@ distinction between shared and
\snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 139
+ There is also a convenience function for adding conditional rules
+ called \c{addMMPRules}. Suppose you need certain functionality
+ to require different library depending on architecture. This
+ can be specified with \c{addMMPRules} as follows:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 148
+
\note You should not use this variable to add MMP statements that are
- explicitly supported by their own variables, such as
+ explicitly supported by their own variables, such as
\c TARGET.EPOCSTACKSIZE.
Doing so could result in duplicate statements in the MMP file.
diff --git a/doc/src/examples/scribble.qdoc b/doc/src/examples/scribble.qdoc
index 3c6d136..5c66410 100644
--- a/doc/src/examples/scribble.qdoc
+++ b/doc/src/examples/scribble.qdoc
@@ -74,9 +74,8 @@
\o \c MainWindow provides a menu above the \c ScribbleArea.
\endlist
- We will start by reviewing the \c ScribbleArea class, which
- contains the interesting, then we will take a look at the \c
- MainWindow class that uses it.
+ We will start by reviewing the \c ScribbleArea class. Then we will
+ review the \c MainWindow class, which uses \c ScribbleArea.
\section1 ScribbleArea Class Definition
diff --git a/doc/src/files-and-resources/datastreamformat.qdoc b/doc/src/files-and-resources/datastreamformat.qdoc
index 1c2d887..bab2c2c 100644
--- a/doc/src/files-and-resources/datastreamformat.qdoc
+++ b/doc/src/files-and-resources/datastreamformat.qdoc
@@ -47,7 +47,7 @@
The \l QDataStream allows you to serialize some of the Qt data types.
The table below lists the data types that QDataStream can serialize
and how they are represented. The format described below is
- \l{QDataStream::setVersion()}{version 8}.
+ \l{QDataStream::setVersion()}{version 12}.
It is always best to cast integers to a Qt integer type, such as
qint16 or quint32, when reading and writing. This ensures that
@@ -57,9 +57,9 @@
\table
\row \o bool
- \o \list
- \o boolean
- \endlist
+ \o \list
+ \o boolean
+ \endlist
\row \o qint8
\o \list
\o signed byte
@@ -145,6 +145,17 @@
\o Time (QTime)
\o 0 for Qt::LocalTime, 1 for Qt::UTC (quint8)
\endlist
+ \row \o QEasingCurve
+ \o \list
+ \o type (quint8)
+ \o func (quint64)
+ \o hasConfig (bool)
+ \o If hasConfig is true then these fields follow:
+ \o list
+ \o period (double)
+ \o amplitude (double)
+ \o overshoot (double)
+ \endlist
\row \o QFont
\o \list
\o The family (QString)
diff --git a/doc/src/frameworks-technologies/activeqt.qdoc b/doc/src/frameworks-technologies/activeqt.qdoc
index 67b9bb3..e24959d 100644
--- a/doc/src/frameworks-technologies/activeqt.qdoc
+++ b/doc/src/frameworks-technologies/activeqt.qdoc
@@ -93,7 +93,7 @@
plugin that integrates the QAxContainer module into \l{Qt
Designer}.
- The ActiveQt modules are part of the \l{Qt Full Framework Edition} and
+ The ActiveQt modules are part of the \l{Qt Commercial Edition} and
the \l{Open Source Versions of Qt}.
\sa {QAxContainer Module}, {QAxServer Module}
diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc
index e54774b..b23629d 100644
--- a/doc/src/getting-started/installation.qdoc
+++ b/doc/src/getting-started/installation.qdoc
@@ -176,7 +176,7 @@ consult the installation instructions provided instead of the ones in
this document.
\o \l{Open Source Versions of Qt} is not officially supported for use with
any version of Visual Studio. Integration with Visual Studio is available
-as part of the \l{Qt Commercial Editions}.
+as part of the \l{Qt Commercial Edition}.
\endlist
\endtable
diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc
index d1f5f0f..52d4488 100644
--- a/doc/src/index.qdoc
+++ b/doc/src/index.qdoc
@@ -142,7 +142,7 @@
<td valign="top">
<ul>
<li><a href="gpl.html">GNU GPL</a>, <a href="lgpl.html">GNU LGPL</a></li>
- <li><a href="commercialeditions.html">Commercial Editions</a></li>
+ <li><a href="commercialedition.html">Commercial Edition</a></li>
<li><a href="licensing.html">Licenses Used in Qt</a></li>
</ul>
</td>
diff --git a/doc/src/legal/3rdparty.qdoc b/doc/src/legal/3rdparty.qdoc
index af3fc93..d608038 100644
--- a/doc/src/legal/3rdparty.qdoc
+++ b/doc/src/legal/3rdparty.qdoc
@@ -305,17 +305,17 @@
\hr
- Copyright (c) 1987, 1993, 1994
+ Copyright (c) 1987, 1993, 1994\br
The Regents of the University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
- are met:
+ are met:\br
1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
+ notice, this list of conditions and the following disclaimer.\br
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
+ documentation and/or other materials provided with the distribution.\br
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
@@ -334,22 +334,22 @@
\hr
- Copyright (C) 1988-1997 Sam Leffler
- Copyright (C) 1991-1997 Silicon Graphics, Inc.
- Copyright (c) Joris Van Damme <info@awaresystems.be>
- Copyright (c) AWare Systems <http://www.awaresystems.be/>
- Portions Copyright (C) 1985-1987, 1990 Regents of the University of California
- Portions Copyright (C) 1990, 1991 Digital Equipment Corporation
- Portions Copyright (C) 1990 Sun Microsystems, Inc.
- Portions Copyright (C) 1990, 1995 Frank D. Cringle
- Portions Copyright (C) 1996 BancTec AB
- Portions Copyright (C) 1996 Mike Johnson
- Portions Copyright (C) 1996 Pixar
- Portions Copyright (C) 1997 Greg Ward Larson
- Portions Copyright (C) 2000 Frank Warmerdam
- Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
- Copyright (c( 1996 USAF Phillips Laboratory
- Additions (c) Richard Nolde 2006-2009
+ Copyright (C) 1988-1997 Sam Leffler\br
+ Copyright (C) 1991-1997 Silicon Graphics, Inc.\br
+ Copyright (c) Joris Van Damme <info@awaresystems.be>\br
+ Copyright (c) AWare Systems <http://www.awaresystems.be/>\br
+ Portions Copyright (C) 1985-1987, 1990 Regents of the University of California\br
+ Portions Copyright (C) 1990, 1991 Digital Equipment Corporation\br
+ Portions Copyright (C) 1990 Sun Microsystems, Inc.\br
+ Portions Copyright (C) 1990, 1995 Frank D. Cringle\br
+ Portions Copyright (C) 1996 BancTec AB\br
+ Portions Copyright (C) 1996 Mike Johnson\br
+ Portions Copyright (C) 1996 Pixar\br
+ Portions Copyright (C) 1997 Greg Ward Larson\br
+ Portions Copyright (C) 2000 Frank Warmerdam\br
+ Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\br
+ Copyright (c( 1996 USAF Phillips Laboratory\br
+ Additions (c) Richard Nolde 2006-2009
Permission to use, copy, modify, distribute, and sell this software and
its documentation for any purpose is hereby granted without fee, provided
@@ -372,7 +372,7 @@
\hr
- Copyright (c) 1985, 1986 The Regents of the University of California.
+ Copyright (c) 1985, 1986 The Regents of the University of California.\br
All rights reserved.
This code is derived from software contributed to Berkeley by
@@ -393,7 +393,7 @@
\hr
- Copyright (c) 1996-1997 Sam Leffler
+ Copyright (c) 1996-1997 Sam Leffler\br
Copyright (c) 1996 Pixar
Permission to use, copy, modify, distribute, and sell this software and
diff --git a/doc/src/legal/commercialeditions.qdoc b/doc/src/legal/commercialeditions.qdoc
index 4e44376..dde8d69 100644
--- a/doc/src/legal/commercialeditions.qdoc
+++ b/doc/src/legal/commercialeditions.qdoc
@@ -40,61 +40,19 @@
****************************************************************************/
/*!
- \page commercialeditions.html
- \title Qt Commercial Editions
+ \page commercialedition.html
+ \title Qt Commercial Edition
\ingroup licensing
\brief Information about the license and features of the Commercial Edition.
- \keyword Qt Full Framework Edition
- \keyword Qt GUI Framework Edition
-
- Two editions of Qt are available under a commercial license:
- Qt GUI Framework Edition, and Qt Full Framework Edition.
+ Qt can be used to develop closed source software if you obtain a commercial
+ license.
If you want to develop Free or Open Source software for release using a recognized
Open Source license, you can use the \l{Open Source Versions of Qt}.
The table below summarizes the differences between the two commercial editions:
- \table 75%
- \header \o{1,2} Features \o{2,1} Editions
- \header \o Qt GUI Framework \o Qt Full Framework
- \row \o \l{QtCore}{Qt Core classes (QtCore)} \o \bold{X} \o \bold{X}
- \row \o \l{QtGui}{Qt GUI classes (QtGui)} \o \bold{(X)} \o \bold{X}
- \row \o \l{Graphics View Classes} (part of QtGui) \o \o \bold{X}
- \row \o \l{QtNetwork}{Networking (QtNetwork)} \o \o \bold{X}
- \row \o \l{QtOpenGL}{OpenGL (QtOpenGL)} \o \o \bold{X}
- \row \o \l{QtScript}{Scripting (QtScript)} \o \o \bold{X}
- \row \o \l{QtScriptTools}{Script Debugging (QtScriptTools)}\o \o \bold{X}
- \row \o \l{QtSql}{Database/SQL (QtSql)} \o \o \bold{X}
- \row \o \l{QtSvg}{SVG (QtSvg)} \o \o \bold{X}
- \row \o \l{QtWebKit}{WebKit integration (QtWebKit)} \o \o \bold{X}
- \row \o \l{QtXml}{XML (QtXml)} \o \o \bold{X}
- \row \o \l{QtXmlPatterns}{XQuery and XPath (QtXmlPatterns)}\o \o \bold{X}
- \row \o \l{Qt3Support}{Qt 3 Support (Qt3Support)} \o \bold{(X)} \o \bold{X}
- \row \o \l{QtHelp}{Help system (QtHelp)} \o \o \bold{X}
- \row \o \l{QtDBus}{D-Bus IPC support (QtDBus)} \o \bold{X} \o \bold{X}
- \row \o \l{QtDesigner}{\QD extension classes (QtDesigner)} \o \o \bold{X}
- \row \o \l{QtTest}{Unit testing framework (QtTest)} \o \bold{X} \o \bold{X}
- \row \o \l{QtUiTools}{Run-time form handling (QtUiTools)} \o \o \bold{X}
- \row \o \l{Phonon Module}{Phonon Multimedia Framework} \o \o \bold{X}
- \row \o \l{ActiveQt} \o \o \bold{<X>}
- \endtable
-
- \bold{(X)} The Qt GUI Framework Edition contains selected classes from the QtGui and
- Qt3Support modules corresponding to the functionality available in the Qt 3 Professional
- Edition.
-
- \bold{<X>} The ActiveQt module is only available on Windows.
-
- Lists of the classes available in each edition are available on the
- following pages:
-
- \list
- \o \l{Qt GUI Framework Edition}
- \o \l{Qt Full Framework Edition}
- \endlist
-
Please see the \l{Supported Platforms}{list of supported
platforms} for up-to-date information about the various platforms
and compilers that Qt supports.
@@ -103,36 +61,13 @@
\l{Qt Licensing Overview} and information on \l{Qt License Pricing}
for commercial editions of Qt and other Qt-related products.
- To purchase, please visit the \l{How to Order}{online order
- form}.
+ To purchase, please visit the \l{How to Order}{online order form}.
- For further information and assistance, please contact Qt
- sales.
+ For further information and assistance, please contact Qt sales.
Web: http://qt.nokia.com/contact.
Phone, U.S. office (for North America): \bold{1-650-813-1676}.
- Phone, Norway office (for the rest of the world): \bold{+47 21 60
- 48 00}.
-*/
-
-/*!
- \page full-framework-edition-classes.html
- \title Qt Full Framework Edition
- \ingroup classlists
-
- \brief The list of Qt classes included in the Full Framework Edition.
-
- \generatelist{classesbyedition Desktop}
-*/
-
-/*!
- \page gui-framework-edition-classes.html
- \title Qt GUI Framework Edition
- \ingroup classlists
-
- \brief The list of Qt classes included in the GUI Framework Edition.
-
- \generatelist{classesbyedition DesktopLight}
+ Phone, Norway office (for the rest of the world): \bold{+47 21 60 48 00}.
*/
diff --git a/doc/src/legal/editions.qdoc b/doc/src/legal/editions.qdoc
index 4de77c1..c7e73f2 100644
--- a/doc/src/legal/editions.qdoc
+++ b/doc/src/legal/editions.qdoc
@@ -53,8 +53,8 @@
In terms of license conditions, there are two main forms of Qt:
\list
- \o The \l{Qt Commercial Editions} are the commercial
- versions of \l{About Qt}{Qt}.
+ \o The \l{Qt Commercial Edition} is the commercial version of
+ \l{About Qt}{Qt} which can be used to create closed source software.
\o The \l{Open Source Versions of Qt} are freely available for download.
\endlist
diff --git a/doc/src/legal/licenses.qdoc b/doc/src/legal/licenses.qdoc
index 344ebd4..d1bf4cf 100644
--- a/doc/src/legal/licenses.qdoc
+++ b/doc/src/legal/licenses.qdoc
@@ -60,7 +60,7 @@
Qt contains some code that is not provided under the
\l{GNU General Public License (GPL)},
\l{GNU Lesser General Public License (LGPL)} or the
- \l{Qt Commercial Editions}{Qt Commercial License Agreement}, but rather under
+ \l{Qt Commercial Edition}{Qt Commercial License Agreement}, but rather under
specific licenses from the original authors. Some pieces of code were developed
by Nokia and others originated from third parties.
This page lists the licenses used, names the authors, and links
diff --git a/doc/src/legal/opensourceedition.qdoc b/doc/src/legal/opensourceedition.qdoc
index c199e34..d95e107 100644
--- a/doc/src/legal/opensourceedition.qdoc
+++ b/doc/src/legal/opensourceedition.qdoc
@@ -87,5 +87,4 @@
If you are in doubt what edition of Qt is right for your project,
please contact
\l{mailto:qt-info@nokia.com}{qt-info@nokia.com}.
-
*/
diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc
index 78af7eb..9e1d340 100644
--- a/doc/src/modules.qdoc
+++ b/doc/src/modules.qdoc
@@ -109,8 +109,6 @@
definitions of the module's classes, use the following directive:
\snippet doc/src/snippets/code/doc_src_qtcore.qdoc 0
-
- The QtCore module is part of all \l{Qt editions}.
*/
@@ -128,9 +126,6 @@
following directive:
\snippet doc/src/snippets/code/doc_src_qtgui.qdoc 0
-
- The QtGui module is part of the \l{Qt GUI Framework Edition},
- the \l{Qt Full Framework Edition}, and the \l{Open Source Versions of Qt}.
*/
/*!
@@ -177,9 +172,6 @@
.pro file:
\snippet doc/src/snippets/code/doc_src_qtnetwork.qdoc 0
-
- The QtNetwork module is part of the \l{Qt Full Framework Edition} and the
- \l{Open Source Versions of Qt}.
*/
/*!
@@ -225,9 +217,9 @@
OpenGL module can take advantage of the whole Qt API for
non-OpenGL-specific GUI functionality.
- The QtOpenGL module is part of the \l{Qt Full Framework Edition} and the
- \l{Open Source Versions of Qt}. It is available on Windows, X11, and Mac OS X.
- \l{Qt for Embedded Linux and OpenGL} supports OpenGL ES (OpenGL for Embedded Systems).
+ The QtOpenGL module is available on Windows, X11 and Mac OS X.
+ \l{Qt for Embedded Linux and OpenGL} supports OpenGL ES (OpenGL for
+ Embedded Systems).
\note To be able to use the OpenGL API in \l{Qt for Embedded Linux}, it must be
integrated with the Q Window System (QWS). See the
\l{Qt for Embedded Linux and OpenGL} documentation for details.
@@ -319,9 +311,6 @@
scriptable with QtScript, see \l{Making Applications
Scriptable}.
- The QtScript module is part of the \l{Qt Full Framework Edition} and the
- \l{Open Source Versions of Qt}.
-
\section1 License Information
Qt Commercial Edition licensees that wish to distribute applications that
@@ -379,9 +368,6 @@
To link against the module, add this line to your \l qmake \c .pro file:
\snippet doc/src/snippets/code/doc.src.qtscripttools.qdoc 1
-
- The QtScriptTools module is part of the \l{Qt Full Framework Edition} and
- the \l{Open Source Versions of Qt}.
*/
/*!
@@ -402,9 +388,6 @@
\snippet doc/src/snippets/code/doc_src_qtsql.qdoc 1
- The QtSql module is part of the \l{Qt Full Framework Edition} and the
- \l{Open Source Versions of Qt}.
-
See the \l{SQL Programming} guide for information about using this
module in your applications.
*/
@@ -430,9 +413,6 @@
\snippet doc/src/snippets/code/doc_src_qtsvg.qdoc 1
- The QtSvg module is part of the \l{Qt Full Framework Edition} and the
- \l{Open Source Versions of Qt}.
-
\section1 License Information
Some code for arc handling in this module is derived from code with
@@ -488,9 +468,6 @@
Further XML support is provided by the \l{Qt Solutions} group who
provide, for example, classes that support SOAP and MML with the
Qt XML classes.
-
- This module is part of the \l{Qt Full Framework Edition} and the
- \l{Open Source Versions of Qt}.
*/
/*!
@@ -515,9 +492,6 @@
\snippet doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc 1
- This module is part of the \l{Qt Full Framework Edition} and the
- \l{Open Source Versions of Qt}.
-
\section1 License Information
The XML Schema implementation provided by this module contains the \c xml.xsd file
@@ -594,9 +568,6 @@
\snippet doc/src/snippets/code/doc_src_phonon.qdoc 1
- The Phonon module is part of the \l{Qt Full Framework Edition} and the
- \l{Open Source Versions of Qt}.
-
\section1 Qt Backends
Qt Backends are currently developed for Phonon version 4.1. The Phonon
@@ -672,12 +643,6 @@
diverse parts of the Qt 3 API, it has dependencies on the QtCore,
QtGui, QtNetwork, QtSql, and QtXml modules.
- This module is part of the \l{Qt Full Framework Edition} and the
- \l{Open Source Versions of Qt}. Most classes offered by this module are
- also part of the \l{Qt GUI Framework Edition}.
- Classes that are not available for \l{Qt GUI Framework Edition}
- users are marked as such in the class documentation.
-
\sa {Porting to Qt 4}
*/
@@ -705,10 +670,6 @@
file:
\snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 1
-
- \note These classes are part of the \l{Open Source Versions of Qt} and
- \l{Qt Commercial Editions}{Qt Full Framework Edition} for commercial
- users.
*/
/*!
@@ -745,10 +706,6 @@
\snippet doc/src/snippets/code/doc_src_qtuiloader.qdoc 1
- \note These classes are part of the \l{Open Source Versions of Qt} and
- \l{Qt Commercial Editions}{Qt Full Framework Edition} for commercial
- users.
-
\sa{Calculator Builder Example}, {World Time Clock Builder Example}
*/
@@ -773,10 +730,6 @@
\snippet doc/src/snippets/code/doc_src_qthelp.qdoc 1
- These classes are part of the \l{Open Source Versions of Qt} and
- \l{Qt Commercial Editions}{Qt Full Framework Edition} for commercial
- users.
-
\section1 License Information
The QtHelp module uses the CLucene indexing library to provide full-text
@@ -860,7 +813,7 @@
The QAxContainer module is not covered by the \l{GNU General Public License (GPL)},
the \l{GNU Lesser General Public License (LGPL)}, or the
- \l{Qt Commercial Editions}{Qt Commercial License}. Instead, it is distributed under
+ \l{Qt Commercial Edition}{Qt Commercial License}. Instead, it is distributed under
the following license.
\legalese
@@ -910,7 +863,7 @@
The QAxContainer module is not covered by the \l{GNU General Public License (GPL)},
the \l{GNU Lesser General Public License (LGPL)}, or the
- \l{Qt Commercial Editions}{Qt Commercial License}. Instead, it is distributed under
+ \l{Qt Commercial Edition}{Qt Commercial License}. Instead, it is distributed under
the following license.
\legalese
@@ -1005,7 +958,7 @@
The QAxContainer module is not covered by the \l{GNU General Public License (GPL)},
the \l{GNU Lesser General Public License (LGPL)}, or the
- \l{Qt Commercial Editions}{Qt Commercial License}. Instead, it is distributed under
+ \l{Qt Commercial Edition}{Qt Commercial License}. Instead, it is distributed under
the following license.
\legalese
@@ -1043,7 +996,7 @@
located in the \c{src/s60main} directory are not covered by the
\l{GNU General Public License (GPL)}, the
\l{GNU Lesser General Public License (LGPL)}, or the
- \l{Qt Commercial Editions}{Qt Commercial License}. Instead, they are
+ \l{Qt Commercial Edition}{Qt Commercial License}. Instead, they are
distributed under the following license.
\legalese
diff --git a/doc/src/platforms/emb-directfb-EmbLinux.qdoc b/doc/src/platforms/emb-directfb-EmbLinux.qdoc
index 74f2aaa..9e060f8 100644
--- a/doc/src/platforms/emb-directfb-EmbLinux.qdoc
+++ b/doc/src/platforms/emb-directfb-EmbLinux.qdoc
@@ -267,7 +267,8 @@ perform well.
\o QT_NO_DIRECTFB_IMAGEPROVIDER
\o By default Qt will use DirectFB to load QPixmaps from disk/memory. If
your DirectFB implementation does not support this it might make sense to
-define this.
+define this. If you see strange rendering issues with pixmaps that have an
+alpha channel defining this could solve the problem.
\row
\o QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE
@@ -327,4 +328,9 @@ QT_DIRECTFB_DISABLE_RASTERFALLBACKS is defined, DirectFB will only return
instead of falling back to QRasterPaintEngine. Please note that these
defines should only be used when optimizing the application.
+\section2 Top level transparency
+\note DirectFB supports partially or fully transparent top level windows,
+either through QWidget::setWindowOpacity or through setting a non-opaque
+background brush. Note that for the latter it is not supported to change an
+opaque window to be transparent at runtime.
*/
diff --git a/doc/src/platforms/mac-differences.qdoc b/doc/src/platforms/mac-differences.qdoc
index bda439d..58d64de 100644
--- a/doc/src/platforms/mac-differences.qdoc
+++ b/doc/src/platforms/mac-differences.qdoc
@@ -301,7 +301,7 @@
\contentspage {Other Licenses Used in Qt}{Contents}
\ingroup licensing
- \brief License information for contributions by Apple, Inc. to specific parts of the Qt/Mac Cocoa port.
+ \brief License information for contributions by Apple, Inc. to specific parts of the Qt for Mac OS X Cocoa port.
\legalese
diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc
index 91593d3..a18bc13 100644
--- a/doc/src/qt4-intro.qdoc
+++ b/doc/src/qt4-intro.qdoc
@@ -471,6 +471,20 @@
\tableofcontents
+ \section1 Declarative UI development with Qt Quick
+
+ \section1 Network Bearer Management
+
+ Bearer Management controls the connectivity state of the system.
+ The new Bearer Management API in the QtNetwork module allows the
+ application to identify whether the system is online and how many
+ interfaces there are, as well as start and stop interfaces, or
+ roam transparently between access points.
+
+ QNetworkAccessManager uses this API for HTTP level roaming.
+
+ \section1 Multimedia - playback and playlist management
+
\section1 New Classes, Functions, Macros, etc.
Links to new classes, functions, macros, and other items
diff --git a/doc/src/snippets/code/doc_src_qmake-manual.qdoc b/doc/src/snippets/code/doc_src_qmake-manual.qdoc
index a48b53f..5a04420 100644
--- a/doc/src/snippets/code/doc_src_qmake-manual.qdoc
+++ b/doc/src/snippets/code/doc_src_qmake-manual.qdoc
@@ -969,3 +969,16 @@ DEPLOYMENT.installer_header = 0x12345678
//! [147]
DEPLOYMENT.installer_header = "$${LITERAL_HASH}{\"My Application Installer\"},(0x12345678),1,0,0"
//! [147]
+
+//! [148]
+# Set conditional libraries
+LIB.MARM = "LIBRARY myarm.lib"
+LIB.WINSCW = "LIBRARY mywinscw.lib"
+LIB.default = "LIBRARY mydefault.lib"
+
+# Add the conditional MMP rules
+MYCONDITIONS = MARM WINSCW
+MYVARIABLES = LIB
+
+addMMPRules(MYCONDITIONS, MYVARIABLES)
+//! [148]
diff --git a/doc/src/snippets/code/src_corelib_tools_qscopedpointer.cpp b/doc/src/snippets/code/src_corelib_tools_qscopedpointer.cpp
index c068ba9..4158388 100644
--- a/doc/src/snippets/code/src_corelib_tools_qscopedpointer.cpp
+++ b/doc/src/snippets/code/src_corelib_tools_qscopedpointer.cpp
@@ -128,7 +128,7 @@ private:
QScopedPointer<int, QScopedPointerArrayDeleter<int> > arrayPointer(new int[42]);
// this QScopedPointer frees its data using free():
-QScopedPointer<int, QScopedPointerPodDeleter<int> > podPointer(reinterpret_cast<int *>(malloc(42)));
+QScopedPointer<int, QScopedPointerPodDeleter> podPointer(reinterpret_cast<int *>(malloc(42)));
// this struct calls "myCustomDeallocator" to delete the pointer
struct ScopedPointerCustomDeleter
diff --git a/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp b/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp
index 643d0dd..5db6676 100644
--- a/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp
+++ b/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp
@@ -60,3 +60,12 @@ connect(reply, SIGNAL(error(QNetworkReply::NetworkError)),
connect(reply, SIGNAL(sslErrors(QList<QSslError>)),
this, SLOT(slotSslErrors(QList<QSslError>)));
//! [1]
+
+//! [2]
+QNetworkConfigurationManager manager;
+networkAccessManager->setConfiguration(manager.defaultConfiguration());
+//! [2]
+
+//! [3]
+networkAccessManager->setConfiguration(QNetworkConfiguration());
+//! [3]
diff --git a/doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp b/doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp
new file mode 100644
index 0000000..e2cc4df
--- /dev/null
+++ b/doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+QNetworkConfigurationManager mgr;
+QList<QNetworkConfiguration> activeConfigs = mgr.allConfigurations(QNetworkConfiguration::Active)
+if (activeConfigs.count() > 0)
+ Q_ASSERT(mgr.isOnline())
+else
+ Q_ASSERT(!mgr.isOnline())
+//! [0]
diff --git a/doc/src/xml-processing/xml-patterns.qdoc b/doc/src/xml-processing/xml-patterns.qdoc
index 408b2da..68056fd 100644
--- a/doc/src/xml-processing/xml-patterns.qdoc
+++ b/doc/src/xml-processing/xml-patterns.qdoc
@@ -65,8 +65,7 @@
\l{http://www.w3.org/TR/xpath20} {XPath 2.0} in Qt applications,
for querying XML data \e{and} for querying
\l{QAbstractXmlNodeModel} {non-XML data that can be modeled to
- look like XML}. The QtXmlPatterns module is included in the \l{Qt
- Full Framework Edition}, and the \l{Open Source Versions of Qt}.
+ look like XML}.
Readers who are not familiar with the XQuery/XPath language can read
\l {A Short Path to XQuery} for a brief introduction.