summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerome Pasion <jerome.pasion@digia.com>2013-02-19 17:54:54 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-25 14:03:24 +0200
commitb11cb96f282fb1037ad31fbafe279c9a8a8dfeda (patch)
treea3fbef8df032458b0d7c745edfd40fbe9478de12
parent7b48954df25930208491a4434127119b1825161d (diff)
Doc: Fixed QDoc's navigation mechanism.
The HTML pages need to display minimal navigation such as a link to the module landing page or Qt 5's index.html. -new variables available in qdocconf files: navigation.landingpage navigation.homepage navigation.cppclassespage navigation.qmltypespage buildversion The navigation variables are for the new navigation bar. The buildversion variable is to insert documentation build information into the pages. Note about compatibility with Qt Creator docs: The HTML template files for Qt Creator is retained to keep Qt Creator compatible with 5.0.x and 5.1.x. Change-Id: Ibb4d7cada19644204457d822b6b77b2aa7b70f8d Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
-rw-r--r--doc/global/config.qdocconf12
-rw-r--r--doc/global/fileextensions.qdocconf12
-rw-r--r--doc/global/html-config.qdocconf29
-rw-r--r--doc/global/html-footer.qdocconf30
-rw-r--r--doc/global/html-header-offline.qdocconf31
-rw-r--r--doc/global/html-header-online.qdocconf64
-rw-r--r--doc/global/qt-cpp-defines.qdocconf (renamed from doc/global/qt-cpp-ignore.qdocconf)20
-rw-r--r--doc/global/qt-defines.qdocconf17
-rw-r--r--doc/global/qt-html-templates-offline.qdocconf45
-rw-r--r--doc/global/qt-html-templates-online.qdocconf82
-rw-r--r--doc/global/qt-module-defaults-offline.qdocconf13
-rw-r--r--doc/global/qt-module-defaults-online.qdocconf40
-rw-r--r--doc/global/qt-module-defaults.qdocconf35
-rw-r--r--doc/global/template/images/arrow_bc.pngbin0 -> 1071 bytes
-rw-r--r--doc/global/template/images/logo.pngbin0 -> 2205 bytes
-rw-r--r--doc/global/template/style/offline.css72
-rw-r--r--doc/global/template/style/online.css91
-rw-r--r--src/tools/qdoc/config.h6
-rw-r--r--src/tools/qdoc/htmlgenerator.cpp162
-rw-r--r--src/tools/qdoc/htmlgenerator.h14
20 files changed, 426 insertions, 349 deletions
diff --git a/doc/global/config.qdocconf b/doc/global/config.qdocconf
new file mode 100644
index 0000000000..2b3ca1d6ba
--- /dev/null
+++ b/doc/global/config.qdocconf
@@ -0,0 +1,12 @@
+#Include this file to inherit configuration related to Qt Project based modules.
+
+dita.metadata.default.author = Qt Project
+dita.metadata.default.permissions = all
+dita.metadata.default.publisher = Qt Project
+dita.metadata.default.copyryear = 2013
+dita.metadata.default.copyrholder = Digia Plc
+dita.metadata.default.audience = programmer
+
+#Set the main Qt index.html
+navigation.homepage = "Qt $QT_VER"
+buildversion = "Qt $QT_VERSION Reference Documentation"
diff --git a/doc/global/fileextensions.qdocconf b/doc/global/fileextensions.qdocconf
new file mode 100644
index 0000000000..ec47dc9c7f
--- /dev/null
+++ b/doc/global/fileextensions.qdocconf
@@ -0,0 +1,12 @@
+naturallanguage = en_US
+outputencoding = UTF-8
+sourceencoding = UTF-8
+
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml *.css"
+examples.imageextensions = "*.png *.jpg *.gif"
+
+headers.fileextensions = "*.ch *.h *.h++ *.hh *.hpp *.hxx"
+sources.fileextensions = "*.c++ *.cc *.cpp *.cxx *.mm *.qml *.qdoc"
+
+#include the external websites
+sourcedirs += externalsites
diff --git a/doc/global/html-config.qdocconf b/doc/global/html-config.qdocconf
new file mode 100644
index 0000000000..1560db8d98
--- /dev/null
+++ b/doc/global/html-config.qdocconf
@@ -0,0 +1,29 @@
+#Additional HTML settings
+
+HTML.nonavigationbar = "false"
+
+HTML.extraimages += template/images/arrow_bc.png \
+ template/images/home.png \
+ template/images/ico_out.png \
+ template/images/ico_note.png \
+ template/images/ico_note_attention.png \
+ template/images/btn_prev.png \
+ template/images/btn_next.png \
+ template/images/bullet_dn.png \
+ template/images/bullet_sq.png \
+ template/images/bgrContent.png \
+ template/images/logo.png
+
+#specify which files in the output directory should be packed into the qch file.
+#these files are assumed to be in each module's output directory."qtquick/images/ico_out.png" for example.
+qhp.extraFiles += images/arrow_bc.png \
+ images/home.png \
+ images/ico_out.png \
+ images/ico_note.png \
+ images/ico_note_attention.png \
+ images/btn_prev.png \
+ images/btn_next.png \
+ images/bullet_dn.png \
+ images/bullet_sq.png \
+ images/bgrContent.png \
+ images/logo.png
diff --git a/doc/global/html-footer.qdocconf b/doc/global/html-footer.qdocconf
new file mode 100644
index 0000000000..6c26dc7c29
--- /dev/null
+++ b/doc/global/html-footer.qdocconf
@@ -0,0 +1,30 @@
+#Default HTML footer for QDoc builds.
+
+HTML.footer = \
+ " </div>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ "</div>\n" \
+ "<div class=\"footer\">\n" \
+ " <div class=\"qt13a-copyright\" id=\"copyright\">\n" \
+ " <div class=\"qt13a-container\">\n" \
+ " <p>\n" \
+ " <acronym title=\"Copyright\">&copy;</acronym> 2013 Digia Plc and/or its\n" \
+ " subsidiaries. Documentation contributions included herein are the copyrights of\n" \
+ " their respective owners.</p>\n" \
+ " <p>\n" \
+ " The documentation provided herein is licensed under the terms of the\n" \
+ " <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU Free Documentation\n" \
+ " License version 1.3</a> as published by the Free Software Foundation.</p>\n" \
+ " <p>\n" \
+ " Documentation sources may be obtained from <a href=\"http://www.qt-project.org\">\n" \
+ " www.qt-project.org</a>.</p>\n" \
+ " <p>\n" \
+ " Digia, Qt and their respective logos are trademarks of Digia Plc \n" \
+ " in Finland and/or other countries worldwide. All other trademarks are property\n" \
+ " of their respective owners. <a title=\"Privacy Policy\"\n" \
+ " href=\"http://en.gitorious.org/privacy_policy/\">Privacy Policy</a></p>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ "</div>\n" \
diff --git a/doc/global/html-header-offline.qdocconf b/doc/global/html-header-offline.qdocconf
new file mode 100644
index 0000000000..d84f38fef8
--- /dev/null
+++ b/doc/global/html-header-offline.qdocconf
@@ -0,0 +1,31 @@
+#Default HTML header for QDoc builds.
+
+#specify the CSS file used by this template
+HTML.stylesheets = template/style/offline.css
+
+#for including files into the qch file
+qhp.extraFiles += style/offline.css
+
+HTML.headerstyles = \
+ " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline.css\" />\n"
+
+HTML.endheader = \
+ "</head>\n"
+
+HTML.postheader = \
+ "<body>\n" \
+ "<div class=\"header\" id=\"qtdocheader\">\n"\
+ " <div class=\"main\">\n" \
+ " <div class=\"main-rounded\">\n" \
+ " <div class=\"navigationbar\">\n"\
+ " <ul>\n"\
+
+
+
+HTML.postpostheader = \
+ " </ul>\n"\
+ " </div>\n" \
+ "</div>\n" \
+ "<div class=\"content\">\n" \
+ "<div class=\"line\">\n" \
+ "<div class=\"content mainContent\">\n" \
diff --git a/doc/global/html-header-online.qdocconf b/doc/global/html-header-online.qdocconf
new file mode 100644
index 0000000000..5c21644a39
--- /dev/null
+++ b/doc/global/html-header-online.qdocconf
@@ -0,0 +1,64 @@
+#HTML Header with Qt Project branding and online links
+
+HTML.stylesheets = template/style/online.css
+
+#for including files into the qch file. Relative to the outputdir of a QDoc build.
+# $QT_INSTALL_DOCS/qtquick/style/online.css for example
+qhp.extraFiles += style/online.css
+
+HTML.headerstyles = \
+ " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/online.css\" />\n"
+
+HTML.endheader = \
+ "</head>\n"
+
+HTML.postheader = \
+ "<body>\n" \
+ "<div class=\"header\" id=\"qtdocheader\"></div>\n" \
+ " <div class=\"nav\" id=\"qt13a-header\">\n" \
+ " <div class=\"qt13a-gradient\">\n" \
+ " <div class=\"qt13a-container qt13a-dynamicREMOVE\" >\n" \
+ " <div id=\"qt13a-register\">\n" \
+ " <a href=\"http://qt-project.org/\">Qt Home</a>\n" \
+ " <a href=\"https://bugreports.qt-project.org/\">Bug Tracker</a>\n" \
+ " <a href=\"https://codereview.qt-project.org/\">Code Review</a>\n" \
+ " </div>\n" \
+ " <div class=\"qt13a-sixCol\">\n" \
+ " <div id=\"qt13a-logo\">\n" \
+ " <a href=\"http://qt-project.org/\" class=\"qt13a-site-logo\">\n" \
+ " <img src=\"images/Qt-logo.png\" alt=\"Qt\"></img>\n" \
+ " </a>\n" \
+ " </div>\n" \
+ " <div id=\"qt13a-title_nav\">\n" \
+ " <div id=\"qt13a-title\">\n" \
+ " <p class=\"qt13a-title\">Qt Documentation Snapshots</p>\n" \
+ " </div>\n" \
+ " <div class=\"qt13a-nav\">\n" \
+ " <ul>\n" \
+ " <li>\n" \
+ " <a href=\"http://doc-snapshot.qt-project.org\">Snapshots</a>\n" \
+ " </li>\n" \
+ " <li>\n" \
+ " <a href=\"http://qt-project.org/doc\">Released</a>\n" \
+ " </li>\n" \
+ " <li>\n" \
+ " <a href=\"http://doc.qt.digia.com\">Archives</a>\n" \
+ " </li>\n" \
+ " </ul>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"main\">\n" \
+ " <div class=\"main-rounded\">\n" \
+ " <div class=\"navigationbar\">\n" \
+ " <ul>\n" \
+
+HTML.postpostheader = \
+ " </ul>\n" \
+ " </div>\n" \
+ "<div class=\"content\">\n" \
+ " <div class=\"line\">\n" \
+ " <div class=\"content mainContent\">\n" \
diff --git a/doc/global/qt-cpp-ignore.qdocconf b/doc/global/qt-cpp-defines.qdocconf
index 1f34f366cb..b2160ea4ac 100644
--- a/doc/global/qt-cpp-ignore.qdocconf
+++ b/doc/global/qt-cpp-defines.qdocconf
@@ -1,3 +1,21 @@
+versionsym = QT_VERSION_STR
+
+defines += Q_QDOC \
+ QT_.*_SUPPORT \
+ QT_.*_LIB \
+ QT_COMPAT \
+ QT_KEYPAD_NAVIGATION \
+ QT_NO_EGL \
+ QT3_SUPPORT \
+ Q_WS_.* \
+ Q_OS_.* \
+ Q_BYTE_ORDER \
+ QT_DEPRECATED \
+ QT_DEPRECATED_* \
+ Q_NO_USING_KEYWORD \
+ __cplusplus \
+ Q_COMPILER_INITIALIZER_LISTS
+
Cpp.ignoretokens += \
PHONON_EXPORT \
Q_AUTOTEST_EXPORT \
@@ -90,7 +108,7 @@ Cpp.ignoretokens += \
QTNFC_END_NAMESPACE \
QWEBKIT_EXPORT
-Cpp.ignoredirectives = \
+Cpp.ignoredirectives += \
__attribute__ \
K_DECLARE_PRIVATE \
PHONON_HEIR \
diff --git a/doc/global/qt-defines.qdocconf b/doc/global/qt-defines.qdocconf
deleted file mode 100644
index 79b13eee92..0000000000
--- a/doc/global/qt-defines.qdocconf
+++ /dev/null
@@ -1,17 +0,0 @@
-versionsym = QT_VERSION_STR
-
-defines += Q_QDOC \
- QT_.*_SUPPORT \
- QT_.*_LIB \
- QT_COMPAT \
- QT_KEYPAD_NAVIGATION \
- QT_NO_EGL \
- QT3_SUPPORT \
- Q_WS_.* \
- Q_OS_.* \
- Q_BYTE_ORDER \
- QT_DEPRECATED \
- QT_DEPRECATED_* \
- Q_NO_USING_KEYWORD \
- __cplusplus \
- Q_COMPILER_INITIALIZER_LISTS
diff --git a/doc/global/qt-html-templates-offline.qdocconf b/doc/global/qt-html-templates-offline.qdocconf
index e9b2c6a7a8..cd8315aa9a 100644
--- a/doc/global/qt-html-templates-offline.qdocconf
+++ b/doc/global/qt-html-templates-offline.qdocconf
@@ -1,4 +1,10 @@
-HTML.nobreadcrumbs = "true"
+#include standard set of HTML header and footer.
+include(html-config.qdocconf)
+include(html-header-offline.qdocconf)
+include(html-footer.qdocconf)
+
+#uncomment if navigation bar is not wanted
+#HTML.nonavigationbar = "true"
HTML.stylesheets = template/style/offline.css
HTML.extraimages += template/images/ico_out.png \
@@ -20,40 +26,3 @@ qhp.extraFiles += style/offline.css \
images/bullet_dn.png \
images/bullet_sq.png \
images/bgrContent.png
-
-
-HTML.headerstyles = \
- " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline.css\" />\n"
-
-HTML.endheader = \
- "</head>\n" \
- "<body>\n" \
- "<div class=\"header\" id=\"qtdocheader\"></div>\n"\
- "<div class=\"content\">\n" \
- "<div class=\"line\">\n" \
- "<div class=\"content mainContent\">\n" \
-
-HTML.footer = \
- "</div>\n" \
- "</div>\n" \
- "</div>\n" \
- "<div class=\"footer\">\n" \
- " <p>\n" \
- " <acronym title=\"Copyright\">&copy;</acronym> 2013 Digia Plc and/or its\n" \
- " subsidiaries. Documentation contributions included herein are the copyrights of\n" \
- " their respective owners.</p>\n" \
- " <br />\n" \
- " <p>\n" \
- " The documentation provided herein is licensed under the terms of the\n" \
- " <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU Free Documentation\n" \
- " License version 1.3</a> as published by the Free Software Foundation.</p>\n" \
- " <p>\n" \
- " Documentation sources may be obtained from <a href=\"http://www.qt-project.org\">\n" \
- " www.qt-project.org</a>.</p>\n" \
- " <br />\n" \
- " <p>\n" \
- " Digia, Qt and their respective logos are trademarks of Digia Plc \n" \
- " in Finland and/or other countries worldwide. All other trademarks are property\n" \
- " of their respective owners. <a title=\"Privacy Policy\"\n" \
- " href=\"http://en.gitorious.org/privacy_policy/\">Privacy Policy</a></p>\n" \
- "</div>\n" \
diff --git a/doc/global/qt-html-templates-online.qdocconf b/doc/global/qt-html-templates-online.qdocconf
index fb04a76000..88abc3429b 100644
--- a/doc/global/qt-html-templates-online.qdocconf
+++ b/doc/global/qt-html-templates-online.qdocconf
@@ -1,4 +1,10 @@
-HTML.nobreadcrumbs = "true"
+#include standard set of HTML header and footer.
+include(html-config.qdocconf)
+include(html-header-online.qdocconf)
+include(html-footer.qdocconf)
+
+#uncomment if navigation bar is not wanted
+#HTML.nonavigationbar = "true"
HTML.stylesheets = template/style/online.css
HTML.extraimages += template/images/ico_out.png \
@@ -15,77 +21,3 @@ HTML.extraimages += template/images/ico_out.png \
template/images/Qt-footer_shadow.png \
template/images/Qt-gradient.png \
template/images/Qt-header-bg.jpg
-
-
-HTML.headerstyles = \
- " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/online.css\" />\n"
-
-HTML.endheader = \
- "</head>\n" \
- "<body>\n" \
- "<div class=\"header\" id=\"qtdocheader\"></div>\n" \
- " <div class=\"nav\" id=\"qt13a-header\">\n" \
- " <div class=\"qt13a-gradient\">\n" \
- " <div class=\"qt13a-container qt13a-dynamicREMOVE\" >\n" \
- " <div id=\"qt13a-register\">\n" \
- " <a href=\"http://qt-project.org/\">Qt Home</a>\n" \
- " <a href=\"https://bugreports.qt-project.org/\">Bug Tracker</a>\n" \
- " <a href=\"https://codereview.qt-project.org/\">Code Review</a>\n" \
- " </div>\n" \
- " <div class=\"qt13a-sixCol\">\n" \
- " <div id=\"qt13a-logo\">\n" \
- " <a href=\"http://qt-project.org/\" class=\"qt13a-site-logo\">\n" \
- " <img src=\"images/Qt-logo.png\" alt=\"Qt\"><\img>\n" \
- " </a>\n" \
- " </div>\n" \
- " <div id=\"qt13a-title_nav\">\n" \
- " <div id=\"qt13a-title\">\n" \
- " <p class=\"qt13a-title\">Qt Documentation Snapshots</p>\n" \
- " </div>\n" \
- " <div class=\"qt13a-nav\">\n" \
- " <ul>\n" \
- " <li>\n" \
- " <a href=\"http://doc-snapshot.qt-project.org\">Snapshots</a>\n" \
- " </li>\n" \
- " <li>\n" \
- " <a href=\"http://qt-project.org/doc\">Released</a>\n" \
- " </li>\n" \
- " <li>\n" \
- " <a href=\"http://doc.qt.digia.com\">Archives</a>\n" \
- " </li>\n" \
- " </ul>\n" \
- " </div>\n" \
- " </div>\n" \
- " </div>\n" \
- " </div>\n" \
- " </div>\n" \
- " </div>\n" \
- "<div class=\"content\">\n" \
- " <div class=\"line\">\n" \
- " <div class=\"content mainContent\">\n" \
-
-HTML.footer = \
- " </div>\n" \
- " </div>\n" \
- "</div>\n" \
- "<div class=\"footer\">\n" \
- " <div class="qt13a-copyright" id="copyright">\n" \
- " <div class=\"qt13a-container\">\n" \
- " <p>\n" \
- " <acronym title=\"Copyright\">&copy;</acronym> 2013 Digia Plc and/or its\n" \
- " subsidiaries. Documentation contributions included herein are the copyrights of\n" \
- " their respective owners.</p>\n" \
- " <p>\n" \
- " The documentation provided herein is licensed under the terms of the\n" \
- " <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU Free Documentation\n" \
- " License version 1.3</a> as published by the Free Software Foundation.</p>\n" \
- " <p>\n" \
- " Documentation sources may be obtained from <a href=\"http://www.qt-project.org\">\n" \
- " www.qt-project.org</a>.</p>\n" \
- " <p>\n" \
- " Digia, Qt and their respective logos are trademarks of Digia Plc \n" \
- " in Finland and/or other countries worldwide. All other trademarks are property\n" \
- " of their respective owners. <a title=\"Privacy Policy\"\n" \
- " href=\"http://en.gitorious.org/privacy_policy/\">Privacy Policy</a></p>\n" \
- " </div>\n" \
- "</div>\n" \
diff --git a/doc/global/qt-module-defaults-offline.qdocconf b/doc/global/qt-module-defaults-offline.qdocconf
new file mode 100644
index 0000000000..bdca212960
--- /dev/null
+++ b/doc/global/qt-module-defaults-offline.qdocconf
@@ -0,0 +1,13 @@
+#The default configuration for a Qt 5 module, including Add-Ons and Tools.
+#Include this file for a standard Qt 5 module; builds with the offline style.
+
+#include standard set of macros and C++ defines and ignores
+include(macros.qdocconf)
+include(qt-cpp-defines.qdocconf)
+include(compat.qdocconf)
+include(manifest-meta.qdocconf)
+include(fileextensions.qdocconf)
+include(qt-html-templates-offline.qdocconf)
+
+#extra configuration data such as file extensions
+include(config.qdocconf)
diff --git a/doc/global/qt-module-defaults-online.qdocconf b/doc/global/qt-module-defaults-online.qdocconf
index 93ecae16fa..258295b4f9 100644
--- a/doc/global/qt-module-defaults-online.qdocconf
+++ b/doc/global/qt-module-defaults-online.qdocconf
@@ -1,32 +1,14 @@
+#The online onfiguration for a Qt 5 module, including Add-Ons and Tools.
+#Online version contains a different header.
+#Include this file for a standard Qt 5 module; builds with the online style.
+
+#include standard set of macros and C++ defines and ignores
include(macros.qdocconf)
-include(qt-cpp-ignore.qdocconf)
-include(qt-defines.qdocconf)
-include(qt-html-templates-online.qdocconf)
+include(qt-cpp-defines.qdocconf)
include(compat.qdocconf)
+include(manifest-meta.qdocconf)
+include(fileextensions.qdocconf)
+include(qt-html-templates-online.qdocconf)
-dita.metadata.default.author = Qt Project
-dita.metadata.default.permissions = all
-dita.metadata.default.publisher = Qt Project
-dita.metadata.default.copyryear = 2013
-dita.metadata.default.copyrholder = Digia Plc
-dita.metadata.default.audience = programmer
-
-naturallanguage = en_US
-outputencoding = UTF-8
-sourceencoding = UTF-8
-
-examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml *.css"
-examples.imageextensions = "*.png *.jpg *.gif"
-
-headers.fileextensions = "*.ch *.h *.h++ *.hh *.hpp *.hxx"
-sources.fileextensions = "*.c++ *.cc *.cpp *.cxx *.mm *.qml *.qdoc"
-
-versionsym = QT_VERSION_STR
-
-macro.raisedaster.HTML = "<sup>*</sup>"
-
-#for including files into the qch file
-qhp.extraFiles += template/style/online.css
-
-#include the external websites
-sourcedirs += externalsites
+#extra configuration data DITA information
+include(config.qdocconf)
diff --git a/doc/global/qt-module-defaults.qdocconf b/doc/global/qt-module-defaults.qdocconf
index 0365d5a6cd..8d0665ef41 100644
--- a/doc/global/qt-module-defaults.qdocconf
+++ b/doc/global/qt-module-defaults.qdocconf
@@ -1,30 +1,7 @@
-include(macros.qdocconf)
-include(qt-cpp-ignore.qdocconf)
-include(qt-defines.qdocconf)
-include(qt-html-templates-offline.qdocconf)
-include(compat.qdocconf)
-include(manifest-meta.qdocconf)
+#The default configuration for a Qt 5 module, including Add-Ons and Tools.
+#Include this file for a standard Qt 5 module. This file is provided for
+#compatibility reasons.
-dita.metadata.default.author = Qt Project
-dita.metadata.default.permissions = all
-dita.metadata.default.publisher = Qt Project
-dita.metadata.default.copyryear = 2013
-dita.metadata.default.copyrholder = Digia Plc
-dita.metadata.default.audience = programmer
-
-naturallanguage = en_US
-outputencoding = UTF-8
-sourceencoding = UTF-8
-
-examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml *.css"
-examples.imageextensions = "*.png *.jpg *.gif"
-
-headers.fileextensions = "*.ch *.h *.h++ *.hh *.hpp *.hxx"
-sources.fileextensions = "*.c++ *.cc *.cpp *.cxx *.mm *.qml *.qdoc"
-
-versionsym = QT_VERSION_STR
-
-macro.raisedaster.HTML = "<sup>*</sup>"
-
-#include the external websites
-sourcedirs += externalsites
+#The default is the offline style. The alternate style is in
+#qt-module-defaults-online.qdocconf
+include(qt-module-defaults-offline.qdocconf)
diff --git a/doc/global/template/images/arrow_bc.png b/doc/global/template/images/arrow_bc.png
new file mode 100644
index 0000000000..f2a83a5740
--- /dev/null
+++ b/doc/global/template/images/arrow_bc.png
Binary files differ
diff --git a/doc/global/template/images/logo.png b/doc/global/template/images/logo.png
new file mode 100644
index 0000000000..1e7ed4cf21
--- /dev/null
+++ b/doc/global/template/images/logo.png
Binary files differ
diff --git a/doc/global/template/style/offline.css b/doc/global/template/style/offline.css
index 0e4dd5e9a4..5a036c7f07 100644
--- a/doc/global/template/style/offline.css
+++ b/doc/global/template/style/offline.css
@@ -181,6 +181,74 @@ footer and license
text-align:center
}
+.navigationbar{
+display: block;
+position: relative;
+top:-20px;
+/*border-top:2px solid #ffffff;*/
+border-bottom: 1px solid #cecece;
+background-color:#F2F2F2;
+z-index:1;
+height:20px;
+padding-left:7px;
+margin:0px;
+padding-top:2px;
+margin-left:-5px;
+margin-right:-5px;
+}
+
+.navigationbar ul{
+ margin:0px;
+ padding:0px;
+}
+
+.navigationbar ul li{
+list-style-type:none;
+padding-top:2px;
+padding-left: 4px;
+margin:0;
+height:20px;
+}
+
+.navigationbar li{
+float:left;
+}
+
+.navigationbar .first {
+background:url(../images/home.png);
+background-position:left;
+background-repeat:no-repeat;
+padding-left:20px;
+}
+
+
+.navigationbar li a{
+display:block;
+text-decoration:none;
+background:url(../images/arrow_bc.png);
+background-repeat:no-repeat;
+background-position:right;
+padding-right:17px;
+}
+
+
+/*
+-----------
+footer and license
+-----------
+*/
+.footer{
+text-align:center
+}
+
+#buildversion{
+font-style: italic;
+font-size: small;
+float: right;
+margin-right: 5px;
+}
+/*
+
/* table of content
no display
*/
@@ -441,7 +509,7 @@ padding: 3px 15px 3px 0;
.qml{
display: block;
-margin: 10;
+margin: 10px;
overflow: auto;
padding: 20px 20px 20px 20px;
}
@@ -493,7 +561,7 @@ vertical-align:top;
-moz-border-radius: 7px 7px 7px 7px;
-webkit-border-radius: 7px 7px 7px 7px;
border-radius: 7px 7px 7px 7px;
- background:#FFF url(../images/bgrContent.png);
+ background:#FFF url('../images/bgrContent.png');
background-position:top;
background-repeat:repeat-x;
border: 1px solid #E6E6E6;
diff --git a/doc/global/template/style/online.css b/doc/global/template/style/online.css
index fd2b7abed7..09c863feff 100644
--- a/doc/global/template/style/online.css
+++ b/doc/global/template/style/online.css
@@ -12,7 +12,7 @@ height: auto
}
.content{
- margin: 30px;
+ margin: 15px;
}
.descr{
@@ -137,64 +137,46 @@ height:20px;
margin-left:30px;
}
-.breadcrumb{
-display: block;
-position: relative;
-z-index:1;
-height:20px;
-padding:0px;
-margin:0px;
-padding-left:10px;
-padding-top:12px;
-margin-left:-5px;
-margin-right:-5px;
-}
-
-.breadcrumb ul{
- margin:0px;
- padding:0px;
+.navigationbar {
+ background-repeat: no-repeat;
+ height: 33px;
+ margin: 0px !important;
+ padding: 0px !important;
+ border-bottom: 1px solid rgb(209, 209, 209);
+ background-image: -moz-linear-gradient(center top , rgb(246, 245, 245), rgb(239, 239, 239));
+background-image: -webkit-gradient( linear, left bottom, left top, color-stop(0.0, #efefef), color-stop(0.5, #f6f5f5) );
+ border-radius: 10px 10px 0px 0px;
}
-.breadcrumb ul li{
-list-style-type:none;
-padding:0;
-margin:0;
+.navigationbar ul{
+margin:0px;
+padding:8px 0px 15px 15px;
height:20px;
}
-.breadcrumb li{
+.navigationbar li{
+list-style-type:none;
float:left;
+font-size: 15px;
}
-.breadcrumb .first {
-background:url('../images/home.png');
-background-position:left;
-background-repeat:no-repeat;
-padding-left:20px;
-}
-
-
-.breadcrumb li a{
+.navigationbar li a{
display:block;
text-decoration:none;
-background:url('../images/arrow.png');
+background:url('../images/arrow_bc.png');
background-repeat:no-repeat;
background-position:right;
padding-right:25px;
-padding-left:10px;
+font-size: inherit;
}
-.breadcrumb li a:hover{
-color:#909090;
-display:block;
-text-decoration:none;
-background:url('../images/arrow.png');
-background-repeat:no-repeat;
-background-position:right;
-padding-right:20px;
-padding-left:10px;
-}
+#buildversion{
+font-style: italic;
+font-size: small;
+float: right;
+margin-right: 5px;
+}
/*
-----------
@@ -844,7 +826,7 @@ p.forum-overview-title,
p.forum-description,
p.desc,
p.forum-lastpost,
-div.breadcrumbs li,
+div.navigationbars li,
div.block-profile div
{
font-size: 13px;
@@ -866,14 +848,6 @@ div.notes p
font-size: 12px !important;
}
-.line {
- display: inline-block;
- background: none repeat scroll 0% 0% rgb(255,255,255);
- width: 100%;
- border: 1px solid #DADADA;
- border-radius: 10px 10px 10px 10px;
- box-shadow: 0 0 3px #C4C4C4;
-}
a {
color: #44a51c;
text-decoration: none;
@@ -881,3 +855,16 @@ text-decoration: none;
.wrap{
padding-left: 30px
}
+
+.main {
+ padding: 0px 30px 30px 30px;
+}
+.main-rounded {
+ display: inline-block;
+ background: none repeat scroll 0% 0% rgb(255,255,255);
+ width: 100%;
+ border: 1px solid #DADADA;
+ border-radius: 10px 10px 10px 10px;
+ box-shadow: 0 0 3px #C4C4C4;
+ padding-bottom: 30px;
+}
diff --git a/src/tools/qdoc/config.h b/src/tools/qdoc/config.h
index f23873b8f9..948f31c01a 100644
--- a/src/tools/qdoc/config.h
+++ b/src/tools/qdoc/config.h
@@ -165,7 +165,9 @@ private:
#define CONFIG_ALIAS "alias"
#define CONFIG_BASE "base"
#define CONFIG_BASEDIR "basedir"
+#define CONFIG_BUILDVERSION "buildversion"
#define CONFIG_CODEINDENT "codeindent"
+#define CONFIG_CPPCLASSESPAGE "cppclassespage"
#define CONFIG_DEFINES "defines"
#define CONFIG_DEPENDS "depends"
#define CONFIG_DESCRIPTION "description"
@@ -184,15 +186,18 @@ private:
#define CONFIG_HEADERS "headers"
#define CONFIG_HEADERSCRIPTS "headerscripts"
#define CONFIG_HEADERSTYLES "headerstyles"
+#define CONFIG_HOMEPAGE "homepage"
#define CONFIG_IGNOREDIRECTIVES "ignoredirectives"
#define CONFIG_IGNORETOKENS "ignoretokens"
#define CONFIG_IMAGEDIRS "imagedirs"
#define CONFIG_IMAGES "images"
#define CONFIG_INDEXES "indexes"
#define CONFIG_LANGUAGE "language"
+#define CONFIG_LANDINGPAGE "landingpage"
#define CONFIG_MACRO "macro"
#define CONFIG_MANIFESTMETA "manifestmeta"
#define CONFIG_NATURALLANGUAGE "naturallanguage"
+#define CONFIG_NAVIGATION "navigation"
#define CONFIG_NOLINKERRORS "nolinkerrors"
#define CONFIG_OBSOLETELINKS "obsoletelinks"
#define CONFIG_OUTPUTDIR "outputdir"
@@ -203,6 +208,7 @@ private:
#define CONFIG_PROJECT "project"
#define CONFIG_REDIRECTDOCUMENTATIONTODEVNULL "redirectdocumentationtodevnull"
#define CONFIG_QHP "qhp"
+#define CONFIG_QMLTYPESPAGE "qmltypespage"
#define CONFIG_QUOTINGINFORMATION "quotinginformation"
#define CONFIG_SCRIPTDIRS "scriptdirs"
#define CONFIG_SCRIPTS "scripts"
diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp
index 845ed35b3c..4e8103906e 100644
--- a/src/tools/qdoc/htmlgenerator.cpp
+++ b/src/tools/qdoc/htmlgenerator.cpp
@@ -166,9 +166,9 @@ void HtmlGenerator::initializeGenerator(const Config &config)
pleaseGenerateMacRef = config.getBool(HtmlGenerator::format() +
Config::dot +
HTMLGENERATOR_GENERATEMACREFS);
- noBreadCrumbs = config.getBool(HtmlGenerator::format() +
+ noNavigationBar = config.getBool(HtmlGenerator::format() +
Config::dot +
- HTMLGENERATOR_NOBREADCRUMBS);
+ HTMLGENERATOR_NONAVIGATIONBAR);
project = config.getString(CONFIG_PROJECT);
@@ -229,6 +229,25 @@ void HtmlGenerator::initializeGenerator(const Config &config)
examplesPath = config.getString(CONFIG_EXAMPLESINSTALLPATH);
if (!examplesPath.isEmpty())
examplesPath += QLatin1Char('/');
+
+ //retrieve the config for the navigation bar
+ homepage = config.getString(CONFIG_NAVIGATION
+ + Config::dot
+ + CONFIG_HOMEPAGE);
+
+ landingpage = config.getString(CONFIG_NAVIGATION
+ + Config::dot
+ + CONFIG_LANDINGPAGE);
+
+ cppclassespage = config.getString(CONFIG_NAVIGATION
+ + Config::dot
+ + CONFIG_CPPCLASSESPAGE);
+
+ qmltypespage = config.getString(CONFIG_NAVIGATION
+ + Config::dot
+ + CONFIG_QMLTYPESPAGE);
+
+ buildversion = config.getString(CONFIG_BUILDVERSION);
}
/*!
@@ -1616,129 +1635,67 @@ QString HtmlGenerator::fileExtension() const
}
/*!
- Output breadcrumb list in the html file.
+ Output navigation list in the html file.
*/
-void HtmlGenerator::generateBreadCrumbs(const QString &title,
+void HtmlGenerator::generateNavigationBar(const QString &title,
const Node *node,
CodeMarker *marker)
{
- if (noBreadCrumbs)
+ if (noNavigationBar)
return;
- Text breadcrumbs;
+ Text navigationbar;
+
+ if (homepage == title)
+ return;
+ if (!homepage.isEmpty())
+ navigationbar << Atom(Atom::ListItemLeft)
+ << Atom(Atom::AutoLink, homepage)
+ << Atom(Atom::ListItemRight);
+ if (!landingpage.isEmpty() && landingpage != title)
+ navigationbar << Atom(Atom::ListItemLeft)
+ << Atom(Atom::AutoLink, landingpage)
+ << Atom(Atom::ListItemRight);
+
if (node->type() == Node::Class) {
const ClassNode *cn = static_cast<const ClassNode *>(node);
QString name = node->moduleName();
- breadcrumbs << Atom(Atom::ListItemLeft)
- << Atom(Atom::Link, QLatin1String("All Modules"))
- << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK)
- << Atom(Atom::String, QLatin1String("Modules"))
- << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK)
- << Atom(Atom::ListItemRight);
- if (!name.isEmpty())
- breadcrumbs << Atom(Atom::ListItemLeft)
- << Atom(Atom::AutoLink, name)
+
+ if (!cppclassespage.isEmpty())
+ navigationbar << Atom(Atom::ListItemLeft)
+ << Atom(Atom::Link, cppclassespage)
+ << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK)
+ << Atom(Atom::String, QLatin1String("C++ Classes"))
+ << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK)
<< Atom(Atom::ListItemRight);
+
if (!cn->name().isEmpty())
- breadcrumbs << Atom(Atom::ListItemLeft)
+ navigationbar << Atom(Atom::ListItemLeft)
<< Atom(Atom::String, protectEnc(cn->name()))
<< Atom(Atom::ListItemRight);
}
else if (node->type() == Node::Document) {
- const DocNode* fn = static_cast<const DocNode*>(node);
- if (node->subType() == Node::Module) {
- breadcrumbs << Atom(Atom::ListItemLeft)
- << Atom(Atom::Link, QLatin1String("All Modules"))
+ if (node->subType() == Node::QmlClass || node->subType() == Node::QmlBasicType) {
+ if (!qmltypespage.isEmpty())
+ navigationbar << Atom(Atom::ListItemLeft)
+ << Atom(Atom::Link, qmltypespage)
<< Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK)
- << Atom(Atom::String, QLatin1String("Modules"))
+ << Atom(Atom::String, QLatin1String("QML Types"))
<< Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK)
<< Atom(Atom::ListItemRight);
- QString name = node->name();
- if (!name.isEmpty())
- breadcrumbs << Atom(Atom::ListItemLeft)
- << Atom(Atom::String, protectEnc(name))
- << Atom(Atom::ListItemRight);
- }
- else if (node->subType() == Node::Group) {
- if (fn->name() == QString("modules"))
- breadcrumbs << Atom(Atom::String, QLatin1String("Modules"));
- else
- breadcrumbs << Atom(Atom::ListItemLeft)
- << Atom(Atom::String, protectEnc(title))
- << Atom(Atom::ListItemRight);
- }
- else if (node->subType() == Node::Page) {
- if (fn->name() == QString("qdeclarativeexamples.html")) {
- breadcrumbs << Atom(Atom::ListItemLeft)
- << Atom(Atom::Link, QLatin1String("Qt Examples"))
- << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK)
- << Atom(Atom::String, QLatin1String("Examples"))
- << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK)
- << Atom(Atom::ListItemRight);
- breadcrumbs << Atom(Atom::ListItemLeft)
- << Atom(Atom::AutoLink, QLatin1String("QML Examples & Demos"))
- << Atom(Atom::ListItemRight);
- }
- else if (fn->name().startsWith("examples-")) {
- breadcrumbs << Atom(Atom::ListItemLeft)
- << Atom(Atom::Link, QLatin1String("Qt Examples"))
- << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK)
- << Atom(Atom::String, QLatin1String("Examples"))
- << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK)
- << Atom(Atom::ListItemRight);
- breadcrumbs << Atom(Atom::ListItemLeft)
- << Atom(Atom::String, protectEnc(title))
- << Atom(Atom::ListItemRight);
- }
- else if (fn->name() == QString("namespaces.html"))
- breadcrumbs << Atom(Atom::String, QLatin1String("Namespaces"));
- else
- breadcrumbs << Atom(Atom::ListItemLeft)
- << Atom(Atom::String, protectEnc(title))
- << Atom(Atom::ListItemRight);
- }
- else if (node->subType() == Node::QmlClass) {
- breadcrumbs << Atom(Atom::ListItemLeft)
- << Atom(Atom::AutoLink, QLatin1String("Basic QML Types"))
- << Atom(Atom::ListItemRight);
- breadcrumbs << Atom(Atom::ListItemLeft)
+
+ navigationbar << Atom(Atom::ListItemLeft)
<< Atom(Atom::String, protectEnc(title))
<< Atom(Atom::ListItemRight);
}
- else if (node->subType() == Node::Example) {
- breadcrumbs << Atom(Atom::ListItemLeft)
- << Atom(Atom::Link, QLatin1String("Qt Examples"))
- << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK)
- << Atom(Atom::String, QLatin1String("Examples"))
- << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK)
- << Atom(Atom::ListItemRight);
- QStringList sl = fn->name().split('/');
- if (sl.contains("declarative"))
- breadcrumbs << Atom(Atom::ListItemLeft)
- << Atom(Atom::AutoLink, QLatin1String("QML Examples & Demos"))
- << Atom(Atom::ListItemRight);
- else {
- QString name = protectEnc("examples-" + sl.at(0) + ".html"); // this generates an empty link
- QString t = CodeParser::titleFromName(name);
- }
- breadcrumbs << Atom(Atom::ListItemLeft)
- << Atom(Atom::String, protectEnc(title))
- << Atom(Atom::ListItemRight);
+ else {
+ navigationbar << Atom(Atom::ListItemLeft)
+ << Atom(Atom::String, protectEnc(title))
+ << Atom(Atom::ListItemRight);
}
}
- else if (node->type() == Node::Namespace) {
- breadcrumbs << Atom(Atom::ListItemLeft)
- << Atom(Atom::Link, QLatin1String("All Namespaces"))
- << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK)
- << Atom(Atom::String, QLatin1String("Namespaces"))
- << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK)
- << Atom(Atom::ListItemRight);
- breadcrumbs << Atom(Atom::ListItemLeft)
- << Atom(Atom::String, protectEnc(title))
- << Atom(Atom::ListItemRight);
- }
- generateText(breadcrumbs, node, marker);
+ generateText(navigationbar, node, marker);
}
void HtmlGenerator::generateHeader(const QString& title,
@@ -1782,7 +1739,8 @@ void HtmlGenerator::generateHeader(const QString& title,
#endif
out() << QString(postHeader).replace("\\" + COMMAND_VERSION, qdb_->version());
- generateBreadCrumbs(title,node,marker);
+ generateNavigationBar(title,node,marker);
+ out() << "<li id=\"buildversion\">\n" << buildversion << "</li>\n";
out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, qdb_->version());
navigationLinks.clear();
diff --git a/src/tools/qdoc/htmlgenerator.h b/src/tools/qdoc/htmlgenerator.h
index cdf296e783..15e97588ee 100644
--- a/src/tools/qdoc/htmlgenerator.h
+++ b/src/tools/qdoc/htmlgenerator.h
@@ -127,7 +127,7 @@ private:
};
const QPair<QString,QString> anchorForNode(const Node *node);
- void generateBreadCrumbs(const QString& title,
+ void generateNavigationBar(const QString& title,
const Node *node,
CodeMarker *marker);
void generateHeader(const QString& title,
@@ -239,7 +239,7 @@ private:
QString footer;
QString address;
bool pleaseGenerateMacRef;
- bool noBreadCrumbs;
+ bool noNavigationBar;
QString project;
QString projectDescription;
QString projectUrl;
@@ -252,6 +252,12 @@ private:
QStack<QXmlStreamWriter*> xmlWriterStack;
static int id;
QList<ManifestMetaFilter> manifestMetaContent;
+ QString homepage;
+ QString landingpage;
+ QString cppclassespage;
+ QString qmltypespage;
+ QString buildversion;
+
public:
static bool debugging_on;
static QString divNavTop;
@@ -262,9 +268,9 @@ public:
#define HTMLGENERATOR_GENERATEMACREFS "generatemacrefs" // ### document me
#define HTMLGENERATOR_POSTHEADER "postheader"
#define HTMLGENERATOR_POSTPOSTHEADER "postpostheader"
-#define HTMLGENERATOR_NOBREADCRUMBS "nobreadcrumbs"
+#define HTMLGENERATOR_NONAVIGATIONBAR "nonavigationbar"
+
QT_END_NAMESPACE
#endif
-