Doc: Fixed QDoc's navigation mechanism.

The HTML pages need to display minimal navigation such
as a link to the module landing page or Qt 5's index.html.

-new variables available in qdocconf files:
    navigation.landingpage
    navigation.homepage
    navigation.cppclassespage
    navigation.qmltypespage
    buildversion

The navigation variables are for the new navigation bar.
The buildversion variable is to insert documentation build
information into the pages.

Note about compatibility with Qt Creator docs:
The HTML template files for Qt Creator is retained to keep
Qt Creator compatible with 5.0.x and 5.1.x.

Change-Id: Ibb4d7cada19644204457d822b6b77b2aa7b70f8d
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
Jerome Pasion 2013-02-19 17:54:54 +01:00 committed by The Qt Project
parent 7b48954df2
commit b11cb96f28
20 changed files with 427 additions and 350 deletions

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,30 @@
#Default HTML footer for QDoc builds.
HTML.footer = \
" </div>\n" \
" </div>\n" \
" </div>\n" \
" </div>\n" \
"</div>\n" \
"<div class=\"footer\">\n" \
" <div class=\"qt13a-copyright\" id=\"copyright\">\n" \
" <div class=\"qt13a-container\">\n" \
" <p>\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2013 Digia Plc and/or its\n" \
" subsidiaries. Documentation contributions included herein are the copyrights of\n" \
" their respective owners.</p>\n" \
" <p>\n" \
" The documentation provided herein is licensed under the terms of the\n" \
" <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU Free Documentation\n" \
" License version 1.3</a> as published by the Free Software Foundation.</p>\n" \
" <p>\n" \
" Documentation sources may be obtained from <a href=\"http://www.qt-project.org\">\n" \
" www.qt-project.org</a>.</p>\n" \
" <p>\n" \
" Digia, Qt and their respective logos are trademarks of Digia Plc \n" \
" in Finland and/or other countries worldwide. All other trademarks are property\n" \
" of their respective owners. <a title=\"Privacy Policy\"\n" \
" href=\"http://en.gitorious.org/privacy_policy/\">Privacy Policy</a></p>\n" \
" </div>\n" \
" </div>\n" \
"</div>\n" \

View File

@ -0,0 +1,31 @@
#Default HTML header for QDoc builds.
#specify the CSS file used by this template
HTML.stylesheets = template/style/offline.css
#for including files into the qch file
qhp.extraFiles += style/offline.css
HTML.headerstyles = \
" <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline.css\" />\n"
HTML.endheader = \
"</head>\n"
HTML.postheader = \
"<body>\n" \
"<div class=\"header\" id=\"qtdocheader\">\n"\
" <div class=\"main\">\n" \
" <div class=\"main-rounded\">\n" \
" <div class=\"navigationbar\">\n"\
" <ul>\n"\
HTML.postpostheader = \
" </ul>\n"\
" </div>\n" \
"</div>\n" \
"<div class=\"content\">\n" \
"<div class=\"line\">\n" \
"<div class=\"content mainContent\">\n" \

View File

