diff options
Diffstat (limited to 'src/svg')
-rw-r--r-- | src/svg/doc/qtsvg.qdocconf | 50 | ||||
-rw-r--r-- | src/svg/doc/snippets/src_svg_qgraphicssvgitem.cpp | 51 | ||||
-rw-r--r-- | src/svg/doc/src/qtsvg-index.qdoc | 49 | ||||
-rw-r--r-- | src/svg/doc/src/qtsvg.qdoc | 41 | ||||
-rw-r--r-- | src/svg/qgraphicssvgitem.cpp | 5 | ||||
-rw-r--r-- | src/svg/qsvggenerator.cpp | 9 | ||||
-rw-r--r-- | src/svg/qsvgrenderer.cpp | 3 | ||||
-rw-r--r-- | src/svg/qsvgwidget.cpp | 3 |
8 files changed, 203 insertions, 8 deletions
diff --git a/src/svg/doc/qtsvg.qdocconf b/src/svg/doc/qtsvg.qdocconf new file mode 100644 index 0000000..99903a2 --- /dev/null +++ b/src/svg/doc/qtsvg.qdocconf @@ -0,0 +1,50 @@ +include(../../../doc/global/qt-html-templates-offline.qdocconf) +include(../../../doc/global/qt-module-defaults.qdocconf) + +project = QtSvg +description = Qt Svg Reference Documentation +url = http://qt-project.org/doc/qt-5.0/qtsvg-index.html +version = 5.0.0 + +qhp.projects = QtSvg + +qhp.QtSvg.file = qtsvg.qhp +qhp.QtSvg.namespace = org.qt-project.qtsvg.500 +qhp.QtSvg.virtualFolder = qdoc +qhp.QtSvg.indexTitle = Qt Svg Reference Documentation +qhp.QtSvg.indexRoot = + +qhp.QtSvg.filterAttributes = qtsvg 5.0.0 qtrefdoc +qhp.QtSvg.customFilters.Qt.name = QtSvg 5.0.0 +qhp.QtSvg.customFilters.Qt.filterAttributes = qtsvg 5.0.0 +qhp.QtSvg.subprojects = classes overviews examples +qhp.QtSvg.subprojects.classes.title = Classes +qhp.QtSvg.subprojects.classes.indexTitle = Qt Svg's Classes +qhp.QtSvg.subprojects.classes.selectors = class fake:headerfile +qhp.QtSvg.subprojects.classes.sortPages = true +qhp.QtSvg.subprojects.overviews.title = Overviews +qhp.QtSvg.subprojects.overviews.indexTitle = All Overviews and HOWTOs +qhp.QtSvg.subprojects.overviews.selectors = fake:page,group,module +qhp.QtSvg.subprojects.examples.title = Qt Svg Examples +qhp.QtSvg.subprojects.examples.indexTitle = Qt Svg Examples +qhp.QtSvg.subprojects.examples.selectors = fake:example + +depends += qtcore \ + qtwidgets \ + qtgui + +outputdir = ../../../doc/qtsvg +tagfile = ../../../doc/qtsvg/qtsvg.tags + +headerdirs += .. \ + ../../plugins/svg + +sourcedirs += .. \ + ../../plugins/svg + +exampledirs += ../../../examples/svg \ + snippets/ + + +imagedirs += images + diff --git a/src/svg/doc/snippets/src_svg_qgraphicssvgitem.cpp b/src/svg/doc/snippets/src_svg_qgraphicssvgitem.cpp new file mode 100644 index 0000000..af175cb --- /dev/null +++ b/src/svg/doc/snippets/src_svg_qgraphicssvgitem.cpp @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [0] +QSvgRenderer *renderer = new QSvgRenderer(QLatin1String("SvgCardDeck.svg")); +QGraphicsSvgItem *black = new QGraphicsSvgItem(); +QGraphicsSvgItem *red = new QGraphicsSvgItem(); + +black->setSharedRenderer(renderer); +black->setElementId(QLatin1String("black_joker")); + +red->setSharedRenderer(renderer); +red->setElementId(QLatin1String("red_joker")); +//! [0] diff --git a/src/svg/doc/src/qtsvg-index.qdoc b/src/svg/doc/src/qtsvg-index.qdoc new file mode 100644 index 0000000..10b39be --- /dev/null +++ b/src/svg/doc/src/qtsvg-index.qdoc @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the documentation of the Qt Svg Module. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \title Qt SVG + \page qtsvg-index.html + \brief Qt Svg provides functionality for handling SVG images. + + Scalable Vector Graphics (SVG) is an XML-based language for + describing two-dimensional vector graphics. Qt provides classes + for rendering and displaying SVG drawings in widgets and on other + paint devices. + + \list + \li \l{Qt Svg C++ Classes} + \endlist + + Qt Svg comes with the following examples: + + \list + \li \l{SVG Generator Example} + \li \l{SVG Viewer Example} + \endlist +*/ + diff --git a/src/svg/doc/src/qtsvg.qdoc b/src/svg/doc/src/qtsvg.qdoc new file mode 100644 index 0000000..ffdc15e --- /dev/null +++ b/src/svg/doc/src/qtsvg.qdoc @@ -0,0 +1,41 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the documentation of the Qt Svg Module. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \module QtSvg + \title Qt Svg C++ Classes + \ingroup modules + + \brief The Qt Svg module provides functionality for handling SVG images. + + Scalable Vector Graphics (SVG) is an XML-based language for + describing two-dimensional vector graphics. Qt provides classes + for rendering and displaying SVG drawings in widgets and on other + paint devices. See the class descriptions for further details. + +*/ + diff --git a/src/svg/qgraphicssvgitem.cpp b/src/svg/qgraphicssvgitem.cpp index 4296af7..ec9bb17 100644 --- a/src/svg/qgraphicssvgitem.cpp +++ b/src/svg/qgraphicssvgitem.cpp @@ -100,6 +100,7 @@ public: /*! \class QGraphicsSvgItem + \inmodule QtSvg \ingroup graphicsview-api \brief The QGraphicsSvgItem class is a QGraphicsItem that can be used to render the contents of SVG files. @@ -122,7 +123,7 @@ public: elements. For example the following code renders only jokers from a SVG file containing a whole card deck: - \snippet doc/src/snippets/code/src_svg_qgraphicssvgitem.cpp 0 + \snippet src_svg_qgraphicssvgitem.cpp 0 Size of the item can be set via the \l{QRectF::setSize()} {setSize()} method of the \l{QGraphicsSvgItem::boundingRect()} @@ -133,7 +134,7 @@ public: mode to speedup the display of items. Caching can be disabled by passing QGraphicsItem::NoCache to the QGraphicsItem::setCacheMode() method. - \sa QSvgWidget, {QtSvg Module}, QGraphicsItem, QGraphicsView + \sa QSvgWidget, {Qt Svg C++ Classes}, QGraphicsItem, QGraphicsView */ /*! diff --git a/src/svg/qsvggenerator.cpp b/src/svg/qsvggenerator.cpp index ef35a21..47f760b 100644 --- a/src/svg/qsvggenerator.cpp +++ b/src/svg/qsvggenerator.cpp @@ -508,6 +508,7 @@ public: /*! \class QSvgGenerator \ingroup painting + \inmodule QtSvg \since 4.3 \brief The QSvgGenerator class provides a paint device that is used to create SVG drawings. \reentrant @@ -520,7 +521,7 @@ public: by setting the \l size property, and in some cases where the drawing will be included in another, the \l viewBox property also needs to be set. - \snippet examples/painting/svggenerator/window.cpp configure SVG generator + \snippet svggenerator/window.cpp configure SVG generator Other meta-data can be specified by setting the \a title, \a description and \a resolution properties. @@ -528,9 +529,9 @@ public: As with other QPaintDevice subclasses, a QPainter object is used to paint onto an instance of this class: - \snippet examples/painting/svggenerator/window.cpp begin painting + \snippet svggenerator/window.cpp begin painting \dots - \snippet examples/painting/svggenerator/window.cpp end painting + \snippet svggenerator/window.cpp end painting Painting is performed in the same way as for any other paint device. However, it is necessary to use the QPainter::begin() and \l{QPainter::}{end()} to @@ -539,7 +540,7 @@ public: The \l{SVG Generator Example} shows how the same painting commands can be used for painting a widget and writing an SVG file. - \sa QSvgRenderer, QSvgWidget, {About SVG} + \sa QSvgRenderer, QSvgWidget, {Qt Svg C++ Classes} */ /*! diff --git a/src/svg/qsvgrenderer.cpp b/src/svg/qsvgrenderer.cpp index 5e054dc..68a97bf 100644 --- a/src/svg/qsvgrenderer.cpp +++ b/src/svg/qsvgrenderer.cpp @@ -55,6 +55,7 @@ QT_BEGIN_NAMESPACE /*! \class QSvgRenderer + \inmodule QtSvg \ingroup painting \brief The QSvgRenderer class is used to draw the contents of SVG files onto paint devices. @@ -98,7 +99,7 @@ QT_BEGIN_NAMESPACE Finally, the QSvgRenderer class provides the repaintNeeded() signal which is emitted whenever the rendering of the document needs to be updated. - \sa QSvgWidget, {QtSvg Module}, {SVG Viewer Example}, QPicture + \sa QSvgWidget, {Qt Svg C++ Classes}, {SVG Viewer Example}, QPicture */ class QSvgRendererPrivate : public QObjectPrivate diff --git a/src/svg/qsvgwidget.cpp b/src/svg/qsvgwidget.cpp index 2050339..698d9d6 100644 --- a/src/svg/qsvgwidget.cpp +++ b/src/svg/qsvgwidget.cpp @@ -52,6 +52,7 @@ QT_BEGIN_NAMESPACE /*! \class QSvgWidget + \inmodule QtSvg \ingroup painting \brief The QSvgWidget class provides a widget that is used to display the contents of @@ -76,7 +77,7 @@ QT_BEGIN_NAMESPACE displays. If no data has been loaded, the widget provides the default QWidget size hint. Subclass this class and reimplement sizeHint() if you need to customize this behavior. - \sa QSvgRenderer, {QtSvg Module}, QPicture + \sa QSvgRenderer, {Qt Svg C++ Classes}, QPicture */ class QSvgWidgetPrivate : public QWidgetPrivate |