summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-03-05 03:37:14 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-03-05 03:37:14 (GMT)
commitc7ac041e5180d118e300a050d9c579467230a48c (patch)
tree396f19b89df7a8da97f459385f4f5ceff58ccede /doc/src
parent9b7e3943b0e67af48fdbb993c5c4cc93dac81304 (diff)
parenta2e7ab8926c5e8a4c89bb017bbcacfcfbf43ef25 (diff)
downloadQt-c7ac041e5180d118e300a050d9c579467230a48c.zip
Qt-c7ac041e5180d118e300a050d9c579467230a48c.tar.gz
Qt-c7ac041e5180d118e300a050d9c579467230a48c.tar.bz2
Merge remote branch 'staging/4.7' into bearermanagement/polling
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/declarative/basictypes.qdoc2
-rw-r--r--doc/src/declarative/elements.qdoc2
-rw-r--r--doc/src/declarative/globalobject.qdoc79
-rw-r--r--doc/src/declarative/tutorial.qdoc6
-rw-r--r--doc/src/frameworks-technologies/containers.qdoc11
-rw-r--r--doc/src/modules.qdoc1
-rw-r--r--doc/src/platforms/emb-pointer.qdoc6
-rw-r--r--doc/src/snippets/code/doc_src_emb-pointer.qdoc5
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp5
-rw-r--r--doc/src/snippets/declarative/GroupBox.qml15
-rw-r--r--doc/src/snippets/declarative/content.qml9
-rw-r--r--doc/src/snippets/declarative/listview/highlight.qml4
-rw-r--r--doc/src/snippets/declarative/mouseregion.qml2
-rw-r--r--doc/src/snippets/declarative/pathview/pathattributes.qml2
-rw-r--r--doc/src/snippets/declarative/pathview/pathview.qml2
15 files changed, 107 insertions, 44 deletions
diff --git a/doc/src/declarative/basictypes.qdoc b/doc/src/declarative/basictypes.qdoc
index c60847e..6901947 100644
--- a/doc/src/declarative/basictypes.qdoc
+++ b/doc/src/declarative/basictypes.qdoc
@@ -128,7 +128,7 @@
\brief A URL is a resource locator, like a file name.
A URL is a resource locator, like a file name. It can be either
- absolute, e.g. "http://qtsoftware.com", or relative, e.g.
+ absolute, e.g. "http://qt.nokia.com", or relative, e.g.
"pics/logo.png". A relative URL is resolved relative to the URL of
the component where the URL is converted from a JavaScript string
expression to a url property value.
diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc
index 1fd4dad..6cca39b 100644
--- a/doc/src/declarative/elements.qdoc
+++ b/doc/src/declarative/elements.qdoc
@@ -91,6 +91,7 @@ The following table lists the QML elements provided by the Qt Declarative module
\o \l VisualDataModel
\o \l Package
\o \l XmlListModel and XmlRole
+\o \l WorkerListModel
\o \l DateTimeFormatter
\o \l NumberFormatter
\endlist
@@ -102,6 +103,7 @@ The following table lists the QML elements provided by the Qt Declarative module
\o \l Component
\o \l Timer
\o \l QtObject
+\o \l WorkerScript
\endlist
\endtable
diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc
index c718a6d..4b1c7d3 100644
--- a/doc/src/declarative/globalobject.qdoc
+++ b/doc/src/declarative/globalobject.qdoc
@@ -87,6 +87,82 @@ This function returns a Point with the specified \c x and \c y coordinates.
This function returns as Size with the specified \c width and \c height.
\section3 Qt.vector3d(real x, real y, real z)
This function returns a Vector3D with the specified \c x, \c y and \c z.
+
+\section2 Formatters
+The Qt object contains several functions for formatting dates and times.
+
+\section3 Qt.formatDate(datetime date, variant format)
+This function returns the string representation of \c date, formatted according to \c format.
+\section3 Qt.formatTime(datetime time, variant format)
+This function returns the string representation of \c time, formatted according to \c format.
+\section3 Qt.formatDateTime(datetime dateTime, variant format)
+This function returns the string representation of \c dateTime, formatted according to \c format.
+
+\c format for the above formatting functions can be specified as follows.
+
+ These expressions may be used for the date:
+
+ \table
+ \header \i Expression \i Output
+ \row \i d \i the day as number without a leading zero (1 to 31)
+ \row \i dd \i the day as number with a leading zero (01 to 31)
+ \row \i ddd
+ \i the abbreviated localized day name (e.g. 'Mon' to 'Sun').
+ Uses QDate::shortDayName().
+ \row \i dddd
+ \i the long localized day name (e.g. 'Monday' to 'Qt::Sunday').
+ Uses QDate::longDayName().
+ \row \i M \i the month as number without a leading zero (1-12)
+ \row \i MM \i the month as number with a leading zero (01-12)
+ \row \i MMM
+ \i the abbreviated localized month name (e.g. 'Jan' to 'Dec').
+ Uses QDate::shortMonthName().
+ \row \i MMMM
+ \i the long localized month name (e.g. 'January' to 'December').
+ Uses QDate::longMonthName().
+ \row \i yy \i the year as two digit number (00-99)
+ \row \i yyyy \i the year as four digit number
+ \endtable
+
+ These expressions may be used for the time:
+
+ \table
+ \header \i Expression \i Output
+ \row \i h
+ \i the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)
+ \row \i hh
+ \i the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)
+ \row \i m \i the minute without a leading zero (0 to 59)
+ \row \i mm \i the minute with a leading zero (00 to 59)
+ \row \i s \i the second without a leading zero (0 to 59)
+ \row \i ss \i the second with a leading zero (00 to 59)
+ \row \i z \i the milliseconds without leading zeroes (0 to 999)
+ \row \i zzz \i the milliseconds with leading zeroes (000 to 999)
+ \row \i AP
+ \i use AM/PM display. \e AP will be replaced by either "AM" or "PM".
+ \row \i ap
+ \i use am/pm display. \e ap will be replaced by either "am" or "pm".
+ \endtable
+
+ All other input characters will be ignored. Any sequence of characters that
+ are enclosed in singlequotes will be treated as text and not be used as an
+ expression. Two consecutive singlequotes ("''") are replaced by a singlequote
+ in the output.
+
+ Example format strings (assumed that the date and time is 21 May 2001
+ 14:13:09):
+
+ \table
+ \header \i Format \i Result
+ \row \i dd.MM.yyyy \i 21.05.2001
+ \row \i ddd MMMM d yy \i Tue May 21 01
+ \row \i hh:mm:ss.zzz \i 14:13:09.042
+ \row \i h:m:s ap \i 2:13:9 pm
+ \endtable
+
+If no format is specified the locale's short format is used. Alternatively, you can specify
+\c Qt.DefaultLocaleLongDate to get the locale's long format.
+
\section2 Functions
The Qt object also contains the following miscellaneous functions which expose Qt functionality for use in QML.
@@ -119,9 +195,6 @@ while the following would rotate myItem clockwise from 350 degrees to 370 degree
NumberAnimation { target: myItem; property: "rotation"; from: 350; to: Qt.closetAngle(350, 10) }
\endqml
-\section3 Qt.playSound(url soundLocation)
-This function plays the audio file located at \c soundLocation. Only .wav files are supported.
-
\section3 Qt.openUrlExternally(url target)
This function attempts to open the specified \c target url in an external application, based on the user's desktop preferences. It will return true if it succeeds, and false otherwise.
diff --git a/doc/src/declarative/tutorial.qdoc b/doc/src/declarative/tutorial.qdoc
index 98efe12..310b776 100644
--- a/doc/src/declarative/tutorial.qdoc
+++ b/doc/src/declarative/tutorial.qdoc
@@ -173,10 +173,10 @@ In this case the rectangle will have the same size as its parent (see \l{anchor-
\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
+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 MouseRegion defines a signal called \e clicked.
+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
@@ -214,7 +214,7 @@ Here is the QML code:
\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.
+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).
diff --git a/doc/src/frameworks-technologies/containers.qdoc b/doc/src/frameworks-technologies/containers.qdoc
index 86920fd..505b65c 100644
--- a/doc/src/frameworks-technologies/containers.qdoc
+++ b/doc/src/frameworks-technologies/containers.qdoc
@@ -612,11 +612,14 @@
Qt automatically takes a copy of the container when it enters a
\c foreach loop. If you modify the container as you are
- iterating, that won't affect the loop. (If you don't modify the
+ iterating, that won't affect the loop. (If you do not modify the
container, the copy still takes place, but thanks to \l{implicit
- sharing} copying a container is very fast.) Similarly, declaring
- the variable to be a non-const reference, in order to modify the
- current item in the list will not work either.
+ sharing} copying a container is very fast.)
+
+ Since foreach creates a copy of the container, using a non-const
+ reference for the variable does not allow you to modify the original
+ container. It only affects the copy, which is probably not what you
+ want.
In addition to \c foreach, Qt also provides a \c forever
pseudo-keyword for infinite loops:
diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc
index 9e1d340..76a52b4 100644
--- a/doc/src/modules.qdoc
+++ b/doc/src/modules.qdoc
@@ -130,6 +130,7 @@
/*!
\module QtMultimedia
+ \page qtmultimedia-module.html
\title QtMultimedia Module
\contentspage All Qt Modules
\previouspage QtCore
diff --git a/doc/src/platforms/emb-pointer.qdoc b/doc/src/platforms/emb-pointer.qdoc
index 34510da..3c37b63 100644
--- a/doc/src/platforms/emb-pointer.qdoc
+++ b/doc/src/platforms/emb-pointer.qdoc
@@ -154,9 +154,9 @@
in the build environment.
The tslib sources can be downloaded from \l
- http://tslib.berlios.de. Use the \c configure script's -L and
- -I options to explicitly specify the location of the library and
- its headers:
+ http://tslib.berlios.de. Specify the location of the library and
+ its headers using -L and -I options in the \c qmake.conf file in
+ your \c mkspec. Also it can be helpful to add a -rpath-link:
\snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 7
diff --git a/doc/src/snippets/code/doc_src_emb-pointer.qdoc b/doc/src/snippets/code/doc_src_emb-pointer.qdoc
index 9661ae5..0d66e18 100644
--- a/doc/src/snippets/code/doc_src_emb-pointer.qdoc
+++ b/doc/src/snippets/code/doc_src_emb-pointer.qdoc
@@ -77,7 +77,10 @@ export QWS_MOUSE_PROTO="Vr41xx:press=500:/dev/misc/ts"
//! [7]
-./configure -L <path to tslib library> -I <path to tslib headers>
+....
+QMAKE_CFLAGS += -I<path to tslib headers>
+QMAKE_LFLAGS += -L<path to tslib library> -Wl,-rpath-link=<path to tslib library>
+....
//! [7]
diff --git a/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp b/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp
index bff72a0..19e37ba 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp
@@ -108,3 +108,8 @@ int id = qRegisterMetaType<MyStruct>();
int id = qMetaTypeId<QString>(); // id is now QMetaType::QString
id = qMetaTypeId<MyStruct>(); // compile error if MyStruct not declared
//! [8]
+
+//! [9]
+typedef QString CustomString;
+qRegisterMetaType<CustomString>("CustomString");
+//! [9]
diff --git a/doc/src/snippets/declarative/GroupBox.qml b/doc/src/snippets/declarative/GroupBox.qml
deleted file mode 100644
index 6c5431e..0000000
--- a/doc/src/snippets/declarative/GroupBox.qml
+++ /dev/null
@@ -1,15 +0,0 @@
-import Qt 4.6
-
-ContentWrapper {
- id: container; width: parent.width; height: contents.height
- children: [
- Rectangle {
- width: parent.width; height: contents.height
- color: "white"; pen.width: 2; pen.color: "#adaeb0"; radius: 10
- Column {
- id: layout; width: parent.width; margin: 5; spacing: 2
- Content { }
- }
- }
- ]
-}
diff --git a/doc/src/snippets/declarative/content.qml b/doc/src/snippets/declarative/content.qml
deleted file mode 100644
index fb03ced..0000000
--- a/doc/src/snippets/declarative/content.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import Qt 4.6
-
-Rectangle {
- width: 200; height: 100; color: "lightgray"
- GroupBox {
- Text { text: "First Item" }
- Text { text: "Second Item" }
- }
-}
diff --git a/doc/src/snippets/declarative/listview/highlight.qml b/doc/src/snippets/declarative/listview/highlight.qml
index b016f9a..6a9d215 100644
--- a/doc/src/snippets/declarative/listview/highlight.qml
+++ b/doc/src/snippets/declarative/listview/highlight.qml
@@ -30,7 +30,7 @@ Rectangle {
}
]
transitions: [
- Transition { NumberAnimation { matchProperties: "x"; duration: 200 } }
+ Transition { NumberAnimation { properties: "x"; duration: 200 } }
]
}
}
@@ -44,7 +44,7 @@ Rectangle {
Rectangle {
width: 180; height: 40
color: "lightsteelblue"; radius: 5
- y: SpringFollow {
+ SpringFollow on y {
source: list.currentItem.y
spring: 3
damping: 0.2
diff --git a/doc/src/snippets/declarative/mouseregion.qml b/doc/src/snippets/declarative/mouseregion.qml
index 79f8f8f..fc6c8f0 100644
--- a/doc/src/snippets/declarative/mouseregion.qml
+++ b/doc/src/snippets/declarative/mouseregion.qml
@@ -1,7 +1,7 @@
import Qt 4.6
Rectangle { width: 200; height: 100
-HorizontalLayout {
+Row {
//! [0]
Rectangle { width: 100; height: 100; color: "green"
MouseArea { anchors.fill: parent; onClicked: { parent.color = 'red' } }
diff --git a/doc/src/snippets/declarative/pathview/pathattributes.qml b/doc/src/snippets/declarative/pathview/pathattributes.qml
index 19a192c..99d0de2 100644
--- a/doc/src/snippets/declarative/pathview/pathattributes.qml
+++ b/doc/src/snippets/declarative/pathview/pathattributes.qml
@@ -13,7 +13,7 @@ Rectangle {
opacity: PathView.opacity
Column {
Image { anchors.horizontalCenter: name.horizontalCenter; width: 64; height: 64; source: icon }
- Text { id: name; text: name; font.pointSize: 16}
+ Text { text: name; font.pointSize: 16}
}
}
}
diff --git a/doc/src/snippets/declarative/pathview/pathview.qml b/doc/src/snippets/declarative/pathview/pathview.qml
index 5605139..e316578 100644
--- a/doc/src/snippets/declarative/pathview/pathview.qml
+++ b/doc/src/snippets/declarative/pathview/pathview.qml
@@ -11,7 +11,7 @@ Rectangle {
width: 80; height: 80
Column {
Image { anchors.horizontalCenter: name.horizontalCenter; width: 64; height: 64; source: icon }
- Text { id: name; text: name; font.pointSize: 16}
+ Text { text: name; font.pointSize: 16}
}
}
}