@ -0,0 +1,64 @@
#HTML Header with Qt Project branding and online links
HTML.stylesheets = template/style/online.css
#for including files into the qch file. Relative to the outputdir of a QDoc build.
# $QT_INSTALL_DOCS/qtquick/style/online.css for example
qhp.extraFiles += style/online.css
HTML.headerstyles = \
" <link rel=\"stylesheet\" type=\"text/css\" href=\"style/online.css\" />\n"
HTML.endheader = \
"</head>\n"
HTML.postheader = \
"<body>\n" \
"<div class=\"header\" id=\"qtdocheader\"></div>\n" \
" <div class=\"nav\" id=\"qt13a-header\">\n" \
" <div class=\"qt13a-gradient\">\n" \
" <div class=\"qt13a-container qt13a-dynamicREMOVE\" >\n" \
" <div id=\"qt13a-register\">\n" \
" <a href=\"http://qt-project.org/\">Qt Home</a>\n" \
" <a href=\"https://bugreports.qt-project.org/\">Bug Tracker</a>\n" \
" <a href=\"https://codereview.qt-project.org/\">Code Review</a>\n" \
" </div>\n" \
" <div class=\"qt13a-sixCol\">\n" \
" <div id=\"qt13a-logo\">\n" \
" <a href=\"http://qt-project.org/\" class=\"qt13a-site-logo\">\n" \
" <img src=\"images/Qt-logo.png\" alt=\"Qt\"></img>\n" \
" </a>\n" \
" </div>\n" \
" <div id=\"qt13a-title_nav\">\n" \
" <div id=\"qt13a-title\">\n" \
" <p class=\"qt13a-title\">Qt Documentation Snapshots</p>\n" \
" </div>\n" \
" <div class=\"qt13a-nav\">\n" \
" <ul>\n" \
" <li>\n" \
" <a href=\"http://doc-snapshot.qt-project.org\">Snapshots</a>\n" \
" </li>\n" \
" <li>\n" \
" <a href=\"http://qt-project.org/doc\">Released</a>\n" \
" </li>\n" \
" <li>\n" \
" <a href=\"http://doc.qt.digia.com\">Archives</a>\n" \
" </li>\n" \
" </ul>\n" \
" </div>\n" \
" </div>\n" \
" </div>\n" \
" </div>\n" \
" </div>\n" \
" </div>\n" \
" <div class=\"main\">\n" \
" <div class=\"main-rounded\">\n" \
" <div class=\"navigationbar\">\n" \
" <ul>\n" \
HTML.postpostheader = \
" </ul>\n" \
" </div>\n" \
"<div class=\"content\">\n" \
" <div class=\"line\">\n" \
" <div class=\"content mainContent\">\n" \

View File

@ -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 += \ Cpp.ignoretokens += \
PHONON_EXPORT \ PHONON_EXPORT \
Q_AUTOTEST_EXPORT \ Q_AUTOTEST_EXPORT \
@ -90,7 +108,7 @@ Cpp.ignoretokens += \
QTNFC_END_NAMESPACE \ QTNFC_END_NAMESPACE \
QWEBKIT_EXPORT QWEBKIT_EXPORT
Cpp.ignoredirectives = \ Cpp.ignoredirectives += \
__attribute__ \ __attribute__ \
K_DECLARE_PRIVATE \ K_DECLARE_PRIVATE \
PHONON_HEIR \ PHONON_HEIR \

View File

@ -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

View File

@ -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.stylesheets = template/style/offline.css
HTML.extraimages += template/images/ico_out.png \ HTML.extraimages += template/images/ico_out.png \
@ -20,40 +26,3 @@ qhp.extraFiles += style/offline.css \
images/bullet_dn.png \ images/bullet_dn.png \
images/bullet_sq.png \ images/bullet_sq.png \
images/bgrContent.png images/bgrContent.png
HTML.headerstyles = \
" <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline.css\" />\n"
HTML.endheader = \
"</head>\n" \
"<body>\n" \
"<div class=\"header\" id=\"qtdocheader\"></div>\n"\
"<div class=\"content\">\n" \
"<div class=\"line\">\n" \
"<div class=\"content mainContent\">\n" \
HTML.footer = \
"</div>\n" \
"</div>\n" \
"</div>\n" \
"<div class=\"footer\">\n" \
" <p>\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2013 Digia Plc and/or its\n" \
" subsidiaries. Documentation contributions included herein are the copyrights of\n" \
" their respective owners.</p>\n" \
" <br />\n" \
" <p>\n" \
" The documentation provided herein is licensed under the terms of the\n" \
" <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU Free Documentation\n" \
" License version 1.3</a> as published by the Free Software Foundation.</p>\n" \
" <p>\n" \
" Documentation sources may be obtained from <a href=\"http://www.qt-project.org\">\n" \
" www.qt-project.org</a>.</p>\n" \
" <br />\n" \
" <p>\n" \
" Digia, Qt and their respective logos are trademarks of Digia Plc \n" \
" in Finland and/or other countries worldwide. All other trademarks are property\n" \
" of their respective owners. <a title=\"Privacy Policy\"\n" \
" href=\"http://en.gitorious.org/privacy_policy/\">Privacy Policy</a></p>\n" \
"</div>\n" \

