Doc: Modularize QtPrintSupport documentation.

This change moves the snippets and images to the modularized
directories.

Change-Id: Ib8f8556bcef13593ee40ac1122d765ed307ecb93
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
This commit is contained in:
Casper van Donderen 2012-05-08 11:13:18 +02:00 committed by Marius Storm-Olsen
parent 03d81b0100
commit 1794c3b7a1
14 changed files with 185 additions and 7 deletions

View File

@ -379,7 +379,7 @@ void QAbstractPrintDialogPrivate::setPrinter(QPrinter *newPrinter)
Typically, QPrintDialog objects are constructed with a QPrinter
object, and executed using the exec() function.
\snippet doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp 0
\snippet code/src_gui_dialogs_qabstractprintdialog.cpp 0
If the dialog is accepted by the user, the QPrinter object is
correctly configured for printing.

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -0,0 +1,92 @@
include(../../../doc/global/qt-cpp-ignore.qdocconf)
project = QtPrintSupport
description = Qt Print Support Reference Documentation
url = http://qt-project.org/doc/qt-5.0/qtprintsupport
version = 5.0.0
sourceencoding = UTF-8
outputencoding = UTF-8
naturallanguage = en_US
qhp.projects = QtPrintSupport
qhp.QtPrintSupport.file = qtprintsupport.qhp
qhp.QtPrintSupport.namespace = org.qt-project.qtprintsupport.500
qhp.QtPrintSupport.virtualFolder = qdoc
qhp.QtPrintSupport.indexTitle = Qt Print Support Reference Documentation
qhp.QtPrintSupport.indexRoot =
qhp.QtPrintSupport.filterAttributes = qtprintsupport 5.0.0 qtrefdoc
qhp.QtPrintSupport.customFilters.Qt.name = QtPrintSupport 5.0.0
qhp.QtPrintSupport.customFilters.Qt.filterAttributes = qtprintsupport 5.0.0
qhp.QtPrintSupport.subprojects = classes overviews examples
qhp.QtPrintSupport.subprojects.classes.title = Classes
qhp.QtPrintSupport.subprojects.classes.indexTitle = Qt Print Support's Classes
qhp.QtPrintSupport.subprojects.classes.selectors = class fake:headerfile
qhp.QtPrintSupport.subprojects.classes.sortPages = true
qhp.QtPrintSupport.subprojects.overviews.title = Overviews
qhp.QtPrintSupport.subprojects.overviews.indexTitle = All Overviews and HOWTOs
qhp.QtPrintSupport.subprojects.overviews.selectors = fake:page,group,module
qhp.QtPrintSupport.subprojects.examples.title = Qt Print Support Examples
qhp.QtPrintSupport.subprojects.examples.indexTitle = Qt Print Support Examples
qhp.QtPrintSupport.subprojects.examples.selectors = fake:example
dita.metadata.default.author = Qt Project
dita.metadata.default.permissions = all
dita.metadata.default.publisher = Qt Project
dita.metadata.default.copyryear = 2012
dita.metadata.default.copyrholder = Nokia
dita.metadata.default.audience = programmer
sources.fileextensions = "*.c++ *.cc *.cpp *.cxx *.mm *.qml *.qdoc"
headers.fileextensions = "*.ch *.h *.h++ *.hh *.hpp *.hxx"
examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml *.css"
examples.imageextensions = "*.png"
outputdir = ../../../doc/qtprintsupport
tagfile = ../../../doc/qtprintsupport/qtprintsupport.tags
HTML.generatemacrefs = "true"
HTML.nobreadcrumbs = "true"
HTML.templatedir = .
HTML.stylesheets = ../../../doc/global/style/offline.css
HTML.headerstyles = \
" <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline.css\" />\n"
HTML.endheader = \
"</head>\n" \
defines = Q_QDOC \
QT_.*_SUPPORT \
QT_.*_LIB \
QT_COMPAT \
QT_KEYPAD_NAVIGATION \
QT_NO_EGL \
Q_WS_.* \
Q_OS_.* \
Q_BYTE_ORDER \
QT_DEPRECATED \
QT_DEPRECATED_* \
Q_NO_USING_KEYWORD \
__cplusplus \
Q_COMPILER_INITIALIZER_LISTS
versionsym = QT_VERSION_STR
codeindent = 1
depends += qtcore qtgui qtwidgets
headerdirs += ..
sourcedirs += ..
exampledirs += ../../../examples \
../ \
snippets
imagedirs += images

View File

@ -0,0 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
** 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 Nokia Corporation 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$
**
****************************************************************************/
//! [1]
#include <QtPrintSupport>
//! [1]

View File

@ -0,0 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
** 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 Nokia Corporation 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]
QT += printsupport
#! [0]

View File

@ -74,7 +74,7 @@
a QPrintDialog, allowing the user to specify the printer to use, paper size, and
other printing properties.
\snippet examples/richtext/orderform/mainwindow.cpp 18
\snippet richtext/orderform/mainwindow.cpp 18
It is also possible to set certain default properties by modifying the QPrinter
before it is supplied to the print dialog. For example, applications that
@ -88,7 +88,7 @@
to perform painting operations on it. We can construct and set up a painter in
the following way:
\snippet doc/src/snippets/printing-qprinter/object.cpp 0
\snippet printing-qprinter/object.cpp 0
Since the QPrinter starts with a blank page, we only need to call the
\l{QPrinter::}{newPage()} function after drawing each page, except for the
@ -143,7 +143,7 @@
will have to scale the painter. You may also want to position the widget on the
page. The following code sample shows how this may look.
\snippet doc/src/snippets/widgetprinting.cpp 0
\snippet widgetprinting.cpp 0
This will center the widget on the page and scale it so that it fits the page.

View File

@ -36,11 +36,11 @@
To include the definitions of the module's classes, use the
following directive:
\snippet doc/src/snippets/code/doc_src_qtprintsupport.cpp 1
\snippet code/doc_src_qtprintsupport.cpp 1
To link against the module, add this line to your \l qmake \c
.pro file:
\snippet doc/src/snippets/code/doc_src_qtprintsupport.pro 0
\snippet code/doc_src_qtprintsupport.pro 0
*/

View File

@ -740,7 +740,7 @@ void QPrinter::setPrinterName(const QString &name)
To detect other failures check the output of QPainter::begin() or QPrinter::newPage().
\snippet doc/src/snippets/printing-qprinter/errors.cpp 0
\snippet printing-qprinter/errors.cpp 0
\sa setPrinterName()
*/