summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-05-05 14:09:42 (GMT)
committerMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-05-05 14:09:42 (GMT)
commit1b61bb9698b50fdeb97304db74e1a64b387aef8b (patch)
tree6dce2761fd6ea28c929ac972d3810aa12dac6b50
parentcbae18e48638cb3fb97dee56c32a2deb5b9af4ad (diff)
downloadQt-1b61bb9698b50fdeb97304db74e1a64b387aef8b.zip
Qt-1b61bb9698b50fdeb97304db74e1a64b387aef8b.tar.gz
Qt-1b61bb9698b50fdeb97304db74e1a64b387aef8b.tar.bz2
Doc: Changes to the HTML output
Changes in css, htmlgenerator (removing redundant class names), updating html templates and updating js. Reviewed-by: Morten Engvoldsen
-rwxr-xr-xdoc/src/template/scripts/functions.js93
-rwxr-xr-xdoc/src/template/style/style.css27
-rw-r--r--tools/qdoc3/htmlgenerator.cpp11
-rw-r--r--tools/qdoc3/test/qt-html-templates.qdocconf57
4 files changed, 88 insertions, 100 deletions
diff --git a/doc/src/template/scripts/functions.js b/doc/src/template/scripts/functions.js
index b2e791c..800660e 100755
--- a/doc/src/template/scripts/functions.js
+++ b/doc/src/template/scripts/functions.js
@@ -40,36 +40,30 @@ var articleCount = 0;
var exampleCount = 0;
var qturl = ""; // change to 0
function processNokiaData(response){
-
var propertyTags = response.getElementsByTagName('page');
var ulStartElement = "<ul>";
var ulEndElement = "</ul>";
for (var i=0; i< propertyTags.length; i++) {
- var full_address_lookup = "<ul><li><a href='"+qturl+"";
- var full_address_topic = "<ul><li><a href='"+qturl+"";
- var full_address_examples = "<ul><li><a href='"+qturl+"";
+ var full_address_lookup = "<li><a href='"+qturl+"";
+ var full_address_topic = "<li><a href='"+qturl+"";
+ var full_address_examples = "<li><a href='"+qturl+"";
if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'APIPage'){
lookupCount=0;
document.getElementById('live001').style.display = "block";
- // document.getElementById('live001').style.height = "150px";
for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
full_address_lookup = full_address_lookup + propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue;
full_address_lookup = full_address_lookup + "'>" + propertyTags[i].getElementsByTagName('pageTitle')[0].firstChild.nodeValue
- + '</a></li></ul>' ;
-
- // var rowlookup = document.getElementById('div001').insertRow(-1);
- // var celllookup = rowlookup.insertCell(-1);
- // celllookup.style.padding="0 0 0 0";
- // lookupCount++;
- // celllookup.innerHTML = full_address_lookup ;
- // document.getElementById('list001').style.display = "none";
+ + '</a></li>' ;
+
+// $('#list002 li').remove();
+// $('#tbl002').prepend('<li>foo1</li>');
+// $('#tbl002').prepend('<li>bar2</li>');
- // <li>
- //var listElement = "<li><a href='"+ full_address_lookup +"" + '</a></li>';
+ $('ul001').prepend(full_address_lookup);
}
}
@@ -77,33 +71,24 @@ function processNokiaData(response){
if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Article'){
articleCount = 0;
document.getElementById('live002').style.display = "block";
- // document.getElementById('live002').style.height = "150px";
for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
full_address_topic = full_address_topic + propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue;
full_address_topic = full_address_topic + "'>" + propertyTags[i].getElementsByTagName('pageTitle')[0].firstChild.nodeValue
- + '</a></li></ul>';
- // var rowlookup = document.getElementById('div002').insertRow(-1);
- // var celllookup = rowlookup.insertCell(-1);
- // celllookup.style.padding="0 0 0 0";
- // articleCount++;
- // celllookup.innerHTML = full_address_topic;
- // document.getElementById('list002').style.display = "none";
+ + '</a></li>';
+
+ $('ul002').prepend(full_address_lookup);
}
}
if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Example'){
exampleCount = 0;
document.getElementById('live003').style.display = "block";
- // document.getElementById('live003').style.height = "150px";
- for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
+
+ for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
full_address_examples = full_address_examples + propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue;
full_address_examples = full_address_examples + "'>" + propertyTags[i].getElementsByTagName('pageTitle')[0].firstChild.nodeValue
- + '</a></li></ul>';
- // var rowlookup = document.getElementById('div003').insertRow(-1);
- // var celllookup = rowlookup.insertCell(-1);
- // celllookup.style.padding="0 0 0 0";
- // exampleCount++;
- // celllookup.innerHTML = full_address_examples;
- // document.getElementById('list003').style.display = "none";
+ + '</a></li>';
+
+ $('ul003').prepend(full_address_lookup);
}
}
@@ -121,6 +106,11 @@ function processNokiaData(response){
}
function removeResults() {
+
+// get hold of the non-default li elements and delete them
+ $('.live li').remove();
+
+
/* var resultsTableLookup = document.getElementById('div001');
var recordslookup = resultsTableLookup.rows.length;
@@ -141,22 +131,22 @@ function removeResults() {
var recordsexample = resultsTableexample.rows.length;
for (var i=(recordsexample-1); i> 0; i--)
// resultsTableexample.deleteRow(i);
- */
- removeList();
+
+ removeList(); */
}
function removeList(){
- // var resultsTableLookuplist = document.getElementById('tbl001');
+ // var resultsTableLookuplist = document.getElementById('ul001');
// var recordlookuplist = resultsTableLookuplist.rows.length;
// for (var i=(recordlookuplist-1); i> 0; i--)
// resultsTableLookuplist.deleteRow(i);
- // var resultsTableArticlelist = document.getElementById('tbl002');
+ // var resultsTableArticlelist = document.getElementById('ul002');
// var recordArticlelist = resultsTableArticlelist.rows.length;
// for (var i=(recordArticlelist-1); i> 0; i--)
// resultsTableArticlelist.deleteRow(i);
- // var resultsTableExamplelist = document.getElementById('tbl003');
+ // var resultsTableExamplelist = document.getElementById('ul003');
// var recordExamplelist = resultsTableExamplelist.rows.length;
// for (var i=(recordExamplelist-1); i> 0; i--)
// resultsTableExamplelist.deleteRow(i);
@@ -170,6 +160,7 @@ function CheckEmptyAndLoadList()
if((blankRE.test(value)) || (value.length < 3))
{
//empty inputbox
+ // load default li elements into the ul if empty
loadAllList();
//alert("loadAllList");
document.getElementById('live001').style.display = "none";
@@ -189,12 +180,12 @@ function CheckEmptyAndLoadList()
}
function loadAllList(){
- var fullAddressListLookup = "<ul><li><a href='"+qturl+"modules.html'>All modules</a></li>"
+ /*var fullAddressListLookup = "<ul><li><a href='"+qturl+"modules.html'>All modules</a></li>"
+ "<li><a href='"+qturl+"classes.html'>All classes</a></li>"
+ "<li><a href='"+qturl+"functions.html'>All functions</a></li>"
+ "<li><a href='"+qturl+"platform-specific.html'>Platform specifics</a></li>"
+ "</ul>";
- // var rowlistlookup = document.getElementById('tbl001').insertRow(-1);
+ // var rowlistlookup = document.getElementById('ul001').insertRow(-1);
// var celllistlookup = rowlistlookup.insertCell(-1);
// celllistlookup.style.padding="0 0 0 0";
//celllistlookup.style.width="10px";
@@ -210,7 +201,7 @@ function loadAllList(){
+ "<li><a href='"+qturl+"declarativeui.html'>Qt Quick</a></li>"
+ "<li><a href='"+qturl+"widgets-and-layouts.html'>Widget style &amp; layout</a></li>"
+ "</ul>";
- // var rowlistarticle = document.getElementById('tbl002').insertRow(-1);
+ // var rowlistarticle = document.getElementById('ul002').insertRow(-1);
// var celllistarticle = rowlistarticle.insertCell(-1);
// celllistarticle.style.padding="0 0 0 0";
//celllistarticle.innerHTML = fullAddressListArticle ;
@@ -222,21 +213,21 @@ function loadAllList(){
+ "<li><a href='"+qturl+"#'>Desktop examples</a></li>"
+ "<li><a href='"+qturl+"#'>Device examples</a></li>"
+ "</ul>";
- // var rowlistexample = document.getElementById('tbl003').insertRow(-1);
+ // var rowlistexample = document.getElementById('ul003').insertRow(-1);
// var celllistexample = rowlistexample.insertCell(-1);
// celllistexample.style.padding="0 0 0 0";
- //celllistexample.innerHTML = fullAddressListExample ;
+ //celllistexample.innerHTML = fullAddressListExample ;*/
}
function loadLookupList(){
- var fullAddressListLookup = "<ul><li><a href='"+qturl+"modules.html'>All modules</a></li>"
+ /*var fullAddressListLookup = "<ul><li><a href='"+qturl+"modules.html'>All modules</a></li>"
+ "<li><a href='"+qturl+"classes.html'>All classes</a></li>"
+ "<li><a href='"+qturl+"functions.html'>All functions</a></li>"
+ "<li><a href='"+qturl+"platform-specific.html'>Platform specifics</a></li>"
+ "</ul>";
- // var rowlistlookup = document.getElementById('tbl001').insertRow(-1);
+ // var rowlistlookup = document.getElementById('ul001').insertRow(-1);
// var celllistlookup = rowlistlookup.insertCell(-1);
// celllistlookup.style.padding="0 0 0 0";
//celllistlookup.style.width="10px";
@@ -245,38 +236,38 @@ function loadLookupList(){
document.getElementById('live001').style.display = "none";
document.getElementById('list001').style.display = "block";
//alert("loadLookupList")
-
+*/
}
function loadArticleList(){
-
+ /*
var fullAddressListArticle = "<ul><li><a href='"+qturl+"object.html'>QObject model</a></li>"
+ "<li><a href='"+qturl+"eventsandfilters.html'>Events, signals &amp; slots</a></li>"
+ "<li><a href='"+qturl+"paintsystem.html'>Graphics &amp; Paint system</a></li>"
+ "<li><a href='"+qturl+"declarativeui.html'>Qt Quick</a></li>"
+ "<li><a href='"+qturl+"widgets-and-layouts.html'>Widget style &amp; layout</a></li>"
+ "</ul>";
- // var rowlistarticle = document.getElementById('tbl002').insertRow(-1);
+ // var rowlistarticle = document.getElementById('ul002').insertRow(-1);
// var celllistarticle = rowlistarticle.insertCell(-1);
// celllistarticle.style.padding="0 0 0 0";
celllistarticle.innerHTML = fullAddressListArticle ;
document.getElementById('live002').style.display = "none";
- document.getElementById('list002').style.display = "block";
+ document.getElementById('list002').style.display = "block";*/
}
function loadExampleList(){
-
+ /*
var fullAddressListExample = "<ul><li><a href='"+qturl+"examples.html'>All examples</a></li>"
+ "<li><a href='"+qturl+"tutorials.html'>All tutorials</a></li>"
+ "<li><a href='"+qturl+"#'>Qt Quick examples</a></li>"
+ "<li><a href='"+qturl+"#'>Desktop examples</a></li>"
+ "<li><a href='"+qturl+"#'>Desktop examples</a></li>"
+ "</ul>";
- // var rowlistexample = document.getElementById('tbl003').insertRow(-1);
+ // var rowlistexample = document.getElementById('ul003').insertRow(-1);
// var celllistexample = rowlistexample.insertCell(-1);
// celllistexample.style.padding="0 0 0 0";
celllistexample.innerHTML = fullAddressListExample ;
document.getElementById('live003').style.display = "none";
- document.getElementById('list003').style.display = "block";
+ document.getElementById('list003').style.display = "block";*/
}
diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css
index 2da91f3..220afb9 100755
--- a/doc/src/template/style/style.css
+++ b/doc/src/template/style/style.css
@@ -315,12 +315,13 @@
}
.sidebar .box ul
{
+ padding:10px 0 0 10px;
}
.sidebar .box ul li
{
padding-left: 12px;
background: url(../images/bullet_gt.png) no-repeat 0 5px;
- margin-bottom: 15px;
+ margin-bottom: 5px;
}
.sidebar .bottombar
{
@@ -492,6 +493,7 @@
.wrap .content ul
{
padding-left: 25px;
+ padding-top: 10px;
}
a:hover
{
@@ -1055,16 +1057,6 @@
color: #00732f;
text-decoration: none;
}
-
- .indexboxcont:after
- {
- content: ".";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
- }
-
.indexbox .indexIcon span
{
display: block;
@@ -1085,6 +1077,17 @@
background: url(../images/sprites-combined.png) no-repeat -111px -376px;
padding: 0;
}
+ .indexboxcont:after
+ {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+ }
+ /*
+
+
.lastcol
{
@@ -1098,6 +1101,8 @@
{
margin-left: -6px;
}
+ */
+
/* end indexbox */
}
/* end of screen media */
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 3120473..373fa3d 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -956,7 +956,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
out() << "<tr><td class=\"topAlign\"><tt>"
<< protectEnc(plainCode(marker->markedUpEnumValue(atom->next()->string(),
relative)))
- << "</tt></td><td class=\"centerAlign topAlign\">";
+ << "</tt></td><td class=\" topAlign\">";
QString itemValue;
if (relative->type() == Node::Enum) {
@@ -1093,13 +1093,13 @@ int HtmlGenerator::generateAtom(const Atom *atom,
}
if (!atom->string().isEmpty()) {
if (atom->string().contains("%"))
- out() << "<table class=\"generic centerAlign\" width=\"" << atom->string() << "\">\n ";
+ out() << "<table class=\"generic\" width=\"" << atom->string() << "\">\n ";
else {
- out() << "<table class=\"generic centerAlign\">\n";
+ out() << "<table class=\"generic\">\n";
}
}
else {
- out() << "<table class=\"generic centerAlign\">\n";
+ out() << "<table class=\"generic\">\n";
}
numTableRows = 0;
break;
@@ -1243,8 +1243,6 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
subtitleText << "(" << Atom(Atom::AutoLink, fullTitle) << ")"
<< Atom(Atom::LineBreak);
-#if 0
- // No longer used because the modeule name is a breadcrumb.
QString fixedModule = inner->moduleName();
if (fixedModule == "Qt3SupportLight")
fixedModule = "Qt3Support";
@@ -1265,7 +1263,6 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
subtitleText << "]";
}
}
-#endif
generateHeader(title, inner, marker);
sections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay);
diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf
index 48ecd2c..1450149 100644
--- a/tools/qdoc3/test/qt-html-templates.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates.qdocconf
@@ -41,16 +41,12 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
" <h2><span></span>\n" \
" API Lookup</h2>\n" \
" <div id=\"list001\" class=\"list\">\n" \
- " <!-- TABLE - will be changed " \
- " <table id=\"tbl001\" > \n" \
- " </table> -->\n " \
- " <!-- TABLE - will be changed -->" \
- " <ul id=\"tbl001\" >\n" \
- " <li><a href=\"modules.html\">All modules</a></li>\n" \
- " <li><a href=\"classes.html\">All classes</a></li>\n" \
- " <li><a href=\"functions.html\">All functions</a></li>\n" \
- " <li><a href=\"namespaces.html\">All namespaces</a></li>\n" \
- " <li><a href=\"qdeclarativeelements.html\">QML elements</a></li>\n" \
+ " <ul id=\"ul001\" >\n" \
+ " <li class=\"defaultLink\"><a href=\"modules.html\">All modules</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"classes.html\">All classes</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"functions.html\">All functions</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"namespaces.html\">All namespaces</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"platform-specific.html\">Platform specifics</a></li>\n" \
" </ul> \n" \
" </div>\n" \
" <div id=\"live001\" class=\"live\">\n" \
@@ -58,17 +54,20 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
" </div>\n" \
" <div class=\"box bottombar\" id=\"topics\">\n" \
" <h2><span></span>\n" \
- " Qt Topics</h2>\n" \
+ " API Topics</h2>\n" \
" <div id=\"list002\" class=\"list\">\n" \
- " <!-- TABLE - will be changed " \
- " <table id=\"tbl002\" > \n" \
- " </table> -->\n " \
- " <!-- TABLE - will be changed -->" \
- " <ul id=\"tbl002\" >\n" \
- " <li><a href=\"qt-basic-concepts.html\">Basic Concepts</a></li>\n" \
- " <li><a href=\"qt-gui-concepts.html\">GUI Construction</a></li>\n" \
- " <li><a href=\"platform-specific.html\">Platform specifics</a></li>\n" \
- " <li><a href=\"declarativeui.html\">Qt Quick</a></li>\n" \
+ " <ul id=\"ul002\" >\n" \
+ " <li class=\"defaultLink\"><a href=\"object.html\">QObject model</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"signalsandslots.html\">Signals &amp; Slots</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"eventsandfilters.html\">Event handling</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"declarativeui.html\">Qt Quick</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"mainwindow.html\">The main window</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"widgets-and-layouts.html\">Widgets &amp; Layouts</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"dialogs.html\">Dialog windows</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"paintsystem.html\">The paint system</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"graphicsview.html\">Graphics views</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"model-view-programming.html\">Model&#47;View programming</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"widgets-and-layouts.html\">Widget style &amp; layout</a></li>\n" \
" </ul> \n" \
" </div>\n" \
" <div id=\"live002\" class=\"live\">\n" \
@@ -76,18 +75,14 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
" </div>\n" \
" <div class=\"box\" id=\"examples\">\n" \
" <h2><span></span>\n" \
- " Qt Examples</h2>\n" \
+ " API Examples</h2>\n" \
" <div id=\"list003\" class=\"list\">\n" \
- " <!-- TABLE - will be changed" \
- " <table id=\"tbl003\"> \n"\
- " </table> --> \n " \
- " <!-- TABLE - will be changed -->" \
- " <ul id=\"tbl003\">\n" \
- " <li><a href=\"examples.html\">All examples</a></li>\n" \
- " <li><a href=\"tutorials.html\">All tutorials</a></li>\n" \
- " <li><a href=\"examples.html\">Qt Quick examples</a></li>\n" \
- " <li><a href=\"examples.html\">Desktop examples</a></li>\n" \
- " <li><a href=\"examples.html\">Device examples</a></li>\n" \
+ " <ul id=\"ul003\">\n" \
+ " <li class=\"defaultLink\"><a href=\"examples.html\">All examples</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"tutorials.html\">All tutorials</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"examples.html\">Qt Quick examples</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"examples.html\">Desktop examples</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"examples.html\">Device examples</a></li>\n" \
" </ul> \n" \
" </div>\n" \
" <div id=\"live003\" class=\"live\">\n" \