View File

@ -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.stylesheets = template/style/online.css
HTML.extraimages += template/images/ico_out.png \ 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-footer_shadow.png \
template/images/Qt-gradient.png \ template/images/Qt-gradient.png \
template/images/Qt-header-bg.jpg template/images/Qt-header-bg.jpg
HTML.headerstyles = \
" <link rel=\"stylesheet\" type=\"text/css\" href=\"style/online.css\" />\n"
HTML.endheader = \
"</head>\n" \
"<body>\n" \
"<div class=\"header\" id=\"qtdocheader\"></div>\n" \
" <div class=\"nav\" id=\"qt13a-header\">\n" \
" <div class=\"qt13a-gradient\">\n" \
" <div class=\"qt13a-container qt13a-dynamicREMOVE\" >\n" \
" <div id=\"qt13a-register\">\n" \
" <a href=\"http://qt-project.org/\">Qt Home</a>\n" \
" <a href=\"https://bugreports.qt-project.org/\">Bug Tracker</a>\n" \
" <a href=\"https://codereview.qt-project.org/\">Code Review</a>\n" \
" </div>\n" \
" <div class=\"qt13a-sixCol\">\n" \
" <div id=\"qt13a-logo\">\n" \
" <a href=\"http://qt-project.org/\" class=\"qt13a-site-logo\">\n" \
" <img src=\"images/Qt-logo.png\" alt=\"Qt\"><\img>\n" \
" </a>\n" \
" </div>\n" \
" <div id=\"qt13a-title_nav\">\n" \
" <div id=\"qt13a-title\">\n" \
" <p class=\"qt13a-title\">Qt Documentation Snapshots</p>\n" \
" </div>\n" \
" <div class=\"qt13a-nav\">\n" \
" <ul>\n" \
" <li>\n" \
" <a href=\"http://doc-snapshot.qt-project.org\">Snapshots</a>\n" \
" </li>\n" \
" <li>\n" \
" <a href=\"http://qt-project.org/doc\">Released</a>\n" \
" </li>\n" \
" <li>\n" \
" <a href=\"http://doc.qt.digia.com\">Archives</a>\n" \
" </li>\n" \
" </ul>\n" \
" </div>\n" \
" </div>\n" \
" </div>\n" \
" </div>\n" \
" </div>\n" \
" </div>\n" \
"<div class=\"content\">\n" \
" <div class=\"line\">\n" \
" <div class=\"content mainContent\">\n" \
HTML.footer = \
" </div>\n" \
" </div>\n" \
"</div>\n" \
"<div class=\"footer\">\n" \
" <div class="qt13a-copyright" id="copyright">\n" \
" <div class=\"qt13a-container\">\n" \
" <p>\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2013 Digia Plc and/or its\n" \
" subsidiaries. Documentation contributions included herein are the copyrights of\n" \
" their respective owners.</p>\n" \
" <p>\n" \
" The documentation provided herein is licensed under the terms of the\n" \
" <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU Free Documentation\n" \
" License version 1.3</a> as published by the Free Software Foundation.</p>\n" \
" <p>\n" \
" Documentation sources may be obtained from <a href=\"http://www.qt-project.org\">\n" \
" www.qt-project.org</a>.</p>\n" \
" <p>\n" \
" Digia, Qt and their respective logos are trademarks of Digia Plc \n" \
" in Finland and/or other countries worldwide. All other trademarks are property\n" \
" of their respective owners. <a title=\"Privacy Policy\"\n" \
" href=\"http://en.gitorious.org/privacy_policy/\">Privacy Policy</a></p>\n" \
" </div>\n" \
"</div>\n" \

