diff options
14 files changed, 185 insertions, 7 deletions
diff --git a/src/printsupport/dialogs/qabstractprintdialog.cpp b/src/printsupport/dialogs/qabstractprintdialog.cpp index 4e3586f646..841a9e688e 100644 --- a/src/printsupport/dialogs/qabstractprintdialog.cpp +++ b/src/printsupport/dialogs/qabstractprintdialog.cpp @@ -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. diff --git a/src/printsupport/doc/images/plastique-printdialog-properties.png b/src/printsupport/doc/images/plastique-printdialog-properties.png Binary files differnew file mode 100644 index 0000000000..38c1ae7038 --- /dev/null +++ b/src/printsupport/doc/images/plastique-printdialog-properties.png diff --git a/src/printsupport/doc/images/plastique-printdialog.png b/src/printsupport/doc/images/plastique-printdialog.png Binary files differnew file mode 100644 index 0000000000..3f8af01790 --- /dev/null +++ b/src/printsupport/doc/images/plastique-printdialog.png diff --git a/src/printsupport/doc/images/printer-rects.png b/src/printsupport/doc/images/printer-rects.png Binary files differnew file mode 100644 index 0000000000..8ebea60da8 --- /dev/null +++ b/src/printsupport/doc/images/printer-rects.png diff --git a/src/printsupport/doc/qtprintsupport.qdocconf b/src/printsupport/doc/qtprintsupport.qdocconf new file mode 100644 index 0000000000..a21639bbc9 --- /dev/null +++ b/src/printsupport/doc/qtprintsupport.qdocconf @@ -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 diff --git a/src/printsupport/doc/snippets/code/doc_src_qtprintsupport.cpp b/src/printsupport/doc/snippets/code/doc_src_qtprintsupport.cpp new file mode 100644 index 0000000000..ca022c4cd5 --- /dev/null +++ b/src/printsupport/doc/snippets/code/doc_src_qtprintsupport.cpp @@ -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] diff --git a/src/printsupport/doc/snippets/code/doc_src_qtprintsupport.pro b/src/printsupport/doc/snippets/code/doc_src_qtprintsupport.pro new file mode 100644 index 0000000000..05cdbf3841 --- /dev/null +++ b/src/printsupport/doc/snippets/code/doc_src_qtprintsupport.pro @@ -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] diff --git a/doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp b/src/printsupport/doc/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp index 41a6e1e622..41a6e1e622 100644 --- a/doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp +++ b/src/printsupport/doc/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp diff --git a/doc/src/snippets/printing-qprinter/errors.cpp b/src/printsupport/doc/snippets/printing-qprinter/errors.cpp index f202d4f6a1..f202d4f6a1 100644 --- a/doc/src/snippets/printing-qprinter/errors.cpp +++ b/src/printsupport/doc/snippets/printing-qprinter/errors.cpp diff --git a/doc/src/snippets/printing-qprinter/object.cpp b/src/printsupport/doc/snippets/printing-qprinter/object.cpp index 4125c9757c..4125c9757c 100644 --- a/doc/src/snippets/printing-qprinter/object.cpp +++ b/src/printsupport/doc/snippets/printing-qprinter/object.cpp diff --git a/doc/src/snippets/widgetprinting.cpp b/src/printsupport/doc/snippets/widgetprinting.cpp index bf0f005ba2..bf0f005ba2 100644 --- a/doc/src/snippets/widgetprinting.cpp +++ b/src/printsupport/doc/snippets/widgetprinting.cpp diff --git a/doc/src/printsupport/printing.qdoc b/src/printsupport/doc/src/printing.qdoc index 5447032a2b..cc79b41704 100644 --- a/doc/src/printsupport/printing.qdoc +++ b/src/printsupport/doc/src/printing.qdoc @@ -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. diff --git a/doc/src/printsupport/qtprintsupport.qdoc b/src/printsupport/doc/src/qtprintsupport.qdoc index 7eea8203aa..d6ba0c88f0 100644 --- a/doc/src/printsupport/qtprintsupport.qdoc +++ b/src/printsupport/doc/src/qtprintsupport.qdoc @@ -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 */ diff --git a/src/printsupport/kernel/qprinter.cpp b/src/printsupport/kernel/qprinter.cpp index 6682550849..fef96d73eb 100644 --- a/src/printsupport/kernel/qprinter.cpp +++ b/src/printsupport/kernel/qprinter.cpp @@ -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() */ |