diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-07-24 09:45:33 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-07-27 13:04:30 (GMT) |
commit | 3643028959f0b38350e57e60ba4000435b75e592 (patch) | |
tree | c129e4dee11487abd437ab8ebd993ba261e06fa6 /doc | |
parent | cf66c667a97c0079141eb3f2d9e997b7378ae792 (diff) | |
parent | c36139c665e61866aff4bf8572890a735167a7d0 (diff) | |
download | Qt-3643028959f0b38350e57e60ba4000435b75e592.zip Qt-3643028959f0b38350e57e60ba4000435b75e592.tar.gz Qt-3643028959f0b38350e57e60ba4000435b75e592.tar.bz2 |
Merge commit 'qt/master-stable'
Conflicts:
configure.exe
qmake/Makefile.unix
qmake/generators/makefile.cpp
src/corelib/global/qglobal.h
src/corelib/kernel/kernel.pri
src/corelib/kernel/qcoreevent.cpp
src/corelib/kernel/qsharedmemory_unix.cpp
src/gui/graphicsview/qgraphicsscene.cpp
src/gui/kernel/qaction.cpp
src/gui/kernel/qaction.h
src/gui/kernel/qaction_p.h
src/gui/kernel/qapplication.cpp
src/gui/kernel/qapplication.h
src/gui/kernel/qwidget.cpp
src/gui/kernel/qwidget.h
src/gui/kernel/qwidget_mac.mm
src/gui/painting/qgraphicssystemfactory.cpp
src/gui/styles/qwindowsstyle.cpp
src/gui/text/qfontengine_qpf.cpp
src/gui/widgets/qabstractscrollarea_p.h
src/network/access/qnetworkaccessdebugpipebackend.cpp
src/network/socket/qlocalsocket_unix.cpp
src/network/socket/qnativesocketengine_p.h
src/network/socket/qnativesocketengine_unix.cpp
src/openvg/qpaintengine_vg.cpp
tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp
tests/auto/qcssparser/qcssparser.pro
tests/auto/qdir/tst_qdir.cpp
tests/auto/qfile/tst_qfile.cpp
tests/auto/qobject/tst_qobject.cpp
tests/auto/qpathclipper/qpathclipper.pro
tests/auto/qprocess/tst_qprocess.cpp
tests/auto/qsettings/tst_qsettings.cpp
tests/auto/qsharedpointer/qsharedpointer.pro
tests/auto/qsqlquerymodel/qsqlquerymodel.pro
tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
tests/auto/qsqltablemodel/qsqltablemodel.pro
tests/auto/qsqlthread/qsqlthread.pro
tests/auto/qwidget/tst_qwidget.cpp
Diffstat (limited to 'doc')
113 files changed, 1269 insertions, 470 deletions
diff --git a/doc/doc.pri b/doc/doc.pri index a4c77fe..13d481f 100644 --- a/doc/doc.pri +++ b/doc/doc.pri @@ -2,13 +2,6 @@ # Qt documentation build ##################################################################### -win32 { - QT_WINCONFIG = release/ - !CONFIG(release, debug|release) { - QT_WINCONFIG = debug/ - } -} - DOCS_GENERATION_DEFINES = -Dopensourceedition GENERATOR = $$QT_BUILD_TREE/bin/qhelpgenerator @@ -21,9 +14,9 @@ win32:!win32-g++ { } $$unixstyle { - QDOC = cd $$QT_SOURCE_TREE/tools/qdoc3/test && QT_BUILD_TREE=$$QT_BUILD_TREE QT_SOURCE_TREE=$$QT_SOURCE_TREE $$QT_BUILD_TREE/tools/qdoc3/$${QT_WINCONFIG}qdoc3 $$DOCS_GENERATION_DEFINES + QDOC = cd $$QT_SOURCE_TREE/tools/qdoc3/test && QT_BUILD_TREE=$$QT_BUILD_TREE QT_SOURCE_TREE=$$QT_SOURCE_TREE $$QT_BUILD_TREE/tools/qdoc3/qdoc3 $$DOCS_GENERATION_DEFINES } else { - QDOC = cd $$QT_SOURCE_TREE/tools/qdoc3/test && set QT_BUILD_TREE=$$QT_BUILD_TREE&& set QT_SOURCE_TREE=$$QT_SOURCE_TREE&& $$QT_BUILD_TREE/tools/qdoc3/$${QT_WINCONFIG}qdoc3.exe $$DOCS_GENERATION_DEFINES + QDOC = cd $$QT_SOURCE_TREE/tools/qdoc3/test && set QT_BUILD_TREE=$$QT_BUILD_TREE&& set QT_SOURCE_TREE=$$QT_SOURCE_TREE&& $$QT_BUILD_TREE/tools/qdoc3/qdoc3.exe $$DOCS_GENERATION_DEFINES QDOC = $$replace(QDOC, "/", "\\") } macx { diff --git a/doc/src/bughowto.qdoc b/doc/src/bughowto.qdoc index 927cb04..fae1180 100644 --- a/doc/src/bughowto.qdoc +++ b/doc/src/bughowto.qdoc @@ -52,7 +52,9 @@ Notes}, and the \l{Task Tracker} on the Qt website to see if the issue is already known. - Always include the following information in your bug report: + If you have found a new bug, please submit a bug report using + the \l{Bug Report Form}. Always include the following information + in your bug report: \list 1 \o The name and version number of your compiler @@ -66,6 +68,6 @@ such a program can be created with some minor changes to one of the many example programs in Qt's \c examples directory. - Please submit the bug report using the \l{Task Tracker} on the Qt - website. + If you have implemented a bug fix and want to contribute your fix + directly, then you can do so through the \l{Public Qt Repository}. */ diff --git a/doc/src/classes.qdoc b/doc/src/classes.qdoc index dddc96f..9a5d3ec 100644 --- a/doc/src/classes.qdoc +++ b/doc/src/classes.qdoc @@ -44,13 +44,15 @@ \title Qt's Classes \ingroup classlists - 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}. + This is a list of all Qt classes. For a shorter list of the most + frequently used Qt classes, see \l{Qt's Main Classes}. For a list + of the classes provided for compatibility with Qt3, see \l{Qt 3 + compatibility classes}. For classes that have been deprecated, see + the \l{Obsolete Classes} list. \generatelist classes - \sa {Qt 3 Compatibility Classes}, {Qt's Modules} + \sa {Qt 3 Compatibility Classes}, {Qt's Modules}, {Obsolete Classes} */ /*! diff --git a/doc/src/credits.qdoc b/doc/src/credits.qdoc index 81ded04..15bf1e2 100644 --- a/doc/src/credits.qdoc +++ b/doc/src/credits.qdoc @@ -247,6 +247,7 @@ Mike Perik <mikep at crt.com>\br Mike Sharkey <msharkey at softarc.com>\br Mikko Ala-Fossi <mikko.ala-fossi at vaisala.com>\br + Milan Burda <milan.burda at gmail.com>\br Miroslav Flidr <flidr at kky.zcu.cz>\br Miyata Shigeru <miyata at kusm.kyoto-u.ac.jp>\br Myron Uecker <muecker at csd.net>\br diff --git a/doc/src/deployment.qdoc b/doc/src/deployment.qdoc index 0866930..1da2c06 100644 --- a/doc/src/deployment.qdoc +++ b/doc/src/deployment.qdoc @@ -715,17 +715,19 @@ \table 100% \header - \o \o VC++ 6.0 \o VC++ 7.1 (2003) \o VC++ 8.0 (2005) + \o \o VC++ 6.0 \o VC++ 7.1 (2003) \o VC++ 8.0 (2005) \o VC++ 9.0 (2008) \row \o The C run-time \o \c msvcrt.dll \o \c msvcr71.dll \o \c msvcr80.dll + \o \c msvcr90.dll \row \o The C++ run-time \o \c msvcp60.dll \o \c msvcp71.dll \o \c msvcp80.dll + \o \c msvcp90.dll \endtable To verify that the application now can be successfully deployed, @@ -893,7 +895,7 @@ \o \l{qt-conf.html}{Using \c qt.conf}. This approach is the recommended if you have executables in different places sharing the same plugins. - + \o Using QApplication::addLibraryPath() or QApplication::setLibraryPaths(). This approach is recommended if you only have one executable that will use the plugin. @@ -902,10 +904,10 @@ hard-coded paths in the QtCore library. \endlist - + If you add a custom path using QApplication::addLibraryPath it could look like this: - + \snippet doc/src/snippets/code/doc_src_deployment.qdoc 54 Then qApp->libraryPaths() would return something like this: diff --git a/doc/src/designer-manual.qdoc b/doc/src/designer-manual.qdoc index 67114b9..c67865d 100644 --- a/doc/src/designer-manual.qdoc +++ b/doc/src/designer-manual.qdoc @@ -86,7 +86,7 @@ \o \l{Creating Main Windows in Qt Designer} \o \l{Editing Resources with Qt Designer} \o \l{Using Stylesheets with Qt Designer} - \o \l{Using a Designer .ui File in Your Application} + \o \l{Using a Designer UI File in Your Application} \endlist For advanced usage of \QD, you can refer to these links: @@ -158,7 +158,7 @@ has been introduced to aid translators in the case of two source texts being the same but used for different purposes. For example, a dialog could have two \gui{Add} buttons for two different - reasons. \note To maintain compatibility, comments in \c{.ui} files + reasons. \note To maintain compatibility, comments in UI files created prior to Qt 4.5 will be listed in the \gui{Disambiguation} field. \endlist @@ -620,7 +620,7 @@ \key{Ctrl+O}. At any point, you can save your form by selecting the \gui{Save From As...} - option from the \gui File menu. The \c{.ui} files saved by \QD contain + option from the \gui File menu. The UI files saved by \QD contain information about the objects used, and any details of signal and slot connections between them. @@ -953,7 +953,7 @@ \image designer-form-layout.png - The \c{.ui} file above results in the previews shown below. + The UI file above results in the previews shown below. \table \header @@ -1226,7 +1226,7 @@ The whole connection can be selected by clicking on any of its path segments. Once selected, a connection can be deleted with the - \key Delete key, ensuring that it will not be set up in the \c{.ui} + \key Delete key, ensuring that it will not be set up in the UI file. \endtable */ @@ -1360,7 +1360,7 @@ inside. Both widgets and spacers can be used inside containers. Stacked widgets, tab widgets, and toolboxes are handled specially in \QD. - Norwally, when adding pages (tabs, pages, compartments) to these containers + Normally, when adding pages (tabs, pages, compartments) to these containers in your own code, you need to supply existing widgets, either as placeholders or containing child widgets. In \QD, these are automatically created for you, so you can add child objects to each page straight away. @@ -1795,7 +1795,7 @@ pixmap property in the property editor. \page designer-stylesheet.html \contentspage {Qt Designer Manual}{Contents} \previouspage Editing Resources with Qt Designer - \nextpage Using a Designer .ui File in Your Application + \nextpage Using a Designer UI File in Your Application \title Using Stylesheets with Qt Designer @@ -1824,7 +1824,7 @@ pixmap property in the property editor. \contentspage {Qt Designer Manual}{Contents} \nextpage Using Custom Widgets with Qt Designer - \title Using a Designer .ui File in Your Application + \title Using a Designer UI File in Your Application With Qt's integrated build tools, \l{qmake Manual}{qmake} and \l uic, the code for user interface components created with \QD is automatically @@ -1855,11 +1855,11 @@ pixmap property in the property editor. \section2 The Direct Approach - To demonstrate how to use user interface (\c{.ui}) files straight from + To demonstrate how to use user interface (UI) files straight from \QD, we create a simple Calculator Form application. This is based on the original \l{Calculator Form Example}{Calculator Form} example. - The application consists of one source file, \c main.cpp and a \c{.ui} + The application consists of one source file, \c main.cpp and a UI file. The \c{calculatorform.ui} file designed with \QD is shown below: @@ -1882,7 +1882,7 @@ pixmap property in the property editor. \snippet doc/src/snippets/uitools/calculatorform/main.cpp 0 This include is an additional check to ensure that we do not generate code - for \c .ui files that are not used. + for UI files that are not used. The \c main function creates the calculator widget by constructing a standard QWidget that we use to host the user interface described by the @@ -2003,7 +2003,7 @@ pixmap property in the property editor. \section2 The UiTools Approach - A resource file containing a \c{.ui} file is required to process forms at + A resource file containing a UI file is required to process forms at run time. Also, the application needs to be configured to use the QtUiTools module. This is done by including the following declaration in a \c qmake project file, ensuring that the application is compiled and linked @@ -2034,7 +2034,7 @@ pixmap property in the property editor. \snippet examples/uitools/textfinder/textfinder.cpp 1 Processing forms at run-time gives the developer the freedom to change a - program's user interface, just by changing the \c{.ui} file. This is useful + program's user interface, just by changing the UI file. This is useful when customizing programs to suit various user needs, such as extra large icons or a different colour scheme for accessibility support. @@ -2130,12 +2130,12 @@ pixmap property in the property editor. \image designer-form-settings.png - When saving a form in \QD, it is stored as an \c .ui file. Several form + When saving a form in \QD, it is stored as a UI file. Several form settings, for example the grid settings or the margin and spacing for the default layout, are stored along with the form's components. These settings are used when the \l uic generates the form's C++ code. For more information on how to use forms in your application, see the - \l{Using a Designer .ui File in Your Application} section. + \l{Using a Designer UI File in Your Application} section. \section1 Modifying the Form Settings @@ -2168,7 +2168,7 @@ pixmap property in the property editor. You can also specify the form's \gui{Include Hints}; i.e., provide a list of the header files which will then be included in the form window's - associated \c .ui file. Header files may be local, i.e., relative to the + associated UI file. Header files may be local, i.e., relative to the project's directory, \c "mywidget.h", or global, i.e. part of Qt or the compilers standard libraries: \c <QtGui/QWidget>. @@ -2331,7 +2331,7 @@ pixmap property in the property editor. \row \o \c includeFile() \o The header file that must be included in applications that use - this widget. This information is stored in .ui files and will + this widget. This information is stored in UI files and will be used by \c uic to create a suitable \c{#includes} statement in the code it generates for the form containing the custom widget. @@ -2379,12 +2379,12 @@ pixmap property in the property editor. \section2 Notes on the \c{domXml()} Function - The \c{domXml()} function returns a \c{.ui} file snippet that is used by + The \c{domXml()} function returns a UI file snippet that is used by \QD's widget factory to create a custom widget and its applicable properties. - Since Qt 4.4, \QD's widget box allows for a complete \c{.ui} file to - describe \bold one custom widget. The \c{.ui} file can be loaded using the + Since Qt 4.4, \QD's widget box allows for a complete UI file to + describe \bold one custom widget. The UI file can be loaded using the \c{<ui>} tag. Specifying the <ui> tag allows for adding the <customwidget> element that contains additional information for custom widgets. The \c{<widget>} tag is sufficient if no additional information is required @@ -2800,7 +2800,7 @@ pixmap property in the property editor. \title Qt Designer's UI File Format - The \c .ui file format used by \QD is described by the + The \c UI file format used by \QD is described by the \l{http://www.w3.org/XML/Schema}{XML schema} presented below, which we include for your convenience. Be aware that the format may change in future Qt releases. diff --git a/doc/src/diagrams/programs/easingcurve/main.cpp b/doc/src/diagrams/programs/easingcurve/main.cpp index 8a2d53b..f249dbc 100644 --- a/doc/src/diagrams/programs/easingcurve/main.cpp +++ b/doc/src/diagrams/programs/easingcurve/main.cpp @@ -85,32 +85,37 @@ void createCurveIcons() qreal curveScale = iconSize.height()/2; - painter.drawLine(yAxis - 2, xAxis - curveScale, yAxis + 2, xAxis - curveScale); // hor + painter.drawLine(yAxis - 2, xAxis - curveScale, yAxis + 2, xAxis - curveScale); // hor painter.drawLine(yAxis + curveScale, xAxis + 2, yAxis + curveScale, xAxis - 2); // ver painter.drawText(yAxis + curveScale - 8, xAxis - curveScale - 4, QLatin1String("(1,1)")); - + painter.drawText(yAxis + 42, xAxis + 10, QLatin1String("progress")); - painter.drawText(15, xAxis - curveScale - 10, QLatin1String("ease")); - - painter.setPen(QPen(Qt::red, 1, Qt::DotLine)); + painter.drawText(15, xAxis - curveScale - 10, QLatin1String("value")); + + painter.setPen(QPen(Qt::red, 1, Qt::DotLine)); painter.drawLine(yAxis, xAxis - curveScale, yAxis + curveScale, xAxis - curveScale); // hor painter.drawLine(yAxis + curveScale, xAxis, yAxis + curveScale, xAxis - curveScale); // ver - - QPoint currentPos(yAxis, xAxis); - + + QPoint start(yAxis, xAxis - curveScale * curve.valueForProgress(0)); + painter.setPen(Qt::black); QFont font = oldFont; font.setPixelSize(oldFont.pixelSize() + 15); painter.setFont(font); painter.drawText(0, iconSize.height() - 20, iconSize.width(), 20, Qt::AlignHCenter, name); - - for (qreal t = 0; t < 1.0; t+=1.0/curveScale) { + + QPainterPath curvePath; + curvePath.moveTo(start); + for (qreal t = 0; t <= 1.0; t+=1.0/curveScale) { QPoint to; to.setX(yAxis + curveScale * t); to.setY(xAxis - curveScale * curve.valueForProgress(t)); - painter.drawLine(currentPos, to); - currentPos = to; + curvePath.lineTo(to); } + painter.setRenderHint(QPainter::Antialiasing, true); + painter.strokePath(curvePath, QColor(32, 32, 32)); + painter.setRenderHint(QPainter::Antialiasing, false); + QString fileName(QString::fromAscii("qeasingcurve-%1.png").arg(name.toLower())); printf("%s\n", qPrintable(fileName)); pix.save(QString::fromAscii("%1/%2").arg(output).arg(fileName), "PNG"); diff --git a/doc/src/dnd.qdoc b/doc/src/dnd.qdoc index 8d3d79d..5ede20c 100644 --- a/doc/src/dnd.qdoc +++ b/doc/src/dnd.qdoc @@ -141,15 +141,17 @@ types of data that the widget accepts. You must reimplement this function if you want to receive either QDragMoveEvent or QDropEvent in your reimplementations of - \l{QWidget::dragMoveEvent()}{dragMoveEvent()} and dropEvent(). + \l{QWidget::dragMoveEvent()}{dragMoveEvent()} and + \l{QWidget::dropEvent()}{dropEvent()}. - The following code shows how dragEnterEvent() can be reimplemented to + The following code shows how \l{QWidget::dragEnterEvent()}{dragEnterEvent()} + can be reimplemented to tell the drag and drop system that we can only handle plain text: \snippet doc/src/snippets/dropevents/window.cpp 3 - The dropEvent() is used to unpack dropped data and handle it in way that - is suitable for your application. + The \l{QWidget::dropEvent()}{dropEvent()} is used to unpack dropped data + and handle it in way that is suitable for your application. In the following code, the text supplied in the event is passed to a QTextBrowser and a QComboBox is filled with the list of MIME types that @@ -159,7 +161,8 @@ In this case, we accept the proposed action without checking what it is. In a real world application, it may be necessary to return from the - dropEvent() function without accepting the proposed action or handling + \l{QWidget::dropEvent()}{dropEvent()} function without accepting the + proposed action or handling the data if the action is not relevant. For example, we may choose to ignore Qt::LinkAction actions if we do not support links to external sources in our application. @@ -435,7 +438,7 @@ \title Porting to Qt 4 - Drag and Drop \contentspage {Porting Guides}{Contents} \previouspage Porting to Qt 4 - Virtual Functions - \nextpage Porting .ui Files to Qt 4 + \nextpage Porting UI Files to Qt 4 \ingroup porting \brief An overview of the porting process for applications that use drag and drop. diff --git a/doc/src/emb-charinput.qdoc b/doc/src/emb-charinput.qdoc index c9c768c..565d953 100644 --- a/doc/src/emb-charinput.qdoc +++ b/doc/src/emb-charinput.qdoc @@ -82,13 +82,13 @@ \section1 Available Keyboard Drivers - \l {Qt for Embedded Linux} provides ready-made drivers for the SL5000, Yopy, - Vr41XX, console (TTY) and USB protocols. Run the \c configure - script to list the available drivers: + \l {Qt for Embedded Linux} provides ready-made drivers for the console + (TTY) and the standard Linux Input Subsystem (USB, PS/2, ...). Run the + \c configure script to list the available drivers: \snippet doc/src/snippets/code/doc_src_emb-charinput.qdoc 0 - Note that the console keyboard driver also handles console + Note that only the console (TTY) keyboard driver handles console switching (\bold{Ctrl+Alt+F1}, ..., \bold{Ctrl+Alt+F10}) and termination (\bold{Ctrl+Alt+Backspace}). @@ -105,6 +105,17 @@ detect the plugin, loading the driver into the server application at run-time. + \section1 Keymaps + + Starting with 4.6, \l {Qt for Embedded Linux} has gained support for + user defined keymaps. Keymap handling is supported by the builtin + keyboard drivers \c TTY and \c LinuxInput. Custom keyboard drivers can + use the existing keymap handling code via + QWSKeyboardHandler::processKeycode(). + + By default Qt will use an internal, compiled-in US keymap. + See the options below for how to load a different keymap. + \section1 Specifying a Keyboard Driver To specify which driver to use, set the QWS_KEYBOARD environment @@ -113,14 +124,41 @@ \snippet doc/src/snippets/code/doc_src_emb-charinput.qdoc 2 - The \c <driver> argument are \c SL5000, \c Yopy, \c VR41xx, \c - TTY, \c USB and \l {QKbdDriverPlugin::keys()}{keys} identifying - custom drivers, and the driver specific options are typically a - device, e.g., \c /dev/tty0. + The \c <driver> argument are \c TTY, \c LinuxInput and \l + {QKbdDriverPlugin::keys()}{keys} identifying custom drivers, and the + driver specific options are typically a device, e.g., \c /dev/tty0. Multiple keyboard drivers can be specified in one go: \snippet doc/src/snippets/code/doc_src_emb-charinput.qdoc 3 Input will be read from all specified drivers. + + Currently the following options are supported by both the \c TTY and \c + LinuxInput driver: + + \table + \header \o Option \o Description + \row \o \c /dev/xxx \o + Open the specified device, instead of the driver's default device. + \row \o \c repeat-delay=<d> \o + Time in milliseconds until auto-repeat kicks in. + \row \o \c repeat-rate=<r> \o + Time in milliseconds specifying interval between auto-repeats. + \row \o \c keymap=xx.qmap \o + File name of a keymap file in Qt's \c qmap format. See \l {kmap2qmap} + for instructions on how to create thoes files.\br Please note that the + file name can of course also be the name of a QResource. + \row \o \c disable-zap \o + Disable the QWS server "Zap" shortcut \bold{Ctrl+Alt+Backspace} + \row \o \c enable-compose \o + Activate Latin-1 composing features in the builtin US keymap. You can + use the right \c AltGr or right \c Alt is used as a dead key modifier, + while \c AltGr+. is the compose key. For example: + \list + \o \c AltGr + \c " + \c u = \uuml (u with diaeresis / umlaut u) + \o \c AltGr + \c . + \c / + \c o = \oslash (slashed o) + \endlist + \endtable + */ diff --git a/doc/src/emb-kmap2qmap.qdoc b/doc/src/emb-kmap2qmap.qdoc new file mode 100644 index 0000000..2b3f687 --- /dev/null +++ b/doc/src/emb-kmap2qmap.qdoc @@ -0,0 +1,84 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** 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 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 http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page qt-embedded-kmap2qmap.html + \title kmap2qmap + \ingroup qt-embedded-linux + + \c kmap2qmap is a tool to generate keymaps for use on Embedded Linux. + The source files have to be in standard Linux \c kmap format that is + e.g. understood by the kernel's \c loadkeys command. This means you + can use the following sources to generate \c qmap files: + + \list + \o The \l {http://lct.sourceforge.net/}{Linux Console Tools (LCT)} project. + \o \l {http://www.x.org/}{Xorg} X11 keymaps can be converted to the \c + kmap format with the \c ckbcomp utility. + \o Since \c kmap files are plain text files, they can also be hand crafted. + \endlist + + The generated \c qmap files are size optimized binary files. + + \c kmap2qmap is a command line program, that needs at least 2 files as + parameters. The last one will be the generated \c .qmap file, while all + the others will be parsed as input \c .kmap files. For example: + + \code + kmap2qmap i386/qwertz/de-latin1-nodeadkeys.kmap include/compose.latin1.inc de-latin1-nodeadkeys.qmap + \endcode + + \c kmap2qmap doesn't support all the (pseudo) symbols that the Linux + kernel supports. If you are converting a standard keymap you will get a + lot of warnings for things like \c Show_Registers, \c Hex_A, etc.: you + can safely ignore those. + + It also doesn't support numeric symbols (e.g. \c{keycode 1 = 4242}, + instead of \c{keycode 1 = colon}), since these are deprecated and can + change from one kernel version to the other. + + On the other hand, \c kmap2qmap supports one additional, Qt specific, + symbol: \c QtZap. The built-in US keymap has that symbol mapped tp + \c{Ctrl+Alt+Backspace} and it serves as a shortcut to kill your QWS + server (similiar to the X11 server). + + See also \l {Qt for Embedded Linux Character Input} +*/ diff --git a/doc/src/emb-pointer.qdoc b/doc/src/emb-pointer.qdoc index b13dec0..49504fe 100644 --- a/doc/src/emb-pointer.qdoc +++ b/doc/src/emb-pointer.qdoc @@ -64,9 +64,10 @@ \section1 Available Drivers \l{Qt for Embedded Linux} provides ready-made drivers for the MouseMan, - IntelliMouse, Microsoft, NEC Vr41XX, Linux Touch Panel and Yopy - protocols as well as the universal touch screen library, - tslib. Run the \c configure script to list the available drivers: + IntelliMouse, Microsoft and Linux Touch Panel protocols, for the + standard Linux Input Subsystem as well as the universal touch screen + library, tslib. Run the \c configure script to list the available + drivers: \if defined(QTOPIA_PHONE) @@ -125,7 +126,7 @@ \snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 4 The valid values for the \c <driver> argument are \c MouseMan, \c - IntelliMouse, \c Microsoft, \c VR41xx, \c LinuxTP, \c Yopy, \c + IntelliMouse, \c Microsoft, \c LinuxTP, \c LinuxInput, \c Tslib and \l {QMouseDriverPlugin::keys()}{keys} identifying custom drivers, and the driver specific options are typically a device, e.g., \c /dev/mouse for mouse devices and \c /dev/ts for touch @@ -137,14 +138,6 @@ Input will be read from all specified drivers. - Note that the \c Vr41xx driver also accepts two optional - arguments: \c press=<value> defining a mouse click (the default - value is 750) and \c filter=<value> specifying the length of the - filter used to eliminate noise (the default length is 3). For - example: - - \snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 6 - \table \header \o The Tslib Mouse Driver \row diff --git a/doc/src/examples.qdoc b/doc/src/examples.qdoc index 4ac4fb3..7cb4430 100644 --- a/doc/src/examples.qdoc +++ b/doc/src/examples.qdoc @@ -418,6 +418,7 @@ \o \l{xmlpatterns/qobjectxmlmodel}{QObject XML Model Example} \o \l{xmlpatterns/xquery/globalVariables}{C++ Source Code Analyzer Example} \o \l{xmlpatterns/trafficinfo}{Traffic Info}\raisedaster + \o \l{xmlpatterns/schema}{XML Schema Validation}\raisedaster \endlist \section1 Inter-Process Communication diff --git a/doc/src/examples/arrowpad.qdoc b/doc/src/examples/arrowpad.qdoc index 9e9268c..fa19fbb 100644 --- a/doc/src/examples/arrowpad.qdoc +++ b/doc/src/examples/arrowpad.qdoc @@ -140,10 +140,10 @@ QLocale::system() can be influenced by setting the \c LANG environment variable, for example. Notice that the use of a naming convention that incorporates the locale for \c .qm message files, - (and \c .ts files), makes it easy to implement choosing the + (and TS files), makes it easy to implement choosing the translation file according to locale. - If there is no \c .qm message file for the locale chosen the original + If there is no QM message file for the locale chosen the original source text will be used and no error raised. \section1 Translating to French and Dutch @@ -194,9 +194,9 @@ \endlist We have to convert the \c tt1_fr.ts and \c tt1_nl.ts translation source - files into \c .qm files. We could use \e {Qt Linguist} as we've done + files into QM files. We could use \e {Qt Linguist} as we've done before; however using the command line tool \c lrelease ensures that - \e all the \c .qm files for the application are created without us + \e all the QM files for the application are created without us having to remember to load and \gui File|Release each one individually from \e {Qt Linguist}. diff --git a/doc/src/examples/calculatorform.qdoc b/doc/src/examples/calculatorform.qdoc index 7cbf2ac..90eef3b 100644 --- a/doc/src/examples/calculatorform.qdoc +++ b/doc/src/examples/calculatorform.qdoc @@ -45,8 +45,8 @@ The Calculator Form Example shows how to use a form created with \QD in an application by using the user interface information from - a QWidget subclass. We use \l{Using a Designer .ui File in Your Application} - {uic's auto-connection} feature to automatically connect signals + a QWidget subclass. We use \l{Using a Designer UI File in Your Application} + {uic's auto-connection} feature to automatically connect signals from widgets on the form to slots in our code. \image calculatorform-example.png Screenshot of the Calculator Form example @@ -59,7 +59,7 @@ \section1 Preparation The user interface for this example is designed completely using \QD. The - result is a .ui file describing the form, the widgets used, any signal-slot + result is a UI file describing the form, the widgets used, any signal-slot connections between them, and other standard user interface properties. To ensure that the example can use this file, we need to include a \c FORMS diff --git a/doc/src/examples/completer.qdoc b/doc/src/examples/completer.qdoc index 9aaaf66..3805a7c 100644 --- a/doc/src/examples/completer.qdoc +++ b/doc/src/examples/completer.qdoc @@ -100,9 +100,9 @@ \section1 MainWindow Class Definition - The \c MainWindow class is a subclass of QMainWindow and implements four - private slots - \c about(), \c changeCase(), \c changeMode(), and - \c changeModel(). + The \c MainWindow class is a subclass of QMainWindow and implements five + private slots - \c about(), \c changeCase(), \c changeMode(), \c changeModel(), + and \c changeMaxVisible(). \snippet examples/tools/completer/mainwindow.h 0 @@ -126,6 +126,9 @@ \snippet examples/tools/completer/mainwindow.cpp 0 + The \c maxVisibleSpinBox is created and determines the number of visible + item in the completer + The \c wrapCheckBox is then set up. This \c checkBox determines if the \c{completer}'s \l{QCompleter::setWrapAround()}{setWrapAround()} property is enabled or disabled. @@ -242,10 +245,15 @@ \snippet examples/tools/completer/mainwindow.cpp 14 - The \c about() function provides a brief description about the example. + The \c changeMaxVisible() update the maximum number of visible items in + the completer. \snippet examples/tools/completer/mainwindow.cpp 15 + The \c about() function provides a brief description about the example. + + \snippet examples/tools/completer/mainwindow.cpp 16 + \section1 \c main() Function The \c main() function instantiates QApplication and \c MainWindow and diff --git a/doc/src/examples/helloscript.qdoc b/doc/src/examples/helloscript.qdoc index a18e4ad..1b0f43c 100644 --- a/doc/src/examples/helloscript.qdoc +++ b/doc/src/examples/helloscript.qdoc @@ -121,7 +121,7 @@ window). Don't forget the exclamation mark! Click the \gui Done checkbox and choose \gui File|Save from the - menu bar. The \c .ts file will no longer contain + menu bar. The TS file will no longer contain \snippet doc/src/snippets/code/doc_src_examples_hellotr.qdoc 3 @@ -129,11 +129,11 @@ \snippet doc/src/snippets/code/doc_src_examples_hellotr.qdoc 4 - To see the application running in Latin, we have to generate a \c .qm - file from the \c .ts file. Generating a \c .qm file can be achieved - either from within \e {Qt Linguist} (for a single \c .ts file), or - by using the command line program \c lrelease which will produce one \c - .qm file for each of the \c .ts files listed in the project file. + To see the application running in Latin, we have to generate a QM + file from the TS file. Generating a QM file can be achieved + either from within \e {Qt Linguist} (for a single TS file), or + by using the command line program \c lrelease which will produce one + QM file for each of the TS files listed in the project file. Generate \c hellotr_la.qm from \c hellotr_la.ts by choosing \gui File|Release from \e {Qt Linguist}'s menu bar and pressing \gui Save in the file save dialog that pops up. Now run the \c helloscript diff --git a/doc/src/examples/hellotr.qdoc b/doc/src/examples/hellotr.qdoc index bb38737..18e0715 100644 --- a/doc/src/examples/hellotr.qdoc +++ b/doc/src/examples/hellotr.qdoc @@ -108,12 +108,12 @@ Note that the file extension is \c .ts, not \c .qm. The \c .ts translation source format is designed for use during the application's development. Programmers or release managers run - the \c lupdate program to generate and update \c .ts files with + the \c lupdate program to generate and update TS files with the source text that is extracted from the source code. - Translators read and update the \c .ts files using \e {Qt + Translators read and update the TS files using \e {Qt Linguist} adding and editing their translations. - The \c .ts format is human-readable XML that can be emailed directly + The TS format is human-readable XML that can be emailed directly and is easy to put under version control. If you edit this file manually, be aware that the default encoding for XML is UTF-8, not Latin1 (ISO 8859-1). One way to type in a Latin1 character such as @@ -121,8 +121,8 @@ "\ø". This will work for any Unicode 4.0 character. Once the translations are complete the \c lrelease program is used to - convert the \c .ts files into the \c .qm Qt message file format. The - \c .qm format is a compact binary format designed to deliver very + convert the TS files into the QM Qt message file format. The + QM format is a compact binary format designed to deliver very fast lookup performance. Both \c lupdate and \c lrelease read all the project's source and header files (as specified in the HEADERS and SOURCES lines of the project file) and extract the strings that @@ -131,7 +131,7 @@ \c lupdate is used to create and update the message files (\c hellotr_la.ts in this case) to keep them in sync with the source code. It is safe to run \c lupdate at any time, as \c lupdate does not remove any - information. For example, you can put it in the makefile, so the \c .ts + information. For example, you can put it in the makefile, so the TS files are updated whenever the source changes. Try running \c lupdate right now, like this: @@ -151,7 +151,7 @@ We will use \e {Qt Linguist} to provide the translation, although you can use any XML or plain text editor to enter a translation into a - \c .ts file. + TS file. To start \e {Qt Linguist}, type @@ -163,7 +163,7 @@ window). Don't forget the exclamation mark! Click the \gui Done checkbox and choose \gui File|Save from the - menu bar. The \c .ts file will no longer contain + menu bar. The TS file will no longer contain \snippet doc/src/snippets/code/doc_src_examples_hellotr.qdoc 3 @@ -173,11 +173,11 @@ \section1 Running the Application in Latin - To see the application running in Latin, we have to generate a \c .qm - file from the \c .ts file. Generating a \c .qm file can be achieved - either from within \e {Qt Linguist} (for a single \c .ts file), or - by using the command line program \c lrelease which will produce one \c - .qm file for each of the \c .ts files listed in the project file. + To see the application running in Latin, we have to generate a QM + file from the TS file. Generating a QM file can be achieved + either from within \e {Qt Linguist} (for a single TS file), or + by using the command line program \c lrelease which will produce one + QM file for each of the TS files listed in the project file. Generate \c hellotr_la.qm from \c hellotr_la.ts by choosing \gui File|Release from \e {Qt Linguist}'s menu bar and pressing \gui Save in the file save dialog that pops up. Now run the \c hellotr diff --git a/doc/src/examples/moveblocks.qdoc b/doc/src/examples/moveblocks.qdoc index 2bdcca5..7e42307 100644 --- a/doc/src/examples/moveblocks.qdoc +++ b/doc/src/examples/moveblocks.qdoc @@ -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/multipleinheritance.qdoc b/doc/src/examples/multipleinheritance.qdoc index 5a77275..1622fb0 100644 --- a/doc/src/examples/multipleinheritance.qdoc +++ b/doc/src/examples/multipleinheritance.qdoc @@ -103,6 +103,6 @@ There are various approaches to include forms into applications. The Multiple Inheritance approach is just one of them. See - \l{Using a Designer .ui File in Your Application} for more information on + \l{Using a Designer UI File in Your Application} for more information on the other approaches available. */ diff --git a/doc/src/examples/qtscripttetrix.qdoc b/doc/src/examples/qtscripttetrix.qdoc index c94697a..fb2d537 100644 --- a/doc/src/examples/qtscripttetrix.qdoc +++ b/doc/src/examples/qtscripttetrix.qdoc @@ -57,7 +57,7 @@ \section1 Setting up the GUI - The graphical user interface is defined in a \c{.ui} file, creating + The graphical user interface is defined in a UI file, created using Qt Designer, and is set up in the example's C++ \c{main.cpp} file. \snippet examples/script/qstetrix/main.cpp 0 diff --git a/doc/src/examples/schema.qdoc b/doc/src/examples/schema.qdoc new file mode 100644 index 0000000..df42832 --- /dev/null +++ b/doc/src/examples/schema.qdoc @@ -0,0 +1,143 @@ +/**************************************************************************** +** +** 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 http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example xmlpatterns/schema + \title XML Schema Validation Example + + This example shows how to use QtXmlPatterns to validate XML with + a W3C XML Schema. + + \tableofcontents + + \section1 Introduction + + The example application shows different XML schema definitions and + for every definition two XML instance documents, one that is valid + according to the schema and one that is not. + The user can select the valid or invalid instance document, change + it and validate it again. + + \section2 The User Interface + + The UI for this example was created using \l{Qt Designer Manual} {Qt + Designer}: + + \image schema-example.png + + The UI consists of three parts, at the top the XML schema \l{QComboBox} {selection} + and the schema \l{QTextBrowser} {viewer}, below the XML instance \l{QComboBox} {selection} + and the instance \l{QTextEdit} {editor} and at the bottom the validation status \l{QLabel} {label} + next to the validation \l{QPushButton} {button}. + + \section2 Validating XML Instance Documents + + You can select one of the three predefined XML schemas and for each schema + an valid or invalid instance document. A click on the 'Validate' button will + validate the content of the XML instance editor against the schema from the + XML schema viewer. As you can modify the content of the instance editor, different + instances can be tested and validation error messages analysed. + + \section1 Code Walk-Through + + The example's main() function creates the standard instance of + QApplication. Then it creates an instance of the mainwindow class, shows it, + and starts the Qt event loop: + + \snippet examples/xmlpatterns/schema/main.cpp 0 + + \section2 The UI Class: MainWindow + + The example's UI is a conventional Qt GUI application inheriting + QMainWindow and the class generated by \l{Qt Designer Manual} {Qt + Designer}: + + \snippet examples/xmlpatterns/schema/mainwindow.h 0 + + The constructor fills the schema and instance \l{QComboBox} selections with the predefined + schemas and instances and connects their \l{QComboBox::currentIndexChanged()} {currentIndexChanged()} + signals to the window's \c{schemaSelected()} resp. \c{instanceSelected()} slot. + Furthermore the signal-slot connections for the validation \l{QPushButton} {button} + and the instance \l{QTextEdit} {editor} are set up. + + The call to \c{schemaSelected(0)} and \c{instanceSelected(0)} will trigger the validation + of the initial Contact Schema example. + + \snippet examples/xmlpatterns/schema/mainwindow.cpp 0 + + In the \c{schemaSelected()} slot the content of the instance \l{QComboBox} {selection} + is adapted to the selected schema and the corresponding schema is loaded from the + \l{The Qt Resource System} {resource file} and displayed in the schema \l{QTextBrowser} {viewer}. + At the end of the method a revalidation is triggered. + + \snippet examples/xmlpatterns/schema/mainwindow.cpp 1 + + In the \c{instanceSelected()} slot the selected instance is loaded from the + \l{The Qt Resource System} {resource file} and loaded into the instance \l{QTextEdit} {editor} + an the revalidation is triggered again. + + \snippet examples/xmlpatterns/schema/mainwindow.cpp 2 + + The \c{validate()} slot does the actual work in this example. + At first it stores the content of the schema \l{QTextBrowser} {viewer} and the + \l{QTextEdit} {editor} into temporary \l{QByteArray} {variables}. + Then it instanciates a \c{MessageHandler} object which inherits from + \l{QAbstractMessageHandler} {QAbstractMessageHandler} and is a convenience + class to store error messages from the XmlPatterns system. + + \snippet examples/xmlpatterns/schema/mainwindow.cpp 4 + + After the \l{QXmlSchema} {QXmlSchema} is instanciated and the message handler set + on it, the \l{QXmlSchema::load()} {load()} method is called with the schema data as argument. + If the schema is invalid or a parsing error has occured, \l{QXmlSchema::isValid()} {isValid()} + returns \c{false} and the error is flagged in \c{errorOccurred}. + If the loading was successful, a \l{QXmlSchemaValidator} {QXmlSchemaValidator} is + instanciated and the schema passed in the constructor. + A call to \l{QXmlSchemaValidator::validate()} {validate()} will validate the passed + XML instance data against the XML schema. The return value of that method signals + whether the validation was successful. + Depending on the success the status \l{QLabel} {label} is set to 'validation successful' + or the error message stored in the \c{MessageHandler} + + The rest of the code does only some fancy coloring and eyecandy. + + \snippet examples/xmlpatterns/schema/mainwindow.cpp 3 +*/ diff --git a/doc/src/examples/simpletextviewer.qdoc b/doc/src/examples/simpletextviewer.qdoc index 87eae57..2531a86 100644 --- a/doc/src/examples/simpletextviewer.qdoc +++ b/doc/src/examples/simpletextviewer.qdoc @@ -198,12 +198,7 @@ <file>openfile.html</file> <file>wildcardmatching.html</file> <file>images/browse.png</file> - <file>images/fadedfilemenu.png</file> - <file>images/filedialog.png</file> - <file>images/handbook.png</file> - <file>images/mainwindow.png</file> - <file>images/open.png</file> - <file>images/wildcard.png</file> + <file>images/*.png</file> </files> </filterSection> </QtHelpProject> diff --git a/doc/src/examples/svggenerator.qdoc b/doc/src/examples/svggenerator.qdoc index 09fe6e1..dd7459a 100644 --- a/doc/src/examples/svggenerator.qdoc +++ b/doc/src/examples/svggenerator.qdoc @@ -55,8 +55,8 @@ The example consists of two classes: \c Window and \c DisplayWidget. The \c Window class contains the application logic and constructs the user - interface from a Qt Designer \c{.ui} file as described in the - \l{Using a Designer .ui File in Your Application#The Multiple Inheritance Approach}{Qt Designer manual}. + interface from a Qt Designer UI file as described in the + \l{Using a Designer UI File in Your Application#The Multiple Inheritance Approach}{Qt Designer manual}. It also contains the code to write an SVG file. The \c DisplayWidget class performs all the work of painting a picture on diff --git a/doc/src/examples/tablet.qdoc b/doc/src/examples/tablet.qdoc index e412815..61c140f 100644 --- a/doc/src/examples/tablet.qdoc +++ b/doc/src/examples/tablet.qdoc @@ -275,7 +275,10 @@ In this function we draw on the image based on the movement of the device. If the device used on the tablet is a stylus we want to draw a - line between the positions of the stylus recorded in \c polyLine. + line between the positions of the stylus recorded in \c polyLine. We + also assume that this is a reasonable handling of any unknown device, + but update the statusbar with a warning so that the user can see that + for his tablet he might have to implement special handling. If it is an airbrush we want to draw a circle of points with a point density based on the tangential pressure, which is the position of the finger wheel on the airbrush. We use the Qt::BrushStyle to diff --git a/doc/src/examples/textfinder.qdoc b/doc/src/examples/textfinder.qdoc index adbbd0d..acfbd0f 100644 --- a/doc/src/examples/textfinder.qdoc +++ b/doc/src/examples/textfinder.qdoc @@ -45,7 +45,7 @@ The Text Finder example demonstrates how to dynamically process forms using the QtUiTools module. Dynamic form processing enables a form to - be processed at run-time only by changing the .ui file for the project. + be processed at run-time only by changing the UI file for the project. The program allows the user to look up a particular word within the contents of a text file. This text file is included in the project's resource and is loaded into the display at startup. @@ -95,7 +95,7 @@ \snippet examples/uitools/textfinder/textfinder.h 0 The slot \c{on_find_Button_clicked()} is a slot named according to the - \l{Using a Designer .ui File in Your Application#Automatic Connections} + \l{Using a Designer UI File in Your Application#Automatic Connections} {Automatic Connection} naming convention required by \c uic. diff --git a/doc/src/examples/worldtimeclockbuilder.qdoc b/doc/src/examples/worldtimeclockbuilder.qdoc index 55246e9..f38062a 100644 --- a/doc/src/examples/worldtimeclockbuilder.qdoc +++ b/doc/src/examples/worldtimeclockbuilder.qdoc @@ -66,7 +66,7 @@ generate a dependency on the \c libQtUiTools library containing the QtUiTools classes. - Note that we do not inform \c qmake about any .ui files, and so none will + Note that we do not inform \c qmake about any UI files, and so none will be processed and built into the application. The resource file contains an entry for the particular form that we wish to use: diff --git a/doc/src/graphicsview.qdoc b/doc/src/graphicsview.qdoc index 4c408cd..f42c0d4 100644 --- a/doc/src/graphicsview.qdoc +++ b/doc/src/graphicsview.qdoc @@ -201,6 +201,9 @@ using an untransformed view, one unit on the scene is represented by one pixel on the screen. + \note The inverted Y-axis coordinate system (where \c y grows upwards) + is unsupported as Graphics Views uses Qt's coordinate system. + There are three effective coordinate systems in play in Graphics View: Item coordinates, scene coordinates, and view coordinates. To simplify your implementation, Graphics View provides convenience functions that diff --git a/doc/src/i18n.qdoc b/doc/src/i18n.qdoc index 4109b62..5964926 100644 --- a/doc/src/i18n.qdoc +++ b/doc/src/i18n.qdoc @@ -266,19 +266,19 @@ \o Run \c lupdate to extract translatable text from the C++ source code of the Qt application, resulting in a message file - for translators (a \c .ts file). The utility recognizes the tr() + for translators (a TS file). The utility recognizes the tr() construct and the \c{QT_TR*_NOOP()} macros described above and - produces \c .ts files (usually one per language). + produces TS files (usually one per language). - \o Provide translations for the source texts in the \c .ts file, using - \e{Qt Linguist}. Since \c .ts files are in XML format, you can also + \o Provide translations for the source texts in the TS file, using + \e{Qt Linguist}. Since TS files are in XML format, you can also edit them by hand. - \o Run \c lrelease to obtain a light-weight message file (a \c .qm - file) from the \c .ts file, suitable only for end use. Think of the \c - .ts files as "source files", and \c .qm files as "object files". The - translator edits the \c .ts files, but the users of your application - only need the \c .qm files. Both kinds of files are platform and + \o Run \c lrelease to obtain a light-weight message file (a QM + file) from the TS file, suitable only for end use. Think of the TS + files as "source files", and QM files as "object files". The + translator edits the TS files, but the users of your application + only need the QM files. Both kinds of files are platform and locale independent. \endlist diff --git a/doc/src/images/qeasingcurve-cosinecurve.png b/doc/src/images/qeasingcurve-cosinecurve.png Binary files differindex b27e763..8cee978 100644 --- a/doc/src/images/qeasingcurve-cosinecurve.png +++ b/doc/src/images/qeasingcurve-cosinecurve.png diff --git a/doc/src/images/qeasingcurve-inback.png b/doc/src/images/qeasingcurve-inback.png Binary files differindex 8506c0f..0064cb3 100644 --- a/doc/src/images/qeasingcurve-inback.png +++ b/doc/src/images/qeasingcurve-inback.png diff --git a/doc/src/images/qeasingcurve-inbounce.png b/doc/src/images/qeasingcurve-inbounce.png Binary files differindex 275b38c..eaa64f8 100644 --- a/doc/src/images/qeasingcurve-inbounce.png +++ b/doc/src/images/qeasingcurve-inbounce.png diff --git a/doc/src/images/qeasingcurve-incirc.png b/doc/src/images/qeasingcurve-incirc.png Binary files differindex b985e9c..7bd0f09 100644 --- a/doc/src/images/qeasingcurve-incirc.png +++ b/doc/src/images/qeasingcurve-incirc.png diff --git a/doc/src/images/qeasingcurve-incubic.png b/doc/src/images/qeasingcurve-incubic.png Binary files differindex e417ee1..1ac9eaf 100644 --- a/doc/src/images/qeasingcurve-incubic.png +++ b/doc/src/images/qeasingcurve-incubic.png diff --git a/doc/src/images/qeasingcurve-incurve.png b/doc/src/images/qeasingcurve-incurve.png Binary files differindex d9a9340..578259e 100644 --- a/doc/src/images/qeasingcurve-incurve.png +++ b/doc/src/images/qeasingcurve-incurve.png diff --git a/doc/src/images/qeasingcurve-inelastic.png b/doc/src/images/qeasingcurve-inelastic.png Binary files differindex b242fd3..f976b5a 100644 --- a/doc/src/images/qeasingcurve-inelastic.png +++ b/doc/src/images/qeasingcurve-inelastic.png diff --git a/doc/src/images/qeasingcurve-inexpo.png b/doc/src/images/qeasingcurve-inexpo.png Binary files differindex f06316c..1af3652 100644 --- a/doc/src/images/qeasingcurve-inexpo.png +++ b/doc/src/images/qeasingcurve-inexpo.png diff --git a/doc/src/images/qeasingcurve-inoutback.png b/doc/src/images/qeasingcurve-inoutback.png Binary files differindex 9fd1446..480bc05 100644 --- a/doc/src/images/qeasingcurve-inoutback.png +++ b/doc/src/images/qeasingcurve-inoutback.png diff --git a/doc/src/images/qeasingcurve-inoutbounce.png b/doc/src/images/qeasingcurve-inoutbounce.png Binary files differindex fb65f31..de62309 100644 --- a/doc/src/images/qeasingcurve-inoutbounce.png +++ b/doc/src/images/qeasingcurve-inoutbounce.png diff --git a/doc/src/images/qeasingcurve-inoutcirc.png b/doc/src/images/qeasingcurve-inoutcirc.png Binary files differindex 123cc54..b4be8ac 100644 --- a/doc/src/images/qeasingcurve-inoutcirc.png +++ b/doc/src/images/qeasingcurve-inoutcirc.png diff --git a/doc/src/images/qeasingcurve-inoutcubic.png b/doc/src/images/qeasingcurve-inoutcubic.png Binary files differindex b07695c..49dfbef 100644 --- a/doc/src/images/qeasingcurve-inoutcubic.png +++ b/doc/src/images/qeasingcurve-inoutcubic.png diff --git a/doc/src/images/qeasingcurve-inoutelastic.png b/doc/src/images/qeasingcurve-inoutelastic.png Binary files differindex 65851e1..5b0e54a 100644 --- a/doc/src/images/qeasingcurve-inoutelastic.png +++ b/doc/src/images/qeasingcurve-inoutelastic.png diff --git a/doc/src/images/qeasingcurve-inoutexpo.png b/doc/src/images/qeasingcurve-inoutexpo.png Binary files differindex 7cbfb13..776984a 100644 --- a/doc/src/images/qeasingcurve-inoutexpo.png +++ b/doc/src/images/qeasingcurve-inoutexpo.png diff --git a/doc/src/images/qeasingcurve-inoutquad.png b/doc/src/images/qeasingcurve-inoutquad.png Binary files differindex c5eed06..2643330 100644 --- a/doc/src/images/qeasingcurve-inoutquad.png +++ b/doc/src/images/qeasingcurve-inoutquad.png diff --git a/doc/src/images/qeasingcurve-inoutquart.png b/doc/src/images/qeasingcurve-inoutquart.png Binary files differindex 3b66c0d..31fc0c8 100644 --- a/doc/src/images/qeasingcurve-inoutquart.png +++ b/doc/src/images/qeasingcurve-inoutquart.png diff --git a/doc/src/images/qeasingcurve-inoutquint.png b/doc/src/images/qeasingcurve-inoutquint.png Binary files differindex c74efe9..4d7a745 100644 --- a/doc/src/images/qeasingcurve-inoutquint.png +++ b/doc/src/images/qeasingcurve-inoutquint.png diff --git a/doc/src/images/qeasingcurve-inoutsine.png b/doc/src/images/qeasingcurve-inoutsine.png Binary files differindex 5964f31..012ff75 100644 --- a/doc/src/images/qeasingcurve-inoutsine.png +++ b/doc/src/images/qeasingcurve-inoutsine.png diff --git a/doc/src/images/qeasingcurve-inquad.png b/doc/src/images/qeasingcurve-inquad.png Binary files differindex 3373310..e697c20 100644 --- a/doc/src/images/qeasingcurve-inquad.png +++ b/doc/src/images/qeasingcurve-inquad.png diff --git a/doc/src/images/qeasingcurve-inquart.png b/doc/src/images/qeasingcurve-inquart.png Binary files differindex 28086d8..6d65175 100644 --- a/doc/src/images/qeasingcurve-inquart.png +++ b/doc/src/images/qeasingcurve-inquart.png diff --git a/doc/src/images/qeasingcurve-inquint.png b/doc/src/images/qeasingcurve-inquint.png Binary files differindex 330aa85..faaaea7 100644 --- a/doc/src/images/qeasingcurve-inquint.png +++ b/doc/src/images/qeasingcurve-inquint.png diff --git a/doc/src/images/qeasingcurve-insine.png b/doc/src/images/qeasingcurve-insine.png Binary files differindex 63d9238..0944903 100644 --- a/doc/src/images/qeasingcurve-insine.png +++ b/doc/src/images/qeasingcurve-insine.png diff --git a/doc/src/images/qeasingcurve-linear.png b/doc/src/images/qeasingcurve-linear.png Binary files differindex 2a05885..fb3aaf3 100644 --- a/doc/src/images/qeasingcurve-linear.png +++ b/doc/src/images/qeasingcurve-linear.png diff --git a/doc/src/images/qeasingcurve-outback.png b/doc/src/images/qeasingcurve-outback.png Binary files differindex 7cb34c6..83b3fa2 100644 --- a/doc/src/images/qeasingcurve-outback.png +++ b/doc/src/images/qeasingcurve-outback.png diff --git a/doc/src/images/qeasingcurve-outbounce.png b/doc/src/images/qeasingcurve-outbounce.png Binary files differindex 932fc16..27ac979 100644 --- a/doc/src/images/qeasingcurve-outbounce.png +++ b/doc/src/images/qeasingcurve-outbounce.png diff --git a/doc/src/images/qeasingcurve-outcirc.png b/doc/src/images/qeasingcurve-outcirc.png Binary files differindex a1a6cb6..0019370 100644 --- a/doc/src/images/qeasingcurve-outcirc.png +++ b/doc/src/images/qeasingcurve-outcirc.png diff --git a/doc/src/images/qeasingcurve-outcubic.png b/doc/src/images/qeasingcurve-outcubic.png Binary files differindex aa1d604..45477c0 100644 --- a/doc/src/images/qeasingcurve-outcubic.png +++ b/doc/src/images/qeasingcurve-outcubic.png diff --git a/doc/src/images/qeasingcurve-outcurve.png b/doc/src/images/qeasingcurve-outcurve.png Binary files differindex a949ae4..295b471 100644 --- a/doc/src/images/qeasingcurve-outcurve.png +++ b/doc/src/images/qeasingcurve-outcurve.png diff --git a/doc/src/images/qeasingcurve-outelastic.png b/doc/src/images/qeasingcurve-outelastic.png Binary files differindex 2a9ba39..1d407ed 100644 --- a/doc/src/images/qeasingcurve-outelastic.png +++ b/doc/src/images/qeasingcurve-outelastic.png diff --git a/doc/src/images/qeasingcurve-outexpo.png b/doc/src/images/qeasingcurve-outexpo.png Binary files differindex e771c2e..5685155 100644 --- a/doc/src/images/qeasingcurve-outexpo.png +++ b/doc/src/images/qeasingcurve-outexpo.png diff --git a/doc/src/images/qeasingcurve-outinback.png b/doc/src/images/qeasingcurve-outinback.png Binary files differindex 7523727..4700ab0 100644 --- a/doc/src/images/qeasingcurve-outinback.png +++ b/doc/src/images/qeasingcurve-outinback.png diff --git a/doc/src/images/qeasingcurve-outinbounce.png b/doc/src/images/qeasingcurve-outinbounce.png Binary files differindex ab73d02..12cc1a8 100644 --- a/doc/src/images/qeasingcurve-outinbounce.png +++ b/doc/src/images/qeasingcurve-outinbounce.png diff --git a/doc/src/images/qeasingcurve-outincirc.png b/doc/src/images/qeasingcurve-outincirc.png Binary files differindex ec4b8d3..c8a5c86 100644 --- a/doc/src/images/qeasingcurve-outincirc.png +++ b/doc/src/images/qeasingcurve-outincirc.png diff --git a/doc/src/images/qeasingcurve-outincubic.png b/doc/src/images/qeasingcurve-outincubic.png Binary files differindex 8b8ae68..42af870 100644 --- a/doc/src/images/qeasingcurve-outincubic.png +++ b/doc/src/images/qeasingcurve-outincubic.png diff --git a/doc/src/images/qeasingcurve-outinelastic.png b/doc/src/images/qeasingcurve-outinelastic.png Binary files differindex 89dde2c..308be57 100644 --- a/doc/src/images/qeasingcurve-outinelastic.png +++ b/doc/src/images/qeasingcurve-outinelastic.png diff --git a/doc/src/images/qeasingcurve-outinexpo.png b/doc/src/images/qeasingcurve-outinexpo.png Binary files differindex 5909901..0692baa 100644 --- a/doc/src/images/qeasingcurve-outinexpo.png +++ b/doc/src/images/qeasingcurve-outinexpo.png diff --git a/doc/src/images/qeasingcurve-outinquad.png b/doc/src/images/qeasingcurve-outinquad.png Binary files differindex 7ddefee..9e3cd83 100644 --- a/doc/src/images/qeasingcurve-outinquad.png +++ b/doc/src/images/qeasingcurve-outinquad.png diff --git a/doc/src/images/qeasingcurve-outinquart.png b/doc/src/images/qeasingcurve-outinquart.png Binary files differindex 00ef597..9a3c16f 100644 --- a/doc/src/images/qeasingcurve-outinquart.png +++ b/doc/src/images/qeasingcurve-outinquart.png diff --git a/doc/src/images/qeasingcurve-outinquint.png b/doc/src/images/qeasingcurve-outinquint.png Binary files differindex 361bfaa4..add9feb 100644 --- a/doc/src/images/qeasingcurve-outinquint.png +++ b/doc/src/images/qeasingcurve-outinquint.png diff --git a/doc/src/images/qeasingcurve-outinsine.png b/doc/src/images/qeasingcurve-outinsine.png Binary files differindex 1737041..4bc2aaf 100644 --- a/doc/src/images/qeasingcurve-outinsine.png +++ b/doc/src/images/qeasingcurve-outinsine.png diff --git a/doc/src/images/qeasingcurve-outquad.png b/doc/src/images/qeasingcurve-outquad.png Binary files differindex 6f27cbd..c505ff9 100644 --- a/doc/src/images/qeasingcurve-outquad.png +++ b/doc/src/images/qeasingcurve-outquad.png diff --git a/doc/src/images/qeasingcurve-outquart.png b/doc/src/images/qeasingcurve-outquart.png Binary files differindex d45a0b8..6eac058 100644 --- a/doc/src/images/qeasingcurve-outquart.png +++ b/doc/src/images/qeasingcurve-outquart.png diff --git a/doc/src/images/qeasingcurve-outquint.png b/doc/src/images/qeasingcurve-outquint.png Binary files differindex 6e7df0e..77a9ad4 100644 --- a/doc/src/images/qeasingcurve-outquint.png +++ b/doc/src/images/qeasingcurve-outquint.png diff --git a/doc/src/images/qeasingcurve-outsine.png b/doc/src/images/qeasingcurve-outsine.png Binary files differindex 7546a0d..d135b2f 100644 --- a/doc/src/images/qeasingcurve-outsine.png +++ b/doc/src/images/qeasingcurve-outsine.png diff --git a/doc/src/images/qeasingcurve-sinecurve.png b/doc/src/images/qeasingcurve-sinecurve.png Binary files differindex ca67d44..6134a01 100644 --- a/doc/src/images/qeasingcurve-sinecurve.png +++ b/doc/src/images/qeasingcurve-sinecurve.png diff --git a/doc/src/images/schema-example.png b/doc/src/images/schema-example.png Binary files differnew file mode 100644 index 0000000..5e95bf5 --- /dev/null +++ b/doc/src/images/schema-example.png diff --git a/doc/src/linguist-manual.qdoc b/doc/src/linguist-manual.qdoc index ee59fdc..fd062bb 100644 --- a/doc/src/linguist-manual.qdoc +++ b/doc/src/linguist-manual.qdoc @@ -247,10 +247,10 @@ subsequent \l lupdate runs would probably take place during the final beta phase. - The \c .ts file format is a simple human-readable XML format that + The TS file format is a simple human-readable XML format that can be used with version control systems if required. \c lupdate can also process Localization Interchange File Format (XLIFF) - format files; file in this format typically have file names that + format files; files in this format typically have file names that end with the \c .xlf suffix. Pass the \c -help option to \c lupdate to obtain the list of @@ -266,19 +266,19 @@ Usage: \c {lrelease myproject.pro} - \l lrelease is a command line tool that produces \c .qm files out - of \c .ts files. The \c .qm file format is a compact binary format + \l lrelease is a command line tool that produces QM files out + of TS files. The QM file format is a compact binary format that is used by the localized application. It provides extremely - fast lookups for translations. The \c .ts files \l lrelease + fast lookups for translations. The TS files \l lrelease processes can be specified at the command line, or given indirectly by a Qt \c .pro project file. This tool is run whenever a release of the application is to be made, from initial test version through to final release - version. If the \c .qm files are not created, e.g. because an + version. If the QM files are not created, e.g. because an alpha release is required before any translation has been undertaken, the application will run perfectly well using the text - the programmers placed in the source files. Once the \c .qm files + the programmers placed in the source files. Once the QM files are available the application will detect them and use them automatically. @@ -293,7 +293,7 @@ \section1 Missing Translations - Both \l lupdate and \l lrelease may be used with \c .ts + Both \l lupdate and \l lrelease may be used with TS translation source files which are incomplete. Missing translations will be replaced with the native language phrases at runtime. @@ -317,8 +317,8 @@ from the taskbar menu, or by double clicking the desktop icon, or by entering the command \c {linguist} at the command line. Once \QL has started, choose \menu{File|Open} from the \l{menubar} - {menu bar} and select a translation source (\c{.ts} file) to - load. If you don't have a \c{.ts} file, see the \l {Qt Linguist + {menu bar} and select a translation source (TS file) to + load. If you do not have a TS file, see the \l {Qt Linguist Manual: Release Manager} {release manager manual} to learn how to generate one. @@ -928,12 +928,12 @@ \image linguist-previewtool.png - Forms created by \e{Qt Designer} are stored in special \c .ui files. - \QL can make use of these \c .ui files to show the translations - done so far on the form itself. This of course requires access to the \c .ui + Forms created by \e{Qt Designer} are stored in special UI files. + \QL can make use of these UI files to show the translations + done so far on the form itself. This of course requires access to the UI files during the translation process. Activate \menu{Tools|Open/Refresh Form Preview} to open the window shown above. - The list of \c .ui files \QL has detected are displayed in the Forms + The list of UI files \QL has detected are displayed in the Forms List on the left hand. If the path to the files has changed, you can load the files manually via \menu{File|Open Form...}. Double-click on an entry in the Forms List to display the Form File. Select \e{<No Translation>} from @@ -947,15 +947,15 @@ \QL makes use of four kinds of files: \list - \o \c .ts \e {translation source files} \BR are human-readable XML + \o TS \e {translation source files} \BR are human-readable XML files containing source phrases and their translations. These files are usually created and updated by \l lupdate and are specific to an application. \o \c .xlf \e {XLIFF files} \BR are human-readable XML files that adhere to the international XML Localization Interchange File Format. \QL can be used to edit XLIFF files generated by other programs. For standard - Qt projects, however, only the \c .ts file format is used. - \o \c .qm \e {Qt message files} \BR are binary files that contain + Qt projects, however, only the TS file format is used. + \o QM \e {Qt message files} \BR are binary files that contain translations used by an application at runtime. These files are generated by \l lrelease, but can also be generated by \QL. \o \c .qph \e {Qt phrase book files} \BR are human-readable XML @@ -974,18 +974,18 @@ \list \o \gui {Open... Ctrl+O} \BR pops up an open file dialog from which a translation source \c .ts or \c .xlf file can be chosen. - \o \gui {Recently opened files} \BR shows the \c .ts files that + \o \gui {Recently opened files} \BR shows the TS files that have been opened recently, click one to open it. \o \gui {Save Ctrl+S} \BR saves the current translation source file. \o \gui {Save As...} \BR pops up a save as file dialog so that the current translation source file may be saved with a different name, format and/or put in a different location. - \o \gui {Release} \BR create a Qt message \c .qm file with the same base + \o \gui {Release} \BR create a Qt message QM file with the same base name as the current translation source file. The release manager's command line tool \l lrelease performs the same function on \e all of an application's translation source files. \o \gui {Release As...} \BR pops up a save as file dialog. The - filename entered will be a Qt message \c .qm file of the translation + filename entered will be a Qt message QM file of the translation based on the current translation source file. The release manager's command line tool \l lrelease performs the same function on \e all of an application's translation source files. @@ -1136,16 +1136,15 @@ \list \o \inlineimage linguist-fileopen.png \BR - Pops up the open file dialog to open a new translation source \c .ts - file. + Pops up the open file dialog to open a new translation source TS file. \o \inlineimage linguist-filesave.png \BR - Saves the current translation source \c .ts file. + Saves the current translation source TS file. \o \inlineimage linguist-fileprint.png \BR - Prints the current translation source \c .ts file. + Prints the current translation source TS file. \o \inlineimage linguist-phrasebookopen.png \BR @@ -1263,10 +1262,10 @@ Translation files are created as follows: \list 1 - \o Run \l lupdate initially to generate the first set of \c .ts + \o Run \l lupdate initially to generate the first set of TS translation source files with all the user-visible text but no translations. - \o The \c .ts files are given to the translator who adds translations + \o The TS files are given to the translator who adds translations using \QL. \QL takes care of any changed or deleted source text. \o Run \l lupdate to incorporate any new text added to the @@ -1274,7 +1273,7 @@ application with the translations; it does not destroy any data. \o Steps 2 and 3 are repeated as often as necessary. \o When a release of the application is needed \l lrelease is run to - read the \c .ts files and produce the \c .qm files used by the + read the TS files and produce the QM files used by the application at runtime. \endlist @@ -1319,7 +1318,7 @@ In production applications a more flexible approach, for example, loading translations according to locale, might be more appropriate. If - the \c .ts files are all named according to a convention such as + the TS files are all named according to a convention such as \e appname_locale, e.g. \c tt2_fr, \c tt2_de etc, then the code above will load the current locale's translation at runtime. @@ -1413,7 +1412,7 @@ To handle plural forms in the native language, you need to load a translation file for this language, too. \l lupdate has the \c -pluralonly command line option, which allows the creation of - \c .ts files containing only entries with plural forms. + TS files containing only entries with plural forms. See the \l{http://doc.trolltech.com/qq/}{Qt Quarterly} Article \l{http://doc.trolltech.com/qq/qq19-plurals.html}{Plural Forms in Translations} @@ -1503,7 +1502,7 @@ \contentspage {Qt Linguist Manual}{Contents} \previouspage Qt Linguist Manual: Programmers - The \c .ts file format used by \QL is described by the + The TS file format used by \QL is described by the \l{http://www.w3.org/TR/1998/REC-xml-19980210}{DTD} presented below, which we include for your convenience. Be aware that the format may change in future Qt releases. diff --git a/doc/src/obsoleteclasses.qdoc b/doc/src/obsoleteclasses.qdoc new file mode 100644 index 0000000..3658dfc --- /dev/null +++ b/doc/src/obsoleteclasses.qdoc @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** 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 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 http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page obsoleteclasses.html + \group obsolete + \title Obsolete Classes + \ingroup classlists + \ingroup groups + + \brief Qt classes that are obsolete (deprecated). + + This is a list of Qt classes that are obsolete (deprecated). These + classes are provided to keep old source code working but they are + no longer maintained. We strongly advise against using these + classes in new code. + + \generatelist obsoleteclasses + + \sa {Qt's Classes}, {Qt's Modules} +*/ diff --git a/doc/src/porting4-canvas.qdoc b/doc/src/porting4-canvas.qdoc index fa0bc6b..d1221cf 100644 --- a/doc/src/porting4-canvas.qdoc +++ b/doc/src/porting4-canvas.qdoc @@ -43,7 +43,7 @@ \page graphicsview-porting.html \title Porting to Graphics View \contentspage {Porting Guides}{Contents} - \previouspage Porting .ui Files to Qt 4 + \previouspage Porting UI Files to Qt 4 \nextpage qt3to4 - The Qt 3 to 4 Porting Tool \ingroup porting \ingroup multimedia diff --git a/doc/src/porting4-designer.qdoc b/doc/src/porting4-designer.qdoc index 916894b..7de1d43 100644 --- a/doc/src/porting4-designer.qdoc +++ b/doc/src/porting4-designer.qdoc @@ -41,12 +41,12 @@ /*! \page porting4-designer.html - \title Porting .ui Files to Qt 4 + \title Porting UI Files to Qt 4 \contentspage {Porting Guides}{Contents} \previouspage Porting to Qt 4 - Drag and Drop \nextpage Porting to Graphics View \ingroup porting - \brief Information about changes to the .ui file format in Qt 4. + \brief Information about changes to the UI file format in Qt 4. Qt Designer has changed significantly in the Qt 4 release. We have moved away from viewing Qt Designer as an IDE and @@ -57,20 +57,20 @@ IDEs. The most important changes in Qt Designer 4 which affect porting - for \c .ui files are summarized below: + for UI files are summarized below: \list \o \bold{Removed project manager.} - Qt Designer now only reads and edits \c .ui - files. It has no notion of a project (\c .pro file). + Qt Designer now only reads and edits UI + files. It has no notion of a project file (\c .pro). \o \bold{Removed code editor.} Qt Designer can no longer be used to edit source files. - \o \bold{Changed format of \c .ui files.} + \o \bold{Changed format of UI files.} Qt Designer 4 cannot read files created by Qt Designer 3 and vice versa. However, we provide the tool \c uic3 to generate Qt - 4 code out of Qt 3 \c .ui files, and to convert old \c .ui files + 4 code out of Qt 3 UI files, and to convert old UI files into a format readable by Qt Designer 4. \o \bold{Changed structure of the code generated by \c uic.} @@ -80,7 +80,7 @@ \c Ui::MyForm. \o \bold{New resource file system.} Icon data is no longer - stored in the \c .ui file. Instead, icons are put into resource + stored in the UI file. Instead, icons are put into resource files (\c .qrc). \endlist @@ -146,9 +146,9 @@ therefore has an interface identical to that of a class generated by \c uic in Qt 3. - Creating POD classes from \c .ui files is more flexible and + Creating POD classes from UI files is more flexible and generic than the old approach of creating widgets. Qt Designer - doesn't need to know anything about the main container apart from + does not need to know anything about the main container apart from the base widget class it inherits. Indeed, \c Ui::HelloWorld can be used to populate any container that inherits QWidget. Conversely, all non-GUI aspects of the main container may be @@ -163,10 +163,10 @@ \list 1 \o To generate headers and source code for a widget to implement any custom signals and slots added using Qt Designer 3. - \o To generate a new \c .ui file that can be used with Qt Designer 4. + \o To generate a new UI file that can be used with Qt Designer 4. \endlist - You can use both these methods in combination to obtain \c{.ui}, header + You can use both these methods in combination to obtain UI, header and source files that you can use as a starting point when porting your user interface to Qt 4. @@ -179,7 +179,7 @@ The resulting files \c myform.h and \c myform.cpp implement the form in Qt 4 using a QWidget that will include custom signals, - slots and connections specified in the \c .ui file. However, + slots and connections specified in the UI file. However, see below for the \l{#Limitations of uic3}{limitations} of this method. @@ -190,7 +190,7 @@ The resulting file \c myform4.ui can be edited in Qt Designer 4. The header file for the form is generated by Qt 4's \c uic. See the - \l{Using a Designer .ui File in Your Application} chapter of the + \l{Using a Designer UI File in Your Application} chapter of the \l{Qt Designer Manual} for information about the preferred ways to use forms created with Qt Designer 4. @@ -218,7 +218,7 @@ \section1 Limitations of uic3 - Converting Qt 3 \c .ui files to Qt 4 has some limitations. The + Converting Qt 3 UI files to Qt 4 has some limitations. The most noticeable limitation is the fact that since \c uic no longer generates a QObject, it's not possible to define custom signals or slots for the form. Instead, the programmer must @@ -231,9 +231,9 @@ A quick and dirty way to port forms containing custom signals and slots is to generate the code using \c uic3, rather than \c uic. Since \c uic3 does generate a QWidget, it will populate it with custom - signals, slots and connections specified in the \c .ui file. - However, \c uic3 can only generate code from Qt 3 \c .ui files, which - implies that the \c .ui files never get translated and need to be + signals, slots and connections specified in the UI file. + However, \c uic3 can only generate code from Qt 3 UI files, which + implies that the UI files never get translated and need to be edited using Qt Designer 3. Note also that it is possible to create implicit connections @@ -256,7 +256,7 @@ \section1 Icons In Qt 3, the binary data for the icons used by a form was stored - in the \c .ui file. In Qt 4 icons and any other external files + in the UI file. In Qt 4 icons and any other external files can be compiled into the application by listing them in a \l{The Qt Resource System}{resource file} (\c .qrc). This file is translated into a C++ source file using Qt's resource compiler @@ -306,7 +306,7 @@ the following steps: \list 1 - \o Use \c{uic3 -convert} to obtain a \c .ui file understood by + \o Use \c{uic3 -convert} to obtain a UI file understood by Qt Designer 4. \o Create a \c .qrc file with a list of all the icon files. diff --git a/doc/src/porting4-overview.qdoc b/doc/src/porting4-overview.qdoc index d91729d..3494c6d 100644 --- a/doc/src/porting4-overview.qdoc +++ b/doc/src/porting4-overview.qdoc @@ -115,13 +115,13 @@ support these project-level features. We recommend using one of the - \l{Using a Designer .ui File in Your Application}{form subclassing approaches} + \l{Using a Designer UI File in Your Application}{form subclassing approaches} with forms created using Qt Designer. This avoids the need to use \c{.ui.h} files and special purpose code editors. Existing Qt 3 forms created using Qt Designer can be gradually ported to Qt 4 by following the advice in the - \l{Porting .ui Files to Qt 4} guide. However, some extra effort + \l{Porting UI Files to Qt 4} guide. However, some extra effort will be required to move application logic from \c{.ui.h} files into the main body of a Qt 4 application. diff --git a/doc/src/porting4.qdoc b/doc/src/porting4.qdoc index 7ce2969..2414c4d 100644 --- a/doc/src/porting4.qdoc +++ b/doc/src/porting4.qdoc @@ -97,7 +97,7 @@ to developers porting from Qt 3 to Qt 4. \o \l{Porting to Qt 4 - Drag and Drop} \mdash covers differences in the way drag and drop is handled between Qt 3 and Qt 4. - \o \l{Porting .ui Files to Qt 4} \mdash describes the new format used to + \o \l{Porting UI Files to Qt 4} \mdash describes the new format used to describe forms created with \QD. \o \l{Porting to Graphics View} \mdash provides a class-by-class overview of the differences between Qt 3's canvas API and Qt 4's Graphics @@ -135,7 +135,7 @@ \o Run the \l qt3to4 porting tool. The tool will go through your source code and adapt it to Qt 4. - \o Follow the instructions in the \l{Porting .ui Files to Qt 4} + \o Follow the instructions in the \l{Porting UI Files to Qt 4} page to port Qt Designer files. \o Recompile with Qt 4. For each error, search below for related @@ -347,7 +347,7 @@ macro, removing the need for a \c Q_OVERRIDE() macro. The table below lists the Qt properties that have been renamed in - Qt 4. Occurrences of these in \e{Qt Designer} \c .ui files are + Qt 4. Occurrences of these in \e{Qt Designer} UI files are automatically converted to the new name by \c uic. \table @@ -406,11 +406,11 @@ Some properties have been removed from Qt 4, but the associated access functions are provided if \c QT3_SUPPORT is defined to help - porting to Qt 4. When converting Qt 3 \c .ui files to Qt 4, \c uic + porting to Qt 4. When converting Qt 3 UI files to Qt 4, \c uic generates calls to the Qt 3 compatibility functions. Note that this only applies to the properties of the Qt3Support library, i.e. \c QT3_SUPPORT properties of the other libraries must be - ported manually when converting Qt 3 .ui files to Qt 4. + ported manually when converting Qt 3 UI files to Qt 4. The table below lists these properties with the read and write functions that you can use instead. The documentation for the @@ -518,7 +518,7 @@ (Notice the \c & in the parameter declaration.) \omit - \section1 Qt Designer .ui Files + \section1 Qt Designer UI Files ### \endomit diff --git a/doc/src/qdesktopwidget.qdoc b/doc/src/qdesktopwidget.qdoc index 1158904..56a882d 100644 --- a/doc/src/qdesktopwidget.qdoc +++ b/doc/src/qdesktopwidget.qdoc @@ -54,9 +54,9 @@ Systems with more than one graphics card and monitor can manage the physical screen space available either as multiple desktops, or as a large virtual desktop, which usually has the size of the bounding - rectangle of all the screens (see isVirtualDesktop()). For an + rectangle of all the screens (see virtualDesktop). For an application, one of the available screens is the primary screen, i.e. - the screen where the main widget resides (see primaryScreen()). All + the screen where the main widget resides (see primaryScreen). All windows opened in the context of the application should be constrained to the boundaries of the primary screen; for example, it would be inconvenient if a dialog box popped up on a different @@ -64,16 +64,16 @@ The QDesktopWidget provides information about the geometry of the available screens with screenGeometry(). The number of screens - available is returned by numScreens(). The screen number that a - particular point or widget is located in is returned by - screenNumber(). + available is returned by screenCount, and the screenCountChanged + signal is emitted when screens are added or removed during runtime. + The screen number that a particular point or widget is located in + is returned by screenNumber(). Widgets provided by Qt use this class, for example, to place tooltips, menus and dialog boxes according to the parent or - application widget. - - Applications can use this class to save window positions, or to place - child widgets on one screen. + application widget. Applications can use this class to save window + positions, or to place child widgets and dialogs on one particular + screen. \img qdesktopwidget.png Managing Multiple Screens @@ -115,30 +115,15 @@ */ /*! - \fn bool QDesktopWidget::isVirtualDesktop() const - - Returns true if the system manages the available screens in a - virtual desktop; otherwise returns false. - - For virtual desktops, screen() will always return the same widget. - The size of the virtual desktop is the size of this desktop - widget. -*/ - -/*! - \fn int QDesktopWidget::primaryScreen() const - - Returns the index of the primary screen. - - \sa numScreens() -*/ - -/*! \fn int QDesktopWidget::numScreens() const - + Returns the number of available screens. + + \obsolete + + This function is deprecated. Use screenCount instead. - \sa primaryScreen() + \sa primaryScreen */ /*! @@ -146,13 +131,12 @@ Returns a widget that represents the screen with index \a screen (a value of -1 means the default screen). - If the system uses a virtual desktop, the returned widget will have the geometry of the entire virtual desktop; i.e., bounding every \a screen. - \sa primaryScreen(), numScreens(), isVirtualDesktop() + \sa primaryScreen, screenCount, virtualDesktop */ /*! @@ -216,7 +200,7 @@ Returns the index of the screen that contains the largest part of \a widget, or -1 if the widget not on a screen. - \sa primaryScreen() + \sa primaryScreen */ /*! @@ -226,7 +210,7 @@ Returns the index of the screen that contains the \a point, or the screen which is the shortest distance from the \a point. - \sa primaryScreen() + \sa primaryScreen */ /*! @@ -245,3 +229,38 @@ This signal is emitted when the work area available on \a screen changes. */ + +/*! + \property QDesktopWidget::screenCount + \brief the number of screens currently available on the system. + + \since 4.6 + + \sa screenCountChanged() +*/ + +/*! + \property QDesktopWidget::primaryScreen + \brief the index of the screen that is configured to be the primary screen + on the system. +*/ + +/*! + \property QDesktopWidget::virtualDesktop + + \brief if the system manages the available screens in a virtual desktop. + + For virtual desktops, screen() will always return the same widget. + The size of the virtual desktop is the size of this desktop + widget. +*/ + +/*! + \fn void QDesktopWidget::screenCountChanged(int newCount) + + \since 4.6 + + This signal is emitted when the number of screens changes to \a newCount. + + \sa screenCount +*/ diff --git a/doc/src/qmake-manual.qdoc b/doc/src/qmake-manual.qdoc index 68f1976..2985b89 100644 --- a/doc/src/qmake-manual.qdoc +++ b/doc/src/qmake-manual.qdoc @@ -235,7 +235,7 @@ \row \o CONFIG \o General project configuration options. \row \o DESTDIR \o The directory in which the executable or binary file will be placed. - \row \o FORMS \o A list of .ui files to be processed by \c uic. + \row \o FORMS \o A list of UI files to be processed by \c uic. \row \o HEADERS \o A list of filenames of header (.h) files used when building the project. \row \o QT \o Qt-specific configuration options. @@ -701,8 +701,8 @@ If a directory is specified, it will be included in the \c DEPENDPATH variable, and relevant code from there will be included in the generated project file. If a file is given, it will be appended to the correct - variable, depending on its extension; for example, .ui files are added - to \c FORMS, and .cpp files are added to \c SOURCES. + variable, depending on its extension; for example, UI files are added + to \c FORMS, and C++ files are added to \c SOURCES. You may also pass assignments on the command line in this mode. When doing so, these assignments will be placed last in the generated project file. @@ -829,6 +829,29 @@ Note that, if a project is later moved on the disk, \c qmake must be run again to process the project file and create a new Xcode project file. + \section2 On supporting two build targets simultaneously + + Implementing this is currently not feasible, because the XCode + concept of Active Build Configurations is conceptually different + from the qmake idea of build targets. + + The XCode Active Build Configurations settings are for modifying + xcode configurations, compiler flags and similar build + options. Unlike Visual Studio, XCode does not allow for the + selection of specific library files based on whether debug or + release build configurations are selected. The qmake debug and + release settings control which library files are linked to the + executable. + + It is currently not possible to set files in XCode configuration + settings from the qmake generated xcode project file. The way the + libraries are linked in the "Frameworks & Libraries" phase in the + XCode build system. + + Furthermore, The selected "Active Build Configuration" is stored + in a .pbxuser file, which is generated by xcode on first load, not + created by qmake. + \section1 Windows Features specific to this platform include support for creating Visual @@ -1146,8 +1169,9 @@ (see \l{LibDepend}{Library Dependencies} for more info). \endtable - Please note that \c create_prl is required when \i {building} a static library, - while \c link_prl is required when \i {using} a static library. + Please note that \c create_prl is required when \e {building} a + static library, while \c link_prl is required when \e {using} a + static library. On Windows (or if Qt is configured with \c{-debug_and_release}, adding the \c build_all option to the \c CONFIG variable makes this rule the default @@ -1443,10 +1467,10 @@ \target FORMS \section1 FORMS - This variable specifies the .ui files (see \link + This variable specifies the UI files (see \link designer-manual.html Qt Designer \endlink) to be processed through \c uic before compiling. All dependencies, headers and source files required - to build these .ui files will automatically be added to the project. + to build these UI files will automatically be added to the project. For example: @@ -1459,10 +1483,10 @@ \target FORMS3 \section1 FORMS3 - This variable specifies the old style .ui files to be processed + This variable specifies the old style UI files to be processed through \c uic3 before compiling, when \c CONFIG contains uic3. All dependencies, headers and source files required to build these - .ui files will automatically be added to the project. + UI files will automatically be added to the project. For example: @@ -4507,7 +4531,7 @@ \list \o HEADERS - A list of all the header files for the application. \o SOURCES - A list of all the source files for the application. - \o FORMS - A list of all the .ui files (created using \c{Qt Designer}) + \o FORMS - A list of all the UI files (created using \c{Qt Designer}) for the application. \o LEXSOURCES - A list of all the lex source files for the application. \o YACCSOURCES - A list of all the yacc source files for the application. @@ -4525,7 +4549,7 @@ \endlist You only need to use the system variables that you have values for, - for instance, if you don't have any extra INCLUDEPATHs then you don't + for instance, if you do not have any extra INCLUDEPATHs then you do not need to specify any, \c qmake will add in the default ones needed. For instance, an example project file might look like this: diff --git a/doc/src/qmsdev.qdoc b/doc/src/qmsdev.qdoc index b8d8f85..127b514 100644 --- a/doc/src/qmsdev.qdoc +++ b/doc/src/qmsdev.qdoc @@ -87,7 +87,7 @@ the existing project. If you want to add an existing dialog to your project, then just select the - relevant \c .ui file. This will then add it to your existing project and add + relevant UI file. This will then add it to your existing project and add the relevant steps to create the generated code. \section2 Using the 'Qt Designer' button diff --git a/doc/src/qnamespace.qdoc b/doc/src/qnamespace.qdoc index eb7d626..afee5a2 100644 --- a/doc/src/qnamespace.qdoc +++ b/doc/src/qnamespace.qdoc @@ -41,6 +41,7 @@ /*! \namespace Qt + \inmodule QtCore \brief The Qt namespace contains miscellaneous identifiers used throughout the Qt library. @@ -1208,6 +1209,9 @@ handle touch events. Without this attribute set, events from a touch device will be sent as mouse events. + \value WA_TouchPadAcceptSingleTouchEvents Allows touchpad single + touch events to be sent to the widget. + \omitvalue WA_SetLayoutDirection \omitvalue WA_InputMethodTransparent \omitvalue WA_WState_CompressKeys @@ -1243,8 +1247,9 @@ /*! \typedef Qt::HANDLE Platform-specific handle type for system objects. This is - equivalent to \c{void *} on Windows and Mac OS X, and embedded - Linux, and to \c{unsigned long} on X11. + equivalent to \c{void *} on Mac OS X and embedded Linux, + and to \c{unsigned long} on X11. On Windows it is the + DWORD returned by the Win32 function getCurrentThreadId(). \warning Using this type is not portable. */ @@ -1692,6 +1697,7 @@ \value ToolButtonTextOnly Only display the text. \value ToolButtonTextBesideIcon The text appears beside the icon. \value ToolButtonTextUnderIcon The text appears under the icon. + \value ToolButtonFollowStyle Follow the \l{QStyle::SH_ToolButtonStyle}{style}. */ /*! @@ -2729,20 +2735,6 @@ \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 @@ -2751,30 +2743,8 @@ \omitvalue NoGesture \value GestureStarted A continuous gesture has started. - \value GestureUpdated A gesture continiues. + \value GestureUpdated A gesture continues. \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/qsql.qdoc b/doc/src/qsql.qdoc index 5315413..bb8f090 100644 --- a/doc/src/qsql.qdoc +++ b/doc/src/qsql.qdoc @@ -41,12 +41,13 @@ /*! \namespace QSql + \inmodule QtSql \brief The QSql namespace contains miscellaneous identifiers used throughout the Qt SQL library. + \inheaderfile QtSql \ingroup database \mainclass - \omit ### \module sql \endomit \sa {QtSql Module} */ diff --git a/doc/src/qsqldatatype-table.qdoc b/doc/src/qsqldatatype-table.qdoc index 5ab6413..2055e6a 100644 --- a/doc/src/qsqldatatype-table.qdoc +++ b/doc/src/qsqldatatype-table.qdoc @@ -34,36 +34,34 @@ ** 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$ ** ****************************************************************************/ /*! - \module QtSql - - \page qsqldatatype-table.html - - \title QtSql Module - Recommended use of data types + \page sql-types.html + \title QtSql Module - Recommended Use of Data Types - \section1 Recommended use of types and widgets in Qt supported Databases + \section1 Recommended Use of Types 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++. + types used in Qt are not necessarily valid as input to the specific + database. One example could be that a double would work perfectly as + input for floating point records in a database, but not necessarily + as a storage format for output from the database since it would be stored + with 64-bit precision in C++. \tableofcontents - \section2 IBM DB2 data type + \section2 IBM DB2 Data Types - \table - \row - \header IBM DB2 data type - \header SQL Type Description - \header Recommended input (C++ data type and Qt ) + \table 90% + \header + \o IBM DB2 data type + \o SQL type description + \o Recommended input (C++ or Qt data type) \row \o SMALLINT \o 16-bit signed integer @@ -124,13 +122,13 @@ \o Mapped to QDateTime \endtable - \section2 Borland InterBase data type + \section2 Borland InterBase Data Types - \table - \row - \header Borland InterBase data type - \header SQL Type Description - \header Recommended input (C++ data type/Qt Widget) + \table 90% + \header + \o Borland InterBase data type + \o SQL type description + \o Recommended input (C++ or Qt data type) \row \o BOOLEAN \o Boolean @@ -189,13 +187,13 @@ \o Mapped to QDateTime \endtable - \section2 MySQL data type + \section2 MySQL Data Types - \table - \row - \header MySQL data type - \header SQL Type Description - \header Recommended input (C++ data type/Qt Widget) + \table 90% + \header + \o MySQL data type + \o SQL type description + \o Recommended input (C++ or Qt data type) \row \o TINYINT \o 8 bit signed integer @@ -290,13 +288,13 @@ \o Mapped to QString \endtable - \section2 Oracle Call Interface data type + \section2 Oracle Call Interface Data Types - \table - \row - \header Oracle Call Interface data type - \header SQL Type Description - \header Recommended input (C++ data type/Qt Widget) + \table 90% + \header + \o Oracle Call Interface data type + \o SQL type description + \o Recommended input (C++ or Qt data type) \row \o NUMBER \o FLOAT, DOUBLE, PRECISIONc REAL @@ -338,13 +336,13 @@ \o Mapped to QDateTime \endtable - \section2 ODBC data type + \section2 ODBC Data Types - \table - \row - \header ODBC data type - \header SQL Type Description - \header Recommended input (C++ data type/Qt Widget) + \table 90% + \header + \o ODBC data type + \o SQL type description + \o Recommended input (C++ or Qt data type) \row \o BIT \o Boolean @@ -407,13 +405,13 @@ \o Mapped to QDateTime \endtable - \section2 PostgreSQL data type + \section2 PostgreSQL Data Types - \table - \row - \header PostgreSQL data type - \header SQL Type Description - \header Recommended input (C++ data type/Qt Widget) + \table 90% + \header + \o PostgreSQL data type + \o SQL type description + \o Recommended input (C++ or Qt data type) \row \o BOOLEAN \o Boolean @@ -484,13 +482,13 @@ \o Mapped to QDateTime \endtable - \section2 QSQLITE SQLite version 3 data type + \section2 QSQLITE SQLite version 3 Data Types - \table - \row - \header QSQLITE SQLite version 3 data type - \header SQL Type Description - \header Recommended input (C++ data type/Qt Widget) + \table 90% + \header + \o QSQLITE SQLite version 3 data type + \o SQL type description + \o Recommended input (C++ or Qt data type) \row \o NULL \o NULL value. @@ -518,13 +516,13 @@ \o Mapped to QByteArray \endtable - \section2 Sybase Adaptive Server data type + \section2 Sybase Adaptive Server Data Types - \table - \row - \header Sybase Adaptive Server data type - \header SQL Type Description - \header Recommended input (C++ data type/Qt Widget) + \table 90% + \header + \o Sybase Adaptive Server data type + \o SQL type description + \o Recommended input (C++ or Qt data type) \row \o BINARY \o Describes a fixed-length binary value up to 255 bytes in size. @@ -535,8 +533,7 @@ \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 Date and time. Range: 1753-01-01 00:00:00 through 9999-12-31 23:59:59. \o Mapped to QDateTime \row \o NCHAR @@ -577,8 +574,8 @@ \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. + SQLite version 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/qt3to4.qdoc b/doc/src/qt3to4.qdoc index 9ffd52e..47e85b4 100644 --- a/doc/src/qt3to4.qdoc +++ b/doc/src/qt3to4.qdoc @@ -50,7 +50,7 @@ to Qt 4. It is designed to automate the most tedious part of the porting effort. - See \l{Porting to Qt 4} and \l{Porting .ui Files to Qt 4} for + See \l{Porting to Qt 4} and \l{Porting UI Files to Qt 4} for more information about porting Qt 3 applications to Qt 4. \section1 Usage diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc index 2fda7cf..6f59cae 100644 --- a/doc/src/qt4-intro.qdoc +++ b/doc/src/qt4-intro.qdoc @@ -235,7 +235,7 @@ for your project (using "DEFINES +=") on to moc, which has its own built-in C++ preprocessor. - To compile code that uses .ui files, you will also need this line in + To compile code that uses UI files, you will also need this line in the .pro file: \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 2 diff --git a/doc/src/qtdesigner.qdoc b/doc/src/qtdesigner.qdoc index 2117b27..d913b32 100644 --- a/doc/src/qtdesigner.qdoc +++ b/doc/src/qtdesigner.qdoc @@ -52,7 +52,7 @@ that enable you to access Qt Designer's components. In addition, the QFormBuilder class provides the possibility of - constructing user interfaces from \c .ui files at run-time. + constructing user interfaces from UI files at run-time. To include the definitions of the module's classes, use the following directive: @@ -155,7 +155,7 @@ The \c QtDesigner module contains the QFormBuilder class that provides a mechanism for dynamically creating user interfaces at - run-time, based on \c .ui files created with \QD. This class is + run-time, based on UI files created with \QD. This class is typically used by custom components and applications that embed \QD. Standalone applications that need to dynamically generate user interfaces at run-time use the QUiLoader class, found in @@ -1427,7 +1427,7 @@ \fn bool QDesignerPropertySheetExtension::isAttribute(int index) const Returns true if the property at the given \a index is an attribute, - which will be \e excluded from the .ui file, otherwise false. + which will be \e excluded from the UI file, otherwise false. \sa indexOf(), setAttribute() */ @@ -1436,7 +1436,7 @@ \fn void QDesignerPropertySheetExtension::setAttribute(int index, bool attribute) If \a attribute is true, the property at the given \a index is - made an attribute which will be \e excluded from the .ui file; + made an attribute which will be \e excluded from the UI file; otherwise it will be included. \sa indexOf(), isAttribute() diff --git a/doc/src/qthelp.qdoc b/doc/src/qthelp.qdoc index 7260b6e..92c9609 100644 --- a/doc/src/qthelp.qdoc +++ b/doc/src/qthelp.qdoc @@ -279,7 +279,7 @@ \section1 Qt Help Project File Format - The file format is XML based. For a better understanding of + The file format is XML-based. For a better understanding of the format we'll discuss the following example: \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 7 @@ -398,11 +398,13 @@ Finally, the actual documentation files have to be listed. Make sure that all files neccessary to display the help are mentioned, i.e. - stylesheets or similar files need to be there as well. The file, like all + stylesheets or similar files need to be there as well. The files, like all file references in a Qt help project, are relative to the help project file - itself. All listed files will be compressed and written to the Qt compressed - help file. So, in the end, one single Qt help file contains all - documentation files along with the contents and indices. \note The - referenced files must be inside the same directory (or within a subdirectory) - as the help project file. An absolute file path is not supported either. + itself. As the example shows, files (but not directories) can also be + specified as patterns using wildcards. All listed files will be compressed + and written to the Qt compressed help file. So, in the end, one single Qt + help file contains all documentation files along with the contents and + indices. \note The referenced files must be inside the same directory + (or within a subdirectory) as the help project file. An absolute file path + is not supported either. */ diff --git a/doc/src/qtscript.qdoc b/doc/src/qtscript.qdoc index f2ac6c9..6b8f639 100644 --- a/doc/src/qtscript.qdoc +++ b/doc/src/qtscript.qdoc @@ -1782,20 +1782,20 @@ \list 1 \o Run \c lupdate to extract translatable text from the script source code - of the Qt application, resulting in a message file for translators (a \c - .ts file). The utility recognizes qsTr(), qsTranslate() and the - \c{QT_TR*_NOOP()} functions described above and produces \c .ts files + of the Qt application, resulting in a message file for translators (a TS + file). The utility recognizes qsTr(), qsTranslate() and the + \c{QT_TR*_NOOP()} functions described above and produces TS files (usually one per language). - \o Provide translations for the source texts in the \c .ts file, using - \e{Qt Linguist}. Since \c .ts files are in XML format, you can also + \o Provide translations for the source texts in the TS file, using + \e{Qt Linguist}. Since TS files are in XML format, you can also edit them by hand. - \o Run \c lrelease to obtain a light-weight message file (a \c .qm - file) from the \c .ts file, suitable only for end use. Think of the \c - .ts files as "source files", and \c .qm files as "object files". The - translator edits the \c .ts files, but the users of your application - only need the \c .qm files. Both kinds of files are platform and + \o Run \c lrelease to obtain a light-weight message file (a QM + file) from the TS file, suitable only for end use. Think of the TS + files as "source files", and QM files as "object files". The + translator edits the TS files, but the users of your application + only need the QM files. Both kinds of files are platform and locale independent. \endlist @@ -1805,7 +1805,7 @@ translations from previous releases. When running \c lupdate, you must specify the location of the script(s), - and the name of the \c{.ts} file to produce. Examples: + and the name of the TS file to produce. Examples: \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 87 @@ -1823,7 +1823,7 @@ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 89 - When running \c lrelease, you must specify the name of the \c{.ts} input + When running \c lrelease, you must specify the name of the TS input file; or, if you are using a qmake project file to manage script translations, you specify the name of that file. \c lrelease will create \c myscript_la.qm, the binary representation of the translation. diff --git a/doc/src/qtuiloader.qdoc b/doc/src/qtuiloader.qdoc index 137cfeb..0a23366 100644 --- a/doc/src/qtuiloader.qdoc +++ b/doc/src/qtuiloader.qdoc @@ -53,7 +53,7 @@ These forms are processed at run-time to produce dynamically-generated user interfaces. In order to generate a form at run-time, a resource - file containing a \c{.ui} file is needed. Applications that use the + file containing a UI file is needed. Applications that use the form handling classes need to be configured to be built against the QtUiTools module. This is done by including the following declaration in a \c qmake project file to ensure that the application is compiled diff --git a/doc/src/qtxmlpatterns.qdoc b/doc/src/qtxmlpatterns.qdoc index 6b82c0d..9f8677b 100644 --- a/doc/src/qtxmlpatterns.qdoc +++ b/doc/src/qtxmlpatterns.qdoc @@ -839,6 +839,27 @@ with the \c fn:id() function. See \l{http://www.w3.org/TR/xml-id/}{xml:id Version 1.0} for details. + \section2 XML Schema 1.0 + + The QtXmlPatterns implementation of XML Schema validation supports + the schema specification version 1.0 in large parts. Known problems + of the implementation and areas where conformancy may be questionable + are: + + \list + \o Large \c minOccurs or \c maxOccurs values or deeply nested ones + require huge amount of memory which might cause the system to freeze. + Such a schema should be rewritten to use \c unbounded as value instead + of large numbers. This restriction will hopefully be fixed in a later release. + \o Comparison of really small or large floating point values might lead to + wrong results in some cases. However such numbers should not be relevant + for day-to-day usage. + \o Regular expression support is currently not conformant but follows + Qt's QRegExp standard syntax. + \o Identity constraint checks can not use the values of default or fixed + attribute definitions. + \endlist + \section2 Resource Loading When QtXmlPatterns loads an XML resource, e.g., using the @@ -884,6 +905,54 @@ URIs are first passed to QAbstractUriResolver. Check QXmlQuery::setUriResolver() for possible rewrites. + \section1 License Information + + The XML Schema implementation provided by this module contains the \c xml.xsd file + (located in \c{src/xmlpatterns/schema/schemas}) which is licensed under the terms + given below. This module is always built with XML Schema support enabled. + + \legalese + W3C\copyright SOFTWARE NOTICE AND LICENSE + + This license came from: http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + + This work (and included software, documentation such as READMEs, or other + related items) is being provided by the copyright holders under the following + license. By obtaining, using and/or copying this work, you (the licensee) + agree that you have read, understood, and will comply with the following + terms and conditions. + + Permission to copy, modify, and distribute this software and its + documentation, with or without modification, for any purpose and without + fee or royalty is hereby granted, provided that you include the following on + ALL copies of the software and documentation or portions thereof, including + modifications: + + 1. The full text of this NOTICE in a location viewable to users of the + redistributed or derivative work.\br + 2. Any pre-existing intellectual property disclaimers, notices, or terms + and conditions. If none exist, the W3C Software Short Notice should be + included (hypertext is preferred, text is permitted) + within the body of any redistributed or derivative code.\br + 3. Notice of any changes or modifications to the files, including the date + changes were made. (We recommend you provide URIs to the location from + which the code is derived.) + + THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS + MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT + LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR + PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE + ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. + + COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR + CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR + DOCUMENTATION. + + The name and trademarks of copyright holders may NOT be used in + advertising or publicity pertaining to the software without specific, written + prior permission. Title to copyright in this software and any associated + documentation will at all times remain with copyright holders. + \endlegalese */ /*! diff --git a/doc/src/richtext.qdoc b/doc/src/richtext.qdoc index 1c76268..c43db0c 100644 --- a/doc/src/richtext.qdoc +++ b/doc/src/richtext.qdoc @@ -714,8 +714,8 @@ Ideas for other sections: \previouspage Common Rich Text Editing Tasks Qt's text widgets are able to display rich text, specified using a subset of \l{HTML 4} - markup. Widgets that use QTextDocument, such as QLabel, QTextEdit, QTreeWidgetItem and - the other item widgets, are able to display rich text specified in this way. + markup. Widgets that use QTextDocument, such as QLabel and QTextEdit, are able to display + rich text specified in this way. \tableofcontents diff --git a/doc/src/signalsandslots.qdoc b/doc/src/signalsandslots.qdoc index 356db33..09eb0a6 100644 --- a/doc/src/signalsandslots.qdoc +++ b/doc/src/signalsandslots.qdoc @@ -190,7 +190,7 @@ know any information about each other. To enable this, the objects only need to be connected together, and this can be achieved with some simple QObject::connect() function calls, or with \c{uic}'s - \l{Using a Designer .ui File in Your Application#Automatic Connections} + \l{Using a Designer UI File in Your Application#Automatic Connections} {automatic connections} feature. \section1 Building the Example diff --git a/doc/src/snippets/code/doc_src_emb-charinput.qdoc b/doc/src/snippets/code/doc_src_emb-charinput.qdoc index 2539e13..f6b33fe 100644 --- a/doc/src/snippets/code/doc_src_emb-charinput.qdoc +++ b/doc/src/snippets/code/doc_src_emb-charinput.qdoc @@ -4,7 +4,7 @@ //! [1] -configure -qt-kbd-s15000 +configure -qt-kbd-linuxinput //! [1] diff --git a/doc/src/snippets/code/doc_src_linguist-manual.qdoc b/doc/src/snippets/code/doc_src_linguist-manual.qdoc index ce3b997..5697300 100644 --- a/doc/src/snippets/code/doc_src_linguist-manual.qdoc +++ b/doc/src/snippets/code/doc_src_linguist-manual.qdoc @@ -42,7 +42,7 @@ Options: -pluralonly Only include plural form messages. -silent - Don't explain what is being done. + Do not explain what is being done. -version Display the version of lupdate and exit. //! [4] @@ -55,14 +55,14 @@ Usage: Options: -help Display this information and exit -compress - Compress the .qm files + Compress the QM files -nounfinished Do not include unfinished translations -removeidentical If the translated text is the same as the source text, do not include the message -silent - Don't explain what is being done + Do not explain what is being done -version Display the version of lrelease and exit //! [5] diff --git a/doc/src/snippets/code/doc_src_qmake-manual.qdoc b/doc/src/snippets/code/doc_src_qmake-manual.qdoc index b93e151..753d560 100644 --- a/doc/src/snippets/code/doc_src_qmake-manual.qdoc +++ b/doc/src/snippets/code/doc_src_qmake-manual.qdoc @@ -689,7 +689,7 @@ qmake -o Makefile hello.pro //! [115] -qmake -tp vc -o hello.dsp hello.pro +qmake -tp vc hello.pro //! [115] diff --git a/doc/src/snippets/code/doc_src_qthelp.qdoc b/doc/src/snippets/code/doc_src_qthelp.qdoc index 11d231f..949e2a5 100644 --- a/doc/src/snippets/code/doc_src_qthelp.qdoc +++ b/doc/src/snippets/code/doc_src_qthelp.qdoc @@ -92,8 +92,7 @@ if (links.count()) { </keywords> <files> <file>classic.css</file> - <file>index.html</file> - <file>doc.html</file> + <file>*.html</file> </files> </filterSection> </QtHelpProject> @@ -154,8 +153,7 @@ if (links.count()) { ... <files> <file>classic.css</file> - <file>index.html</file> - <file>doc.html</file> + <file>*.html</file> </files> ... //! [13] diff --git a/doc/src/snippets/code/src_corelib_global_qglobal.cpp b/doc/src/snippets/code/src_corelib_global_qglobal.cpp index 287181a..50052c3 100644 --- a/doc/src/snippets/code/src_corelib_global_qglobal.cpp +++ b/doc/src/snippets/code/src_corelib_global_qglobal.cpp @@ -358,6 +358,30 @@ QString global_greeting(int type) //! [36] +//! [qttrid] + //% "%n fooish bar(s) found.\n" + //% "Do you want to continue?" + QString text = qtTrId("qtn_foo_bar", n); +//! [qttrid] + + +//! [qttrid_noop] +static const char * const ids[] = { + //% "This is the first text." + QT_TRID_NOOP("qtn_1st_text"), + //% "This is the second text." + QT_TRID_NOOP("qtn_2nd_text"), + 0 +}; + +void TheClass::addLabels() +{ + for (int i = 0; ids[i]; ++i) + new QLabel(qtTrId(ids[i]), this); +} +//! [qttrid_noop] + + //! [37] qWarning("%s: %s", qPrintable(key), qPrintable(value)); //! [37] diff --git a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp index 5a7c5a7..5c0f80c 100644 --- a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp +++ b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp @@ -376,6 +376,15 @@ hostNameLabel->setText(tr("Name:")); QString example = tr("Example"); //! [40] +//! [meta data] +//: This is a comment for the translator. +//= qtn_foo_bar +//~ loc-layout_id foo_dialog +//~ loc-blank False +//~ magic-stuff This might mean something magic. +QString text = MyMagicClass::tr("Sim sala bim."); +//! [meta data] + //! [explicit tr context] QString text = QScrollBar::tr("Page up"); //! [explicit tr context] diff --git a/doc/src/snippets/code/src_network_access_qnetworkreply.cpp b/doc/src/snippets/code/src_network_access_qnetworkreply.cpp new file mode 100644 index 0000000..78b388b --- /dev/null +++ b/doc/src/snippets/code/src_network_access_qnetworkreply.cpp @@ -0,0 +1,10 @@ +//! [0] +QList<QSslCertificate> cert = QSslCertificate::fromPath(QLatin1String("server-certificate.pem")); +QSslError error(QSslError::SelfSignedCertificate, cert.at(0)); +QList<QSslError> expectedSslErrors; +expectedSslErrors.append(error); + +QNetworkReply *reply = manager.get(QNetworkRequest(QUrl("https://server.tld/index.html"))); +reply->ignoreSslErrors(expectedSslErrors); +// here connect signals etc. +//! [0] diff --git a/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp b/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp index afffbab..7845e9b 100644 --- a/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp +++ b/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp @@ -54,3 +54,14 @@ socket->connectToHostEncrypted("imap", 993); if (socket->waitForEncrypted(1000)) qDebug("Encrypted!"); //! [5] + +//! [6] +QList<QSslCertificate> cert = QSslCertificate::fromPath(QLatin1String("server-certificate.pem")); +QSslError error(QSslError::SelfSignedCertificate, cert.at(0)); +QList<QSslError> expectedSslErrors; +expectedSslErrors.append(error); + +QSslSocket socket; +socket.ignoreSslErrors(expectedSslErrors); +socket.connectToHostEncrypted("server.tld", 443); +//! [6] diff --git a/doc/src/snippets/qxmlschema/main.cpp b/doc/src/snippets/qxmlschema/main.cpp new file mode 100644 index 0000000..e5989ee --- /dev/null +++ b/doc/src/snippets/qxmlschema/main.cpp @@ -0,0 +1,118 @@ +/**************************************************************************** +** +** 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 http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtCore> +#include <QtXmlPatterns> + +class Schema +{ + public: + void loadFromUrl() const; + void loadFromFile() const; + void loadFromData() const; +}; + +void Schema::loadFromUrl() const +{ +//! [0] + QUrl url("http://www.schema-example.org/myschema.xsd"); + + QXmlSchema schema; + if (schema.load(url) == true) + qDebug() << "schema is valid"; + else + qDebug() << "schema is invalid"; +//! [0] +} + +void Schema::loadFromFile() const +{ +//! [1] + QFile file("myschema.xsd"); + file.open(QIODevice::ReadOnly); + + QXmlSchema schema; + schema.load(&file, QUrl::fromLocalFile(file.fileName())); + + if (schema.isValid()) + qDebug() << "schema is valid"; + else + qDebug() << "schema is invalid"; +//! [1] +} + +void Schema::loadFromData() const +{ +//! [2] + QByteArray data( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<xsd:schema" + " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"" + " xmlns=\"http://www.qtsoftware.com/xmlschematest\"" + " targetNamespace=\"http://www.qtsoftware.com/xmlschematest\"" + " version=\"1.0\"" + " elementFormDefault=\"qualified\">" + "</xsd:schema>" ); + + QBuffer buffer(&data); + buffer.open(QIODevice::ReadOnly); + + QXmlSchema schema; + schema.load(&buffer); + + if (schema.isValid()) + qDebug() << "schema is valid"; + else + qDebug() << "schema is invalid"; +//! [2] +} + +int main(int argc, char **argv) +{ + QCoreApplication app(argc, argv); + + Schema schema; + + schema.loadFromUrl(); + schema.loadFromFile(); + schema.loadFromData(); + + return 0; +} diff --git a/doc/src/snippets/qxmlschema/qxmlschema.pro b/doc/src/snippets/qxmlschema/qxmlschema.pro new file mode 100644 index 0000000..7e8782a --- /dev/null +++ b/doc/src/snippets/qxmlschema/qxmlschema.pro @@ -0,0 +1,3 @@ +SOURCES += main.cpp + +QT += xmlpatterns diff --git a/doc/src/snippets/qxmlschemavalidator/main.cpp b/doc/src/snippets/qxmlschemavalidator/main.cpp new file mode 100644 index 0000000..581f40f --- /dev/null +++ b/doc/src/snippets/qxmlschemavalidator/main.cpp @@ -0,0 +1,160 @@ +/**************************************************************************** +** +** 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 http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtCore> +#include <QtXmlPatterns> + +class SchemaValidator +{ + public: + void validateFromUrl() const; + void validateFromFile() const; + void validateFromData() const; + void validateComplete() const; + + private: + QXmlSchema getSchema() const; +}; + +void SchemaValidator::validateFromUrl() const +{ +//! [0] + const QXmlSchema schema = getSchema(); + + const QUrl url("http://www.schema-example.org/test.xml"); + + QXmlSchemaValidator validator(schema); + if (validator.validate(url)) + qDebug() << "instance document is valid"; + else + qDebug() << "instance document is invalid"; +//! [0] +} + +void SchemaValidator::validateFromFile() const +{ +//! [1] + const QXmlSchema schema = getSchema(); + + QFile file("test.xml"); + file.open(QIODevice::ReadOnly); + + QXmlSchemaValidator validator(schema); + if (validator.validate(&file, QUrl::fromLocalFile(file.fileName()))) + qDebug() << "instance document is valid"; + else + qDebug() << "instance document is invalid"; +//! [1] +} + +void SchemaValidator::validateFromData() const +{ +//! [2] + const QXmlSchema schema = getSchema(); + + QByteArray data("<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<test></test>"); + + QBuffer buffer(&data); + buffer.open(QIODevice::ReadOnly); + + QXmlSchemaValidator validator(schema); + if (validator.validate(&buffer)) + qDebug() << "instance document is valid"; + else + qDebug() << "instance document is invalid"; +//! [2] +} + +QXmlSchema SchemaValidator::getSchema() const +{ + QByteArray data("<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<xsd:schema" + " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"" + " xmlns=\"http://www.qtsoftware.com/xmlschematest\"" + " targetNamespace=\"http://www.qtsoftware.com/xmlschematest\"" + " version=\"1.0\"" + " elementFormDefault=\"qualified\">" + "</xsd:schema>"); + + QBuffer buffer(&data); + buffer.open(QIODevice::ReadOnly); + + QXmlSchema schema; + schema.load(&buffer); + + return schema; +} + +void SchemaValidator::validateComplete() const +{ +//! [3] + QUrl schemaUrl("file:///home/user/schema.xsd"); + + QXmlSchema schema; + schema.load(schemaUrl); + + if (schema.isValid()) { + QFile file("test.xml"); + file.open(QIODevice::ReadOnly); + + QXmlSchemaValidator validator(schema); + if (validator.validate(&file, QUrl::fromLocalFile(file.fileName()))) + qDebug() << "instance document is valid"; + else + qDebug() << "instance document is invalid"; + } +//! [3] +} + +int main(int argc, char **argv) +{ + QCoreApplication app(argc, argv); + + SchemaValidator validator; + + validator.validateFromUrl(); + validator.validateFromFile(); + validator.validateFromData(); + validator.validateComplete(); + + return 0; +} diff --git a/doc/src/snippets/qxmlschemavalidator/qxmlschemavalidator.pro b/doc/src/snippets/qxmlschemavalidator/qxmlschemavalidator.pro new file mode 100644 index 0000000..7e8782a --- /dev/null +++ b/doc/src/snippets/qxmlschemavalidator/qxmlschemavalidator.pro @@ -0,0 +1,3 @@ +SOURCES += main.cpp + +QT += xmlpatterns diff --git a/doc/src/snippets/snippets.pro b/doc/src/snippets/snippets.pro index 50e33b3..e3e7eca 100644 --- a/doc/src/snippets/snippets.pro +++ b/doc/src/snippets/snippets.pro @@ -73,6 +73,8 @@ SUBDIRS = brush \ quiloader \ qx11embedcontainer \ qx11embedwidget \ + qxmlschema \ + qxmlschemavalidator \ reading-selections \ scribe-overview \ separations \ diff --git a/doc/src/snippets/statemachine/eventtest.cpp b/doc/src/snippets/statemachine/eventtest.cpp new file mode 100644 index 0000000..e0f359a --- /dev/null +++ b/doc/src/snippets/statemachine/eventtest.cpp @@ -0,0 +1,34 @@ + +#include <QtGui> + +class MyTransition : public QAbstractTransition +{ + Q_OBJECT +public: + MyTransition() {} + +protected: +//![0] + bool eventTest(QEvent *event) + { + if (event->type() == QEvent::Wrapped) { + QEvent *wrappedEvent = static_cast<QWrappedEvent *>(event)->event(); + if (wrappedEvent->type() == QEvent::KeyPress) { + QKeyEvent *keyEvent = static_cast<QKeyEvent *>(wrappedEvent); + // Do your event test + } + } + return false; + } +//![0] + + void onTransition(QEvent *event) + { + + } +}; + +int main(int argv, char **args) +{ + return 0; +} diff --git a/doc/src/templates.qdoc b/doc/src/templates.qdoc index 5a8acf7..8cfb851 100644 --- a/doc/src/templates.qdoc +++ b/doc/src/templates.qdoc @@ -162,7 +162,7 @@ without having to know the exact types of the objects we are connecting. This is impossible with a template based solution. This kind of runtime introspection opens up new possibilities, for example GUIs that are - generated and connected from Qt Designer's XML \c{ui} files. + generated and connected from Qt Designer's XML UI files. \section1 Calling Performance is Not Everything diff --git a/doc/src/threads.qdoc b/doc/src/threads.qdoc index c9d0904..8469f51 100644 --- a/doc/src/threads.qdoc +++ b/doc/src/threads.qdoc @@ -262,48 +262,41 @@ \keyword thread-safe \section1 Reentrancy and Thread-Safety - Throughout the Qt documentation, the terms \e reentrant and \e - thread-safe are used to specify how a function can be used in - multithreaded applications: + Throughout the documentation, the terms \e{reentrant} and + \e{thread-safe} are used to mark classes and functions to indicate + how they can be used in multithread applications: \list - \o A \e reentrant function can be called simultaneously by - multiple threads provided that each invocation of the function - references unique data. - \o A \e thread-safe function can be called simultaneously by - multiple threads when each invocation references shared data. - All access to the shared data is serialized. + \o A \e thread-safe function can be called simultaneously from + multiple threads, even when the invocations use shared data, + because all references to the shared data are serialized. + \o A \e reentrant function can also be called simultaneously from + multiple threads, but only if each invocation uses its own data. \endlist - By extension, a class is said to be reentrant if each and every - one of its functions can be called simultaneously by multiple - threads on different instances of the class. Similarly, the class - is said to be thread-safe if the functions can be called by - different threads on the same instance. + Hence, a \e{thread-safe} function is always \e{reentrant}, but a + \e{reentrant} function is not always \e{thread-safe}. - Classes in the documentation will be documented as thread-safe only - if they are intended to be used by multiple threads. + By extension, a class is said to be \e{reentrant} if its member + functions can be called safely from multiple threads, as long as + each thread uses a \e{different} instance of the class. The class + is \e{thread-safe} if its member functions can be called safely + from multiple threads, even if all the threads use the \e{same} + instance of the class. - Note that the terminology in this domain isn't entirely - standardized. POSIX uses a somewhat different definition of - reentrancy and thread-safety for its C APIs. When dealing with an - object-oriented C++ class library such as Qt, the definitions - must be adapted. - - Most C++ classes are inherently reentrant, since they typically - only reference member data. Any thread can call such a member - function on an instance of the class, as long as no other thread - is calling a member function on the same instance. For example, - the \c Counter class below is reentrant: + C++ classes are often reentrant, simply because they only access + their own member data. Any thread can call a member function on an + instance of a reentrant class, as long as no other thread can call + a member function on the \e{same} instance of the class at the + same time. For example, the \c Counter class below is reentrant: \snippet doc/src/snippets/threads/threads.cpp 3 \snippet doc/src/snippets/threads/threads.cpp 4 The class isn't thread-safe, because if multiple threads try to modify the data member \c n, the result is undefined. This is - because C++'s \c ++ and \c -- operators aren't necessarily - atomic. Indeed, they usually expand to three machine - instructions: + because the \c ++ and \c -- operators aren't always atomic. + Indeed, they usually expand to three machine instructions: \list 1 \o Load the variable's value in a register. @@ -332,14 +325,27 @@ declared with the \c mutable qualifier because we need to lock and unlock the mutex in \c value(), which is a const function. - Most Qt classes are reentrant and not thread-safe, to avoid the - overhead of repeatedly locking and unlocking a QMutex. For - example, QString is reentrant, meaning that you can use it in - different threads, but you can't access the same QString object - from different threads simultaneously (unless you protect it with - a mutex yourself). A few classes and functions are thread-safe; - these are mainly thread-related classes such as QMutex, or - fundamental functions such as QCoreApplication::postEvent(). + Many Qt classes are \e{reentrant}, but they are not made + \e{thread-safe}, because making them thread-safe would incur the + extra overhead of repeatedly locking and unlocking a QMutex. For + example, QString is reentrant but not thread-safe. You can safely + access \e{different} instances of QString from multiple threads + simultaneously, but you can't safely access the \e{same} instance + of QString from multiple threads simultaneously (unless you + protect the accesses yourself with a QMutex). + + Some Qt classes and functions are thread-safe. These are mainly + the thread-related classes (e.g. QMutex) and fundamental functions + (e.g. QCoreApplication::postEvent()). + + \note Qt Classes are only documented as \e{thread-safe} if they + are intended to be used by multiple threads. + + \note Terminology in the multithreading domain isn't entirely + standardized. POSIX uses definitions of reentrant and thread-safe + that are somewhat different for its C APIs. When using other + object-oriented C++ class libraries with Qt, be sure the + definitions are understood. \section1 Threads and QObjects @@ -428,20 +434,22 @@ an object and its children (the object cannot be moved if it has a parent). - Calling \c delete on a QObject from another thread than the - thread where it is created (or accessing the object in other - ways) is unsafe unless you can guarantee that the object isn't - processing events at the same moment. Use QObject::deleteLater() - instead; it will post a - \l{QEvent::DeferredDelete}{DeferredDelete} event, which the - event loop of the object's thread will eventually pick up. + Calling \c delete on a QObject from a thread other than the one + that \e owns the object (or accessing the object in other ways) is + unsafe, unless you guarantee that the object isn't processing + events at that moment. Use QObject::deleteLater() instead, and a + \l{QEvent::DeferredDelete}{DeferredDelete} event will be posted, + which the event loop of the object's thread will eventually pick + up. By default, the thread that \e owns a QObject is the thread + that \e creates the QObject, but not after QObject::moveToThread() + has been called. If no event loop is running, events won't be delivered to the - object. For example, if you create a QTimer object in a thread - but never call \l{QThread::exec()}{exec()}, the QTimer will never emit its - \l{QTimer::timeout()}{timeout()} signal. Calling - \l{QObject::deleteLater()}{deleteLater()} won't work either. (These - restrictions apply to the main thread as well.) + object. For example, if you create a QTimer object in a thread but + never call \l{QThread::exec()}{exec()}, the QTimer will never emit + its \l{QTimer::timeout()}{timeout()} signal. Calling + \l{QObject::deleteLater()}{deleteLater()} won't work + either. (These restrictions apply to the main thread as well.) You can manually post events to any object in any thread at any time using the thread-safe function diff --git a/doc/src/trolltech-webpages.qdoc b/doc/src/trolltech-webpages.qdoc index 7d48167..abbe4e0 100644 --- a/doc/src/trolltech-webpages.qdoc +++ b/doc/src/trolltech-webpages.qdoc @@ -165,11 +165,6 @@ */ /*! - \externalpage http://www.qtsoftware.com/developer/supported-platforms/supported-platforms/ - \title Qt 4 Supported Platforms -*/ - -/*! \externalpage http://www.qtsoftware.com/products/qtopia/ \title Qt Extended */ @@ -243,3 +238,8 @@ \externalpage http://www.qtsoftware.com/developer/faqs/qt/installation \title Installation FAQ */ + +/*! + \externalpage http://qt.gitorious.org + \title Public Qt Repository +*/ diff --git a/doc/src/tutorials/addressbook.qdoc b/doc/src/tutorials/addressbook.qdoc index 2f6cec2..95394eb 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. + 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. - 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. + 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. - 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 @@ -873,7 +876,7 @@ \image addressbook-tutorial-part6-save.png - If \c fileName is not empty, we create a QFile object, \c file with + If \c fileName is not empty, we create a QFile object, \c file, with \c fileName. QFile works with QDataStream as QFile is a QIODevice. Next, we attempt to open the file in \l{QIODevice::}{WriteOnly} mode. @@ -903,18 +906,18 @@ \image addressbook-tutorial-part6-load.png If \c fileName is not empty, again, we use a QFile object, \c file, and - attempt to open it in \l{QIODevice::}{ReadOnly} mode. In a similar way - to our implementation of \c saveToFile(), if this attempt is unsuccessful, - we display a QMessageBox to inform the user. + attempt to open it in \l{QIODevice::}{ReadOnly} mode. Similar to our + implementation of \c saveToFile(), if this attempt is unsuccessful, we + display a QMessageBox to inform the user. \snippet tutorials/addressbook/part6/addressbook.cpp loadFromFile() function part2 Otherwise, we instantiate a QDataStream object, \c in, set its version as above and read the serialized data into the \c contacts data structure. - Note that we empty \c contacts before reading data into it to simplify the - file reading process. A more advanced method would be to read the contacts - into temporary QMap object, and copy only the contacts that do not already - exist in \c contacts. + The \c contacts object is emptied before data is read into it to simplify + the file reading process. A more advanced method would be to read the + contacts into a temporary QMap object, and copy over non-duplicate contacts + into \c contacts. \snippet tutorials/addressbook/part6/addressbook.cpp loadFromFile() function part3 |