diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-25 21:53:30 +0200 |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-25 21:53:30 +0200 |
commit | ef5891755bf760b68df1fc387e08a1b16980d6ad (patch) | |
tree | ffacc13c82dcadd1dda588e703ba43e440d9454c /doc | |
parent | 5a7223450d0ebd4eaa47f263005c6d1c2e142a76 (diff) | |
parent | a32c96e753c2f5a123e518a92762ec9c9ff3b0b7 (diff) |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (50 commits)
Dont crash when assigning the same input context twice.
Fixed a typo in variable name in qlocale data generator.
Fix for Norwegian and Korean languages on symbian.
Remove unused function in QDBusConnectionPrivate
Doc: Fixing bugs in HTML generator
Updating 4.7.0 change log.
Doc: Correcting style to class lists
qdoc: Improved class index page.
Added MSVC 2010 project files to .gitignore
Fix architecture detection on GNU/Hurd.
Revert "tst_bic: make it possible to test for cross-compilation"
fix typo in documentation
Improve Bearer Management related documentation in QNetworkAccessManager
Compile with QT_NO_ACTION.
Unbreak compilation outside Mac
QDBusAbstractInterface: don't set lastError outside the object's own thread
tst_bic: make it possible to test for cross-compilation
Remove Q_PACKED from QChar and QLocale::Data.
QDebug operator for QFlags
Removing unneeded qDebug statement.
...
Diffstat (limited to 'doc')
36 files changed, 1146 insertions, 642 deletions
diff --git a/doc/src/declarative/advtutorial.qdoc b/doc/src/declarative/advtutorial.qdoc index 47504ae78b..62536c63c6 100644 --- a/doc/src/declarative/advtutorial.qdoc +++ b/doc/src/declarative/advtutorial.qdoc @@ -468,6 +468,6 @@ By following this tutorial you've seen how you can write a fully functional appl \endlist There is so much more to learn about QML that we haven't been able to cover in this tutorial. Check out all the -demos and examples and the \l {Declarative UI Using QML}{documentation} to find out all the things you can do with QML! +demos and examples and the \l {Qt Quick} documentation to see all the things you can do with QML! */ diff --git a/doc/src/declarative/examples.qdoc b/doc/src/declarative/examples.qdoc index 6e0426ca09..15d7652374 100644 --- a/doc/src/declarative/examples.qdoc +++ b/doc/src/declarative/examples.qdoc @@ -42,12 +42,9 @@ /*! \page qdeclarativeexamples.html \title QML Examples and Demos + \brief Building UI's with QML \ingroup all-examples -\previouspage Graphics View Examples -\contentspage Qt Examples -\nextpage Painting Examples - \section1 Running the examples You can find many simple examples in the \c examples/declarative diff --git a/doc/src/declarative/integrating.qdoc b/doc/src/declarative/integrating.qdoc index c6f754b149..728eb1389a 100644 --- a/doc/src/declarative/integrating.qdoc +++ b/doc/src/declarative/integrating.qdoc @@ -81,7 +81,7 @@ of simple and dynamic elements. \section2 Adding QML widgets to a QGraphicsScene -If you have an existing UI based on the \l{The Graphics View Framework}{Graphics View Framework}, +If you have an existing UI based on the \l{Graphics View Framework}, you can integrate QML widgets directly into your QGraphicsScene. Use QDeclarativeComponent to create a QGraphicsObject from a QML file, and place the graphics object into your scene using \l{QGraphicsScene::addItem()}, or diff --git a/doc/src/declarative/qml-intro.qdoc b/doc/src/declarative/qml-intro.qdoc new file mode 100644 index 0000000000..64a4949e55 --- /dev/null +++ b/doc/src/declarative/qml-intro.qdoc @@ -0,0 +1,967 @@ +/**************************************************************************** +** +** 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 qml-intro.html +\title Beginning Qt Quick + + +\section1 Overview + + +QML is a high level, scripted language. Its commands, more correctly \e elements, +leverage the power and efficiency of the Qt libraries to make easy to use +commands that perform intuitive functions. Draw a rectangle, display an image at +a position and so on. Behind these elements are complex C++ libraries that +efficiently perform the action. As with any graphical application, always +consider that this ability to easily build graphically rich applications means +that some care may be needed to prevent performance problems. + +The language also allows more flexibility of these commands by using +Javascript rather than C++ to add new layers of logic to your application. +Javascript is easier to learn than C++ and can be embedded into the QML +files or imported from a separate file. + +\bold{In QML the types of various 'objects' are referred to as \l {QML +Elements}{ elements}}. + +An element usually has various \e properties that help define the element. For +example, if we created an element called Circle then the radius of the circle +would be a property. + + +\section1 A First Look + +The basic syntax of an \l {QML Elements}{element} is + + \code + SomeElement { + id: myObject + ... some other things here ... + } + \endcode + +Here we are defining a new object. We specify its 'type' first as SomeElement. +Then within matching braces { ... } we specify the various parts of our +element. + +The \c id is a unique identifier for the element, it must start with a lower +case letter and only contain letters, numbers and underscores. It is this +particular object's name. If this SomeElement \l {QML Elements}{element} was +a Rectangle instead and it was one of many then the \e optional unique id +would allow us to manipulate each element individually. + +Each visual element is ultimately based on, or inherits from, an element +called \l Item. \l Item has certain properties and actions that may be +useful. The properties have default values so you need only specify the +ones you will need. + +Take a simple element such as a \l Rectangle. It has an \c id, we will call +it \e myRectangle, it has a \c width and a \c height. Imagine that we +want a rectangle that is 500 pixels by 400 pixels in the x and y directions +(horizontal by vertical). + +We can implement this \l Rectangle with these properties this way + + \code + import Qt 4.7 + + // This is a comment. And below myRectangle is defined. + Rectangle { + id: myRectangle + width: 500 + height: 400 + } + \endcode + +This is a valid QML script. To run it, copy it and save it to a file, say +myexample.qml, and on the command line run the command + + \code + qml myexample.qml + \endcode + +It will create a very boring rectangle in its own window. + + + +\section1 Hello World! + +We can now add some color and text to make a Hello World QML program. + +\l Rectangle has the property \l {Rectangle::color}{color} to produce a +background color. + +Text is handled by a different element called \l Text. We need to create a +\l Text object inside the \l Rectangle and set its \l {Text::text}{text} +property to "Hello World!". So to set the text to 'Hello world' and the +background colour to light gray, + + \code + import Qt 4.7 + + Rectangle { + id: myRectangle + width: 500 + height: 400 + + Text { text: "Hello World!" } + + color: "lightgray" + } + \endcode + + +\section1 Hello World Again + +From now on we will not always show the import statement for Qt but it +should still be there when you create your QML scripts. + +To make our Hello World example a little nicer set the position of the text +to be at pixel position x = 100, y = 100 within the displayed window. This +position belongs to the \l Text element so we set the position inside its +definition. Note that we separate different QML statements on the same line +with a semi-colon, or we could have simply put each statement on a new line + + \code + Text { + text: "<h2>Hello World</h2>"; color: "darkgreen" + x: 100; y:100 + } + \endcode + +Not only did we reposition the text, but the text was altered by adding +HTML tags to change the font size. The text color was also changed from the +default black to dark green by using a standard string for the color's SVG +name. + +We could also have used a hexadecimal string for the RGB (red-green-blue, as +#rrggbb) values of the color similar to the method used in HTML. For +example, mostly blue with a green tint, + + \code + Text { + text: "<h1>Hello world again</h1>" + color: "#002288" + x: 100; y: 100 + } + \endcode + +All of these changes occurred within the \l Text object which is the scope +of these property changes. + +Other objects may use the information but it belongs to the element where +the property has been defined. + + +\section1 Images + +To add an image to our little application we use the \l Image element. An +\l Image uses a path to an image file, and has properties to control +the aspect ratio, the image size, to tile the area amongst others. The +source of the image, the path to the file, is a URL. Therefore the file can +be local: \e {mydir/myimage1.png}. Or it can be remote: +\e {"http://www.example.com/images/myimage1.png"}. + + \code + Image { + source: "images/qt-logo.png" + } + \endcode + +This displays the image, as we would expect, at the top left of the window. +The position of the default x = 0, y = 0 coordinate. The example here uses +a PNG file, but it could have been one of various supported formats, +including JPG and GIF. + +Let us reposition the image and enlarge it. Place it at the same 'x' offset +as the "Hello world again" text, but put it another 50 pixels below the +text, also make it 150 by 150 pixels in size, + + \code + Image { + source: "images/qt-logo.png" + x: 100; y: 150 + width: 150; height: 150 + } + \endcode + +Adding the Hello World example, with the text and the image example we can +write a simple piece of QML that starts to look a bit better. + + \code + import Qt 4.7 + + Rectangle { + id: myRectangle + width: 500 + height: 400 + + // A light gray background + color: "lightgray" + + // Position and color some text + Text { + text: "<h1>Hello world again</h1>" + color: "darkgreen" + x: 100; y: 100 + } + + // Using the opportunity to resize the image. + Image { + source: "images/qt-logo.png" + x: 100; y: 150 + width: 150; height: 150 + } + + } + \endcode + +The result is still quite simple + +\image qml-intro-helloa.png + + +\section1 Anchors: Aligning Elements + +Using absolute positioning, such as saying x = 100 and y = 150, works well +until the user or developer stretches or increases the size of the window. +Then the positions need to be recalculated. What would be nice would be a +relative means of positioning of objects in a window or rectangle. For +example, we want to place an image at the bottom of a rectangle, we would +like to specify the image's location as the 'bottom of the window', not a +specific coordinate. We can do this with the anchors property, which +objects inherit from Item. + +The anchors property is really a property group. It is a collection of +related properties. It has properties within it which can be used by means +of the dot notation. + +The dot notation uses object \c{id}s and property names to use a particular +object or property. Say I have a rectangle r1, which contains a rectangle +r2, which contains an Item item1, which has an 'x' property I want to +change. I just use the dot notation to identify it: r1.r2.item1.x + +If we want to position an image at the bottom of the rectangle it is +inside. I have to specify that the bottom of the image is also at the +bottom of the rectangle + + \code + import Qt 4.7 + + Rectangle { + id: myWin + width: 500 + height: 400 + + Image { + id: image1 + source: "images/qt-logo.png" + width: 150; height: 150 + anchors.bottom: myWin.bottom + } + } + \endcode + +This places the logo at the bottom left of the window. + +\image qml-intro-anchors1.png "A simple anchor" + +We would like it centered and not touching the bottom of the window, for +aesthetic reasons. For the centering we use the horizontalCenter property, +and to prevent the touching of the image to the bottom of the rectangle, +the bottomMargin property is used. So the new actions for the script are + + \list + \o set the bottom of the image (anchors.bottom) to be the bottom of the window + \o move the image to be in the horizontal center of the window + \o set a margin of 10 pixels so that the image does not touch the bottom window border + \endlist + +Encoded into QML the script becomes + + \code + import Qt 4.7 + + Rectangle { + id: myWin + width: 500 + height: 400 + + Image { + id: image1 + source: "images/qt-logo.png" + width: 150; height: 150 + anchors.bottom: myWin.bottom + anchors.horizontalCenter: myWin.horizontalCenter + anchors.bottomMargin: 10 + } + } + \endcode + + +Run this and resize the window. You will see that now the position of the +image adjusts during the resize. + +\image qml-intro-anchors2.png "Image Centered at the Bottom" + +You can also add another object say a block of descriptive text and place +it above or below the image or to the side. This code places some text just +above the image + + \code + Text { + text: "<h2>The Qt Logo</h2>" + anchors.bottom: image1.top + anchors.horizontalCenter: myWin.horizontalCenter + anchors.bottomMargin: 15 + } + \endcode + +\image qml-intro-anchors3.png + +\note \e anchors is a property group, to be used within the object. When +referencing these properties from another object we use the property +directly, instead of saying: + + \code + myRectangle.anchors.top // Wrong + \endcode + +we use + + \code + myRectangle.top // Correct + \endcode + + + + +\section1 Transformations + +We can transform a graphical object to get additional effects. Rotate a +piece of text by 180 degrees to display upside-down text. Rotate an image +by 90 degrees to lay it on its side. These transformations require +additonal information. + +For rotation, the additional information includes: the origin relative to +the object being rotated, the axis of rotation, and the angle in degrees to +rotate the image through in a clockwise direction. The axis does not have +to be the z-axis, the line between your eyes and the image, it could be +along the vertical y-axis or the horizontal x-axis. We have three +dimensions to play with. For simplicity in this example we will rotate +about the z-axis by 90 degrees in a negative direction, anti-clockwise. + +Rotation of text was also suggested. It could also be useful to scale the +text. We can do both. The \l {Item::transform}{transform} property is a +\e list of \l Transform elements, so using the list syntax + + \code + myList: [ listElement1, listElement2, ... } ] + \endcode + +we can produce a list of transformations. + +The text will be rotated by 45 degrees anti-clockwise and scaled +vertically by a factor of 1.5 and by 1.2 horizontally. + +Using the example above as the basis for this we have, + + \code + import Qt 4.7 + + Rectangle { + id: myWin + width: 500 + height: 400 + + Image { + id: image1 + source: "images/qt-logo.png" + width: 150; height: 150 + anchors.bottom: myWin.bottom + anchors.horizontalCenter: myWin.horizontalCenter + anchors.bottomMargin: 10 + + transform: Rotation { + origin.x: 75; origin.y: 75 + axis{ x: 0; y: 0; z:1 } angle: -90 + } + + } + + Text { + text: "<h2>The Qt Logo -- taking it easy</h2>" + anchors.bottom: image1.top + anchors.horizontalCenter: myWin.horizontalCenter + anchors.bottomMargin: 15 + + transform: [ + Scale { xScale: 1.5; yScale: 1.2 } , + + Rotation { + origin.x: 75; origin.y: 75 + axis{ x: 0; y: 0; z:1 } angle: -45 + } + ] + } + } + \endcode + +The code block in \c image1 starting with \c transform specifies that the +\l {Item::transform}{transform} property will be a Rotation through -90 +degrees, which is anti-clockwise, about the z-axis running through the +center of the image at (75,75), since the image is 150 x 150 pixels. + +The other transformation available is \l Translate. This produces a change +in position of the item. + +\note In a list of transformations the order of the transformations is +important. In the above example try swapping around the Scale transform with +the Rotation transform, remember to remove or add the comma. The results are +acceptable for our little test but not the same. + + +\section1 Animations + +Animation in QML is done by animating properties of objects. Properties +that are numbers, colors, Rectangles, points and directions. In QML these +are \l {QML Basic Types} named as real, int, color, rect, point, size, and +vector3d. There are a number of different ways to do animation. Here we +will look at a few of them. + +\section2 Number Animation + +Previously we have used a rotation transformation to change the orientation +of an image. We could easily animate this rotation so that instead of a +straight rotation counter-clockwise of 90 degrees we could rotate the image +through a full 360 degrees in an animation. The axis of rotation wont +change, the position of the center of the image will not change, only the +angle will change. Therefore, a NumberAnimation of a rotation's angle should +be enough for the task. If we wish for a simple rotation about the center +of the image then we can use the \c rotation property that is inherited +from \l Item. The rotation property is a real number that specifies the +angle in a clockwise direction for the rotation of the object. Here is the +code for our animated rotating image. + + \code + import Qt 4.7 + + Rectangle { + id: mainRec + width: 600 + height: 400 + + Image { + id: image1 + source: "images/qt-logo.png" + x: 200; y: 100 + width: 100; height: 100 + + // Animate a rotation + transformOrigin: Item.Center + NumberAnimation on rotation { + from: 0; to: 360 + duration: 2000 + loops: Animation.Infinite + } + } + } + \endcode + +The \c {transformOrigin: Item.Center} is redundant since this is the default +axis of rotation anyway. But if you change \c Center to \c BottomRight you +will see an interesting variation. + +Also if instead the \l Rotation transformation had been used then we would have +more control over the various parameters. We could vary the axis, to be not +just a different offset from the z-axis but along the y-axis, x-axis or +combination. For example, if the task had been to animate the rotation +about the y-axis passing through the center of the image then the following +code would do it. + + \code + import Qt 4.7 + + Rectangle { + id: mainRec + width: 600 + height: 400 + + Image { + id: image1 + source: "images/qt-logo.png" + x: 200; y: 100 + width: 100; height: 100 + + // Animate a rotation + transform: Rotation { + origin.x: 50; origin.y: 50; axis {x:0; y:1; z:0} angle:0 + NumberAnimation on angle { + from: 0; to: 360; + duration: 3000; + loops: Animation.Infinite + } + } + } + } + \endcode + +Here there is a rectangle 600 by 400 pixels. Placed within that rectangle +is an image 100 by 100 pixels. It is rotated about the center of the image +about the y-axis so that it looks as if it is rotating about an invisible +vertical string holding it up. The time it takes to complete the rotation is 3 +seconds (3,000 milliseconds). The NumberAnimation is applied to the angle +taking it from 0 (no change) to 360 degrees, back where it started. +Strictly speaking it isn't necessary to go from 0 to 360 since the same +location is duplicated, but it makes it easier to read in this example and +it has no visible effect on the animation. The number of loops that the +animation will execute is set to \c {Animation.Infinite} which means that the +animation is in an endless loop. + +To see an interesting variation. Change the axis to \c {axis { x:1; y:1; z:1 +}}. This is a line coming from the center of the image downwards to the +right and out of the screen. Although the change is simple the rotation +seems complex. + +\section2 Sequential Animation + +For a more complex animation we will need two images. The first image will +be placed at the center of a window (Rectangle) and the second image will +be at the upper left of the window. The animation will move the second +image from the top left of the window to the bottom right. In doing so we +will be animating the position and the size of the image. + +First create two images + + \code + import Qt 4.7 + + Rectangle { + id: mainRec + width: 600 + height: 400 + z: 0 + + Image { + id: image1 + source: "images/qt-logo.png" + x: 20; y: 20 ; z: 1 + width: 100; height: 100 + } + + Image { + id: image2 + source: "images/qt-logo.png" + width: 100; height: 100 + x: (mainRec.width - 100)/2; y: (mainRec.height - 100)/2 + z: 2 + } + } + \endcode + +We will add to 'image1' a SequentialAnimation from x = 20 to the target of +x = 450. The 'from' values will be used because we will be repeating the +animation, so the object needs to know where the original position is, both +x and y. The SequentialAnimation of x will set it to repeat by indicating +that the number of animation loops is infinite, meaning that the 'loop' +counter will be set to a value Animation.Infinite that indicates an endless +cycle. Also there will be a NumberAnimation to vary the numeric property +between the x values and over a given duration. After the NumberAnimation +there will be a PauseAnimation that will pause the animation for 500 +milliseconds (half a second) simply for the visual effect. + + \code + SequentialAnimation on x { + loops: Animation.Infinite + NumberAnimation { from: 20; to: 450; easing.type: "InOutQuad"; +duration: 2000 } + PauseAnimation { duration: 500 } + } + \endcode + +A similar block of code is written for the animation of the 'y' value of +the position. + +We will also animate the scale of the object, so as it goes from top left +to bottom right of the window it will become smaller until about midway, +and then become larger. To complete the animation we will set the 'z' +values of the images. 'z' is the stacking order, the z-axis effectively +points out from the screen to your eyes with the default value of 'z' being +0. So if we set the Rectangle to have z with value zero, just to be sure, +and image1 to 1 and image2 to 2 then image2 will be in the foreground and +image1 in the background. When image1 passes image2 it will pass behind it. +The completed code looks like + + \code + Rectangle { + id: mainRec + width: 600 + height: 400 + z: 0 + + Image { + id: image2 + source: "images/qt-logo.png" + width: 100; height: 100 + x: (mainRec.width - 100)/2; y: (mainRec.height - 100)/2 + z: 2 + } + + Image { + id: image1 + source: "images/qt-logo.png" + x: 20; y: 20 ; z: 1 + width: 100; height: 100 + + SequentialAnimation on x { + loops: Animation.Infinite + NumberAnimation { + from: 20; to: 450 + easing.type: "InOutQuad"; duration: 2000 + } + PauseAnimation { duration: 500 } + } + + SequentialAnimation on y { + loops: Animation.Infinite + NumberAnimation { + from: 20; to: 250 + easing.type: "InOutQuad"; duration: 2000 + } + PauseAnimation { duration: 500 } + } + + SequentialAnimation on scale { + loops: Animation.Infinite + NumberAnimation { from: 1; to: 0.5; duration: 1000 } + NumberAnimation { from: 0.5; to: 1; duration: 1000 } + PauseAnimation { duration: 500 } + } + } + } + \endcode + +The \c {easing.type} has many options, expressed as a string. It specifies the +kind of equation that describes the acceleration of the property value, not +necessarily position, over time. + +For example, \e InOutQuad means that at the start and the end of the animation the +'velocity' is low but the acceleration or deceleration is high. Much like a car +accelerating from stop, and decelerating to stop at the end of a journey, +with the maximum speed being in the middle. Examine the \l {PropertyAnimation::easing.type} +{easing} documentation and the various graphs that show the effect. The horizontal +axis, 'progress', can be thought of as time. The vertical axis is the value +of the particular property. + +In discussing animation we need to describe three objects: State, MouseArea +and Signals. Although independent of the animation elements, animation +delivers some of the best examples that illustrate these new elements. + + + +\section2 Animation Summary + +\table + \header + \o Name + \o Description + \row + \o PropertyAnimation + \o a property value on a target object is varied to a specified value over a given time. + + \row + \o NumberAnimation + \o animate a numeric property from one value to another over a given time. + + \row + \o PauseAnimation + \o results in the task waiting for the specified duration, in milliseconds. + + \row + \o SequentialAnimation + \o allows us to list in order the animation events we want to occur, first A then B then C and so on. + + \row + \o ParallelAnimation + \o enables us to run different animations at the same time instead of sequentially. + +\endtable + + + + + +\section1 Using States + +A state is a defined set of values in the configuration of an object and +often depends on the previous state. For example, a glass could be in a +state we call 'HalfFull' if it is being filled with a liquid and has +reached half of its total capacity. We could also have a state called +HalfEmpty which is the state that occurs when the amount of liquid drops to +half of the glass's capacity. Both states represent the same amount of +liquid, but we consider them different. Likewise, states in a program +represent not just values but may include how the current values were +reached. + +When a state changes a \e transition occurs. This is an opportunity to make +changes or take actions that depend on the movement to the new state. For +example, if we had a scene in the country where the state variable has two +states "daylight" and "night". Then when the state changes to "night" at +this transition the sky would be made dark, stars would be shown, the +countryside would be darkened. And when the state changes to "daylight" the +opposite changes would be made: the sky is now blue, the scenery is green, +there is a sun in the sky. + +Here is a simple QML program that shows the change of state in the above +example. We have two rectangles, the top one is the 'sky' and the bottom +one is the 'ground'. We will animate the change from daylight to night. +There will be two states, but we only need to define one since 'daylight' +will be the default state. We will just go to 'night' by clicking and +holding the left mouse button down, releasing the mouse button will reverse +the process + + \code + import Qt 4.7 + + Rectangle { + id: mainRectangle + width: 600 + height: 400 + color: "black" + + Rectangle { + id: sky + width: 600 + height: 200 + y: 0 + color: "lightblue" + } + + Rectangle { + id: ground + width: 600; height: 200 + y: 200 + color: "green" + } + + MouseArea { + id: mousearea + anchors.fill: mainRectangle + } + + states: [ State { + name: "night" + when: mousearea.pressed == true + PropertyChanges { target: sky; color: "darkblue" } + PropertyChanges { target: ground; color: "black" } + }, + State { + name: "daylight" + when: mousearea.pressed == false + PropertyChanges { target: sky; color: "lightblue" } + PropertyChanges { target: ground; color: "green" } + } + ] + + transitions: [ Transition { + from: "daylight"; to: "night" + ColorAnimation { duration: 1000 } + }, + Transition { + from: "night"; to: "daylight" + ColorAnimation { duration: 500 } + } + ] + } + \endcode + +Several new things appear in this sample. Firstly, we use a \l MouseArea +element to detect mouse clicks in the \e mainRectangle. Secondly, we use +the list notation [ thing1 , thing2, ... ] to build a list of states and a +list of transitions. + +\l MouseArea defines a region that will respond to mouse clicks. In this case +we are only concerned with when the mouse is pressed or not pressed, not +the particular button or other details. The area of the MouseArea is the +entire main window, mainRectangle, so that clicking anywhere in this region +will start the animation. Since we are using the 'pressed' mouse state, +then the animation will move from 'daylight' to 'night' only while the mouse +button remains pressed. + +When the button is released the 'daylight' state is entered and the +transition from 'night' to 'daylight' is triggered causing the animation to +run. The transition specifies the duration in milliseconds of the +ColorAnimation, while the state specifies the color of the new state. + +The PropertyChanges command is the way that we nominate which properties +will change in a change of state, and what new value the property will +take. Since, for example, we want the 'sky' region to turn to dark blue and +the 'ground' region to turn to black for the 'night' state, then the +rectangles for those regions are the 'target' and the property in the target +is 'color'. + + +\section1 Signals + +Signals are simply events that can be hooked up to actions we want performed. +In QML they are usually preceded by the word 'on', for example in the animation +using a MouseArea the signal was \l {MouseArea::onPressed}{onPressed}. If +you look at the C++ documentation you will see a lot of talk about +\l {Signals & Slots}{Signals and Slots}. Signals are connected to Slots. The +signal represents an event and the Slot is the function that does something +based on that event. You can also have Signals connected to other Signals, so +that one Signal (event) triggers another Signal (event), and so forth. It is +nice to know this is what happens beneath the QML layer but not essential for +using QML. + +Most elements do not have Signals associated with them. However, a few like +the \l Audio element have many signals. Some of the \l Audio signals are +used to represent events such as when the audio is stopped, play is pressed, +paused, and reaching the end of the media. They allow the developer to connect, + for example, the press of a user interface button (perhaps a MouseArea) to + some QML that will handle this event. + + +\section1 Analyzing An Example: Dial + +In the Qt \e {examples/declarative/toys} folder you will find a folder +\e {dial} which contains the \e dial example. + +\image qml-dial.png "QML Dial example with Slider" + +In essence this small application has a sliding bar that you can slide using +a mouse, and a graphical dial that responds to the position of the slider. + +The code for the example is in two parts: Dial.qml and dial-example.qml. + +\e {Dial.qml} can be found in the \e content sub-directory. It defines a Dial +component similar to an odometer. Eventually, the example will hook up a slider +component so that moving the slider will change the position of a needle on the +dial. + +The code for the Dial, identified by the name of the file, contains four images +in overlapping order: the background (numbers and divisions), the shadow of the +needle, the needle itself, and finally the 'glass' overlay (containing +transparent layers). + +The needle_shadow.png image has a Rotation assigned to the \e transform +attribute of the \l Image. The rotation is set to match the angle of the needle +image angle value \e {needleRotation.angle}. Both the needle and the +needle_shadow have the same default \e x and \e y values but the rotation origin +for the needle is slightly different so that a shadow will be evident as the +needle moves. + +\snippet ../../examples/declarative/toys/dial/content/Dial.qml needle_shadow + +And the needle + +\snippet ../../examples/declarative/toys/dial/content/Dial.qml needle + +The final image is the overlay which simply has a position defined. + +\snippet ../../examples/declarative/toys/dial/content/Dial.qml overlay + +\e {dial-example.qml} in the \e {examples/declarative/toys/dial} directory is the +main file of the example. It defines the visual environment that the Dial +will fit into. Because the \e Dial component and the images live in the \e +content sub-directory we will have to import this into \e dial-example. So the +start of the file looks like + + \code + import Qt 4.7 + import "content" + \endcode + +The visual space is bound by a 300 by 300 pixel \l Rectangle which is given +a gray color. Inside this rectangle is our component \e Dial and a \l Rectangle. +Inside the rectangle called 'container' is another rectangle with the +interesting name 'slider'. + +\snippet ../../examples/declarative/toys/dial/dial-example.qml 0 + +The Dial component, named 'dial, is \e anchored to the center of the main +rectangle. The \c value attribute of 'dial' is set to a value based on the +'slider' horizontal position and the 'container' width. So changes to the +'slider' position will change the Dial \c value which is used in Dial to compute +the rotation of the needle image. Notice this piece of code in Dial where +the change in \c value modifies the position of the needle. + + \code + SpringFollow on angle { + spring: 1.4 + damping: .15 + to: Math.min(Math.max(-130, root.value*2.6 - 130), 133) + } + \endcode + +This is part of the \c needleRotation that rotates the needle and causes the +rotation of its shadow. \l SpringFollow is an element that modifies the value +of that rotation angle \e to and mimics the oscillatory behavior of a spring, +with the appropriate \e spring constant to control the acceleration and the \e +damping to control how quickly the effect dies away. + +The 'container' is light gray with a color gradient defined using +\l GradientStop. The gradient is applied vertically. If you need a horizontal +gradient then you could apply the vertical gradient and then rotate the item +by 90 degrees. + +The 'slider' is dark gray and also has a vertical color gradient. The most +important thing about the 'slider' is that it has a MouseArea defined, which +specifies a \c {drag.target} on itself along the X-axis. With minimum +and maximum values on the X-axis defined. So we can click on the 'slider' and +drag it left and right within the confines of the 'container'. The motion of +the 'slider' will then change the \c value attribute in \e Dial as discussed +already. + +Also notice the use of a \c radius value for a rectangle. This produces rounded +corners. That is how the 'container' and 'slider' are displayed with a +pleasant rounded look. + + + +*/ + + + diff --git a/doc/src/demos/boxes.qdoc b/doc/src/demos/boxes.qdoc index aeb2513cec..367eb52eb0 100644 --- a/doc/src/demos/boxes.qdoc +++ b/doc/src/demos/boxes.qdoc @@ -44,7 +44,7 @@ \title Boxes This demo shows Qt's ability to combine advanced OpenGL rendering with the - the \l{The Graphics View Framework}{Graphics View} framework. + the \l{Graphics View Framework}. \image boxes-demo.png diff --git a/doc/src/examples/diagramscene.qdoc b/doc/src/examples/diagramscene.qdoc index 87c973a888..a39f89a7e7 100644 --- a/doc/src/examples/diagramscene.qdoc +++ b/doc/src/examples/diagramscene.qdoc @@ -54,13 +54,13 @@ colors, and it is possible to change the font, style, and underline of the text. - The Qt graphics view framework is designed to manage and - display custom 2D graphics items. The main classes of the - framework are QGraphicsItem, QGraphicsScene and QGraphicsView. The - graphics scene manages the items and provides a surface for them. + The Qt graphics view framework is designed to manage and display + custom 2D graphics items. The main classes of the framework are + QGraphicsItem, QGraphicsScene and QGraphicsView. The graphics + scene manages the items and provides a surface for them. QGraphicsView is a widget that is used to render a scene on the - screen. See the \l{The Graphics View Framework}{overview document} - for a more detailed description of the framework. + screen. See the \l{Graphics View Framework} for a more detailed + description of the framework. In this example we show how to create such custom graphics scenes and items by implementing classes that inherit diff --git a/doc/src/examples/drilldown.qdoc b/doc/src/examples/drilldown.qdoc index ca994e8e4d..2b87840bee 100644 --- a/doc/src/examples/drilldown.qdoc +++ b/doc/src/examples/drilldown.qdoc @@ -292,7 +292,7 @@ \codeline \snippet examples/sql/drilldown/view.h 1 - The QGraphicsView class is part of the \l {The Graphics View + The QGraphicsView class is part of the \l {Graphics View Framework} which we will use to display the images of Nokia's Qt offices. To be able to respond to user interaction; i.e., showing the @@ -388,8 +388,8 @@ reason we must create a custom item class is that we want to catch the item's hover events, animating the item when the mouse cursor is hovering over the image (by default, no items accept hover - events). Please see the \l{The Graphics View Framework} - documentation and the \l{Graphics View Examples} for more details. + events). Please see the \l{Graphics View Framework} documentation + and the \l{Graphics View Examples} for more details. \snippet examples/sql/drilldown/view.cpp 5 @@ -399,7 +399,7 @@ function calls the private \c showInformation() function to pop up the associated information window. - \l {The Graphics View Framework} provides the qgraphicsitem_cast() + The \l {Graphics View Framework} provides the qgraphicsitem_cast() function to determine whether the given QGraphicsItem instance is of a given type. Note that if the event is not related to any of our image items, we pass it on to the base class implementation. @@ -456,7 +456,7 @@ borders. Finally, we store the location ID that this particular record is - associated with as well as a z-value. In the \l {The Graphics View + associated with as well as a z-value. In the \l {Graphics View Framework}, an item's z-value determines its position in the item stack. An item of high Z-value will be drawn on top of an item with a lower z-value if they share the same parent item. We also @@ -477,7 +477,7 @@ there is no current mouse grabber item. They are sent when the mouse cursor enters an item, when it moves around inside the item, and when the cursor leaves an item. As we mentioned earlier, none - of the \l {The Graphics View Framework}'s items accept hover + of the \l {Graphics View Framework}'s items accept hover event's by default. The QTimeLine class provides a timeline for controlling diff --git a/doc/src/examples/mandelbrot.qdoc b/doc/src/examples/mandelbrot.qdoc index 7a3c1cd4df..11173a8173 100644 --- a/doc/src/examples/mandelbrot.qdoc +++ b/doc/src/examples/mandelbrot.qdoc @@ -285,7 +285,7 @@ \snippet examples/threads/mandelbrot/mandelbrotwidget.cpp 8 If the pixmap has the right scale factor, we draw the pixmap directly onto - the widget. Otherwise, we scale and translate the \l{The Coordinate + the widget. Otherwise, we scale and translate the \l{Coordinate System}{coordinate system} before we draw the pixmap. By reverse mapping the widget's rectangle using the scaled painter matrix, we also make sure that only the exposed areas of the pixmap are drawn. The calls to diff --git a/doc/src/examples/transformations.qdoc b/doc/src/examples/transformations.qdoc index 0d8de1d4d0..0c246cb72a 100644 --- a/doc/src/examples/transformations.qdoc +++ b/doc/src/examples/transformations.qdoc @@ -87,7 +87,7 @@ tranformation matrix that you can retrieve using the QPainter::worldTransform() function. A matrix transforms a point in the plane to another point. For more information about the - transformation matrix, see the \l {The Coordinate System} and + transformation matrix, see the \l {Coordinate System} and QTransform documentation. \snippet examples/painting/transformations/renderarea.h 0 @@ -374,7 +374,7 @@ All the tranformation operations operate on QPainter's tranformation matrix. For more information about the - transformation matrix, see the \l {The Coordinate System} and + transformation matrix, see the \l {Coordinate System} and QTransform documentation. The Qt reference documentation provides several painting diff --git a/doc/src/examples/undoframework.qdoc b/doc/src/examples/undoframework.qdoc index adb38b6c2c..aab25fa499 100644 --- a/doc/src/examples/undoframework.qdoc +++ b/doc/src/examples/undoframework.qdoc @@ -67,7 +67,7 @@ available through the edit menu. The user can also select a command from the undo view. - We use the \l{The Graphics View Framework}{graphics view + We use the \l{Graphics View Framework}{graphics view framework} to implement the diagram. We only treat the related code briefly as the framework has examples of its own (e.g., the \l{Diagram Scene Example}). diff --git a/doc/src/frameworks-technologies/activeqt.qdoc b/doc/src/frameworks-technologies/activeqt.qdoc index 979d885c94..5a3b23ebeb 100644 --- a/doc/src/frameworks-technologies/activeqt.qdoc +++ b/doc/src/frameworks-technologies/activeqt.qdoc @@ -71,16 +71,16 @@ \endlist For more information about using ActiveX with Qt, see - \l{Building ActiveX servers and controls with Qt}. + \l{Building ActiveX servers in Qt}. The ActiveQt framework consists of two modules: \list - \o The \l{Using ActiveX controls and COM objects in Qt}{QAxContainer} + \o The \l{Using ActiveX controls and COM in Qt}{QAxContainer} module is a static library implementing QObject and QWidget subclasses, QAxObject and QAxWidget, that act as containers for COM objects and ActiveX controls. - \o The \l{Building ActiveX servers and controls with Qt}{QAxServer} + \o The \l{Building ActiveX servers in Qt}{QAxServer} module is a static library that implements functionality for in-process and executable COM servers. This module provides the QAxAggregated, QAxBindable and QAxFactory diff --git a/doc/src/frameworks-technologies/dnd.qdoc b/doc/src/frameworks-technologies/dnd.qdoc index 0e952ad8fe..f728972b2a 100644 --- a/doc/src/frameworks-technologies/dnd.qdoc +++ b/doc/src/frameworks-technologies/dnd.qdoc @@ -58,9 +58,9 @@ This document describes the basic drag and drop mechanism and outlines the approach used to enable it in custom widgets. Drag and drop operations are also supported by Qt's item views and by - the graphics view framework; more information is available in the - \l{Using Drag and Drop with Item Views} and \l{The Graphics View - Framework} documents. + the graphics view framework. More information is available in + \l{Using Drag and Drop with Item Views} and \l{Graphics View + Framework}. \section1 Drag and Drop Classes diff --git a/doc/src/frameworks-technologies/graphicsview.qdoc b/doc/src/frameworks-technologies/graphicsview.qdoc index 681568ed5d..b13f98e67f 100644 --- a/doc/src/frameworks-technologies/graphicsview.qdoc +++ b/doc/src/frameworks-technologies/graphicsview.qdoc @@ -220,9 +220,10 @@ allow you to map between the three coordinate systems. When rendering, Graphics View's scene coordinates correspond to - QPainter's \e logical coordinates, and view coordinates are the same as - \e device coordinates. In \l{The Coordinate System}, you can read about - the relationship between logical coordinates and device coordinates. + QPainter's \e logical coordinates, and view coordinates are the + same as \e device coordinates. In the \l{Coordinate System} + documentation, you can read about the relationship between + logical coordinates and device coordinates. \img graphicsview-parentchild.png @@ -435,11 +436,12 @@ \section2 Animation - Graphics View supports animation at several levels. You can easily - assemble animation by using the Animation Framework. For that you'll - need your items to inherit from QGraphicsObject and associate - QPropertyAnimation with them. QPropertyAnimation allows to animate any - QObject property. + Graphics View supports animation at several levels. You can + easily assemble animation by using the Animation Framework. + For that you'll need your items to inherit from + QGraphicsObject and associate QPropertyAnimation with + them. QPropertyAnimation allows to animate any QObject + property. Another option is to create a custom item that inherits from QObject and QGraphicsItem. The item can the set up its own timers, and control diff --git a/doc/src/getting-started/demos.qdoc b/doc/src/getting-started/demos.qdoc index f8c70fe74e..9d39e080b0 100644 --- a/doc/src/getting-started/demos.qdoc +++ b/doc/src/getting-started/demos.qdoc @@ -126,16 +126,15 @@ \section1 Graphics View \list - \o \l{demos/chip}{40000 Chips} uses the - \l{The Graphics View Framework}{Graphics View} framework to efficiently - display a large number of individual graphical items on a scrolling canvas, - highlighting features such as rotation, zooming, level of detail control, - and item selection. - \o \l{demos/embeddeddialogs}{Embedded Dialogs} showcases Qt 4.4's \e{Widgets on - the Canvas} feature by embedding a multitude of fully-working dialogs into a - scene. + \o \l{demos/chip}{40000 Chips} uses the \l{Graphics View Framework} to + efficiently display a large number of individual graphical items on + a scrolling canvas and highlighting features including rotation, + zooming, level of detail control, and item selection. + \o \l{demos/embeddeddialogs}{Embedded Dialogs} showcases Qt 4.4's + \e{Widgets on the Canvas} feature by embedding several + fully-functional dialogs in a scene. \o \l{demos/boxes}{Boxes} showcases Qt's OpenGL support and the - integration with the Graphics View framework. + integration with the \l{Graphics View Framework}. \endlist \section1 Tools @@ -185,7 +184,7 @@ \o \l{demos/embedded/fluidlauncher}{Fluid Launcher} demo application launcher for embedded screens \o \l{demos/embedded/lightmaps}{Light Maps} demonstrates OpenStreetMap integration with WebKit. \o \l{demos/embedded/raycasting}{Ray Casting} demonstrates the use of ray casting with the - \l{The Graphics View Framework}{Graphics View} framework. + \l{Graphics View Framework}. \o \l{demos/embedded/styledemo}{Embedded Styles} demonstrates the use of styles. \o \l{demos/embedded/weatherinfo}{Weather Info} fetches weather information from the Web. \endlist diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc index 61fa1cd43b..a3393dda8b 100644 --- a/doc/src/getting-started/examples.qdoc +++ b/doc/src/getting-started/examples.qdoc @@ -76,423 +76,11 @@ */ /*! - \page examples.html - \title Qt Examples - \brief The example programs provided with Qt. - - \previouspage Tutorials - \contentspage How to Learn Qt - \nextpage Qt Demonstrations - - Qt is supplied with a variety of examples that cover almost every aspect - of development. They are not all designed to be impressive when you run - them, but their source code is carefully written to show good Qt - programming practices. You can launch any of these programs from the - \l{Examples and Demos Launcher} application. - - These examples are ordered by functional area, but many examples often - use features from many parts of Qt to highlight one area in particular. - If you are new to Qt, you should probably start by going through the - \l{Tutorials} before you have a look at the - \l{mainwindows/application}{Application} example. - - In addition to the examples and the tutorial, Qt includes a - \l{Qt Demonstrations}{selection of demos} that deliberately show off - Qt's features. You might want to look at these as well. - - \section1 \l{Widgets Examples}{Widgets} - \beginfloatleft - \l{Widgets Examples}{\inlineimage widget-examples.png - } - - \endfloat - Qt comes with a large range of standard widgets that users of modern - applications have come to expect. You can also develop your own custom - widgets and controls, and use them alongside standard widgets. - - It is even possible to provide custom styles and themes for widgets that can - be used to change the appearance of standard widgets and appropriately - written custom widgets. - - \clearfloat - \section1 \l{Dialog Examples}{Dialogs} - \beginfloatleft - \l{Dialog Examples}{\inlineimage dialog-examples.png - } - - \endfloat - Qt includes standard dialogs for many common operations, such as file - selection, printing, and color selection. - - Custom dialogs can also be created for specialized modal or modeless - interactions with users. - - \clearfloat - \section1 \l{Main Window Examples}{Main Windows} - \beginfloatleft - \l{Main Window Examples}{\inlineimage mainwindow-examples.png - } - - \endfloat - All the standard features of application main windows are provided by Qt. - - Main windows can have pull down menus, tool bars, and dock windows. These - separate forms of user input are unified in an integrated action system that - also supports keyboard shortcuts and accelerator keys in menu items. - - \clearfloat - \section1 \l{Layout Examples}{Layouts} - \beginfloatleft - \l{Layout Examples}{\inlineimage layout-examples.png - } - - \endfloat - Qt uses a layout-based approach to widget management. Widgets are arranged in - the optimal positions in windows based on simple layout rules, leading to a - consistent look and feel. - - Custom layouts can be used to provide more control over the positions and - sizes of child widgets. - - \clearfloat - \section1 \l{Item Views Examples}{Item Views} - \beginfloatleft - \l{Item Views Examples}{\inlineimage itemview-examples.png - } - - \endfloat - Item views are widgets that typically display data sets. Qt 4's model/view - framework lets you handle large data sets by separating the underlying data - from the way it is represented to the user, and provides support for - customized rendering through the use of delegates. - - \clearfloat - \section1 \l{Graphics View Examples}{Graphics View} - \beginfloatleft - \l{Graphics View Examples}{\inlineimage graphicsview-examples.png - } - - \endfloat - Qt is provided with a comprehensive canvas through the GraphicsView - classes. - - \clearfloat - \section1 \l{QML Examples and Demos}{Declarative} - \beginfloatleft - \l{QML Examples and Demos}{\inlineimage declarative-examples.png - } - - \endfloat - The Qt Declarative module provides a declarative framework for building - highly dynamic, custom user interfaces. - - \clearfloat - \section1 \l{Painting Examples}{Painting} - \beginfloatleft - \l{Painting Examples}{\inlineimage painting-examples.png - } - - \endfloat - Qt's painting system is able to render vector graphics, images, and outline - font-based text with sub-pixel accuracy accuracy using anti-aliasing to - improve rendering quality. - - \clearfloat - \section1 \l{Rich Text Examples}{Rich Text} - \beginfloatleft - \l{Rich Text Examples}{\inlineimage richtext-examples.png - } - - \endfloat - Qt provides powerful document-oriented rich text engine that supports Unicode - and right-to-left scripts. Documents can be manipulated using a cursor-based - API, and their contents can be imported and exported as both HTML and in a - custom XML format. - - \clearfloat - \section1 \l{Desktop Examples}{Desktop} - \beginfloatleft - \l{Desktop Examples}{\inlineimage desktop-examples.png - } - - \endfloat - Qt provides features to enable applications to integrate with the user's - preferred desktop environment. - - Features such as system tray icons, access to the desktop widget, and - support for desktop services can be used to improve the appearance of - applications and take advantage of underlying desktop facilities. - - \clearfloat - \section1 \l{Drag and Drop Examples}{Drag and Drop} - \beginfloatleft - \l{Drag and Drop Examples}{\inlineimage draganddrop-examples.png - } - - \endfloat - Qt supports native drag and drop on all platforms via an extensible - MIME-based system that enables applications to send data to each other in the - most appropriate formats. - - Drag and drop can also be implemented for internal use by applications. - - \clearfloat - \section1 \l{Threading and Concurrent Programming Examples}{Threading and Concurrent Programming} - \beginfloatleft - \l{Threading and Concurrent Programming Examples}{\inlineimage thread-examples.png - } - - \endfloat - Qt 4 makes it easier than ever to write multithreaded applications. More - classes have been made usable from non-GUI threads, and the signals and slots - mechanism can now be used to communicate between threads. - - The QtConcurrent namespace includes a collection of classes and functions - for straightforward concurrent programming. - - \clearfloat - \section1 \l{Tools Examples}{Tools} - \beginfloatleft - \l{Tools Examples}{\inlineimage tool-examples.png - } - - \endfloat - Qt is equipped with a range of capable tool classes, from containers and - iterators to classes for string handling and manipulation. - - Other classes provide application infrastructure support, handling plugin - loading and managing configuration files. - - \clearfloat - \section1 \l{Network Examples}{Network} - \beginfloatleft - \l{Network Examples}{\inlineimage network-examples.png - } - - \endfloat - Qt is provided with an extensive set of network classes to support both - client-based and server side network programming. - - \clearfloat - \section1 \l{Inter-Process Communication Examples}{Inter-Process Communication} - \beginfloatleft - \l{Inter-Process Communication Examples}{\inlineimage ipc-examples.png - } - - \endfloat - Simple, lightweight inter-process communication can be performed using shared - memory and local sockets. - - \clearfloat - \section1 \l{OpenGL Examples}{OpenGL} and \l{OpenVG Examples}{OpenVG} Examples - \beginfloatleft - \l{OpenGL Examples}{\inlineimage opengl-examples.png - } - - \endfloat - Qt provides support for integration with OpenGL implementations on all - platforms, giving developers the opportunity to display hardware accelerated - 3D graphics alongside a more conventional user interface. - - Qt provides support for integration with OpenVG implementations on - platforms with suitable drivers. - - \clearfloat - \section1 \l{Multimedia Examples}{Multimedia Framework} - \beginfloatleft - \l{Multimedia Examples}{\inlineimage phonon-examples.png - } - - \endfloat - Qt provides low-level audio support on linux,windows and mac platforms by default and - an audio plugin API to allow developers to implement there own audio support for - custom devices and platforms. - - The Phonon Multimedia Framework brings multimedia support to Qt applications. - - \clearfloat - \section1 \l{SQL Examples}{SQL} - \beginfloatleft - \l{SQL Examples}{\inlineimage sql-examples.png - } - - \endfloat - Qt provides extensive database interoperability, with support for products - from both open source and proprietary vendors. - - SQL support is integrated with Qt's model/view architecture, making it easier - to provide GUI integration for your database applications. - - \clearfloat - \section1 \l{XML Examples}{XML} - \beginfloatleft - \l{XML Examples}{\inlineimage xml-examples.png - } - - \endfloat - XML parsing and handling is supported through SAX and DOM compliant APIs - as well as streaming classes. - - The XQuery/XPath and XML Schema engines in the QtXmlPatterns modules - provide classes for querying XML files and custom data models. - - \clearfloat - \section1 \l{Qt Designer Examples}{Qt Designer} - \beginfloatleft - \l{Qt Designer Examples}{\inlineimage designer-examples.png - } - - \endfloat - Qt Designer is a capable graphical user interface designer that lets you - create and configure forms without writing code. GUIs created with - Qt Designer can be compiled into an application or created at run-time. - - \clearfloat - \section1 \l{UiTools Examples}{UiTools} - \beginfloatleft - \l{UiTools Examples}{\inlineimage uitools-examples.png - } - - \endfloat - User interfaces created with Qt Designer can be loaded and displayed at - run-time using the facilities of the QtUiTools module without the need - to generate code in advance. - - \clearfloat - \section1 \l{Qt Linguist Examples}{Qt Linguist} - \beginfloatleft - \l{Qt Linguist Examples}{\inlineimage linguist-examples.png - } - - \endfloat - Internationalization is a core feature of Qt. - - \clearfloat - \section1 \l{Qt Script Examples}{Qt Script} - \beginfloatleft - \l{Qt Script Examples}{\inlineimage qtscript-examples.png - } - - \endfloat - Qt is provided with a powerful embedded scripting environment through the QtScript - classes. - - \clearfloat - \section1 \l{WebKit Examples}{WebKit} - \beginfloatleft - \l{WebKit Examples}{\inlineimage webkit-examples.png - } - - \endfloat - Qt provides an integrated Web browser component based on WebKit, the popular - open source browser engine. - - \clearfloat - \section1 \l{Help System Examples}{Help System} - \beginfloatleft - \l{Help System Examples}{\inlineimage assistant-examples.png - } - - \endfloat - Support for interactive help is provided by the Qt Assistant application. - Developers can take advantages of the facilities it offers to display - specially-prepared documentation to users of their applications. - - \clearfloat - \section1 \l{State Machine Examples}{State Machine} - \beginfloatleft - \l{State Machine Examples}{\inlineimage statemachine-examples.png - } - - \endfloat - Qt provides a powerful hierarchical finite state machine through the Qt State - Machine classes. - - \clearfloat - \section1 \l{Animation Framework Examples}{Animation Framework} - \beginfloatleft - \l{Animation Framework Examples}{\inlineimage animation-examples.png - } - - \endfloat - These examples show to to use the \l{The Animation Framework}{animation framework} - to build highly animated, high-performance GUIs. - - \clearfloat - \section1 \l{Multi-Touch Examples}{Multi-Touch Framework} - \beginfloatleft - \l{Multi-Touch Examples}{\inlineimage multitouch-examples.png - } - - \endfloat - Support for multi-touch input makes it possible for developers to create - extensible and intuitive user interfaces. - - \clearfloat - \section1 \l{Gestures Examples}{Gestures} - \beginfloatleft - \l{Gestures Examples}{\inlineimage gestures-examples.png - } - - \endfloat - Applications can be written to respond to gestures as a natural input method. - These examples show how to enable support for standard and custom gestures in - applications. - - \clearfloat - \section1 \l{D-Bus Examples}{D-Bus} - \beginfloatleft - \l{D-Bus Examples}{\inlineimage dbus-examples.png - } - - \endfloat - Systems with limited resources, specialized hardware, and small - screens require special attention. - - \clearfloat - \section1 \l{Qt for Embedded Linux Examples}{Qt for Embedded Linux} - \beginfloatleft - \l{Qt for Embedded Linux Examples}{\inlineimage qt-embedded-examples.png - } - - \endfloat - D-Bus is an inter-process communication protocol for Unix/Linux systems. - These examples demonstrate how to write application that communicate with - each other. - - \clearfloat - \section1 \l{ActiveQt Examples}{ActiveQt} - \beginfloatleft - \l{ActiveQt Examples}{\inlineimage activeqt-examples.png - } - - \endfloat - These examples demonstrate how to write ActiveX controls and control servers - with Qt, and how to use ActiveX controls and COM objects in a Qt application. - - \clearfloat - \section1 \l{Qt Quarterly}{Qt Quarterly} - \beginfloatleft - \l{Qt Quarterly}{\inlineimage qq-thumbnail.png - } - - \endfloat - One more valuable source for examples and explanations of Qt - features is the archive of \l{Qt Quarterly}, a newsletter for - Qt developers. - - \clearfloat -*/ - -/*! \page examples-widgets.html - \title Widgets Examples + \title Widget Examples \ingroup all-examples \brief Lots of examples of how to use different kinds of widgets. - \contentspage Qt Examples - \nextpage Dialog Examples - \image widget-examples.png Qt comes with a large range of standard widgets that users of modern @@ -541,10 +129,6 @@ \title Dialog Examples \brief Using Qt's standard dialogs and building and using custom dialogs. - \previouspage Widgets Examples - \contentspage Qt Examples - \nextpage Main Window Examples - \image dialog-examples.png Qt includes standard dialogs for many common operations, such as file @@ -573,10 +157,6 @@ \title Main Window Examples \brief Building applications around a main window. - \previouspage Dialog Examples - \contentspage Qt Examples - \nextpage Layout Examples - \image mainwindow-examples.png All the standard features of application main windows are provided by Qt. @@ -601,11 +181,7 @@ \page examples-layouts.html \ingroup all-examples \title Layout Examples - Using Qt's layout-based approach to widget management. - - \previouspage Main Window Examples - \contentspage Qt Examples - \nextpage Item Views Examples + \brief Using Qt's layout-based approach to widget management. \image layout-examples.png @@ -632,10 +208,6 @@ \title Item Views Examples \brief Using the model/view design pattern to separate presentation from data. - \previouspage Layout Examples - \contentspage Qt Examples - \nextpage Graphics View Examples - \image itemview-examples.png Item views are widgets that typically display data sets. Qt 4's model/view @@ -672,10 +244,6 @@ \title Graphics View Examples \brief Using Qt to manage and interact with a large (potentially) number of graphics items. - \previouspage Item Views Examples - \contentspage Qt Examples - \nextpage QML Examples and Demos - \image graphicsview-examples.png Qt is provided with a comprehensive canvas through the GraphicsView @@ -718,10 +286,7 @@ \page examples-painting.html \ingroup all-examples \title Painting Examples - - \previouspage QML Examples and Demos - \contentspage Qt Examples - \nextpage Rich Text Examples + \brief How to use the Qt painting system \image painting-examples.png @@ -751,10 +316,7 @@ \page examples-richtext.html \ingroup all-examples \title Rich Text Examples - - \previouspage Painting Examples - \contentspage Qt Examples - \nextpage Desktop Examples + \brief Using the document-oriented rich text engine \image richtext-examples.png @@ -775,10 +337,7 @@ \page examples-desktop.html \ingroup all-examples \title Desktop Examples - - \previouspage Rich Text Examples - \contentspage Qt Examples - \nextpage Drag and Drop Examples + \brief Integrating your Qt application with your favorite desktop \image desktop-examples.png @@ -798,11 +357,8 @@ /*! \page examples-draganddrop.html \ingroup all-examples - \title Drag and Drop Examples - - \previouspage Desktop Examples - \contentspage Qt Examples - \nextpage Threading and Concurrent Programming Examples + \title Drag & Drop Examples + \brief How to access your platform's native darg & drop functionality \image draganddrop-examples.png @@ -828,10 +384,7 @@ \page examples-threadandconcurrent.html \ingroup all-examples \title Threading and Concurrent Programming Examples - - \previouspage Drag and Drop Examples - \contentspage Qt Examples - \nextpage Tools Examples + \brief Threading and concurrent programming in Qt \image thread-examples.png @@ -869,10 +422,7 @@ \page examples.tools.html \ingroup all-examples \title Tools Examples - - \previouspage Threading and Concurrent Programming Examples - \contentspage Qt Examples - \nextpage Network Examples + \brief Using Qt's containers, iterators, and other tool classes \image tool-examples.png @@ -908,10 +458,7 @@ \page examples-network.html \ingroup all-examples \title Network Examples - - \previouspage Tools Examples - \contentspage Qt Examples - \nextpage Inter-Process Communication Examples + \brief How to do network programming in Qt \image network-examples.png @@ -946,11 +493,8 @@ /*! \page examples-ipc.html \ingroup all-examples - \title Inter-Process Communication Examples - - \previouspage Network Examples - \contentspage Qt Examples - \nextpage OpenGL Examples + \title IPC Examples + \brief Inter-Process Communication with Qt \image ipc-examples.png @@ -965,10 +509,7 @@ \page examples-opengl.html \ingroup all-examples \title OpenGL Examples - - \previouspage Inter-Process Communication Examples - \contentspage Qt Examples - \nextpage OpenVG Examples + \brief Accessing OpenGL from Qt \image opengl-examples.png @@ -1000,10 +541,7 @@ \page examples-openvg.html \ingroup all-examples \title OpenVG Examples - - \previouspage OpenGL Examples - \contentspage Qt Examples - \nextpage Multimedia Examples + \brief Accessing OpenVG from Qt \image openvg-examples.png @@ -1022,10 +560,7 @@ \page examples-multimedia.html \ingroup all-examples \title Multimedia Examples - - \previouspage OpenGL Examples - \contentspage Qt Examples - \nextpage SQL Examples + \brief Accessing audio support from Qt \image phonon-examples.png @@ -1072,10 +607,7 @@ \page examples-sql.html \ingroup all-examples \title SQL Examples - - \previouspage Multimedia Examples - \contentspage Qt Examples - \nextpage XML Examples + \brief Accessing your SQL database from Qt \image sql-examples.png @@ -1102,10 +634,7 @@ \page examples-xml.html \ingroup all-examples \title XML Examples - - \previouspage SQL Examples - \contentspage Qt Examples - \nextpage Qt Designer Examples + \brief Using XML with Qt \image xml-examples.png XML @@ -1139,10 +668,7 @@ \page examples-designer.html \ingroup all-examples \title Qt Designer Examples - - \previouspage XML Examples - \contentspage Qt Examples - \nextpage UiTools Examples + \brief Using Qt Designer to build your UI \image designer-examples.png QtDesigner @@ -1165,10 +691,7 @@ \page examples-uitools.html \ingroup all-examples \title UiTools Examples - - \previouspage Qt Designer Examples - \contentspage Qt Examples - \nextpage Qt Linguist Examples + \brief Using the QtUiTools module \image uitools-examples.png UiTools @@ -1182,10 +705,7 @@ \page examples-linguist.html \ingroup all-examples \title Qt Linguist Examples - - \previouspage UiTools Examples - \contentspage Qt Examples - \nextpage Qt Script Examples + \brief Using Qt Linguist to internationalize your Qt application \image linguist-examples.png @@ -1203,10 +723,7 @@ \page examples-script.html \ingroup all-examples \title Qt Script Examples - - \previouspage Qt Linguist Examples - \contentspage Qt Examples - \nextpage WebKit Examples + \brief Using the Qt scripting environment \image qtscript-examples.png QtScript @@ -1233,10 +750,7 @@ \page examples-webkit.html \ingroup all-examples \title WebKit Examples - - \previouspage Qt Script Examples - \contentspage Qt Examples - \nextpage Help System Examples + \brief Using WebKit in your Qt application \image webkit-examples.png WebKit @@ -1275,10 +789,7 @@ \page examples-helpsystem.html \ingroup all-examples \title Help System Examples - - \previouspage WebKit Examples - \contentspage Qt Examples - \nextpage State Machine Examples + \brief Adding interactive help to your Qt application \image assistant-examples.png HelpSystem @@ -1299,10 +810,7 @@ \page examples-statemachine.html \ingroup all-examples \title State Machine Examples - - \previouspage Help System Examples - \contentspage Qt Examples - \nextpage Animation Framework Examples + \brief Using Qt's finite state machine classes \image statemachine-examples.png StateMachine @@ -1326,10 +834,7 @@ \page examples-animation.html \ingroup all-examples \title Animation Framework Examples - - \previouspage State Machine Examples - \contentspage Qt Examples - \nextpage Multi-Touch Examples + \brief Doing animations with Qt \image animation-examples.png Animation @@ -1349,10 +854,7 @@ \page examples-multitouch.html \ingroup all-examples \title Multi-Touch Examples - - \previouspage Animation Framework Examples - \contentspage Qt Examples - \nextpage Gestures Examples + \brief Using Qt's multi-touch input capability Support for multi-touch input makes it possible for developers to create extensible and intuitive user interfaces. @@ -1369,10 +871,7 @@ \page examples-gestures.html \ingroup all-examples \title Gestures Examples - - \previouspage Multi-Touch Examples - \contentspage Qt Examples - \nextpage D-Bus Examples + \brief Gesture programming examples The API of the gesture framework is not yet finalized and still subject to change. @@ -1386,10 +885,7 @@ \page examples-dbus.html \ingroup all-examples \title D-Bus Examples - - \previouspage Gestures Examples - \contentspage Qt Examples - \nextpage Qt for Embedded Linux Examples + \brief Using D-Bus from Qt applications \list \o \l{dbus/dbus-chat}{Chat} @@ -1406,10 +902,7 @@ \page examples-embeddedlinux.html \ingroup all-examples \title Qt for Embedded Linux Examples - - \previouspage D-Bus Examples - \contentspage Qt Examples - \nextpage ActiveQt Examples + \brief Using Qt in Embedded Linux \image qt-embedded-examples.png QtEmbedded @@ -1429,10 +922,7 @@ \page examples-activeqt.html \ingroup all-examples \title ActiveQt Examples - - \previouspage Qt for Embedded Linux Examples - \contentspage Qt Examples - \nextpage Qt Quarterly + \brief Using ActiveX from Qt applications \image activeqt-examples.png ActiveQt diff --git a/doc/src/getting-started/how-to-learn-qt.qdoc b/doc/src/getting-started/how-to-learn-qt.qdoc index ce8f5218f6..642421b07f 100644 --- a/doc/src/getting-started/how-to-learn-qt.qdoc +++ b/doc/src/getting-started/how-to-learn-qt.qdoc @@ -59,11 +59,11 @@ If you want to design your user interfaces using a design tool, then read at least the first few chapters of the \l{Qt Designer manual}. - By now you'll have produced some small working applications and have a - broad feel for Qt programming. You could start work on your own - projects straight away, but we recommend reading a couple of key - overviews to deepen your understanding of Qt: \l{Qt Object Model} - and \l{Signals and Slots}. + By now you'll have produced some small working applications and + have a broad feel for Qt programming. You could start work on your + own projects straight away, but we recommend reading a couple of + key overviews to deepen your understanding of Qt: The Qt \l{Object + Model} and \l{Signals and Slots}. \beginfloatleft \inlineimage qtdemo-small.png diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index 36abc10e22..4a96a39461 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -959,7 +959,7 @@ applications using Qt for Symbian can start right away.} \l{http://www.microsoft.com/downloads/details.aspx?FamilyID=0baf2b35-c656-4969-ace8-e4c0c0716adb&DisplayLang=en}{here}. \endlist - \sa {Known Issues in %VERSION%} + \sa {Known Issues} */ /*! @@ -969,7 +969,7 @@ applications using Qt for Symbian can start right away.} \brief Setting up the Mac OS X environment for Qt. \previouspage General Qt Requirements - \sa {Known Issues in %VERSION%} + \sa {Known Issues} */ /*! @@ -1108,7 +1108,7 @@ applications using Qt for Symbian can start right away.} distributions; try searching for \c gstreamer or \c libgstreamer in your distribution's package repository to find suitable packages. - \sa {Known Issues in %VERSION%} + \sa {Known Issues} */ /*! @@ -1162,7 +1162,7 @@ applications using Qt for Symbian can start right away.} information on Windows CE Customization can be found \l{Windows CE - Working with Custom SDKs}{here}. - \sa {Known Issues in %VERSION%} + \sa {Known Issues} */ /*! @@ -1172,7 +1172,7 @@ applications using Qt for Symbian can start right away.} \brief Setting up the Embedded Linux environment for Qt. \previouspage General Qt Requirements - \sa {Known Issues in %VERSION%} + \sa {Known Issues} \section1 Building Qt for Embedded Linux with uclibc @@ -1272,5 +1272,5 @@ applications using Qt for Symbian can start right away.} We recommend you to take a look at \l{http://developer.symbian.org/wiki/index.php/Qt_Quick_Start}{Symbian Foundation - Qt Quick Start} to get more information about how to setup the development environment. - \sa {Known Issues in %VERSION%} + \sa {Known Issues} */ diff --git a/doc/src/getting-started/known-issues.qdoc b/doc/src/getting-started/known-issues.qdoc index cedebf9fec..5b6b2fc240 100644 --- a/doc/src/getting-started/known-issues.qdoc +++ b/doc/src/getting-started/known-issues.qdoc @@ -41,7 +41,7 @@ /*! \page known-issues.html - \title Known Issues in this Qt Version + \title Known Issues \ingroup platform-specific \brief A summary of known issues in this Qt version at the time of release. diff --git a/doc/src/images/qml-dial.png b/doc/src/images/qml-dial.png Binary files differnew file mode 100644 index 0000000000..da5c031c40 --- /dev/null +++ b/doc/src/images/qml-dial.png diff --git a/doc/src/images/qml-intro-anchors1.png b/doc/src/images/qml-intro-anchors1.png Binary files differnew file mode 100644 index 0000000000..fdb301ea22 --- /dev/null +++ b/doc/src/images/qml-intro-anchors1.png diff --git a/doc/src/images/qml-intro-anchors2.png b/doc/src/images/qml-intro-anchors2.png Binary files differnew file mode 100644 index 0000000000..84f43bd3df --- /dev/null +++ b/doc/src/images/qml-intro-anchors2.png diff --git a/doc/src/images/qml-intro-anchors3.png b/doc/src/images/qml-intro-anchors3.png Binary files differnew file mode 100644 index 0000000000..21ae97baf7 --- /dev/null +++ b/doc/src/images/qml-intro-anchors3.png diff --git a/doc/src/images/qml-intro-helloa.png b/doc/src/images/qml-intro-helloa.png Binary files differnew file mode 100644 index 0000000000..00b34b0208 --- /dev/null +++ b/doc/src/images/qml-intro-helloa.png diff --git a/doc/src/objectmodel/object.qdoc b/doc/src/objectmodel/object.qdoc index f81577dfa8..8ae91ec773 100644 --- a/doc/src/objectmodel/object.qdoc +++ b/doc/src/objectmodel/object.qdoc @@ -59,11 +59,11 @@ communication called \l{signals and slots} \o queryable and designable \l{Qt's Property System}{object properties} - \o powerful \l{events and event filters} + \o powerful \l{The Event System}{events and event filters} \o contextual \l{i18n}{string translation for internationalization} \o sophisticated interval driven \l timers that make it possible to elegantly integrate many tasks in an event-driven GUI - \o hierarchical and queryable \l{Object Trees and Object Ownership}{object + \o hierarchical and queryable \l{Object Trees & Ownership}{object trees} that organize object ownership in a natural way \o guarded pointers (QPointer) that are automatically set to 0 when the referenced object is destroyed, unlike normal C++ @@ -113,7 +113,7 @@ \o might have a unique \l{QObject::objectName()}. If we copy a Qt Object, what name should we give the copy? - \o has a location in an \l{Object Trees and Object Ownership} + \o has a location in an \l{Object Trees & Ownership} {object hierarchy}. If we copy a Qt Object, where should the copy be located? diff --git a/doc/src/painting-and-printing/paintsystem.qdoc b/doc/src/painting-and-printing/paintsystem.qdoc index 44c84a21ac..c106f35923 100644 --- a/doc/src/painting-and-printing/paintsystem.qdoc +++ b/doc/src/painting-and-printing/paintsystem.qdoc @@ -89,7 +89,7 @@ \o \l{Classes for Painting} \o \l{Paint Devices and Backends} \o \l{Drawing and Filling} - \o \l{The Coordinate System} + \o \l{Coordinate System} \o \l{Reading and Writing Image Files} \o \l{Styling} \o \l{Printing with Qt} @@ -339,10 +339,10 @@ Normally, QPainter draws in a "natural" coordinate system, but it is able to perform view and world transformations using the - QTransform class. For more information, see \l {The Coordinate - System} documentation which also describes the rendering process, - i.e. the relation between the logical representation and the - rendered pixels, and the benefits of anti-aliased painting. + QTransform class. For more information, see \l {Coordinate + System}, which also describes the rendering process, i.e. the + relation between the logical representation and the rendered + pixels, and the benefits of anti-aliased painting. \table 100% \row \o @@ -568,5 +568,5 @@ \endtable For more information about widget styling and appearance, see the - documentation about \l{Implementing Styles and Style Aware Widgets}. + \l{Styles & Style Aware Widgets}. */ diff --git a/doc/src/porting/porting4-canvas.qdoc b/doc/src/porting/porting4-canvas.qdoc index b69f53b5d6..592f430888 100644 --- a/doc/src/porting/porting4-canvas.qdoc +++ b/doc/src/porting/porting4-canvas.qdoc @@ -56,7 +56,7 @@ number of custom-made 2D graphical items, and a view widget for visualizing the items, with support for zooming and rotation. Graphics View was introduced in Qt 4.2, replacing its predecessor, QCanvas. For - more on Graphics View, see \l{The Graphics View Framework}. + more on Graphics View, see \l{Graphics View Framework}. This document walks through the steps needed, class by class and function by function, to port a QCanvas application to Graphics View. diff --git a/doc/src/porting/porting4.qdoc b/doc/src/porting/porting4.qdoc index 1b6eeb7729..75fe844564 100644 --- a/doc/src/porting/porting4.qdoc +++ b/doc/src/porting/porting4.qdoc @@ -1000,8 +1000,8 @@ \row \o \c QCanvasView \o Q3CanvasView \endtable - \l{The Graphics View Framework} replaces QCanvas. For more on porting to - Graphics View, see \l{Porting to Graphics View}. + The \l{Graphics View Framework} replaces QCanvas. For more on + porting to Graphics View, see \l{Porting to Graphics View}. \section1 QColor diff --git a/doc/src/scripting/scripting.qdoc b/doc/src/scripting/scripting.qdoc index 2c229891e1..1f203a6c17 100644 --- a/doc/src/scripting/scripting.qdoc +++ b/doc/src/scripting/scripting.qdoc @@ -362,7 +362,7 @@ By default, the script engine does not take ownership of the QObject that is passed to QScriptEngine::newQObject(); the object is managed according to Qt's object ownership (see - \l{Object Trees and Object Ownership}). This mode is appropriate + \l{Object Trees & Ownership}). This mode is appropriate when, for example, you are wrapping C++ objects that are part of your application's core; that is, they should persist regardless of what happens in the scripting environment. Another way of stating @@ -627,9 +627,9 @@ To completely understand how to make C++ objects available to Qt Script, some basic knowledge of the Qt meta-object system is very - helpful. We recommend that you read the \l{Qt Object Model}. The - information in this document and the documents it links to are very - useful for understanding how to implement application objects. + helpful. We recommend that you read about the Qt \l{Object Model} + and \l{The Meta-Object System}, which are useful for understanding + how to implement application objects. However, this knowledge is not essential in the simplest cases. To make an object available in QtScript, it must derive from diff --git a/doc/src/sql-programming/qsqldatatype-table.qdoc b/doc/src/sql-programming/qsqldatatype-table.qdoc index fb5fb494db..329222b65e 100644 --- a/doc/src/sql-programming/qsqldatatype-table.qdoc +++ b/doc/src/sql-programming/qsqldatatype-table.qdoc @@ -46,7 +46,7 @@ \ingroup qt-sql - \section1 Data Types for Qt Supported Database Systems + \section1 Recommended Data Types for Qt-Supported Database Systems This table shows the recommended data types for extracting data from the databases supported in Qt. Note that types used in Qt are not diff --git a/doc/src/sql-programming/sql-programming.qdoc b/doc/src/sql-programming/sql-programming.qdoc index b34810c226..936e555127 100644 --- a/doc/src/sql-programming/sql-programming.qdoc +++ b/doc/src/sql-programming/sql-programming.qdoc @@ -73,7 +73,7 @@ \endlist \o \l{Executing SQL Statements} \list - \o \l{Recommended Use of Data Types in Databases} + \o \l{Data Types for Qt-supported Database Systems} \endlist \o \l{Using the SQL Model Classes} \o \l{Presenting Data in a Table View} @@ -240,8 +240,9 @@ QVariant::toString() and QVariant::toInt() to convert variants to QString and \c int. - For an overview of the recommended types used with Qt supported - Databases, please refer to \l{Recommended Use of Data Types in Databases}{this table}. + For an overview of the recommended types for use with Qt-supported + Databases, please refer to \l{Data Types for Qt-supported Database + Systems} {this table}. You can iterate back and forth using QSqlQuery::next(), QSqlQuery::previous(), QSqlQuery::first(), QSqlQuery::last(), and diff --git a/doc/src/template/scripts/functions.js b/doc/src/template/scripts/functions.js index 7d93486a75..58a0248591 100755 --- a/doc/src/template/scripts/functions.js +++ b/doc/src/template/scripts/functions.js @@ -33,15 +33,27 @@ $('#bigA').click(function() { $(this).addClass('active') }); +$('.feedclose').click(function() { + $('.bd').show(); + $('.hd').show(); + $('.footer').show(); + $('#feedbackBox').hide(); + $('#blurpage').hide(); +}); +$('.feedback').click(function() { + $('.bd').hide(); + $('.hd').hide(); + $('.footer').hide(); + $('#feedbackBox').show(); + $('#blurpage').show(); +}); var lookupCount = 0; var articleCount = 0; var exampleCount = 0; var qturl = ""; // change from "http://doc.qt.nokia.com/4.6/" to 0 so we can have relative links function processNokiaData(response){ -$('.sidebar .search form input').addClass('loading'); - // debug $('.content').prepend('<li>handling search results</li>'); // debuging var propertyTags = response.getElementsByTagName('page'); for (var i=0; i< propertyTags.length; i++) { @@ -50,7 +62,6 @@ $('.sidebar .search form input').addClass('loading'); if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'APIPage'){ lookupCount++; - //$('.live001').css('display','block'); for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){ @@ -65,7 +76,6 @@ $('.sidebar .search form input').addClass('loading'); if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Article'){ articleCount++; - //$('.live002').css('display','block'); for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){ @@ -79,7 +89,6 @@ $('.sidebar .search form input').addClass('loading'); } if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Example'){ exampleCount++; - //$('.live003').css('display','block'); for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){ @@ -91,10 +100,11 @@ $('.sidebar .search form input').addClass('loading'); } } + if(i==propertyTags.length){$('#pageType').removeClass('loading');} + } - if(lookupCount == 0){$('#ul001').prepend('<li class=\"liveResult noMatch\">Found no result</li>');$('#ul001 li').css('display','block');$('.sidebar .search form input').removeClass('loading'); -} + if(lookupCount == 0){$('#ul001').prepend('<li class=\"liveResult noMatch\">Found no result</li>');$('#ul001 li').css('display','block');$('.sidebar .search form input').removeClass('loading');} if(articleCount == 0){$('#ul002').prepend('<li class=\"liveResult noMatch\">Found no result</li>');$('#ul002 li').css('display','block');} if(exampleCount == 0){$('#ul003').prepend('<li class=\"liveResult noMatch\">Found no result</li>');$('#ul003 li').css('display','block');} // reset count variables; @@ -103,12 +113,18 @@ $('.sidebar .search form input').addClass('loading'); exampleCount = 0; } - //build regular expression object to find empty string or any number of blank var blankRE=/^\s*$/; function CheckEmptyAndLoadList() { + var pageUrl = window.location.href; + var pageVal = $('title').html(); + $('#feedUrl').remove(); + $('#pageVal').remove(); + $('#feedform').append('<input id="feedUrl" name="feedUrl" value="'+pageUrl+'" style="display:none;">'); + $('#feedform').append('<input id="pageVal" name="pageVal" value="'+pageVal+'" style="display:none;">'); $('.liveResult').remove(); + $('.defaultLink').css('display','block'); var value = document.getElementById('pageType').value; if((blankRE.test(value)) || (value.length < 3)) { @@ -131,8 +147,9 @@ else */ // Loads on doc ready $(document).ready(function () { + //alert(pageUrl); + //$('#pageUrl').attr('foo',pageUrl); var pageTitle = $('title').html(); - $('#feedform').append('<input id="page" name="pageVal" value="'+pageTitle+'" style="display:none;">'); var currentString = $('#pageType').val() ; if(currentString.length < 1){ $('.defaultLink').css('display','block'); @@ -142,6 +159,7 @@ else $('#pageType').keyup(function () { var searchString = $('#pageType').val() ; if ((searchString == null) || (searchString.length < 3)) { + $('#pageType').removeClass('loading'); $('.liveResult').remove(); // replaces removeResults(); CheckEmptyAndLoadList(); $('.report').remove(); @@ -150,6 +168,7 @@ else } if (this.timer) clearTimeout(this.timer); this.timer = setTimeout(function () { + $('#pageType').addClass('loading'); // debug$('.content').prepend('<li>new search started </li>');// debug // debug$('.content').prepend('<p class=\"report\">Search string ' +searchString +'</p>'); // debug @@ -162,6 +181,8 @@ else success: function (response, textStatus) { $('.liveResult').remove(); // replaces removeResults(); + $('#pageType').removeClass('loading'); + processNokiaData(response); } diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index 5ad90e361f..c155d9bdf0 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -456,6 +456,7 @@ .wrap .content { padding: 30px; + word-wrap:break-word; } .wrap .content li @@ -843,7 +844,7 @@ background-color: #e6e7e8; z-index: 4; } - #feedcloseX a + #feedcloseX { display: inline; padding: 5px 5px 0 0; @@ -988,6 +989,7 @@ border-width: 1px; border-style: solid; border-color: #E6E6E6; + width:100%; } .centerAlign @@ -1067,6 +1069,7 @@ .indexboxcont .sectionlist { display: inline-block; + vertical-align:top; width: 32.5%; padding: 0; } @@ -1138,7 +1141,34 @@ /* end of screen media */ - +.flowList{ +vertical-align:top; +} +.alphaChar{ +width:100%; +background-color:#F6F6F6; +border:1px solid #E6E6E6; +font-size:12pt; +padding-left:10px; +margin-top:10px; +margin-bottom:10px; +} + +.flowList dl{ +} +.flowList dd{ +display:inline-block; +margin-left:10px; +width:250px; +} +.wrap .content .flowList p{ +padding:0px; +} +pre.highlightedCode { + display: block; + overflow:hidden; +} + } /* end of screen media */ diff --git a/doc/src/widgets-and-layouts/focus.qdoc b/doc/src/widgets-and-layouts/focus.qdoc index 71f41d5246..5ccfb636bc 100644 --- a/doc/src/widgets-and-layouts/focus.qdoc +++ b/doc/src/widgets-and-layouts/focus.qdoc @@ -82,7 +82,7 @@ Pressing \key Tab is by far the most common way to move focus using the keyboard. (Sometimes in data-entry applications Enter does the same as \key{Tab}; this can easily be achieved in Qt by - implementing an \l{Events and Event Filters}{event filter}.) + implementing an \l{The Event System}{event filter}.) Pressing \key Tab, in all window systems in common use today, moves the keyboard focus to the next widget in a circular diff --git a/doc/src/widgets-and-layouts/styles.qdoc b/doc/src/widgets-and-layouts/styles.qdoc index 31dfe405ce..b031deca2d 100644 --- a/doc/src/widgets-and-layouts/styles.qdoc +++ b/doc/src/widgets-and-layouts/styles.qdoc @@ -47,7 +47,7 @@ /*! \page style-reference.html - \title Styles and Style Aware Widgets + \title Styles & Style Aware Widgets \ingroup qt-gui-concepts \brief Styles and the styling of widgets. diff --git a/doc/src/widgets-and-layouts/widgets.qdoc b/doc/src/widgets-and-layouts/widgets.qdoc index 9fe2d69c0b..c93a380a80 100644 --- a/doc/src/widgets-and-layouts/widgets.qdoc +++ b/doc/src/widgets-and-layouts/widgets.qdoc @@ -48,11 +48,10 @@ \section1 Widgets Widgets are the primary elements for creating user interfaces in Qt. - \l{Widget Classes}{Widgets} can display data and status information, + \l{The Widget Classes}{Widgets} can display data and status information, receive user input, and provide a container for other widgets that should be grouped together. A widget that is not embedded in a - parent widget is called a \l{Application Windows and - Dialogs}{window}. + parent widget is called a \l{Window and Dialog Widgets} {window}. \image parent-child-widgets.png A parent widget containing various child widgets. @@ -82,11 +81,10 @@ \section1 Widget Styles - \l{Implementing Styles and Style Aware Widgets}{Styles} draw on - behalf of widgets and encapsulate the look and feel of a GUI. Qt's - built-in widgets use the QStyle class to perform nearly all of their - drawing, ensuring that they look exactly like the equivalent native - widgets. + \l{Styles & Style Aware Widgets}{Styles} draw on behalf of + widgets and encapsulate the look and feel of a GUI. Qt's built-in + widgets use the QStyle class to perform nearly all of their drawing, + ensuring that they look exactly like the equivalent native widgets. \table \row diff --git a/doc/src/windows-and-dialogs/mainwindow.qdoc b/doc/src/windows-and-dialogs/mainwindow.qdoc index c1e66d9d27..db9a63611d 100644 --- a/doc/src/windows-and-dialogs/mainwindow.qdoc +++ b/doc/src/windows-and-dialogs/mainwindow.qdoc @@ -49,7 +49,6 @@ \title Window and Dialog Widgets \brief Windows and Dialogs in Qt. \ingroup qt-gui-concepts - \ingroup frameworks-technologies A \l{Widgets Tutorial}{widget} that is not embedded in a parent widget is called a window. Usually, windows have a frame and a title bar, although it is also possible to create @@ -81,7 +80,7 @@ \section1 Main Windows and Dialogs - \l{The Application Main Window} provides the framework for building the + The \l{Application Main Window} provides the framework for building the application's main user interface, and are created by subclassing QMainWindow. QMainWindow has its own layout to which you can add a \l{QMenuBar}{menu bar}, \l{QToolBar}{tool bars}, \l{QDockWidget}{dockable widgets} and a |