Doc: Modularize QtPrintSupport documentation.
authorCasper van Donderen <casper.vandonderen@nokia.com>
Tue, 8 May 2012 09:13:18 +0000 (11:13 +0200)
committerMarius Storm-Olsen <marius.storm-olsen@nokia.com>
Wed, 9 May 2012 06:37:10 +0000 (08:37 +0200)
This change moves the snippets and images to the modularized
directories.

Change-Id: Ib8f8556bcef13593ee40ac1122d765ed307ecb93
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
14 files changed:
src/printsupport/dialogs/qabstractprintdialog.cpp
src/printsupport/doc/images/plastique-printdialog-properties.png [new file with mode: 0644]
src/printsupport/doc/images/plastique-printdialog.png [new file with mode: 0644]
src/printsupport/doc/images/printer-rects.png [new file with mode: 0644]
src/printsupport/doc/qtprintsupport.qdocconf [new file with mode: 0644]
src/printsupport/doc/snippets/code/doc_src_qtprintsupport.cpp [new file with mode: 0644]
src/printsupport/doc/snippets/code/doc_src_qtprintsupport.pro [new file with mode: 0644]
src/printsupport/doc/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp [moved from doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp with 100% similarity]
src/printsupport/doc/snippets/printing-qprinter/errors.cpp [moved from doc/src/snippets/printing-qprinter/errors.cpp with 100% similarity]
src/printsupport/doc/snippets/printing-qprinter/object.cpp [moved from doc/src/snippets/printing-qprinter/object.cpp with 100% similarity]
src/printsupport/doc/snippets/widgetprinting.cpp [moved from doc/src/snippets/widgetprinting.cpp with 100% similarity]
src/printsupport/doc/src/printing.qdoc [moved from doc/src/printsupport/printing.qdoc with 97% similarity]
src/printsupport/doc/src/qtprintsupport.qdoc [moved from doc/src/printsupport/qtprintsupport.qdoc with 90% similarity]
src/printsupport/kernel/qprinter.cpp

index 4e3586f..841a9e6 100644 (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.
diff --git a/src/printsupport/doc/images/plastique-printdialog-properties.png b/src/printsupport/doc/images/plastique-printdialog-properties.png
new file mode 100644 (file)
index 0000000..38c1ae7
Binary files /dev/null and b/src/printsupport/doc/images/plastique-printdialog-properties.png differ
diff --git a/src/printsupport/doc/images/plastique-printdialog.png b/src/printsupport/doc/images/plastique-printdialog.png
new file mode 100644 (file)
index 0000000..3f8af01
Binary files /dev/null and b/src/printsupport/doc/images/plastique-printdialog.png differ
diff --git a/src/printsupport/doc/images/printer-rects.png b/src/printsupport/doc/images/printer-rects.png
new file mode 100644 (file)
index 0000000..8ebea60
Binary files /dev/null and b/src/printsupport/doc/images/printer-rects.png differ
diff --git a/src/printsupport/doc/qtprintsupport.qdocconf b/src/printsupport/doc/qtprintsupport.qdocconf
new file mode 100644 (file)
index 0000000..a21639b
--- /dev/null
@@ -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 (file)
index 0000000..ca022c4
--- /dev/null
@@ -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 (file)
index 0000000..05cdbf3
--- /dev/null
@@ -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]
similarity index 97%
rename from doc/src/printsupport/printing.qdoc
rename to src/printsupport/doc/src/printing.qdoc
index 5447032..cc79b41 100644 (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
   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.
 
similarity index 90%
rename from doc/src/printsupport/qtprintsupport.qdoc
rename to src/printsupport/doc/src/qtprintsupport.qdoc
index 7eea820..d6ba0c8 100644 (file)
     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
 */
 
index 6682550..fef96d7 100644 (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()
 */