From b11cb96f282fb1037ad31fbafe279c9a8a8dfeda Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Tue, 19 Feb 2013 17:54:54 +0100 Subject: [PATCH] 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 Reviewed-by: Oswald Buddenhagen --- doc/global/config.qdocconf | 12 ++ doc/global/fileextensions.qdocconf | 12 ++ doc/global/html-config.qdocconf | 29 ++++ doc/global/html-footer.qdocconf | 30 ++++ doc/global/html-header-offline.qdocconf | 31 ++++ doc/global/html-header-online.qdocconf | 64 +++++++ ...gnore.qdocconf => qt-cpp-defines.qdocconf} | 20 ++- doc/global/qt-defines.qdocconf | 17 -- doc/global/qt-html-templates-offline.qdocconf | 45 +---- doc/global/qt-html-templates-online.qdocconf | 82 +-------- .../qt-module-defaults-offline.qdocconf | 13 ++ doc/global/qt-module-defaults-online.qdocconf | 40 ++--- doc/global/qt-module-defaults.qdocconf | 35 +--- doc/global/template/images/arrow_bc.png | Bin 0 -> 1071 bytes doc/global/template/images/logo.png | Bin 0 -> 2205 bytes doc/global/template/style/offline.css | 72 +++++++- doc/global/template/style/online.css | 93 +++++----- src/tools/qdoc/config.h | 6 + src/tools/qdoc/htmlgenerator.cpp | 162 +++++++----------- src/tools/qdoc/htmlgenerator.h | 14 +- 20 files changed, 427 insertions(+), 350 deletions(-) create mode 100644 doc/global/config.qdocconf create mode 100644 doc/global/fileextensions.qdocconf create mode 100644 doc/global/html-config.qdocconf create mode 100644 doc/global/html-footer.qdocconf create mode 100644 doc/global/html-header-offline.qdocconf create mode 100644 doc/global/html-header-online.qdocconf rename doc/global/{qt-cpp-ignore.qdocconf => qt-cpp-defines.qdocconf} (88%) delete mode 100644 doc/global/qt-defines.qdocconf create mode 100644 doc/global/qt-module-defaults-offline.qdocconf create mode 100644 doc/global/template/images/arrow_bc.png create mode 100644 doc/global/template/images/logo.png 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 0000000000000000000000000000000000000000..f2a83a5740683d31d9aab1e7da51c875d8b122fe GIT binary patch literal 1071 zcmaJ=O-K|`93K_LL__OPR_1FADsbmx-Bo9D)pd8x6-SnJE1`?CGtb>YXWlgPbjLl! zni2Ft2a)I$NYJUe1VKfF<|R9H5i-4mbjm|Yhc1G>QFraoHt^=X_vion{l9+iPHf;( zb>)dlilVBcz2P|7o5(s|QBM9-sNoIS>TqNT526vAku69CRg{Dvs>>-Dhq5|({UdCr zsIs$KVh9gO{i1?&Ms|G|M>h$YqS`whQ&vVH21%IGi~#-f?Ry$%YJk4#mpI7`!L-(! zwcucOAfaSO6+xvtJ3zZ55&|7!894fwVT(?H-sKg^*)_8?*mc390eUZ~At?qz$b!Jn za2|zg;X#X!;eDLo6PkdR<2jc1vRtc&=R|+2$njwRqe(PN9TDT>!GV#tCr zMpgo$v3wU}X@rrTMkWXi`WYTbvZ5KTWfvhyV$`s)Y$z}q4$y>y(KJ;Q{5GvyNE&!%{{pIx6 z`LS5GvF2FG*1P$~w}qTjTXXK{#>&)$d9fx{wsmdB`jIZX;YL3_zPV{}UAYnpHPjvX Sb;h{sKH+F&ApD|x_~sv>GF^E9 literal 0 HcmV?d00001 diff --git a/doc/global/template/images/logo.png b/doc/global/template/images/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..1e7ed4cf21300f6695a894db7a6c2376dd65c288 GIT binary patch literal 2205 zcmb_d`9IT-A780f%21!m(VXST2e~C@4J}t;jyZ}f=h$qHCRh6;zE-}5=Dsz(8OgQL zNHq0rL^Zz$MgBiGv%hewTQ5kFbD(^fnSF??sLul zSsxYJ#}_%IXZy5x)7IIN&~bHdZx4L;{OgJ0yngK1YTv_m_Ll$h*cNP7e@p3^r>A~E zu59z>Hb)w`S><12-_2BWmbyB=z0c^m=LK9DTk9j%k^KrIEyy~|i4thUMO>@-#L~>^ zFqQK$f1gEb`_&q+ZLQ;}|6C?%^-m2r6dGtJX_mgD=_lAh0+m7%# z0WRg2$t^|kjG&@U%A3!uxlOKGg1S5fwh~deENlF0d$N{pPoxg84zYDwKSDzEJTEJZWvls7gmQe0Dv;j+rs&+n%(8&1f zyx9@?;(j>*0NPEBe{Hn4pHyQ8pMSljO6OnIE(7^bKoC$$Jsp{pF%&Y+IxP;{CA;Nr|qR#{oQfH`e? zNmJI9a>L6z8qM}WJZc`qjM&uYH`+w^BL#c2rdnzG4fWdvS_lNw!z#&eXzJS;rk~NX@L#dyOCr4G6-B7;*+4J>usB0M4TE_j@q{QSdSw0ED-8 zgmCTWxgjmOAUPEJ_zT~bF_vH5b?E6V;PP}M$ zd(8p5)0actXI?M&_3~lJE(zlS7a5j+~9+{NU^lHx4%nsl6y<$LmV@NJ` zIzBe7P!5xn43elL$(TJqwAFnALZN@6_*A>+w&u%*@&K!J34%CPim>1j*l;?%ayYpX zqA*2BZXddjYAb^us>$fc*gznOqc)*wqCnFr>Br)HT@Oc|)dNN!0AvkQ+cx3O zs4mFxY(QB(sndbIAN^s8b*L%H3w(JJt#Q`5!+#Ch0BsZUPn24O@<<~S1Awr*dVx|Y zaIg9f^*He&?2&iLV+-q`kCl2Z>fr`7HQ^70^5(*~1sa)$t#;}r8ak0M^)bSt=v*P1 z*A}Z;b2|NmmkExROjqL)=ANQ91gg{&$koYbq4M7tIwaf|8vS4${z!lBErj04k82EY zD^A*h41s|w-wphPR42GqzH6e;Kf2m|P0ZrfU)yGO#lAwmK*KV7L^3dW%+=~A0P(_5 z(~rAsulFP^BpLl5WZSPUImLlM*TtAHk37?t5tL{wL~gw2?8@?8_RBMc?aZas?ev%y zQae-^X{lWZL$6o^L0nBQj|tkNqL?1{;MzCvuaLs_y~ zmZfu9vLPBK6`>$zDTOc?OsUxAlz$l_2mCzK`{aJTA6AC#^xj~cJ$NQ4SVmB8}c;;1S(ONB4h+Vv1<2q{$+iUe$x2 zC=s3!S<*L5<;jO0n#0F+Awhjlz4g8vu3R7PxA>wX92Z~`OI%&gEphn-s(C$bX_crV zws;bbK5y%K%46$0h77)aghBOSpdz!Ro;R&nTn8?|Y#RX7bAAbQP%T)=I$Y?am%=ud`<*BY^m)tRV8e$;1HYIm{-WaNl zT?Xu5#6c;Wt~OH(;Xm@rc%tz;f|$;f(Q}g3tngK8{ec@oRc~)PJ%ru9N`yEVm}iIC z3Kd!f8(&lExA%1Ch?9Xuxn&M5b5jRb_sl$ODJ`VpDBL(=&CdYlgI64~5MoYrf=&R) zY49K)M6Y;-;2gRO7ke!8+Mer!pg!ug#Lp}9%w zhEX`vDC%gII=6AbR|ZvUnpkJ;@vUkoTCI6Zaiz5p9&)^SR8iv-yR1{1;l7>nv47JQ z90rkf?O_Htnl7E)wl2iCq}HsJaL-45ZfeCbmkCkU0|oS`6S46t-sZ|H@u5>I;`ph> z-+V^XnC3j2Bar5r#6624WD8Cu)X;Zll|kyW@mK-gJx9krdA}b)a7%kw&DA>({|g8V Bgthtype() == 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 -