summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-07-23 05:01:40 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-07-23 05:01:40 (GMT)
commitd1072c333225ded9e46cf857bef701cc67f6fc1d (patch)
treed20b15a94385a78f907350a0f74b9faa905eff3d /doc/src
parent4f35294d737d9059398b2c8f714c8e0ea37079ed (diff)
parentc42f7058dfd7ea551b2d3bca5651b0c802c91259 (diff)
downloadQt-d1072c333225ded9e46cf857bef701cc67f6fc1d.zip
Qt-d1072c333225ded9e46cf857bef701cc67f6fc1d.tar.gz
Qt-d1072c333225ded9e46cf857bef701cc67f6fc1d.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-declarativeui
Conflicts: configure configure.exe src/gui/kernel/qaction.h
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/classes.qdoc10
-rw-r--r--doc/src/credits.qdoc1
-rw-r--r--doc/src/designer-manual.qdoc2
-rw-r--r--doc/src/diagrams/programs/easingcurve/main.cpp29
-rw-r--r--doc/src/examples.qdoc1
-rw-r--r--doc/src/examples/completer.qdoc16
-rw-r--r--doc/src/examples/moveblocks.qdoc2
-rw-r--r--doc/src/examples/schema.qdoc143
-rw-r--r--doc/src/examples/tablet.qdoc5
-rw-r--r--doc/src/graphicsview.qdoc3
-rw-r--r--doc/src/images/qeasingcurve-cosinecurve.pngbin2544 -> 3419 bytes
-rw-r--r--doc/src/images/qeasingcurve-inback.pngbin2225 -> 2808 bytes
-rw-r--r--doc/src/images/qeasingcurve-inbounce.pngbin2378 -> 3154 bytes
-rw-r--r--doc/src/images/qeasingcurve-incirc.pngbin2138 -> 2605 bytes
-rw-r--r--doc/src/images/qeasingcurve-incubic.pngbin2230 -> 2722 bytes
-rw-r--r--doc/src/images/qeasingcurve-incurve.pngbin2325 -> 2692 bytes
-rw-r--r--doc/src/images/qeasingcurve-inelastic.pngbin2314 -> 3304 bytes
-rw-r--r--doc/src/images/qeasingcurve-inexpo.pngbin2183 -> 2675 bytes
-rw-r--r--doc/src/images/qeasingcurve-inoutback.pngbin2460 -> 3241 bytes
-rw-r--r--doc/src/images/qeasingcurve-inoutbounce.pngbin2522 -> 3386 bytes
-rw-r--r--doc/src/images/qeasingcurve-inoutcirc.pngbin2352 -> 2843 bytes
-rw-r--r--doc/src/images/qeasingcurve-inoutcubic.pngbin2410 -> 2931 bytes
-rw-r--r--doc/src/images/qeasingcurve-inoutelastic.pngbin2485 -> 3461 bytes
-rw-r--r--doc/src/images/qeasingcurve-inoutexpo.pngbin2383 -> 3004 bytes
-rw-r--r--doc/src/images/qeasingcurve-inoutquad.pngbin2392 -> 2893 bytes
-rw-r--r--doc/src/images/qeasingcurve-inoutquart.pngbin2331 -> 2925 bytes
-rw-r--r--doc/src/images/qeasingcurve-inoutquint.pngbin2244 -> 2823 bytes
-rw-r--r--doc/src/images/qeasingcurve-inoutsine.pngbin2405 -> 2891 bytes
-rw-r--r--doc/src/images/qeasingcurve-inquad.pngbin2283 -> 2733 bytes
-rw-r--r--doc/src/images/qeasingcurve-inquart.pngbin2261 -> 2727 bytes
-rw-r--r--doc/src/images/qeasingcurve-inquint.pngbin2178 -> 2630 bytes
-rw-r--r--doc/src/images/qeasingcurve-insine.pngbin2167 -> 2567 bytes
-rw-r--r--doc/src/images/qeasingcurve-linear.pngbin2165 -> 2318 bytes
-rw-r--r--doc/src/images/qeasingcurve-outback.pngbin2371 -> 2852 bytes
-rw-r--r--doc/src/images/qeasingcurve-outbounce.pngbin2481 -> 3360 bytes
-rw-r--r--doc/src/images/qeasingcurve-outcirc.pngbin2269 -> 2796 bytes
-rw-r--r--doc/src/images/qeasingcurve-outcubic.pngbin2336 -> 2792 bytes
-rw-r--r--doc/src/images/qeasingcurve-outcurve.pngbin2389 -> 2724 bytes
-rw-r--r--doc/src/images/qeasingcurve-outelastic.pngbin2402 -> 3423 bytes
-rw-r--r--doc/src/images/qeasingcurve-outexpo.pngbin2299 -> 2803 bytes
-rw-r--r--doc/src/images/qeasingcurve-outinback.pngbin2400 -> 3026 bytes
-rw-r--r--doc/src/images/qeasingcurve-outinbounce.pngbin2568 -> 3629 bytes
-rw-r--r--doc/src/images/qeasingcurve-outincirc.pngbin2339 -> 2822 bytes
-rw-r--r--doc/src/images/qeasingcurve-outincubic.pngbin2393 -> 2872 bytes
-rw-r--r--doc/src/images/qeasingcurve-outinelastic.pngbin2517 -> 3941 bytes
-rw-r--r--doc/src/images/qeasingcurve-outinexpo.pngbin2377 -> 2923 bytes
-rw-r--r--doc/src/images/qeasingcurve-outinquad.pngbin2380 -> 2858 bytes
-rw-r--r--doc/src/images/qeasingcurve-outinquart.pngbin2319 -> 2830 bytes
-rw-r--r--doc/src/images/qeasingcurve-outinquint.pngbin2248 -> 2724 bytes
-rw-r--r--doc/src/images/qeasingcurve-outinsine.pngbin2388 -> 2817 bytes
-rw-r--r--doc/src/images/qeasingcurve-outquad.pngbin2324 -> 2760 bytes
-rw-r--r--doc/src/images/qeasingcurve-outquart.pngbin2304 -> 2764 bytes
-rw-r--r--doc/src/images/qeasingcurve-outquint.pngbin2242 -> 2687 bytes
-rw-r--r--doc/src/images/qeasingcurve-outsine.pngbin2364 -> 2773 bytes
-rw-r--r--doc/src/images/qeasingcurve-sinecurve.pngbin2470 -> 3329 bytes
-rw-r--r--doc/src/images/schema-example.pngbin0 -> 84320 bytes
-rw-r--r--doc/src/obsoleteclasses.qdoc59
-rw-r--r--doc/src/qdesktopwidget.qdoc87
-rw-r--r--doc/src/qnamespace.qdoc1
-rw-r--r--doc/src/qsqldatatype-table.qdoc2
-rw-r--r--doc/src/qtxmlpatterns.qdoc69
-rw-r--r--doc/src/snippets/code/src_network_access_qnetworkreply.cpp10
-rw-r--r--doc/src/snippets/code/src_network_ssl_qsslsocket.cpp11
-rw-r--r--doc/src/snippets/qxmlschema/main.cpp118
-rw-r--r--doc/src/snippets/qxmlschema/qxmlschema.pro3
-rw-r--r--doc/src/snippets/qxmlschemavalidator/main.cpp160
-rw-r--r--doc/src/snippets/qxmlschemavalidator/qxmlschemavalidator.pro3
-rw-r--r--doc/src/snippets/snippets.pro2
-rw-r--r--doc/src/snippets/statemachine/eventtest.cpp34
69 files changed, 713 insertions, 58 deletions
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/designer-manual.qdoc b/doc/src/designer-manual.qdoc
index 25e7455..c67865d 100644
--- a/doc/src/designer-manual.qdoc
+++ b/doc/src/designer-manual.qdoc
@@ -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.
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/examples.qdoc b/doc/src/examples.qdoc
index f6bb877..2861c90 100644
--- a/doc/src/examples.qdoc
+++ b/doc/src/examples.qdoc
@@ -417,6 +417,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/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/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/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/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/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/images/qeasingcurve-cosinecurve.png b/doc/src/images/qeasingcurve-cosinecurve.png
index b27e763..8cee978 100644
--- a/doc/src/images/qeasingcurve-cosinecurve.png
+++ b/doc/src/images/qeasingcurve-cosinecurve.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inback.png b/doc/src/images/qeasingcurve-inback.png
index 8506c0f..0064cb3 100644
--- a/doc/src/images/qeasingcurve-inback.png
+++ b/doc/src/images/qeasingcurve-inback.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inbounce.png b/doc/src/images/qeasingcurve-inbounce.png
index 275b38c..eaa64f8 100644
--- a/doc/src/images/qeasingcurve-inbounce.png
+++ b/doc/src/images/qeasingcurve-inbounce.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-incirc.png b/doc/src/images/qeasingcurve-incirc.png
index b985e9c..7bd0f09 100644
--- a/doc/src/images/qeasingcurve-incirc.png
+++ b/doc/src/images/qeasingcurve-incirc.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-incubic.png b/doc/src/images/qeasingcurve-incubic.png
index e417ee1..1ac9eaf 100644
--- a/doc/src/images/qeasingcurve-incubic.png
+++ b/doc/src/images/qeasingcurve-incubic.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-incurve.png b/doc/src/images/qeasingcurve-incurve.png
index d9a9340..578259e 100644
--- a/doc/src/images/qeasingcurve-incurve.png
+++ b/doc/src/images/qeasingcurve-incurve.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inelastic.png b/doc/src/images/qeasingcurve-inelastic.png
index b242fd3..f976b5a 100644
--- a/doc/src/images/qeasingcurve-inelastic.png
+++ b/doc/src/images/qeasingcurve-inelastic.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inexpo.png b/doc/src/images/qeasingcurve-inexpo.png
index f06316c..1af3652 100644
--- a/doc/src/images/qeasingcurve-inexpo.png
+++ b/doc/src/images/qeasingcurve-inexpo.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inoutback.png b/doc/src/images/qeasingcurve-inoutback.png
index 9fd1446..480bc05 100644
--- a/doc/src/images/qeasingcurve-inoutback.png
+++ b/doc/src/images/qeasingcurve-inoutback.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inoutbounce.png b/doc/src/images/qeasingcurve-inoutbounce.png
index fb65f31..de62309 100644
--- a/doc/src/images/qeasingcurve-inoutbounce.png
+++ b/doc/src/images/qeasingcurve-inoutbounce.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inoutcirc.png b/doc/src/images/qeasingcurve-inoutcirc.png
index 123cc54..b4be8ac 100644
--- a/doc/src/images/qeasingcurve-inoutcirc.png
+++ b/doc/src/images/qeasingcurve-inoutcirc.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inoutcubic.png b/doc/src/images/qeasingcurve-inoutcubic.png
index b07695c..49dfbef 100644
--- a/doc/src/images/qeasingcurve-inoutcubic.png
+++ b/doc/src/images/qeasingcurve-inoutcubic.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inoutelastic.png b/doc/src/images/qeasingcurve-inoutelastic.png
index 65851e1..5b0e54a 100644
--- a/doc/src/images/qeasingcurve-inoutelastic.png
+++ b/doc/src/images/qeasingcurve-inoutelastic.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inoutexpo.png b/doc/src/images/qeasingcurve-inoutexpo.png
index 7cbfb13..776984a 100644
--- a/doc/src/images/qeasingcurve-inoutexpo.png
+++ b/doc/src/images/qeasingcurve-inoutexpo.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inoutquad.png b/doc/src/images/qeasingcurve-inoutquad.png
index c5eed06..2643330 100644
--- a/doc/src/images/qeasingcurve-inoutquad.png
+++ b/doc/src/images/qeasingcurve-inoutquad.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inoutquart.png b/doc/src/images/qeasingcurve-inoutquart.png
index 3b66c0d..31fc0c8 100644
--- a/doc/src/images/qeasingcurve-inoutquart.png
+++ b/doc/src/images/qeasingcurve-inoutquart.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inoutquint.png b/doc/src/images/qeasingcurve-inoutquint.png
index c74efe9..4d7a745 100644
--- a/doc/src/images/qeasingcurve-inoutquint.png
+++ b/doc/src/images/qeasingcurve-inoutquint.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inoutsine.png b/doc/src/images/qeasingcurve-inoutsine.png
index 5964f31..012ff75 100644
--- a/doc/src/images/qeasingcurve-inoutsine.png
+++ b/doc/src/images/qeasingcurve-inoutsine.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inquad.png b/doc/src/images/qeasingcurve-inquad.png
index 3373310..e697c20 100644
--- a/doc/src/images/qeasingcurve-inquad.png
+++ b/doc/src/images/qeasingcurve-inquad.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inquart.png b/doc/src/images/qeasingcurve-inquart.png
index 28086d8..6d65175 100644
--- a/doc/src/images/qeasingcurve-inquart.png
+++ b/doc/src/images/qeasingcurve-inquart.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-inquint.png b/doc/src/images/qeasingcurve-inquint.png
index 330aa85..faaaea7 100644
--- a/doc/src/images/qeasingcurve-inquint.png
+++ b/doc/src/images/qeasingcurve-inquint.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-insine.png b/doc/src/images/qeasingcurve-insine.png
index 63d9238..0944903 100644
--- a/doc/src/images/qeasingcurve-insine.png
+++ b/doc/src/images/qeasingcurve-insine.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-linear.png b/doc/src/images/qeasingcurve-linear.png
index 2a05885..fb3aaf3 100644
--- a/doc/src/images/qeasingcurve-linear.png
+++ b/doc/src/images/qeasingcurve-linear.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outback.png b/doc/src/images/qeasingcurve-outback.png
index 7cb34c6..83b3fa2 100644
--- a/doc/src/images/qeasingcurve-outback.png
+++ b/doc/src/images/qeasingcurve-outback.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outbounce.png b/doc/src/images/qeasingcurve-outbounce.png
index 932fc16..27ac979 100644
--- a/doc/src/images/qeasingcurve-outbounce.png
+++ b/doc/src/images/qeasingcurve-outbounce.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outcirc.png b/doc/src/images/qeasingcurve-outcirc.png
index a1a6cb6..0019370 100644
--- a/doc/src/images/qeasingcurve-outcirc.png
+++ b/doc/src/images/qeasingcurve-outcirc.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outcubic.png b/doc/src/images/qeasingcurve-outcubic.png
index aa1d604..45477c0 100644
--- a/doc/src/images/qeasingcurve-outcubic.png
+++ b/doc/src/images/qeasingcurve-outcubic.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outcurve.png b/doc/src/images/qeasingcurve-outcurve.png
index a949ae4..295b471 100644
--- a/doc/src/images/qeasingcurve-outcurve.png
+++ b/doc/src/images/qeasingcurve-outcurve.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outelastic.png b/doc/src/images/qeasingcurve-outelastic.png
index 2a9ba39..1d407ed 100644
--- a/doc/src/images/qeasingcurve-outelastic.png
+++ b/doc/src/images/qeasingcurve-outelastic.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outexpo.png b/doc/src/images/qeasingcurve-outexpo.png
index e771c2e..5685155 100644
--- a/doc/src/images/qeasingcurve-outexpo.png
+++ b/doc/src/images/qeasingcurve-outexpo.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outinback.png b/doc/src/images/qeasingcurve-outinback.png
index 7523727..4700ab0 100644
--- a/doc/src/images/qeasingcurve-outinback.png
+++ b/doc/src/images/qeasingcurve-outinback.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outinbounce.png b/doc/src/images/qeasingcurve-outinbounce.png
index ab73d02..12cc1a8 100644
--- a/doc/src/images/qeasingcurve-outinbounce.png
+++ b/doc/src/images/qeasingcurve-outinbounce.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outincirc.png b/doc/src/images/qeasingcurve-outincirc.png
index ec4b8d3..c8a5c86 100644
--- a/doc/src/images/qeasingcurve-outincirc.png
+++ b/doc/src/images/qeasingcurve-outincirc.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outincubic.png b/doc/src/images/qeasingcurve-outincubic.png
index 8b8ae68..42af870 100644
--- a/doc/src/images/qeasingcurve-outincubic.png
+++ b/doc/src/images/qeasingcurve-outincubic.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outinelastic.png b/doc/src/images/qeasingcurve-outinelastic.png
index 89dde2c..308be57 100644
--- a/doc/src/images/qeasingcurve-outinelastic.png
+++ b/doc/src/images/qeasingcurve-outinelastic.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outinexpo.png b/doc/src/images/qeasingcurve-outinexpo.png
index 5909901..0692baa 100644
--- a/doc/src/images/qeasingcurve-outinexpo.png
+++ b/doc/src/images/qeasingcurve-outinexpo.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outinquad.png b/doc/src/images/qeasingcurve-outinquad.png
index 7ddefee..9e3cd83 100644
--- a/doc/src/images/qeasingcurve-outinquad.png
+++ b/doc/src/images/qeasingcurve-outinquad.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outinquart.png b/doc/src/images/qeasingcurve-outinquart.png
index 00ef597..9a3c16f 100644
--- a/doc/src/images/qeasingcurve-outinquart.png
+++ b/doc/src/images/qeasingcurve-outinquart.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outinquint.png b/doc/src/images/qeasingcurve-outinquint.png
index 361bfaa4..add9feb 100644
--- a/doc/src/images/qeasingcurve-outinquint.png
+++ b/doc/src/images/qeasingcurve-outinquint.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outinsine.png b/doc/src/images/qeasingcurve-outinsine.png
index 1737041..4bc2aaf 100644
--- a/doc/src/images/qeasingcurve-outinsine.png
+++ b/doc/src/images/qeasingcurve-outinsine.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outquad.png b/doc/src/images/qeasingcurve-outquad.png
index 6f27cbd..c505ff9 100644
--- a/doc/src/images/qeasingcurve-outquad.png
+++ b/doc/src/images/qeasingcurve-outquad.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outquart.png b/doc/src/images/qeasingcurve-outquart.png
index d45a0b8..6eac058 100644
--- a/doc/src/images/qeasingcurve-outquart.png
+++ b/doc/src/images/qeasingcurve-outquart.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outquint.png b/doc/src/images/qeasingcurve-outquint.png
index 6e7df0e..77a9ad4 100644
--- a/doc/src/images/qeasingcurve-outquint.png
+++ b/doc/src/images/qeasingcurve-outquint.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-outsine.png b/doc/src/images/qeasingcurve-outsine.png
index 7546a0d..d135b2f 100644
--- a/doc/src/images/qeasingcurve-outsine.png
+++ b/doc/src/images/qeasingcurve-outsine.png
Binary files differ
diff --git a/doc/src/images/qeasingcurve-sinecurve.png b/doc/src/images/qeasingcurve-sinecurve.png
index ca67d44..6134a01 100644
--- a/doc/src/images/qeasingcurve-sinecurve.png
+++ b/doc/src/images/qeasingcurve-sinecurve.png
Binary files differ
diff --git a/doc/src/images/schema-example.png b/doc/src/images/schema-example.png
new file mode 100644
index 0000000..5e95bf5
--- /dev/null
+++ b/doc/src/images/schema-example.png
Binary files differ
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/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/qnamespace.qdoc b/doc/src/qnamespace.qdoc
index ded1577..2d40fdd 100644
--- a/doc/src/qnamespace.qdoc
+++ b/doc/src/qnamespace.qdoc
@@ -1697,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}.
*/
/*!
diff --git a/doc/src/qsqldatatype-table.qdoc b/doc/src/qsqldatatype-table.qdoc
index 567bb65..2055e6a 100644
--- a/doc/src/qsqldatatype-table.qdoc
+++ b/doc/src/qsqldatatype-table.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/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/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;
+}