From b11cb96f282fb1037ad31fbafe279c9a8a8dfeda Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Tue, 19 Feb 2013 17:54:54 +0100 Subject: 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 ++++++++++ doc/global/qt-cpp-defines.qdocconf | 134 ++++++++++++++++++++ doc/global/qt-cpp-ignore.qdocconf | 116 ------------------ doc/global/qt-defines.qdocconf | 17 --- doc/global/qt-html-templates-offline.qdocconf | 45 ++----- doc/global/qt-html-templates-online.qdocconf | 82 ++----------- doc/global/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 | 91 ++++++-------- src/tools/qdoc/config.h | 6 + src/tools/qdoc/htmlgenerator.cpp | 162 +++++++++---------------- src/tools/qdoc/htmlgenerator.h | 14 ++- 21 files changed, 541 insertions(+), 464 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 create mode 100644 doc/global/qt-cpp-defines.qdocconf delete mode 100644 doc/global/qt-cpp-ignore.qdocconf 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 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 = \ + " \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 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 = \ + " \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 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 = \ + " \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-defines.qdocconf b/doc/global/qt-cpp-defines.qdocconf new file mode 100644 index 0000000000..b2160ea4ac --- /dev/null +++ b/doc/global/qt-cpp-defines.qdocconf @@ -0,0 +1,134 @@ +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 \ + Q_BLUETOOTH_EXPORT \ + Q_COMPAT_EXPORT \ + Q_CORE_EXPORT \ + Q_CORE_EXPORT_INLINE \ + Q_DBUS_EXPORT \ + Q_DECL_CONSTEXPR \ + Q_DECL_NOEXCEPT \ + Q_DECL_NOTHROW \ + Q_DECLARATIVE_EXPORT \ + Q_EXPLICIT \ + Q_EXPORT \ + Q_EXPORT_CODECS_CN \ + Q_EXPORT_CODECS_JP \ + Q_EXPORT_CODECS_KR \ + Q_EXPORT_PLUGIN \ + Q_EXPORT_PLUGIN2 \ + Q_GADGET \ + Q_GFX_INLINE \ + Q_GUI_EXPORT \ + Q_GUI_EXPORT_INLINE \ + Q_GUI_EXPORT_STYLE_CDE \ + Q_GUI_EXPORT_STYLE_COMPACT \ + Q_GUI_EXPORT_STYLE_MAC \ + Q_GUI_EXPORT_STYLE_MOTIF \ + Q_GUI_EXPORT_STYLE_MOTIFPLUS \ + Q_GUI_EXPORT_STYLE_PLATINUM \ + Q_GUI_EXPORT_STYLE_POCKETPC \ + Q_GUI_EXPORT_STYLE_SGI \ + Q_GUI_EXPORT_STYLE_WINDOWS \ + Q_GUI_EXPORT_STYLE_WINDOWSXP \ + Q_INLINE_TEMPLATE \ + Q_INTERNAL_WIN_NO_THROW \ + Q_INVOKABLE \ + Q_LOCATION_EXPORT \ + Q_MULTIMEDIA_EXPORT \ + Q_NETWORK_EXPORT \ + Q_OPENGL_EXPORT \ + Q_OPENVG_EXPORT \ + Q_OUTOFLINE_TEMPLATE \ + Q_PRINTSUPPORT_EXPORT \ + Q_QML_EXPORT \ + Q_SCRIPT_EXPORT \ + Q_SCRIPTTOOLS_EXPORT \ + Q_SQL_EXPORT \ + Q_SVG_EXPORT \ + Q_TESTLIB_EXPORT \ + Q_TYPENAME \ + Q_WIDGETS_EXPORT \ + Q_XML_EXPORT \ + Q_XMLPATTERNS_EXPORT \ + Q_XMLSTREAM_EXPORT \ + QAXFACTORY_EXPORT \ + QDBUS_EXPORT \ + QDESIGNER_COMPONENTS_LIBRARY \ + QDESIGNER_EXTENSION_LIBRARY \ + QDESIGNER_SDK_LIBRARY \ + QDESIGNER_SHARED_LIBRARY \ + QDESIGNER_UILIB_LIBRARY \ + QHELP_EXPORT \ + QM_AUTOTEST_EXPORT \ + QM_EXPORT_CANVAS \ + QM_EXPORT_DNS \ + QM_EXPORT_DOM \ + QM_EXPORT_FTP \ + QM_EXPORT_HTTP \ + QM_EXPORT_ICONVIEW \ + QM_EXPORT_NETWORK \ + QM_EXPORT_OPENGL \ + QM_EXPORT_OPENVG \ + QM_EXPORT_SQL \ + QM_EXPORT_TABLE \ + QM_EXPORT_WORKSPACE \ + QM_EXPORT_XML \ + QT_ASCII_CAST_WARN \ + QT_ASCII_CAST_WARN_CONSTRUCTOR \ + QT_BEGIN_INCLUDE_NAMESPACE \ + QT_BEGIN_NAMESPACE \ + QT_BOOTSTRAPPED \ + QT_DESIGNER_STATIC \ + QT_END_INCLUDE_NAMESPACE \ + QT_END_NAMESPACE \ + QT_FASTCALL \ + QT_WIDGET_PLUGIN_EXPORT \ + QTBLUETOOTH_BEGIN_NAMESPACE \ + QTBLUETOOTH_END_NAMESAPCE \ + QTNFC_BEGIN_NAMESPACE \ + QTNFC_END_NAMESPACE \ + QWEBKIT_EXPORT + +Cpp.ignoredirectives += \ + __attribute__ \ + K_DECLARE_PRIVATE \ + PHONON_HEIR \ + PHONON_OBJECT \ + Q_CLASSINFO \ + Q_DECLARE_INTERFACE \ + Q_DECLARE_METATYPE \ + Q_DECLARE_OPERATORS_FOR_FLAGS \ + Q_DECLARE_PRIVATE \ + Q_DECLARE_PRIVATE_D \ + Q_DECLARE_PUBLIC \ + Q_DECLARE_SHARED \ + Q_DECLARE_TR_FUNCTIONS \ + Q_DECLARE_TYPEINFO \ + Q_DISABLE_COPY \ + Q_DUMMY_COMPARISON_OPERATOR \ + Q_ENUMS \ + Q_FLAGS \ + Q_INTERFACES \ + Q_PRIVATE_PROPERTY \ + QT_FORWARD_DECLARE_CLASS \ + Q_DECLARE_HANDLE \ + Q_REVISION diff --git a/doc/global/qt-cpp-ignore.qdocconf b/doc/global/qt-cpp-ignore.qdocconf deleted file mode 100644 index 1f34f366cb..0000000000 --- a/doc/global/qt-cpp-ignore.qdocconf +++ /dev/null @@ -1,116 +0,0 @@ -Cpp.ignoretokens += \ - PHONON_EXPORT \ - Q_AUTOTEST_EXPORT \ - Q_BLUETOOTH_EXPORT \ - Q_COMPAT_EXPORT \ - Q_CORE_EXPORT \ - Q_CORE_EXPORT_INLINE \ - Q_DBUS_EXPORT \ - Q_DECL_CONSTEXPR \ - Q_DECL_NOEXCEPT \ - Q_DECL_NOTHROW \ - Q_DECLARATIVE_EXPORT \ - Q_EXPLICIT \ - Q_EXPORT \ - Q_EXPORT_CODECS_CN \ - Q_EXPORT_CODECS_JP \ - Q_EXPORT_CODECS_KR \ - Q_EXPORT_PLUGIN \ - Q_EXPORT_PLUGIN2 \ - Q_GADGET \ - Q_GFX_INLINE \ - Q_GUI_EXPORT \ - Q_GUI_EXPORT_INLINE \ - Q_GUI_EXPORT_STYLE_CDE \ - Q_GUI_EXPORT_STYLE_COMPACT \ - Q_GUI_EXPORT_STYLE_MAC \ - Q_GUI_EXPORT_STYLE_MOTIF \ - Q_GUI_EXPORT_STYLE_MOTIFPLUS \ - Q_GUI_EXPORT_STYLE_PLATINUM \ - Q_GUI_EXPORT_STYLE_POCKETPC \ - Q_GUI_EXPORT_STYLE_SGI \ - Q_GUI_EXPORT_STYLE_WINDOWS \ - Q_GUI_EXPORT_STYLE_WINDOWSXP \ - Q_INLINE_TEMPLATE \ - Q_INTERNAL_WIN_NO_THROW \ - Q_INVOKABLE \ - Q_LOCATION_EXPORT \ - Q_MULTIMEDIA_EXPORT \ - Q_NETWORK_EXPORT \ - Q_OPENGL_EXPORT \ - Q_OPENVG_EXPORT \ - Q_OUTOFLINE_TEMPLATE \ - Q_PRINTSUPPORT_EXPORT \ - Q_QML_EXPORT \ - Q_SCRIPT_EXPORT \ - Q_SCRIPTTOOLS_EXPORT \ - Q_SQL_EXPORT \ - Q_SVG_EXPORT \ - Q_TESTLIB_EXPORT \ - Q_TYPENAME \ - Q_WIDGETS_EXPORT \ - Q_XML_EXPORT \ - Q_XMLPATTERNS_EXPORT \ - Q_XMLSTREAM_EXPORT \ - QAXFACTORY_EXPORT \ - QDBUS_EXPORT \ - QDESIGNER_COMPONENTS_LIBRARY \ - QDESIGNER_EXTENSION_LIBRARY \ - QDESIGNER_SDK_LIBRARY \ - QDESIGNER_SHARED_LIBRARY \ - QDESIGNER_UILIB_LIBRARY \ - QHELP_EXPORT \ - QM_AUTOTEST_EXPORT \ - QM_EXPORT_CANVAS \ - QM_EXPORT_DNS \ - QM_EXPORT_DOM \ - QM_EXPORT_FTP \ - QM_EXPORT_HTTP \ - QM_EXPORT_ICONVIEW \ - QM_EXPORT_NETWORK \ - QM_EXPORT_OPENGL \ - QM_EXPORT_OPENVG \ - QM_EXPORT_SQL \ - QM_EXPORT_TABLE \ - QM_EXPORT_WORKSPACE \ - QM_EXPORT_XML \ - QT_ASCII_CAST_WARN \ - QT_ASCII_CAST_WARN_CONSTRUCTOR \ - QT_BEGIN_INCLUDE_NAMESPACE \ - QT_BEGIN_NAMESPACE \ - QT_BOOTSTRAPPED \ - QT_DESIGNER_STATIC \ - QT_END_INCLUDE_NAMESPACE \ - QT_END_NAMESPACE \ - QT_FASTCALL \ - QT_WIDGET_PLUGIN_EXPORT \ - QTBLUETOOTH_BEGIN_NAMESPACE \ - QTBLUETOOTH_END_NAMESAPCE \ - QTNFC_BEGIN_NAMESPACE \ - QTNFC_END_NAMESPACE \ - QWEBKIT_EXPORT - -Cpp.ignoredirectives = \ - __attribute__ \ - K_DECLARE_PRIVATE \ - PHONON_HEIR \ - PHONON_OBJECT \ - Q_CLASSINFO \ - Q_DECLARE_INTERFACE \ - Q_DECLARE_METATYPE \ - Q_DECLARE_OPERATORS_FOR_FLAGS \ - Q_DECLARE_PRIVATE \ - Q_DECLARE_PRIVATE_D \ - Q_DECLARE_PUBLIC \ - Q_DECLARE_SHARED \ - Q_DECLARE_TR_FUNCTIONS \ - Q_DECLARE_TYPEINFO \ - Q_DISABLE_COPY \ - Q_DUMMY_COMPARISON_OPERATOR \ - Q_ENUMS \ - Q_FLAGS \ - Q_INTERFACES \ - Q_PRIVATE_PROPERTY \ - QT_FORWARD_DECLARE_CLASS \ - Q_DECLARE_HANDLE \ - Q_REVISION 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 = \ - " \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 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 = \ - " \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 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 = "*" - -#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 = "*" - -#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 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 0000000000..1e7ed4cf21 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 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(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 cdf296e783..15e97588ee 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 - -- cgit v1.2.3