View File

@ -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)

View File

@ -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(macros.qdocconf)
include(qt-cpp-ignore.qdocconf) include(qt-cpp-defines.qdocconf)
include(qt-defines.qdocconf)
include(qt-html-templates-online.qdocconf)
include(compat.qdocconf) include(compat.qdocconf)
include(manifest-meta.qdocconf)
include(fileextensions.qdocconf)
include(qt-html-templates-online.qdocconf)
dita.metadata.default.author = Qt Project #extra configuration data DITA information
dita.metadata.default.permissions = all include(config.qdocconf)
dita.metadata.default.publisher = Qt Project
dita.metadata.default.copyryear = 2013
dita.metadata.default.copyrholder = Digia Plc
dita.metadata.default.audience = programmer
naturallanguage = en_US
outputencoding = UTF-8
sourceencoding = UTF-8
examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml *.css"
examples.imageextensions = "*.png *.jpg *.gif"
headers.fileextensions = "*.ch *.h *.h++ *.hh *.hpp *.hxx"
sources.fileextensions = "*.c++ *.cc *.cpp *.cxx *.mm *.qml *.qdoc"
versionsym = QT_VERSION_STR
macro.raisedaster.HTML = "<sup>*</sup>"
#for including files into the qch file
qhp.extraFiles += template/style/online.css
#include the external websites
sourcedirs += externalsites

View File

@ -1,30 +1,7 @@
include(macros.qdocconf) #The default configuration for a Qt 5 module, including Add-Ons and Tools.
include(qt-cpp-ignore.qdocconf) #Include this file for a standard Qt 5 module. This file is provided for
include(qt-defines.qdocconf) #compatibility reasons.
include(qt-html-templates-offline.qdocconf)
include(compat.qdocconf)
include(manifest-meta.qdocconf)
dita.metadata.default.author = Qt Project #The default is the offline style. The alternate style is in
dita.metadata.default.permissions = all #qt-module-defaults-online.qdocconf
dita.metadata.default.publisher = Qt Project include(qt-module-defaults-offline.qdocconf)
dita.metadata.default.copyryear = 2013
dita.metadata.default.copyrholder = Digia Plc
dita.metadata.default.audience = programmer
naturallanguage = en_US
outputencoding = UTF-8
sourceencoding = UTF-8
examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml *.css"
examples.imageextensions = "*.png *.jpg *.gif"
headers.fileextensions = "*.ch *.h *.h++ *.hh *.hpp *.hxx"
sources.fileextensions = "*.c++ *.cc *.cpp *.cxx *.mm *.qml *.qdoc"
versionsym = QT_VERSION_STR
macro.raisedaster.HTML = "<sup>*</sup>"
#include the external websites
sourcedirs += externalsites

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -181,6 +181,74 @@ footer and license
text-align:center 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 /* table of content
no display no display
*/ */
@ -441,7 +509,7 @@ padding: 3px 15px 3px 0;
.qml{ .qml{
display: block; display: block;
margin: 10; margin: 10px;
overflow: auto; overflow: auto;
padding: 20px 20px 20px 20px; padding: 20px 20px 20px 20px;
} }
@ -493,7 +561,7 @@ vertical-align:top;
-moz-border-radius: 7px 7px 7px 7px; -moz-border-radius: 7px 7px 7px 7px;
-webkit-border-radius: 7px 7px 7px 7px; -webkit-border-radius: 7px 7px 7px 7px;
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-position:top;
background-repeat:repeat-x; background-repeat:repeat-x;
border: 1px solid #E6E6E6; border: 1px solid #E6E6E6;

View File

