diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-06-23 05:53:53 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-06-23 05:53:53 (GMT) |
commit | fbe44b843194f3892e163ecec1be52fb498e2ddd (patch) | |
tree | 857c749710a71e2d485bd134d6542c62ac51c4e5 /doc/src | |
parent | 6fc3873707ae9e8c002b14800bac9fd64faca42b (diff) | |
parent | 3647de5291db9e359e7844f80202251f47e83a97 (diff) | |
download | Qt-fbe44b843194f3892e163ecec1be52fb498e2ddd.zip Qt-fbe44b843194f3892e163ecec1be52fb498e2ddd.tar.gz Qt-fbe44b843194f3892e163ecec1be52fb498e2ddd.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/modules.qdoc | 1 | ||||
-rw-r--r-- | doc/src/qtopengl.qdoc | 2 | ||||
-rw-r--r-- | doc/src/qtopenvg.qdoc | 73 | ||||
-rw-r--r-- | doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp | 24 |
4 files changed, 99 insertions, 1 deletions
diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc index 145b361..5f0f868 100644 --- a/doc/src/modules.qdoc +++ b/doc/src/modules.qdoc @@ -55,6 +55,7 @@ \row \o \l{QtGui} \o Graphical user interface (GUI) components \row \o \l{QtNetwork} \o Classes for network programming \row \o \l{QtOpenGL} \o OpenGL support classes + \row \o \l{QtOpenVG} \o OpenVG support classes \row \o \l{QtScript} \o Classes for evaluating Qt Scripts \row \o \l{QtScriptTools} \o Additional Qt Script components \row \o \l{QtSql} \o Classes for database integration using SQL diff --git a/doc/src/qtopengl.qdoc b/doc/src/qtopengl.qdoc index 69d33bb..f60ef89 100644 --- a/doc/src/qtopengl.qdoc +++ b/doc/src/qtopengl.qdoc @@ -44,7 +44,7 @@ \title QtOpenGL Module \contentspage Qt's Modules \previouspage QtNetwork - \nextpage QtSql + \nextpage QtOpenVG \ingroup modules \brief The QtOpenGL module offers classes that make it easy to diff --git a/doc/src/qtopenvg.qdoc b/doc/src/qtopenvg.qdoc new file mode 100644 index 0000000..ad036ef --- /dev/null +++ b/doc/src/qtopenvg.qdoc @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ + +/*! + \module QtOpenVG + \title QtOpenVG Module + \contentspage Qt's Modules + \previouspage QtOpenGL + \nextpage QtSql + \ingroup modules + + \brief The QtOpenVG module offers classes that make it easy to + use OpenVG in Qt applications. + + From the OpenVG 1.1 Specification: + + \quotation + + OpenVG is an application programming interface (API) for hardware-accelerated two- + dimensional vector and raster graphics developed under the auspices of the Khronos + Group (www.khronos.org). It provides a device-independent and vendor-neutral interface + for sophisticated 2D graphical applications, while allowing device manufacturers to + provide hardware acceleration where appropriate. + + \endquotation + + The specification, and a reference implementation of it are available from the + \l{http://www.khronos.org/registry/vg/}{Khronos Group}. + + \bold{Note:} Khronos and OpenVG are trademarks of The Khronos Group Inc. OpenGL is a + registered trademark, and OpenGL ES is a trademark, of Silicon Graphics, Inc. + + + The Qt OpenVG module makes it easy to use OpenVG in Qt applications. + */ diff --git a/doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp b/doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp new file mode 100644 index 0000000..acd3938 --- /dev/null +++ b/doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp @@ -0,0 +1,24 @@ +//! [0] +QNetworkAccessManager *manager = new QNetworkAccessManager(this); +QNetworkDiskCache *diskCache = new QNetworkDiskCache(this); +diskCache->setCacheDirectory("cacheDir"); +manager->setCache(diskCache); +//! [0] + +//! [1] +// do a normal request (preferred from network, as this is the default) +QNetworkRequest request(QUrl(QString("http://www.qtsoftware.com"))); +manager->get(request); + +// do a request preferred from cache +QNetworkRequest request2(QUrl(QString("http://www.qtsoftware.com"))); +request2.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferCache); +manager->get(request2); +//! [1] + +//! [2] +void replyFinished(QNetworkReply *reply) { + QVariant fromCache = reply->attribute(QNetworkRequest::SourceIsFromCacheAttribute); + qDebug() << "page from cache?" << fromCache.toBool(); +} +//! [2] |