summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-07-02 03:40:10 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-07-02 03:40:10 (GMT)
commitfcfeee14047b87eeb4de49188a997fbfeed73773 (patch)
tree8e5f732783a90b2187728f5e955efb11304a420c /doc/src
parent8aba610c22c44bf36eb2e539a06b65753c48bbc2 (diff)
parent6c9647f6673fd5738001c5bbe416b116442fbc41 (diff)
downloadQt-fcfeee14047b87eeb4de49188a997fbfeed73773.zip
Qt-fcfeee14047b87eeb4de49188a997fbfeed73773.tar.gz
Qt-fcfeee14047b87eeb4de49188a997fbfeed73773.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-declarativeui
Conflicts: configure.exe src/gui/kernel/qevent.cpp src/gui/kernel/qevent_p.h tools/qdoc3/codemarker.cpp tools/qdoc3/cppcodemarker.cpp tools/qdoc3/generator.cpp
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/classes.qdoc3
-rw-r--r--doc/src/developing-on-mac.qdoc73
-rw-r--r--doc/src/examples.qdoc1
-rw-r--r--doc/src/examples/frozencolumn.qdoc4
-rw-r--r--doc/src/examples/moveblocks.qdoc228
-rw-r--r--doc/src/images/checkboxes-exclusive.pngbin0 -> 5079 bytes
-rw-r--r--doc/src/images/checkboxes-non-exclusive.pngbin0 -> 5614 bytes
-rw-r--r--doc/src/images/move-blocks-chart.pngbin0 -> 15740 bytes
-rw-r--r--doc/src/images/moveblocks-example.pngbin0 -> 4532 bytes
-rw-r--r--doc/src/index.qdoc2
-rw-r--r--doc/src/installation.qdoc26
-rw-r--r--doc/src/phonon-api.qdoc7
-rw-r--r--doc/src/platform-notes.qdoc7
-rw-r--r--doc/src/qmake-manual.qdoc69
-rw-r--r--doc/src/qnamespace.qdoc55
-rw-r--r--doc/src/qsqldatatype-table.qdoc584
-rw-r--r--doc/src/qtopenvg.qdoc283
-rw-r--r--doc/src/qtscript.qdoc2
-rw-r--r--doc/src/qtsql.qdoc3
-rw-r--r--doc/src/snippets/code/src_gui_qproxystyle.cpp10
-rw-r--r--doc/src/tutorials/addressbook.qdoc59
21 files changed, 1325 insertions, 91 deletions
diff --git a/doc/src/classes.qdoc b/doc/src/classes.qdoc
index 69ca716..dddc96f 100644
--- a/doc/src/classes.qdoc
+++ b/doc/src/classes.qdoc
@@ -47,9 +47,6 @@
This is a list of all Qt classes excluding the \l{Qt 3
compatibility classes}. For a shorter list that only includes the
most frequently used classes, see \l{Qt's Main Classes}.
- \omit This is old and dingy now.
- and the \l{http://doc.trolltech.com/extras/qt43-class-chart.pdf}{Qt 4.3 Class Chart (PDF)}.
- \endomit
\generatelist classes
diff --git a/doc/src/developing-on-mac.qdoc b/doc/src/developing-on-mac.qdoc
index 60c928d..849e79a 100644
--- a/doc/src/developing-on-mac.qdoc
+++ b/doc/src/developing-on-mac.qdoc
@@ -60,17 +60,15 @@
\section1 What Versions of Mac OS X are Supported?
- As of Qt 4.5, Qt supports Mac OS X versions 10.3 (for \bold{deployment
- only}, not for development), 10.4 and 10.5. It is usually in the best
- interest of the developer and user to be running the latest updates to any
- version. We test internally against Mac OS X 10.3.9 and Mac OS X 10.4.11 as
- well as the updated release of Mac OS X 10.5.
-
+ As of Qt 4.6, Qt supports Mac OS X versions 10.4 and up. It is usually in
+ the best interest of the developer and user to be running the latest
+ updates to any version. We test internally against Mac OS X 10.4.11 as well
+ as the updated release of Mac OS X 10.5 and Mac OS X 10.6.
\section2 Carbon or Cocoa?
Historically, Qt has used the Carbon toolkit, which supports 32-bit
- applications on Mac OS X 10.3 and up. Qt 4.5 adds support for the Cocoa
+ applications on Mac OS X 10.4 and up. Qt 4.5 and up has support for the Cocoa
toolkit, which requires 10.5 and provides 64-bit support.
This detail is typically not important to Qt application developers. Qt is
@@ -79,17 +77,21 @@
version will be discontinued. This is something to keep in mind when you
consider writing code directly against native APIs.
- The current binary for Qt is built for Carbon. If you want to choose which
- framework Qt will use, you must build from scratch. Carbon or Cocoa is
- chosen when configuring the package for building. The configure process
- selects Carbon by default, to specify Cocoa use the \c{-cocoa} flag.
- configure for a 64-bit architecture using one of the \c{-arch} flags (see
- \l{universal binaries}{Universal Binaries}).
-
- Currently, Apple's GCC 4.0.1 is used by default. When building on 10.5,
- Apple's GCC 4.2 is also available and selectable with the configure flag:
- \c{-platform macx-g++42}. GCC 3.x will \e not work. Experimental LLVM-GCC
- support is available by passing in the \c{-platform macx-llvm} flag.
+ The current binary for Qt is built in two flavors, 32-bit Carbon and full
+ universal Cocoa (32-bit and 64-bit). If you want a different setup for
+ Qt will use, you must build from scratch. Carbon or Cocoa is chosen when
+ configuring the package for building. The configure process selects Carbon
+ by default, to specify Cocoa use the \c{-cocoa} flag. configure for a
+ 64-bit architecture using one of the \c{-arch} flags (see \l{universal
+ binaries}{Universal Binaries}).
+
+ Currently, Apple's default GCC compiler is used by default (GCC 4.0.1 on
+ 10.4 and 10.5, GCC 4.2 on 10.6). You can specify alternate compilers
+ though. For example, on Mac OS X 10.5, Apple's GCC 4.2 is also available
+ and selectable with the configure flag: \c{-platform macx-g++42}. LLVM-GCC
+ support is available by passing in the \c{-platform macx-llvm} flag. GCC
+ 3.x will \e not work. Though they may work, We do not support custom-built
+ GCC's.
The following table summarizes the different versions of Mac OS X and what
capabilities are used by Qt.
@@ -103,13 +105,6 @@
\o CPU Architecture Supported
\o Development Platform
\row
- \o 10.3
- \o Panther
- \o Carbon
- \o 32
- \o PPC
- \o No
- \row
\o 10.4
\o Tiger
\o Carbon
@@ -130,6 +125,20 @@
\o 32/64
\o PPC/Intel
\o Yes
+ \row
+ \o 10.6
+ \o Snow Leopard
+ \o Carbon
+ \o 32
+ \o PPC/Intel
+ \o Yes
+ \row
+ \o 10.6
+ \o Snow Leopard
+ \o Cocoa
+ \o 32/64
+ \o PPC/Intel
+ \o Yes
\endtable
\section2 Which One Should I Use?
@@ -144,15 +153,21 @@
Carbon universal application with the appropriate checks in your code to
choose the right path based on where you are running the application.
+ For Mac OS X 10.6, Apple has started recommending developers to build their
+ applications 64-bit. The main reason is that there is a small speed
+ increase due to the extra registers on Intel CPU's, all their machine
+ offerings have been 64-bit since 2007, and there is a cost for reading all
+ the 32-bit libraries into memory if everything else is 64-bit. If you want
+ to follow this advice, there is only one choice, 64-bit Cocoa.
+
\target universal binaries
\section1 Universal Binaries
In 2006, Apple begin transitioning from PowerPC (PPC) to Intel (x86)
systems. Both architectures are supported by Qt. The release of Mac OS X
10.5 in October 2007 added the possibility of writing and deploying 64-bit
- GUI applications. Qt 4.5 supports both the 32-bit (PPC and x86) and 64-bit
- (PPC64 and x86-64) versions of PowerPC and Intel-based systems are
- supported.
+ GUI applications. Qt 4.5 and up supports both the 32-bit (PPC and x86) and
+ 64-bit (PPC64 and x86-64) versions of PowerPC and Intel-based systems.
Universal binaries are used to bundle binaries for more than one
architecture into a single package, simplifying deployment and
@@ -221,7 +236,7 @@
In general, Qt supports building on one Mac OS X version and deploying on
all others, both forward and backwards. You can build on 10.4 Tiger and run
- the same binary on 10.3 and 10.5.
+ the same binary on 10.5 and up.
Some restrictions apply:
diff --git a/doc/src/examples.qdoc b/doc/src/examples.qdoc
index 1f20b91..f6bb877 100644
--- a/doc/src/examples.qdoc
+++ b/doc/src/examples.qdoc
@@ -90,6 +90,7 @@
\section1 Animation
\list
+ \o \l{animation/moveblocks}{Move Blocks}\raisedaster
\o \l{animation/stickman}{Stick man}\raisedaster
\endlist
diff --git a/doc/src/examples/frozencolumn.qdoc b/doc/src/examples/frozencolumn.qdoc
index e5a3b59..9d89478 100644
--- a/doc/src/examples/frozencolumn.qdoc
+++ b/doc/src/examples/frozencolumn.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/doc/src/examples/moveblocks.qdoc b/doc/src/examples/moveblocks.qdoc
new file mode 100644
index 0000000..2bdcca5
--- /dev/null
+++ b/doc/src/examples/moveblocks.qdoc
@@ -0,0 +1,228 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (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 either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** 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.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example animation/moveblocks
+ \title Move Blocks Example
+
+ The Move Blocks example shows how to animate items in a
+ QGraphicsScene using a QStateMachine with a custom transition.
+
+ \image moveblocks-example.png
+
+ The example animates the blue blocks that you can see in the image
+ above. The animation moves the blocks between four preset positions.
+
+ The example consists of the following classes:
+
+ \list
+ \o \c StateSwitcher inherits QState and can add
+ \c {StateSwitchTransition}s to other states.
+ When entered, it will randomly transition to one of these
+ states.
+ \o \c StateSwitchTransition is a custom transition that
+ triggers on \c{StateSwitchEvent}s.
+ \o \c StateSwitchEvent is a QEvent that trigger \c{StateSwitchTransition}s.
+ \o \c QGraphicsRectWidget is a QGraphicsWidget that simply
+ paints its background in a solid \l{Qt::}{blue} color.
+ \endlist
+
+ The blocks are instances of \c QGraphicsRectWidget and are
+ animated in a QGraphicsScene. We do this by building a state
+ graph, which we insert animations into. The graph is then executed
+ in a QStateMachine. All this is done in \c main().
+ Let's look at the \c main() function first.
+
+ \section1 The \c main() Function
+
+ After QApplication has been initialized, we set up the
+ QGraphicsScene with its \c{QGraphicsRectWidget}s.
+
+ \snippet examples/animation/moveblocks/main.cpp 1
+
+ After adding the scene to a QGraphicsView, it is time to build the
+ state graph. Let's first look at a statechart of what we are
+ trying to build.
+
+ \image move-blocks-chart.png
+
+ Note that the \c group has seven sub states, but we have only
+ included three of them in the diagram. The code that builds this
+ graph will be examined line-by-line, and will show how the graph
+ works. First off, we construct the \c group state:
+
+ \snippet examples/animation/moveblocks/main.cpp 2
+
+ The timer is used to add a delay between each time the blocks are
+ moved. The timer is started when \c group is entered. As we will
+ see later, \c group has a transition back to the \c StateSwitcher
+ when the timer times out. \c group is the initial state in the
+ machine, so an animation will be scheduled when the example is
+ started.
+
+ \snippet examples/animation/moveblocks/main.cpp 3
+ \dots
+ \snippet examples/animation/moveblocks/main.cpp 4
+
+ \c createGeometryState() returns a QState that will set the
+ geometry of our items upon entry. It also assigns \c group as the
+ parent of this state.
+
+ A QPropertyAnimation inserted into a transition will use the
+ values assigned to a QState (with QState::assignProperty()), i.e.,
+ the animation will interpolate between the current values of the
+ properties and the values in the target state. We add animated
+ transitions to the state graph later.
+
+ \snippet examples/animation/moveblocks/main.cpp 5
+
+ We move the items in parallel. Each item is added to \c
+ animationGroup, which is the animation that is inserted into the
+ transitions.
+
+ \snippet examples/animation/moveblocks/main.cpp 6
+
+ The sequential animation group, \c subGroup, helps us insert a
+ delay between the animation of each item.
+
+ \snippet examples/animation/moveblocks/main.cpp 7
+ \dots
+ \snippet examples/animation/moveblocks/main.cpp 8
+
+ A StateSwitchTransition is added to the state switcher
+ in \c StateSwitcher::addState(). We also add the animation in this
+ function. Since QPropertyAnimation uses the values from the
+ states, we can insert the same QPropertyAnimation instance in all
+ \c {StateSwitchTransition}s.
+
+ As mentioned previously, we add a transition to the state switcher
+ that triggers when the timer times out.
+
+ \snippet examples/animation/moveblocks/main.cpp 9
+
+ Finally, we can create the state machine, add our initial state,
+ and start execution of the state graph.
+
+ \section2 The \c createGemetryState() Function
+
+ In \c createGeometryState(), we set up the geometry for each
+ graphics item.
+
+ \snippet examples/animation/moveblocks/main.cpp 13
+
+ As mentioned before, QAbstractTransition will set up an animation
+ added with \l{QAbstractTransition::}{addAnimation()} using
+ property values set with \l{QState::}{assignProperty()}.
+
+ \section1 The StateSwitcher Class
+
+ \c StateSwitcher has state switch transitions to each \l{QState}s
+ we created with \c createGemetryState(). Its job is to transition
+ to one of these states at random when it is entered.
+
+ All functions in \c StateSwitcher are inlined. We'll step through
+ its definition.
+
+ \snippet examples/animation/moveblocks/main.cpp 10
+
+ \c StateSwitcher is a state designed for a particular purpose and
+ will always be a top-level state. We use \c m_stateCount to keep
+ track of how many states we are managing, and \c m_lastIndex to
+ remember which state was the last state to which we transitioned.
+
+ \snippet examples/animation/moveblocks/main.cpp 11
+
+ We select the next state we are going to transition to, and post a
+ \c StateSwitchEvent, which we know will trigger the \c
+ StateSwitchTransition to the selected state.
+
+ \snippet examples/animation/moveblocks/main.cpp 12
+
+ This is where the magic happens. We assign a number to each state
+ added. This number is given to both a StateSwitchTransition and to
+ StateSwitchEvents. As we have seen, state switch events will
+ trigger a transition with the same number.
+
+ \section1 The StateSwitchTransition Class
+
+ \c StateSwitchTransition inherits QAbstractTransition and triggers
+ on \c{StateSwitchEvent}s. It contains only inline functions, so
+ let's take a look at its \l{QAbstractTransition::}{eventTest()}
+ function, which is the only function that we define..
+
+ \snippet examples/animation/moveblocks/main.cpp 14
+
+ \c eventTest is called by QStateMachine when it checks whether a
+ transition should be triggered--a return value of true means that
+ it will. We simply check if our assigned number is equal to the
+ event's number (in which case we fire away).
+
+ \section1 The StateSwitchEvent Class
+
+ \c StateSwitchEvent inherits QEvent, and holds a number that has
+ been assigned to a state and state switch transition by \c
+ StateSwitcher. We have already seen how it is used to trigger \c
+ \c{StateSwitchTransition}s in \c StateSwitcher.
+
+ \snippet examples/animation/moveblocks/main.cpp 15
+
+ We only have inlined functions in this class, so a look at its
+ definition will do.
+
+ \section1 The QGraphicsRectWidget Class
+
+ QGraphicsRectWidget inherits QGraphicsWidget and simply paints its
+ \l{QWidget::}{rect()} blue. We inline \l{QWidget::}{paintEvent()},
+ which is the only function we define. Here is the
+ QGraphicsRectWidget class definition:
+
+ \snippet examples/animation/moveblocks/main.cpp 16
+
+ \section1 Moving On
+
+ The technique shown in this example works equally well for all
+ \l{QPropertyAnimation}s. As long as the value to be animated is a
+ Qt property, you can insert an animation of it into a state graph.
+
+ QState::addAnimation() takes a QAbstractAnimation, so any type
+ of animation can be inserted into the graph.
+*/
+
diff --git a/doc/src/images/checkboxes-exclusive.png b/doc/src/images/checkboxes-exclusive.png
new file mode 100644
index 0000000..0ada3a0
--- /dev/null
+++ b/doc/src/images/checkboxes-exclusive.png
Binary files differ
diff --git a/doc/src/images/checkboxes-non-exclusive.png b/doc/src/images/checkboxes-non-exclusive.png
new file mode 100644
index 0000000..4211aae
--- /dev/null
+++ b/doc/src/images/checkboxes-non-exclusive.png
Binary files differ
diff --git a/doc/src/images/move-blocks-chart.png b/doc/src/images/move-blocks-chart.png
new file mode 100644
index 0000000..fd0c165
--- /dev/null
+++ b/doc/src/images/move-blocks-chart.png
Binary files differ
diff --git a/doc/src/images/moveblocks-example.png b/doc/src/images/moveblocks-example.png
new file mode 100644
index 0000000..56353d1
--- /dev/null
+++ b/doc/src/images/moveblocks-example.png
Binary files differ
diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc
index 0ca1975..b59523e 100644
--- a/doc/src/index.qdoc
+++ b/doc/src/index.qdoc
@@ -152,7 +152,6 @@
<li><a href="qt-embedded.html">Qt for Embedded Platforms</a></li>
<li><a href="overviews.html">All Overviews and HOWTOs</a></li>
<li><a href="gallery.html">Qt Widget Gallery</a></li>
- <li><a href="http://doc.trolltech.com/extras/qt43-class-chart.pdf">Class Chart</a></li>
<li><a href="qtglobal.html">Qt Global Declarations</a></li>
</ul>
</td>
@@ -181,6 +180,7 @@
<li><a href="qthelp.html">Help Module</a></li>
<li><a href="qtnetwork.html">Network Module</a></li>
<li><a href="qtopengl.html">OpenGL Module</a></li>
+ <li><a href="qtopenvg.html">OpenVG Module</a></li>
<li><a href="qtscript.html">Script Module</a></li>
<li><a href="qtsql.html">SQL Module</a></li>
<li><a href="qtsvg.html">SVG Module</a></li>
diff --git a/doc/src/installation.qdoc b/doc/src/installation.qdoc
index f5d3788..d868069 100644
--- a/doc/src/installation.qdoc
+++ b/doc/src/installation.qdoc
@@ -595,7 +595,9 @@ in the \l{Qt for Windows CE Requirements} document.
\endraw
The QtGui module and the QtCore module, which provides the non-GUI features required
- by QtGui, depend on the libraries described in the following table.
+ by QtGui, depend on the libraries described in the following table. To build
+ Qt from its source code, you will also need to install the development
+ packages for these libraries for your system.
\table 90%
\header \o Name \o Library \o Notes \o Configuration options \o Minimum working version
@@ -653,6 +655,28 @@ in the \l{Qt for Windows CE Requirements} document.
\note You must compile with XRender support to get alpha transparency
support for pixmaps and images.
+ Development packages for these libraries contain header files that are used
+ when building Qt from its source code. On Debian-based GNU/Linux systems,
+ for example, we recommend that you install the following development
+ packages:
+
+ \list
+ \o libfontconfig1-dev
+ \o libfreetype6-dev
+ \o libx11-dev
+ \o libxcursor-dev
+ \o libxext-dev
+ \o libxfixes-dev
+ \o libxft-dev
+ \o libxi-dev
+ \o libxrandr-dev
+ \o libxrender-dev
+ \endlist
+
+ Some of these packages depend on others in this list, so installing one
+ may cause others to be automatically installed. Other distributions may
+ provide system packages with similar names.
+
\section1 Phonon Dependencies
As described in the \l{Phonon Overview}, Phonon uses the GStreamer multimedia
diff --git a/doc/src/phonon-api.qdoc b/doc/src/phonon-api.qdoc
index 0743bab..09274bf 100644
--- a/doc/src/phonon-api.qdoc
+++ b/doc/src/phonon-api.qdoc
@@ -1115,6 +1115,11 @@
\note Sequential devices can also be used, but MediaObject::isSeekable() will
return false as a result.
+ \warning On Windows, we only support \l{QIODevice}s containing the
+ \c avi, \c mp3, or \c mpg formats. Use the constructor that takes
+ a file name to open files (the Qt backend does not use a QFile
+ internally).
+
\sa setAutoDelete()
*/
@@ -1864,7 +1869,7 @@
\snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 14
- \sa currentSource()
+ \sa currentSource(), MediaSource
*/
/*!
diff --git a/doc/src/platform-notes.qdoc b/doc/src/platform-notes.qdoc
index 23094e1..8fe8170 100644
--- a/doc/src/platform-notes.qdoc
+++ b/doc/src/platform-notes.qdoc
@@ -397,7 +397,7 @@
\row \o Apple Mac OS X (32-bit) \o gcc 4.0.1
\row \o Linux (32 and 64-bit) \o gcc 4.1, 4.2, 4.3
\row \o Microsoft Windows \o gcc 3.4.2 (MinGW) (32-bit), MSVC 2003, 2005 (32 and 64-bit), 2008,
- \l{Known Issues in %VERSION%}{Intel icc (see note)}
+ \l{Intel C++ Compiler}{Intel icc (see note)}
\endtable
Any platform-compiler combinations not listed here should be considered unsupported.
@@ -596,8 +596,9 @@
\section1 Intel C++ Compiler
- \warning Please see the \l{Known Issues in %VERSION%} page for information
- about an issue with this compiler.
+ Qt supports the Intel C++ compiler on both Windows and Linux.
+ However, there are a few issues on Linux (see the following
+ section).
\section2 Intel C++ Compiler for Linux
diff --git a/doc/src/qmake-manual.qdoc b/doc/src/qmake-manual.qdoc
index f8347c1..d4d51c7 100644
--- a/doc/src/qmake-manual.qdoc
+++ b/doc/src/qmake-manual.qdoc
@@ -858,10 +858,12 @@
\snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 21
-
Each time you update the project file, you need to run \c qmake to generate
an updated Visual Studio project.
+ \note If you are using the Visual Studio Add-in, you can import \c .pro
+ files via the \gui{Qt->Import from .pro file} menu item.
+
\section2 Visual Studio 2005 Manifest Files
When deploying Qt applications built using Visual Studio 2005, it is
@@ -1922,6 +1924,14 @@
typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely
needs to be modified.
+ \target QMAKE_INCDIR_EGL
+ \section1 QMAKE_INCDIR_EGL
+
+ This variable contains the location of EGL header files to be added
+ to INCLUDEPATH when building an application with OpenGL/ES or
+ OpenVG support. The value of this variable is typically handled by
+ \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
\target QMAKE_INCDIR_OPENGL
\section1 QMAKE_INCDIR_OPENGL
@@ -1930,6 +1940,20 @@
value of this variable is typically handled by \c qmake or
\l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ If the OpenGL implementation uses EGL (most OpenGL/ES systems),
+ then QMAKE_INCDIR_EGL may also need to be set.
+
+ \target QMAKE_INCDIR_OPENVG
+ \section1 QMAKE_INCDIR_OPENVG
+
+ This variable contains the location of OpenVG header files to be added
+ to INCLUDEPATH when building an application with OpenVG support. The
+ value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ If the OpenVG implementation uses EGL then QMAKE_INCDIR_EGL may also
+ need to be set.
+
\target QMAKE_INCDIR_QT
\section1 QMAKE_INCDIR_QT
@@ -2078,6 +2102,13 @@
\c qmake or
\l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ \section1 QMAKE_LIBDIR_EGL
+
+ This variable contains the location of the EGL library
+ directory, when EGL is used with OpenGL/ES or OpenVG. The value
+ of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
\section1 QMAKE_LIBDIR_OPENGL
This variable contains the location of the OpenGL library
@@ -2085,6 +2116,19 @@
\c qmake or
\l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ If the OpenGL implementation uses EGL (most OpenGL/ES systems),
+ then QMAKE_LIBDIR_EGL may also need to be set.
+
+ \section1 QMAKE_LIBDIR_OPENVG
+
+ This variable contains the location of the OpenVG library
+ directory. The value of this variable is typically handled by
+ \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ If the OpenVG implementation uses EGL, then QMAKE_LIBDIR_EGL
+ may also need to be set.
+
\section1 QMAKE_LIBDIR_QT
This variable contains the location of the Qt library
@@ -2116,18 +2160,41 @@
project on Windows. \l{#QMAKE_LIBS_WINDOW}{QMAKE_LIBS_WINDOW}
should now be used instead.
+ \section1 QMAKE_LIBS_EGL
+
+ This variable contains all EGL libraries when building Qt with
+ OpenGL/ES or OpenVG. The value of this variable is typically
+ handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified. The usual value is \c{-lEGL}.
+
\section1 QMAKE_LIBS_OPENGL
This variable contains all OpenGL libraries. The value of this
variable is typically handled by \c qmake or
\l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ If the OpenGL implementation uses EGL (most OpenGL/ES systems),
+ then QMAKE_LIBS_EGL may also need to be set.
+
\section1 QMAKE_LIBS_OPENGL_QT
This variable contains all OpenGL Qt libraries.The value of this
variable is typically handled by \c qmake or
\l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ \section1 QMAKE_LIBS_OPENVG
+
+ This variable contains all OpenVG libraries. The value of this
+ variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf}
+ and rarely needs to be modified. The usual value is \c{-lOpenVG}.
+
+ Some OpenVG engines are implemented on top of OpenGL. This will
+ be detected at configure time and QMAKE_LIBS_OPENGL will be implicitly
+ added to QMAKE_LIBS_OPENVG wherever the OpenVG libraries are linked.
+
+ If the OpenVG implementation uses EGL, then QMAKE_LIBS_EGL may also
+ need to be set.
+
\section1 QMAKE_LIBS_QT
This variable contains all Qt libraries.The value of this
diff --git a/doc/src/qnamespace.qdoc b/doc/src/qnamespace.qdoc
index 7e655b6..805855a 100644
--- a/doc/src/qnamespace.qdoc
+++ b/doc/src/qnamespace.qdoc
@@ -1203,6 +1203,11 @@
on Mac when using Carbon. This attribute has no effect on Cocoa.
The attribute is off by default and can be enabled on a per-window basis.
+ \value WA_AcceptTouchEvents Allows touch events (see QTouchEvent)
+ to be sent to the widget. Must be set on all widgets that can
+ handle touch events. Without this attribute set, events from a
+ touch device will be sent as mouse events.
+
\omitvalue WA_SetLayoutDirection
\omitvalue WA_InputMethodTransparent
\omitvalue WA_WState_CompressKeys
@@ -1232,6 +1237,7 @@
\omitvalue WA_X11BypassTransientForHint
\omitvalue WA_SetWindowModality
\omitvalue WA_WState_WindowOpacitySet
+ \omitvalue WA_WState_AcceptedTouchBeginEvent
*/
/*! \typedef Qt::HANDLE
@@ -2691,3 +2697,52 @@
\internal
*/
+/*! \enum Qt::GestureType
+ \since 4.6
+
+ This enum lists standard gestures.
+
+ \value UnknownGesture An unknown gesture. This enum value shouldn't be used.
+ \value TapGesture A single tap gesture.
+ \value DoubleTapGesture A double tap gesture.
+ \value TrippleTapGesture A tripple tap gesture.
+ \value TapAndHoldGesture A tap-and-hold (long tap) gesture.
+ \value PanGesture A pan gesture.
+ \value PinchGesture A pinch gesture.
+*/
+
+/*!
+ \enum Qt::GestureState
+ \since 4.6
+
+ This enum type describes the state of a gesture.
+
+ \omitvalue NoGesture
+ \value GestureStarted A continuous gesture has started.
+ \value GestureUpdated A gesture continiues.
+ \value GestureFinished A gesture has finished.
+
+ \sa QGesture
+*/
+
+/*!
+ \enum Qt::DirectionType
+ \since 4.6
+
+ This enum type describes directions. This could be used by the
+ gesture recognizers.
+
+ \value NoDirection Non-specific direction.
+ \value LeftDownDirection
+ \value DownLeftDirection
+ \value DownDirection
+ \value RightDownDirection
+ \value DownRightDirection
+ \value LeftDirection
+ \value RightDirection
+ \value LeftUpDirection
+ \value UpLeftDirection
+ \value UpDirection
+ \value RightUpDirection
+ \value UpRightDirection
+*/
diff --git a/doc/src/qsqldatatype-table.qdoc b/doc/src/qsqldatatype-table.qdoc
new file mode 100644
index 0000000..5ab6413
--- /dev/null
+++ b/doc/src/qsqldatatype-table.qdoc
@@ -0,0 +1,584 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (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 either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** 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.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtSql
+
+ \page qsqldatatype-table.html
+
+ \title QtSql Module - Recommended use of data types
+
+ \section1 Recommended use of types and widgets in Qt supported Databases
+
+ This table shows the recommended data types used when extracting data
+ from the databases supported in Qt. It is important to note that the
+ types used in Qt not necessary are valid as input to the specific
+ database. One example could be that a double would work perfect as
+ input for floating point records in a database, but not necessary
+ as output to the database since it would be stored with 64-bit in C++.
+
+ \tableofcontents
+
+ \section2 IBM DB2 data type
+
+ \table
+ \row
+ \header IBM DB2 data type
+ \header SQL Type Description
+ \header Recommended input (C++ data type and Qt )
+ \row
+ \o SMALLINT
+ \o 16-bit signed integer
+ \o typedef qint16
+ \row
+ \o INTEGER
+ \o 32-bit signed integer
+ \o typedef qint32
+ \row
+ \o BIGINT
+ \o 64-bit signed integer
+ \o typedef qint64
+ \row
+ \o REAL
+ \o 32-bit Single-precision floating point
+ \o By default mapping to QString
+ \row
+ \o DOUBLE PRECISION
+ \o 64-bit Double-precision floating point
+ \o By default mapping to QString
+ \row
+ \o FLOAT
+ \o 64-bit Double-precision floating point
+ \o By default mapping to QString
+ \row
+ \o CHAR
+ \o Fixed-length, null-terminated character string
+ \o Mapped to QString
+ \row
+ \o VARCHAR
+ \o Null-terminated varying length string
+ \o Mapped to QString
+ \row
+ \o LONG VARCHAR
+ \o Not null-terminated varying length character string
+ \o Mapped to QString
+ \row
+ \o BLOB
+ \o Not null-terminated varying binary string with 4-byte string
+ length indicator
+ \o Mapped to QByteArray
+ \row
+ \o CLOB
+ \o Character large string object
+ \o Mapped to QString
+ \row
+ \o DATE
+ \o Null-terminated character string of the following format:
+ yyyy-mm-dd
+ \o Mapped to QDate
+ \row
+ \o TIME
+ \o Null-terminated character string of the following format: hh.mm.ss
+ \o Mapped to QTime
+ \row
+ \o TIMESTAMP
+ \o Null-terminated character string of the following format: yyyy-mm-dd-hh.mm.ss.nnnnnn
+ \o Mapped to QDateTime
+ \endtable
+
+ \section2 Borland InterBase data type
+
+ \table
+ \row
+ \header Borland InterBase data type
+ \header SQL Type Description
+ \header Recommended input (C++ data type/Qt Widget)
+ \row
+ \o BOOLEAN
+ \o Boolean
+ \o bool
+ \row
+ \o TINYINT
+ \o 8 bit signed integer
+ \o typedef qint8
+ \row
+ \o SMALLINT
+ \o 16-bit signed integer
+ \o typedef qint16
+ \row
+ \o INTEGER
+ \o 32-bit signed integer
+ \o typedef qint32
+ \row
+ \o BIGINT LONG
+ \o 64-bit signed integer
+ \o typedef qint64
+ \row
+ \o REAL FLOAT
+ \o 32-bit floating point
+ \o By default mapping to QString
+ \row
+ \o FLOAT
+ \o 64-bit floating point
+ \o By default mapping to QString
+ \row
+ \o DOUBLE
+ \o 64-bit floating point
+ \o By default mapping to QString
+ \row
+ \o DOUBLE PRECISION
+ \o 64-bit Double-precision floating point
+ \o By default mapping to QString
+ \row
+ \o VARCHAR STRING
+ \o Character string, Unicode
+ \o Mapped to QString
+ \row
+ \o CLOB
+ \o Character large string object
+ \o Mapped to QString
+ \row
+ \o DATE
+ \o Displays date. Format: 'yyyy-mm-dd'
+ \o Mapped to QDate
+ \row
+ \o TIME
+ \o Displays time. Format is 'hh:mm:ss' in 24-hour format
+ \o Mapped to QTime
+ \row
+ \o TIMESTAMP
+ \o Displays a timestamp. Format is 'yyyy-mm-dd hh:mm:ss'
+ \o Mapped to QDateTime
+ \endtable
+
+ \section2 MySQL data type
+
+ \table
+ \row
+ \header MySQL data type
+ \header SQL Type Description
+ \header Recommended input (C++ data type/Qt Widget)
+ \row
+ \o TINYINT
+ \o 8 bit signed integer
+ \o typedef qint8
+ \row
+ \o TINYINT UNSIGNED
+ \o 8 bit unsigned integer
+ \o typedef quint8
+ \row
+ \o SMALLINT
+ \o 16-bit signed integer
+ \o typedef qint16
+ \row
+ \o SMALLINT UNSIGNED
+ \o 16-bit unsigned integer
+ \o typedef quint16
+ \row
+ \o INT
+ \o 32-bit signed integer
+ \o typedef qint32
+ \row
+ \o INT UNSIGNED
+ \o 32-bit unsigned integer
+ \o typedef quint32
+ \row
+ \o BIGINT
+ \o 64-bit signed integer
+ \o typedef qint64
+ \row
+ \o FLOAT
+ \o 32-bit Floating Point
+ \o By default mapping to QString
+ \row
+ \o DOUBLE
+ \o 64-bit Floating Point
+ \o By default mapping to QString
+ \row
+ \o CHAR
+ \o Character string
+ \o Mapped to QString
+ \row
+ \o VARCHAR
+ \o Character string
+ \o Mapped to QString
+ \row
+ \o TINYTEXT
+ \o Character string
+ \o Mapped to QString
+ \row
+ \o TEXT
+ \o Character string
+ \o Mapped to QString
+ \row
+ \o MEDIUMTEXT
+ \o Character string
+ \o Mapped to QString
+ \row
+ \o LONGTEXT
+ \o Character string
+ \o Mapped to QString
+ \row
+ \o CLOB
+ \o Character large string object
+ \o Mapped to QString
+ \row
+ \o all BLOB types
+ \o BLOB
+ \o Mapped to QByteArray
+ \row
+ \o DATE
+ \o Date without Time
+ \o Mapped to QDate
+ \row
+ \o DATETIME
+ \o Date and Time
+ \o Mapped to QDateTime
+ \row
+ \o TIMESTAMP
+ \o Date and Time
+ \o Mapped to QDateTime
+ \row
+ \o TIME
+ \o Time
+ \o Mapped to QTime
+ \row
+ \o YEAR
+ \o Year (int)
+ \o Mapped to QDateTime
+ \row
+ \o ENUM
+ \o Enumeration of Value Set
+ \o Mapped to QString
+ \endtable
+
+ \section2 Oracle Call Interface data type
+
+ \table
+ \row
+ \header Oracle Call Interface data type
+ \header SQL Type Description
+ \header Recommended input (C++ data type/Qt Widget)
+ \row
+ \o NUMBER
+ \o FLOAT, DOUBLE, PRECISIONc REAL
+ \o By default mapping to QString
+ \row
+ \o NUMBER(38)
+ \o INTEGER INT SMALLINT
+ \o typedef qint8/16/32/64
+ \row
+ \o NUMBER(p,s)
+ \o NUMERIC(p,s) DECIMAL(p,s)a
+ \o By default mapping to QString
+ \row
+ \o NVARCHAR2(n)
+ \o Character string (NATIONAL CHARACTER VARYING(n) NATIONAL
+ CHAR VARYING(n) NCHAR VARYING(n))
+ \o Mapped to QString
+ \row
+ \o NCHAR(n)
+ \o Character string (NATIONAL CHARACTER(n) NATIONAL CHAR(n)
+ NCHAR(n))
+ \o Mapped to QString
+ \row
+ \o CHAR(n)
+ \o Character string (CHARACTER(n) CHAR(n))
+ \o Mapped to QString
+ \row
+ \o CLOB
+ \o Character large string object
+ \o Mapped to QString
+ \row
+ \o BLOB
+ \o A binary large object
+ \o Mapped to QByteArray
+ \row
+ \o TIMESTAMP
+ \o Year, month, and day values of date, as well as hour, minute,
+ and second values of time
+ \o Mapped to QDateTime
+ \endtable
+
+ \section2 ODBC data type
+
+ \table
+ \row
+ \header ODBC data type
+ \header SQL Type Description
+ \header Recommended input (C++ data type/Qt Widget)
+ \row
+ \o BIT
+ \o Boolean
+ \o BOOL
+ \row
+ \o TINYINT
+ \o 8 bit integer
+ \o typedef qint8
+ \row
+ \o SMALLINT
+ \o 16-bit signed integer
+ \o typedef qint16
+ \row
+ \o INTEGER
+ \o 32-bit signed integer
+ \o typedef qint32
+ \row
+ \o BIGINT
+ \o 64-bit signed integer
+ \o typedef qint64
+ \row
+ \o REAL
+ \o 32-bit Single-precision floating point
+ \o By default mapping to QString
+ \row
+ \o FLOAT
+ \o 64-bit Double floating point
+ \o By default mapping to QString
+ \row
+ \o DOUBLE
+ \o 64-bit Double floating point
+ \o By default mapping to QString
+ \row
+ \o CHAR
+ \o Character string
+ \o Mapped to QString
+ \row
+ \o VARCHAR
+ \o Character string
+ \o Mapped to QString
+ \row
+ \o LONGVARCHAR
+ \o Character string
+ \o Mapped to QString
+ \row
+ \o CLOB
+ \o Character large string object
+ \o Mapped to QString
+ \row
+ \o DATE
+ \o Character string
+ \o Mapped to QDate
+ \row
+ \o TIME
+ \o Character Time, Character string
+ \o Mapped to QTime
+ \row
+ \o TIMESTAMP
+ \o Character Time, Character string
+ \o Mapped to QDateTime
+ \endtable
+
+ \section2 PostgreSQL data type
+
+ \table
+ \row
+ \header PostgreSQL data type
+ \header SQL Type Description
+ \header Recommended input (C++ data type/Qt Widget)
+ \row
+ \o BOOLEAN
+ \o Boolean
+ \o bool
+ \row
+ \o SMALLINT
+ \o 16-bit signed integer
+ \o typedef qint16
+ \row
+ \o INTEGER
+ \o 32-bit signed integer
+ \o typedef qint32
+ \row
+ \o BIGINT
+ \o 64-bit signed integer
+ \o typedef qint64
+ \row
+ \o REAL
+ \o 32-bit variable-precision floating point
+ \o By default mapping to QString
+ \row
+ \o DOUBLE PRECISION
+ \o 64-bit variable-precision floating point
+ \o By default mapping to QString
+ \row
+ \o DECIMAL VARIABLE
+ \o user-specified precision, exact
+ \o Mapped to QString
+ \row
+ \o NUMERIC VARIABLE
+ \o user-specified precision, exact
+ \o Mapped to QString
+ \row
+ \o VARCHAR
+ \o variable-length character string
+ \o Mapped to QString
+ \row
+ \o CHARACTER
+ \o Character string of fixed-length
+ \o Mapped to QString
+ \row
+ \o TEXT
+ \o Character string of variable-length
+ \o Mapped to QString
+ \row
+ \o CLOB
+ \o Character large string object
+ \o Mapped to QString
+ \row
+ \o TIMESTAMP
+ \o 8 bytes, both date and time
+ \o Mapped to QDateTime
+ \row
+ \o TIMESTAMP
+ \o 8 bytes, both date and time, with time zone
+ \o Mapped to QDateTime
+ \row
+ \o DATE
+ \o 4 bytes, dates only
+ \o Mapped to QDate
+ \row
+ \o TIME
+ \o 8 bytes, times of day only 00:00:00.00 - 23:59:59.99
+ \o Mapped to QTime
+ \row
+ \o TIME
+ \o 12 bytes times of day only, with time zone 00:00:00.00+12
+ \o Mapped to QDateTime
+ \endtable
+
+ \section2 QSQLITE SQLite version 3 data type
+
+ \table
+ \row
+ \header QSQLITE SQLite version 3 data type
+ \header SQL Type Description
+ \header Recommended input (C++ data type/Qt Widget)
+ \row
+ \o NULL
+ \o NULL value.
+ \o NULL
+ \row
+ \o INTEGER
+ \o Signed integer, stored in 8, 16, 24, 32, 48, or 64-bits
+ depending on the magnitude of the value.
+ \o typedef qint8/16/32/64
+ \row
+ \o REAL
+ \o 64-bit floating point value.
+ \o By default mapping to QString
+ \row
+ \o TEXT
+ \o Character string (UTF-8, UTF-16BE or UTF-16-LE).
+ \o Mapped to QString
+ \row
+ \o CLOB
+ \o Character large string object
+ \o Mapped to QString
+ \row
+ \o BLOB
+ \o The value is a BLOB of data, stored exactly as it was input.
+ \o Mapped to QByteArray
+ \endtable
+
+ \section2 Sybase Adaptive Server data type
+
+ \table
+ \row
+ \header Sybase Adaptive Server data type
+ \header SQL Type Description
+ \header Recommended input (C++ data type/Qt Widget)
+ \row
+ \o BINARY
+ \o Describes a fixed-length binary value up to 255 bytes in size.
+ \o Mapped to QByteArray
+ \row
+ \o CHAR
+ \o Character String
+ \o Mapped to QString
+ \row
+ \o DATETIME
+ \o Date and time. Range: 1753-01-01 00:00:00 through
+ 9999-12-31 23:59:59.
+ \o Mapped to QDateTime
+ \row
+ \o NCHAR
+ \o Character String of fixed length
+ \o Mapped to QString
+ \row
+ \o NVARACHAR
+ \o Character String of variable length
+ \o Mapped to QString
+ \row
+ \o VARCHAR
+ \o Character String of fixed length
+ \o Mapped to QString
+ \row
+ \o CLOB
+ \o Character large string object
+ \o Mapped to QString
+ \row
+ \o TIMESTAMP
+ \o A unique number within a database
+ \o Mapped to QString
+ \row
+ \o SMALLDATETIME
+ \o Date and time. Range: 1900-01-01 00:00 through 2079-12-31 23:59
+ \o Mapped to QDateTime
+ \row
+ \o UNICHAR
+ \o Character String of fixed length.(Unicode)
+ \o Mapped to QString
+ \row
+ \o UNIVARCHAR
+ \o Character String of variable length.(Unicode)
+ \o Mapped to QString
+ \row
+ \o VARBINARY
+ \o Describes a variable-length binary value up to 255 bytes in size
+ \o Mapped to QByteArray
+ \endtable
+
+ \section2 SQLite Version 2
+ SQLite V.2 is "typeless". This means that you can store any kind of
+ data you want in any column of any table, regardless of the declared
+ data type of that column. We recommend that you map the data to QString.
+
+*/
diff --git a/doc/src/qtopenvg.qdoc b/doc/src/qtopenvg.qdoc
index ad036ef..38be288 100644
--- a/doc/src/qtopenvg.qdoc
+++ b/doc/src/qtopenvg.qdoc
@@ -42,32 +42,283 @@
/*!
\module QtOpenVG
\title QtOpenVG Module
+ \since 4.6
\contentspage Qt's Modules
\previouspage QtOpenGL
- \nextpage QtSql
+ \nextpage QtScript
\ingroup modules
- \brief The QtOpenVG module offers classes that make it easy to
- use OpenVG in Qt applications.
+ \brief The QtOpenVG module provides support classes for OpenVG painting.
- From the OpenVG 1.1 Specification:
+ \tableofcontents
- \quotation
+ OpenVG is a standard API from the
+ \l{http://www.khronos.org/openvg}{Khronos Group} for accelerated
+ 2D vector graphics that is appearing in an increasing number of
+ embedded devices.
- OpenVG is an application programming interface (API) for hardware-accelerated two-
- dimensional vector and raster graphics developed under the auspices of the Khronos
- Group (www.khronos.org). It provides a device-independent and vendor-neutral interface
- for sophisticated 2D graphical applications, while allowing device manufacturers to
- provide hardware acceleration where appropriate.
+ OpenVG is optimized for 2D vector operations, and closely matches
+ the functionality in QPainter. It can therefore be an excellent
+ substitute for the default raster-based QPaintEngine on hardware
+ that supports OpenVG.
- \endquotation
+ \section1 Building Qt with OpenVG support
- The specification, and a reference implementation of it are available from the
- \l{http://www.khronos.org/registry/vg/}{Khronos Group}.
+ OpenVG support can be enabled by passing the \c{-openvg} option
+ to configure. It is assumed that the following qmake variables
+ are set to appropriate values in the qmake.conf file for your
+ platform:
- \bold{Note:} Khronos and OpenVG are trademarks of The Khronos Group Inc. OpenGL is a
- registered trademark, and OpenGL ES is a trademark, of Silicon Graphics, Inc.
+ \list
+ \o QMAKE_INCDIR_OPENVG
+ \o QMAKE_LIBDIR_OPENVG
+ \o QMAKE_LIBS_OPENVG
+ \endlist
+ Most OpenVG implementations are based on EGL, so the following
+ variables may also need to be set:
- The Qt OpenVG module makes it easy to use OpenVG in Qt applications.
+ \list
+ \o QMAKE_INCDIR_EGL
+ \o QMAKE_LIBDIR_EGL
+ \o QMAKE_LIBS_EGL
+ \endlist
+
+ See \l{qmake Variable Reference} for more information on these variables.
+
+ Two kinds of OpenVG engines are currently supported: EGL based,
+ and engines built on top of OpenGL such as
+ \l{http://sourceforge.net/projects/shivavg}{ShivaVG}.
+ EGL based engines are preferred.
+
+ It is assumed that the EGL implementation has some way to turn a
+ QWidget::winId() into an EGL rendering surface with
+ \c{eglCreateWindowSurface()}. If this is not the case, then
+ modifications may be needed to the code under \c{src/gui/egl} and
+ \c{src/plugins/graphicssystems/openvg} to accomodate the EGL
+ implementation.
+
+ The ShivaVG graphics system under \c{src/plugins/graphicssystems/shivavg}
+ is an example of how to integrate a non-EGL implementation of
+ OpenVG into Qt. It is currently only supported with Qt/X11
+ and being an example only, the resulting screen output may not
+ be as good as with other OpenVG engines.
+
+ \section1 Using the OpenVG graphics system
+
+ Once the graphics system plugin has been built and installed,
+ applications can be run as follows to use the plugin:
+
+ \code
+ app -graphicssystem OpenVG
+ \endcode
+
+ If ShivaVG is being used, then substitute \c ShivaVG instead of
+ \c OpenVG in the line above.
+
+ If the plugin fails to load, try setting the \c QT_DEBUG_PLUGINS
+ environment variable to 1 and try again. Usually the plugin
+ cannot be loaded because Qt cannot locate it in the directory
+ \c{plugins/graphicssystems} within the Qt installation, or the
+ dynamic library path does not include the directory containing
+ the system's \c libOpenVG.so library.
+
+ \section1 Supported features
+
+ \section2 Context modes
+
+ The default configuration is "single-context" mode, where a single
+ EGLContext object is used for all drawing, regardless of the surface.
+ Multiple EGLSurfaces are created, one for each window surface or pixmap.
+ eglMakeCurrent() is called with the same EGLContext every time, but a
+ different EGLSurface.
+
+ Single-context mode is necessary for QPixmapData to be implemented in
+ terms of a VGImage. If single-context mode is not enabled, then QPixmapData
+ will use the fallback QRasterPixmapData implementation, which is less
+ efficient performance-wise.
+
+ Single-context mode can be disabled with the QVG_NO_SINGLE_CONTEXT define
+ if the OpenVG engine does not support one context with multiple surfaces.
+
+ \section2 Transformation matrices
+
+ All affine and projective transformation matrices are supported.
+
+ QVGPaintEngine will use the engine to accelerate affine transformation
+ matrices only. When a projective transformation matrix is used,
+ QVGPaintEngine will transform the coordinates before passing them
+ to the engine. This will probably incur a performance penalty.
+
+ Pixmaps and images are always transformed by the engine, because
+ OpenVG specifies that projective transformations must work for images.
+
+ It is recommended that client applications should avoid using projective
+ transformations for non-image elements in performance critical code.
+
+ \section2 Composition modes
+
+ The following composition modes are supported:
+
+ \list
+ \o QPainter::CompositionMode_SourceOver
+ \o QPainter::CompositionMode_DestinationOver
+ \o QPainter::CompositionMode_Source
+ \o QPainter::CompositionMode_SourceIn
+ \o QPainter::CompositionMode_DestinationIn
+ \o QPainter::CompositionMode_Plus
+ \o QPainter::CompositionMode_Multiply
+ \o QPainter::CompositionMode_Screen
+ \o QPainter::CompositionMode_Darken
+ \o QPainter::CompositionMode_Lighten
+ \endlist
+
+ The other members of QPainter::CompositionMode are not supported
+ because OpenVG 1.1 does not have an equivalent in its \c VGBlendMode
+ enumeration. Any attempt to set an unsupported mode will result in
+ the actual mode being set to QPainter::CompositionMode_SourceOver.
+ Client applications should avoid using unsupported modes.
+
+ \section2 Pens and brushes
+
+ All pen styles are supported, including cosmetic pens.
+
+ All brush styles are supported except for conical gradients, which are
+ not supported by OpenVG 1.1. Conical gradients will be converted into a
+ solid color brush corresponding to the first color in the gradient's
+ color ramp.
+
+ Affine matrices are supported for brush transforms, but not projective
+ matrices.
+
+ \section2 Rectangles, lines, and points
+
+ Rectangles and lines use cached VGPath objects to try to accelerate
+ drawing operations. vgModifyPathCoords() is used to modify the
+ co-ordinates in the cached VGPath object each time fillRect(),
+ drawRects(), or drawLines() is called.
+
+ If the engine does not implement vgModifyPathCoords() properly, then the
+ QVG_NO_MODIFY_PATH define can be set to disable path caching. This will
+ incur a performance penalty.
+
+ Points are implemented as lines from the point to itself. The cached
+ line drawing VGPath object is used when drawing points.
+
+ \section2 Polygons and Ellipses
+
+ Polygon and ellipse drawing creates a new VGPath object every time
+ drawPolygon() or drawEllipse() is called. If the client application is
+ making heavy use of these functions, the constant creation and destruction
+ of VGPath objects could have an impact on performance.
+
+ If a projective transformation is active, ellipses are converted into
+ cubic curves prior to transformation, which may further impact performance.
+
+ Client applications should avoid polygon and ellipse drawing in performance
+ critical code if possible.
+
+ \section2 Other Objects
+
+ Most other objects (arcs, pies, etc) use drawPath(), which takes a
+ QPainterPath argument. The default implementation in QPainterEngineEx
+ converts the QPainterPath into a QVectorPath and then calls draw(),
+ which in turn converts the QVectorPath into a VGPath for drawing.
+
+ To reduce the overhead, we have overridden drawPath() in QVGPaintEngine
+ to convert QPainterPath's directly into VGPath's. This should help improve
+ performance compared to the default implementation.
+
+ Client applications should try to avoid these types of objects in
+ performance critical code because of the QPainterPath to VGPath
+ conversion cost.
+
+ \section2 Clipping
+
+ Clipping with QRect, QRectF, and QRegion objects is supported on all
+ OpenVG engines with vgMask() if the transformation matrix is the identity
+ or a simple origin translation.
+
+ Clipping with an arbitrary QPainterPath, or setting the clip region when
+ the transformation matrix is simple, is supported only if the OpenVG engine
+ has the vgRenderToMask() function (OpenVG 1.1 and higher).
+
+ The QVG_NO_RENDER_TO_MASK define will disable the use of vgRenderToMask().
+
+ The QVG_SCISSOR_CLIP define will disable clipping with vgMask() or
+ vgRenderToMask() and instead use the scissor rectangle list to perform
+ clipping. Clipping with an arbitrary QPainterPath will not be supported.
+ The QVG_SCISSOR_CLIP define should only be used if the OpenVG engine
+ does not support vgMask() or vgRenderToMask().
+
+ \section2 Opacity
+
+ Opacity is supported for all drawing operations. Solid color pens,
+ solid color brushes, gradient brushes, and image drawing with drawPixmap()
+ and drawImage() will probably have the best performance compared to
+ other kinds of pens and brushes.
+
+ \section2 Text Drawing
+
+ If OpenVG 1.1 is used, the paint engine will use VG fonts to cache glyphs
+ while drawing. If the engine does not support VG fonts correctly,
+ QVG_NO_DRAW_GLYPHS can be defined to disable this mode. Text drawing
+ performance will suffer if VG fonts are not used.
+
+ By default, image-based glyphs are used. If QVG_NO_IMAGE_GLYPHS is defined,
+ then path-based glyphs will be used instead. QVG_NO_IMAGE_GLYPHS is ignored
+ if QVG_NO_DRAW_GLYPHS is defined.
+
+ If path-based glyphs are used, then the OpenVG engine will need to
+ support hinting to render text with good results. Image-based glyphs
+ avoids the need for hinting and will usually give better results than
+ path-based glyphs.
+
+ \section2 Pixmaps
+
+ In single-context mode, pixmaps will be implemented using VGImage
+ unless QVG_NO_PIXMAP_DATA is defined.
+
+ QVGPixmapData will convert QImage's into VGImage's when the application
+ calls drawPixmap(), and the pixmap will be kept in VGImage form for the
+ lifetime of the QVGPixmapData object. When the application tries to paint
+ into a QPixmap with QPainter, the data will be converted back into a
+ QImage and the raster paint engine will be used to render into the QImage.
+
+ This arrangement optimizes for the case of drawing the same static pixmap
+ over and over (e.g. for icons), but does not optimize the case of drawing
+ into pixmaps.
+
+ Bitmaps must use QRasterPixmapData. They are not accelerated with
+ VGImage at present.
+
+ \section2 Pixmap filters
+
+ Convolution, colorize, and drop shadow filters are accelerated using
+ OpenVG operations.
+
+ \section1 Known issues
+
+ Performance of copying the contents of an OpenVG-rendered window to the
+ screen needs platform-specific work in the QVGWindowSurface class.
+
+ Clipping with arbitrary non-rectangular paths only works on engines
+ that support vgRenderToMask(). Simple rectangular paths are supported
+ on all engines that correctly implement vgMask().
+
+ The paint engine is not yet thread-safe, so it is not recommended for
+ use in threaded Qt applications that draw from multiple threads.
+ Drawing should be limited to the main GUI thread.
+
+ Performance of projective matrices for non-image drawing is not as good
+ as for affine matrices.
+
+ QPixmap's are implemented as VGImage objects so that they can be quickly
+ rendered with drawPixmap(). Rendering into a QPixmap using QPainter
+ will use the default Qt raster paint engine on a QImage copy of the
+ QPixmap, and will not be accelerated. This issue may be addressed in
+ a future version of the engine.
+
+ ShivaVG support is highly experimental and limited to Qt/X11. It is
+ provided as an example of how to integrate a non-EGL engine.
*/
diff --git a/doc/src/qtscript.qdoc b/doc/src/qtscript.qdoc
index ac13ddf..f2ac6c9 100644
--- a/doc/src/qtscript.qdoc
+++ b/doc/src/qtscript.qdoc
@@ -44,7 +44,7 @@
\title QtScript Module
\since 4.3
\contentspage Qt's Modules
- \previouspage QtOpenGL
+ \previouspage QtOpenVG
\nextpage QtScriptTools
\ingroup modules
\ingroup scripting
diff --git a/doc/src/qtsql.qdoc b/doc/src/qtsql.qdoc
index ff58c62..54ea86a 100644
--- a/doc/src/qtsql.qdoc
+++ b/doc/src/qtsql.qdoc
@@ -212,6 +212,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 {QtSql Module - Recommended use of data types}{this table}.
+
You can iterate back and forth using QSqlQuery::next(),
QSqlQuery::previous(), QSqlQuery::first(), QSqlQuery::last(), and
QSqlQuery::seek(). The current row index is returned by
diff --git a/doc/src/snippets/code/src_gui_qproxystyle.cpp b/doc/src/snippets/code/src_gui_qproxystyle.cpp
index a9c55b3..46a2a5f 100644
--- a/doc/src/snippets/code/src_gui_qproxystyle.cpp
+++ b/doc/src/snippets/code/src_gui_qproxystyle.cpp
@@ -3,7 +3,7 @@ class MyProxyStyle : public QProxyStyle
{
public:
- int styleHint(StyleHint hint, const QStyleOption *option = 0,
+ int styleHint(StyleHint hint, const QStyleOption *option = 0,
const QWidget *widget = 0, QStyleHintReturn *returnData = 0) const
{
if (hint == QStyle::SH_UnderlineShortcut)
@@ -18,7 +18,7 @@ public:
#include "textedit.h"
#include <QApplication>
#include <QProxyStyle>
-
+
class MyProxyStyle : public QProxyStyle
{
public:
@@ -30,16 +30,16 @@ class MyProxyStyle : public QProxyStyle
return QProxyStyle::styleHint(hint, option, widget, returnData);
}
};
-
+
int main(int argc, char **argv)
{
Q_INIT_RESOURCE(textedit);
-
+
QApplication a(argc, argv);
a.setStyle(new MyProxyStyle);
TextEdit mw;
mw.resize(700, 800);
- mw.show();
+ mw.show();
//...
}
//! [1]
diff --git a/doc/src/tutorials/addressbook.qdoc b/doc/src/tutorials/addressbook.qdoc
index 2f6cec2..33832da 100644
--- a/doc/src/tutorials/addressbook.qdoc
+++ b/doc/src/tutorials/addressbook.qdoc
@@ -697,10 +697,11 @@
\snippet tutorials/addressbook/part5/finddialog.h FindDialog header
- We define a public function, \c getFindText() for use by classes that
- instantiate \c FindDialog, which allows them to obtain the text
- entered by the user. A public slot, \c findClicked(), is defined to
- handle the search string when the user clicks the \gui Find button.
+ We define a public function, \c getFindText(), to be used by classes that
+ instantiate \c FindDialog. This function allows these classes to obtain the
+ search string entered by the user. A public slot, \c findClicked(), is also
+ defined to handle the search string when the user clicks the \gui Find
+ button.
Lastly, we define the private variables, \c findButton, \c lineEdit
and \c findText, corresponding to the \gui Find button, the line edit
@@ -715,15 +716,15 @@
\snippet tutorials/addressbook/part5/finddialog.cpp constructor
- We set the layout and window title, as well as connect the signals
- to their respective slots. Notice that \c{findButton}'s
- \l{QPushButton::clicked()}{clicked()} signal is connected to to
- \c findClicked() and \l{QDialog::accept()}{accept()}. The
- \l{QDialog::accept()}{accept()} slot provided by QDialog hides
- the dialog and sets the result code to \l{QDialog::}{Accepted}.
- We use this function to help \c{AddressBook}'s \c findContact() function
- know when the \c FindDialog object has been closed. This will be
- further explained when discussing the \c findContact() function.
+ We set the layout and window title, as well as connect the signals to their
+ respective slots. Notice that \c{findButton}'s \l{QPushButton::clicked()}
+ {clicked()} signal is connected to to \c findClicked() and
+ \l{QDialog::accept()}{accept()}. The \l{QDialog::accept()}{accept()} slot
+ provided by QDialog hides the dialog and sets the result code to
+ \l{QDialog::}{Accepted}. We use this function to help \c{AddressBook}'s
+ \c findContact() function know when the \c FindDialog object has been
+ closed. We will explain this logic in further detail when discussing the
+ \c findContact() function.
\image addressbook-tutorial-part5-signals-and-slots.png
@@ -817,21 +818,23 @@
\image addressbook-tutorial-part6-screenshot.png
- Although browsing and searching for contacts are useful features, our address
- book is not really fully ready for use until we can saving existing contacts
- and load them again at a later time.
- Qt provides a number of classes for \l{Input/Output and Networking}{input and output},
- but we have chosen to use two which are simple to use in combination: QFile and
- QDataStream.
-
- A QFile object represents a file on disk that can be read from and written to.
- QFile is a subclass of the more general QIODevice class which represents many
- different kinds of devices.
-
- A QDataStream object is used to serialize binary data so that it can be stored
- in a QIODevice and retrieved again later. Reading from a QIODevice and writing
- to it is as simple as opening the stream - with the respective device as a
- parameter - and reading from or writing to it.
+ Although browsing and searching for contacts are useful features, our
+ address book is not ready for use until we can save existing contacts and
+ load them again at a later time.
+
+ Qt provides a number of classes for \l{Input/Output and Networking}
+ {input and output}, but we have chosen to use two which are simple to use
+ in combination: QFile and QDataStream.
+
+ A QFile object represents a file on disk that can be read from and written
+ to. QFile is a subclass of the more general QIODevice class which
+ represents many different kinds of devices.
+
+ A QDataStream object is used to serialize binary data so that it can be
+ stored in a QIODevice and retrieved again later. Reading from a QIODevice
+ and writing to it is as simple as opening the stream - with the respective
+ device as a parameter - and reading from or writing to it.
+
\section1 Defining the AddressBook Class