@ -12,7 +12,7 @@ height: auto
} }
.content{ .content{
margin: 30px; margin: 15px;
} }
.descr{ .descr{
@ -137,64 +137,46 @@ height:20px;
margin-left:30px; margin-left:30px;
} }
.breadcrumb{ .navigationbar {
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;
}
.breadcrumb ul li{
list-style-type:none;
padding:0;
margin:0;
height:20px;
}
.breadcrumb li{
float:left;
}
.breadcrumb .first {
background:url('../images/home.png');
background-position:left;
background-repeat: no-repeat; background-repeat: no-repeat;
padding-left:20px; 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:8px 0px 15px 15px;
height:20px;
}
.breadcrumb li a{ .navigationbar li{
list-style-type:none;
float:left;
font-size: 15px;
}
.navigationbar li a{
display:block; display:block;
text-decoration:none; text-decoration:none;
background:url('../images/arrow.png'); background:url('../images/arrow_bc.png');
background-repeat:no-repeat; background-repeat:no-repeat;
background-position:right; background-position:right;
padding-right:25px; 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.forum-description,
p.desc, p.desc,
p.forum-lastpost, p.forum-lastpost,
div.breadcrumbs li, div.navigationbars li,
div.block-profile div div.block-profile div
{ {
font-size: 13px; font-size: 13px;
@ -866,14 +848,6 @@ div.notes p
font-size: 12px !important; 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 { a {
color: #44a51c; color: #44a51c;
text-decoration: none; text-decoration: none;
@ -881,3 +855,16 @@ text-decoration: none;
.wrap{ .wrap{
padding-left: 30px 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;
}

View File

@ -165,7 +165,9 @@ private:
#define CONFIG_ALIAS "alias" #define CONFIG_ALIAS "alias"
#define CONFIG_BASE "base" #define CONFIG_BASE "base"
#define CONFIG_BASEDIR "basedir" #define CONFIG_BASEDIR "basedir"
#define CONFIG_BUILDVERSION "buildversion"
#define CONFIG_CODEINDENT "codeindent" #define CONFIG_CODEINDENT "codeindent"
#define CONFIG_CPPCLASSESPAGE "cppclassespage"
#define CONFIG_DEFINES "defines" #define CONFIG_DEFINES "defines"
#define CONFIG_DEPENDS "depends" #define CONFIG_DEPENDS "depends"
#define CONFIG_DESCRIPTION "description" #define CONFIG_DESCRIPTION "description"
@ -184,15 +186,18 @@ private:
#define CONFIG_HEADERS "headers" #define CONFIG_HEADERS "headers"
#define CONFIG_HEADERSCRIPTS "headerscripts" #define CONFIG_HEADERSCRIPTS "headerscripts"
#define CONFIG_HEADERSTYLES "headerstyles" #define CONFIG_HEADERSTYLES "headerstyles"
#define CONFIG_HOMEPAGE "homepage"
#define CONFIG_IGNOREDIRECTIVES "ignoredirectives" #define CONFIG_IGNOREDIRECTIVES "ignoredirectives"
#define CONFIG_IGNORETOKENS "ignoretokens" #define CONFIG_IGNORETOKENS "ignoretokens"
#define CONFIG_IMAGEDIRS "imagedirs" #define CONFIG_IMAGEDIRS "imagedirs"
#define CONFIG_IMAGES "images" #define CONFIG_IMAGES "images"
#define CONFIG_INDEXES "indexes" #define CONFIG_INDEXES "indexes"
#define CONFIG_LANGUAGE "language" #define CONFIG_LANGUAGE "language"
#define CONFIG_LANDINGPAGE "landingpage"
#define CONFIG_MACRO "macro" #define CONFIG_MACRO "macro"
#define CONFIG_MANIFESTMETA "manifestmeta" #define CONFIG_MANIFESTMETA "manifestmeta"
#define CONFIG_NATURALLANGUAGE "naturallanguage" #define CONFIG_NATURALLANGUAGE "naturallanguage"
#define CONFIG_NAVIGATION "navigation"
#define CONFIG_NOLINKERRORS "nolinkerrors" #define CONFIG_NOLINKERRORS "nolinkerrors"
#define CONFIG_OBSOLETELINKS "obsoletelinks" #define CONFIG_OBSOLETELINKS "obsoletelinks"
#define CONFIG_OUTPUTDIR "outputdir" #define CONFIG_OUTPUTDIR "outputdir"
@ -203,6 +208,7 @@ private:
#define CONFIG_PROJECT "project" #define CONFIG_PROJECT "project"
#define CONFIG_REDIRECTDOCUMENTATIONTODEVNULL "redirectdocumentationtodevnull" #define CONFIG_REDIRECTDOCUMENTATIONTODEVNULL "redirectdocumentationtodevnull"
#define CONFIG_QHP "qhp" #define CONFIG_QHP "qhp"
#define CONFIG_QMLTYPESPAGE "qmltypespage"
#define CONFIG_QUOTINGINFORMATION "quotinginformation" #define CONFIG_QUOTINGINFORMATION "quotinginformation"
#define CONFIG_SCRIPTDIRS "scriptdirs" #define CONFIG_SCRIPTDIRS "scriptdirs"
#define CONFIG_SCRIPTS "scripts" #define CONFIG_SCRIPTS "scripts"

View File

@ -166,9 +166,9 @@ void HtmlGenerator::initializeGenerator(const Config &config)
pleaseGenerateMacRef = config.getBool(HtmlGenerator::format() + pleaseGenerateMacRef = config.getBool(HtmlGenerator::format() +
Config::dot + Config::dot +
HTMLGENERATOR_GENERATEMACREFS); HTMLGENERATOR_GENERATEMACREFS);
noBreadCrumbs = config.getBool(HtmlGenerator::format() + noNavigationBar = config.getBool(HtmlGenerator::format() +
Config::dot + Config::dot +
HTMLGENERATOR_NOBREADCRUMBS); HTMLGENERATOR_NONAVIGATIONBAR);
project = config.getString(CONFIG_PROJECT); project = config.getString(CONFIG_PROJECT);
@ -229,6 +229,25 @@ void HtmlGenerator::initializeGenerator(const Config &config)
examplesPath = config.getString(CONFIG_EXAMPLESINSTALLPATH); examplesPath = config.getString(CONFIG_EXAMPLESINSTALLPATH);
if (!examplesPath.isEmpty()) if (!examplesPath.isEmpty())
examplesPath += QLatin1Char('/'); 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, const Node *node,
CodeMarker *marker) CodeMarker *marker)
{ {
if (noBreadCrumbs) if (noNavigationBar)
return; 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) { if (node->type() == Node::Class) {
const ClassNode *cn = static_cast<const ClassNode *>(node); const ClassNode *cn = static_cast<const ClassNode *>(node);
QString name = node->moduleName(); QString name = node->moduleName();
breadcrumbs << Atom(Atom::ListItemLeft)
<< Atom(Atom::Link, QLatin1String("All Modules")) if (!cppclassespage.isEmpty())
navigationbar << Atom(Atom::ListItemLeft)
<< Atom(Atom::Link, cppclassespage)
<< Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK) << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK)
<< Atom(Atom::String, QLatin1String("Modules")) << Atom(Atom::String, QLatin1String("C++ Classes"))
<< Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK) << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK)
<< Atom(Atom::ListItemRight); << Atom(Atom::ListItemRight);
if (!name.isEmpty())
breadcrumbs << Atom(Atom::ListItemLeft)
<< Atom(Atom::AutoLink, name)
<< Atom(Atom::ListItemRight);
if (!cn->name().isEmpty()) if (!cn->name().isEmpty())
breadcrumbs << Atom(Atom::ListItemLeft) navigationbar << Atom(Atom::ListItemLeft)
<< Atom(Atom::String, protectEnc(cn->name())) << Atom(Atom::String, protectEnc(cn->name()))
<< Atom(Atom::ListItemRight); << Atom(Atom::ListItemRight);
} }
else if (node->type() == Node::Document) { else if (node->type() == Node::Document) {
const DocNode* fn = static_cast<const DocNode*>(node); if (node->subType() == Node::QmlClass || node->subType() == Node::QmlBasicType) {
if (node->subType() == Node::Module) { if (!qmltypespage.isEmpty())
breadcrumbs << Atom(Atom::ListItemLeft) navigationbar << Atom(Atom::ListItemLeft)
<< Atom(Atom::Link, QLatin1String("All Modules")) << Atom(Atom::Link, qmltypespage)
<< Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK) << 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::FormattingRight, ATOM_FORMATTING_LINK)
<< Atom(Atom::ListItemRight); << Atom(Atom::ListItemRight);
QString name = node->name();
if (!name.isEmpty()) navigationbar << Atom(Atom::ListItemLeft)
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::String, protectEnc(title))
<< Atom(Atom::ListItemRight); << 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)
<< 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 { else {
QString name = protectEnc("examples-" + sl.at(0) + ".html"); // this generates an empty link navigationbar << Atom(Atom::ListItemLeft)
QString t = CodeParser::titleFromName(name);
}
breadcrumbs << Atom(Atom::ListItemLeft)
<< Atom(Atom::String, protectEnc(title)) << Atom(Atom::String, protectEnc(title))
<< Atom(Atom::ListItemRight); << 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, void HtmlGenerator::generateHeader(const QString& title,
@ -1782,7 +1739,8 @@ void HtmlGenerator::generateHeader(const QString& title,
#endif #endif
out() << QString(postHeader).replace("\\" + COMMAND_VERSION, qdb_->version()); out() << QString(postHeader).replace("\\" + COMMAND_VERSION, qdb_->version());
generateBreadCrumbs(title,node,marker); generateNavigationBar(title,node,marker);
out() << "<li id=\"buildversion\">\n" << buildversion << "</li>\n";
out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, qdb_->version()); out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, qdb_->version());
navigationLinks.clear(); navigationLinks.clear();

View File

@ -127,7 +127,7 @@ private:
}; };
const QPair<QString,QString> anchorForNode(const Node *node); const QPair<QString,QString> anchorForNode(const Node *node);
void generateBreadCrumbs(const QString& title, void generateNavigationBar(const QString& title,
const Node *node, const Node *node,
CodeMarker *marker); CodeMarker *marker);
void generateHeader(const QString& title, void generateHeader(const QString& title,
@ -239,7 +239,7 @@ private:
QString footer; QString footer;
QString address; QString address;
bool pleaseGenerateMacRef; bool pleaseGenerateMacRef;
bool noBreadCrumbs; bool noNavigationBar;
QString project; QString project;
QString projectDescription; QString projectDescription;
QString projectUrl; QString projectUrl;
@ -252,6 +252,12 @@ private:
QStack<QXmlStreamWriter*> xmlWriterStack; QStack<QXmlStreamWriter*> xmlWriterStack;
static int id; static int id;
QList<ManifestMetaFilter> manifestMetaContent; QList<ManifestMetaFilter> manifestMetaContent;
QString homepage;
QString landingpage;
QString cppclassespage;
QString qmltypespage;
QString buildversion;
public: public:
static bool debugging_on; static bool debugging_on;
static QString divNavTop; static QString divNavTop;
@ -262,9 +268,9 @@ public:
#define HTMLGENERATOR_GENERATEMACREFS "generatemacrefs" // ### document me #define HTMLGENERATOR_GENERATEMACREFS "generatemacrefs" // ### document me
#define HTMLGENERATOR_POSTHEADER "postheader" #define HTMLGENERATOR_POSTHEADER "postheader"
#define HTMLGENERATOR_POSTPOSTHEADER "postpostheader" #define HTMLGENERATOR_POSTPOSTHEADER "postpostheader"
#define HTMLGENERATOR_NOBREADCRUMBS "nobreadcrumbs" #define HTMLGENERATOR_NONAVIGATIONBAR "nonavigationbar"
QT_END_NAMESPACE QT_END_NAMESPACE
#endif #endif