diff --git a/doc/global/config.qdocconf b/doc/global/config.qdocconf new file mode 100644 index 00000000000..2b3ca1d6ba3 --- /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 00000000000..ec47dc9c7f7 --- /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 00000000000..1560db8d987 --- /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 00000000000..6c26dc7c29a --- /dev/null +++ b/doc/global/html-footer.qdocconf @@ -0,0 +1,30 @@ +#Default HTML footer for QDoc builds. + +HTML.footer = \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + "\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "

\n" \ + " © 2013 Digia Plc and/or its\n" \ + " subsidiaries. Documentation contributions included herein are the copyrights of\n" \ + " their respective owners.

\n" \ + "

\n" \ + " The documentation provided herein is licensed under the terms of the\n" \ + " GNU Free Documentation\n" \ + " License version 1.3 as published by the Free Software Foundation.

\n" \ + "

\n" \ + " Documentation sources may be obtained from \n" \ + " www.qt-project.org.

\n" \ + "

\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. Privacy Policy

\n" \ + "
\n" \ + "
\n" \ + "
\n" \ diff --git a/doc/global/html-header-offline.qdocconf b/doc/global/html-header-offline.qdocconf new file mode 100644 index 00000000000..d84f38fef87 --- /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 = \ + " \n" + +HTML.endheader = \ + "\n" + +HTML.postheader = \ + "\n" \ + "
\n"\ + "
\n" \ + "
\n" \ + "
\n"\ + "
    \n"\ + + + +HTML.postpostheader = \ + "
\n"\ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ diff --git a/doc/global/html-header-online.qdocconf b/doc/global/html-header-online.qdocconf new file mode 100644 index 00000000000..5c21644a392 --- /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 = \ + " \n" + +HTML.endheader = \ + "\n" + +HTML.postheader = \ + "\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + " Qt Home\n" \ + " Bug Tracker\n" \ + " Code Review\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + " \n" \ + " \"Qt\"\n" \ + " \n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "

Qt Documentation Snapshots

\n" \ + "
\n" \ + "
\n" \ + "
    \n" \ + "
  • \n" \ + " Snapshots\n" \ + "
  • \n" \ + "
  • \n" \ + " Released\n" \ + "
  • \n" \ + "
  • \n" \ + " Archives\n" \ + "
  • \n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
    \n" \ + +HTML.postpostheader = \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ diff --git a/doc/global/qt-cpp-ignore.qdocconf b/doc/global/qt-cpp-defines.qdocconf similarity index 88% rename from doc/global/qt-cpp-ignore.qdocconf rename to doc/global/qt-cpp-defines.qdocconf index 1f34f366cb8..b2160ea4acf 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 79b13eee928..00000000000 --- 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 e9b2c6a7a89..cd8315aa9ad 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 = \ - " \n" - -HTML.endheader = \ - "\n" \ - "\n" \ - "
\n"\ - "
\n" \ - "
\n" \ - "
\n" \ - -HTML.footer = \ - "
\n" \ - "
\n" \ - "
\n" \ - "
\n" \ - "

\n" \ - " © 2013 Digia Plc and/or its\n" \ - " subsidiaries. Documentation contributions included herein are the copyrights of\n" \ - " their respective owners.

\n" \ - "
\n" \ - "

\n" \ - " The documentation provided herein is licensed under the terms of the\n" \ - " GNU Free Documentation\n" \ - " License version 1.3 as published by the Free Software Foundation.

\n" \ - "

\n" \ - " Documentation sources may be obtained from \n" \ - " www.qt-project.org.

\n" \ - "
\n" \ - "

\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. Privacy Policy

\n" \ - "
\n" \ diff --git a/doc/global/qt-html-templates-online.qdocconf b/doc/global/qt-html-templates-online.qdocconf index fb04a76000b..88abc3429bf 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 = \ - " \n" - -HTML.endheader = \ - "\n" \ - "\n" \ - "
\n" \ - "
\n" \ - "
\n" \ - "
\n" \ - "
\n" \ - " Qt Home\n" \ - " Bug Tracker\n" \ - " Code Review\n" \ - "
\n" \ - "
\n" \ - "
\n" \ - " \n" \ - " \"Qt\"<\img>\n" \ - " \n" \ - "
\n" \ - "
\n" \ - "
\n" \ - "

Qt Documentation Snapshots

\n" \ - "
\n" \ - "
\n" \ - "
    \n" \ - "
  • \n" \ - " Snapshots\n" \ - "
  • \n" \ - "
  • \n" \ - " Released\n" \ - "
  • \n" \ - "
  • \n" \ - " Archives\n" \ - "
  • \n" \ - "
\n" \ - "
\n" \ - "
\n" \ - "
\n" \ - "
\n" \ - "
\n" \ - "
\n" \ - "
\n" \ - "
\n" \ - "
\n" \ - -HTML.footer = \ - "
\n" \ - "
\n" \ - "
\n" \ - "
\n" \ - " \n" \ diff --git a/doc/global/qt-module-defaults-offline.qdocconf b/doc/global/qt-module-defaults-offline.qdocconf new file mode 100644 index 00000000000..bdca2129607 --- /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 93ecae16fa2..258295b4f9d 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 = "*" - -#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 0365d5a6cd4..8d0665ef412 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 = "*" - -#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 00000000000..f2a83a57406 Binary files /dev/null and b/doc/global/template/images/arrow_bc.png differ diff --git a/doc/global/template/images/logo.png b/doc/global/template/images/logo.png new file mode 100644 index 00000000000..1e7ed4cf213 Binary files /dev/null and b/doc/global/template/images/logo.png differ diff --git a/doc/global/template/style/offline.css b/doc/global/template/style/offline.css index 0e4dd5e9a4c..5a036c7f070 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 fd2b7abed73..09c863feff7 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; +.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; +} + +.navigationbar ul{ margin:0px; -padding-left:10px; -padding-top:12px; -margin-left:-5px; -margin-right:-5px; -} - -.breadcrumb ul{ - margin:0px; - padding:0px; -} - -.breadcrumb ul li{ -list-style-type:none; -padding:0; -margin:0; +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 f23873b8f9f..948f31c01ae 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 845ed35b3cd..4e8103906ef 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(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(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() << "
  • \n" << buildversion << "
  • \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 cdf296e7832..15e97588ee9 100644 --- a/src/tools/qdoc/htmlgenerator.h +++ b/src/tools/qdoc/htmlgenerator.h @@ -127,7 +127,7 @@ private: }; const QPair 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 xmlWriterStack; static int id; QList 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 -