From 65f4148dc8c2ecd6538c1e2313c633d65e2b7fcc Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Wed, 2 Jun 2010 10:17:09 +0200 Subject: Doc: adding offline docs to assistant and Qt Creator. Improving small docs and adding highlighting --- doc/src/template/images/arrow_down.png | Bin 0 -> 177 bytes doc/src/template/scripts/narrow.js | 78 +++ doc/src/template/scripts/superfish.js | 121 ++++ doc/src/template/style/OfflineStyle.css | 819 ++++++++++++++++++++++++++ doc/src/template/style/narrow.css | 250 ++++++++ doc/src/template/style/superfish.css | 51 ++ doc/src/template/style/superfish_skin.css | 83 +++ tools/qdoc3/htmlgenerator.cpp | 85 ++- tools/qdoc3/test/assistant.qdocconf | 2 + tools/qdoc3/test/designer.qdocconf | 2 + tools/qdoc3/test/linguist.qdocconf | 4 +- tools/qdoc3/test/qdeclarative.qdocconf | 2 + tools/qdoc3/test/qmake.qdocconf | 2 + tools/qdoc3/test/qt-build-docs.qdocconf | 2 + tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf | 1 + tools/qdoc3/test/qt-defines.qdocconf | 53 +- tools/qdoc3/test/qt-html-templates.qdocconf | 55 +- tools/qdoc3/test/qt.qdocconf | 17 +- 18 files changed, 1570 insertions(+), 57 deletions(-) create mode 100644 doc/src/template/images/arrow_down.png create mode 100644 doc/src/template/scripts/narrow.js create mode 100644 doc/src/template/scripts/superfish.js create mode 100644 doc/src/template/style/OfflineStyle.css create mode 100644 doc/src/template/style/narrow.css create mode 100644 doc/src/template/style/superfish.css create mode 100644 doc/src/template/style/superfish_skin.css diff --git a/doc/src/template/images/arrow_down.png b/doc/src/template/images/arrow_down.png new file mode 100644 index 0000000..9d01e97 Binary files /dev/null and b/doc/src/template/images/arrow_down.png differ diff --git a/doc/src/template/scripts/narrow.js b/doc/src/template/scripts/narrow.js new file mode 100644 index 0000000..12d0ce8 --- /dev/null +++ b/doc/src/template/scripts/narrow.js @@ -0,0 +1,78 @@ +var narrowInit = function() { + /* TODO: + Could probably be more efficient, not hardcoding each element to be created + */ + // 1: Create search form + var narrowSearch = $('
'); + var searchform = $("#qtdocsearch"); + narrowSearch.append(searchform); + $("#qtdocheader .content .qtref").after(narrowSearch); + + // 2: Create dropdowns + var narrowmenu = $(''); + + // Lookup + var lookuptext = $("#lookup h2").attr("title"); + $("#lookup ul").removeAttr("id"); + $("#lookup ul li").removeAttr("class"); + $("#lookup ul li").removeAttr("style"); + var lookupul = $("#lookup ul"); + var lookuplist = $('
  • '); + var lookuplink = $(''); + lookuplink.append(lookuptext); + lookuplist.append(lookuplink); + lookuplist.append(lookupul); + narrowmenu.append(lookuplist); + + // Topics + var topicstext = $("#topics h2").attr("title"); + $("#topics ul").removeAttr("id"); + $("#topics ul li").removeAttr("class"); + $("#topics ul li").removeAttr("style"); + var topicsul = $("#topics ul"); + var topicslist = $('
  • '); + var topicslink = $(''); + topicslink.append(topicstext); + topicslist.append(topicslink); + topicslist.append(topicsul); + narrowmenu.append(topicslist); + + // Examples + var examplestext = $("#examples h2").attr("title"); + $("#examples ul").removeAttr("id"); + $("#examples ul li").removeAttr("class"); + $("#examples ul li").removeAttr("style"); + var examplesul = $("#examples ul"); + var exampleslist = $('
  • '); + var exampleslink = $(''); + exampleslink.append(examplestext); + exampleslist.append(exampleslink); + exampleslist.append(examplesul); + narrowmenu.append(exampleslist); + + $("#shortCut").after(narrowmenu); + $('ul#narrowmenu').superfish({ + delay: 100, + autoArrows: false, + disableHI: true + }); +} + +$(document).ready(function(){ + if ($('body').hasClass('narrow')) { + narrowInit(); + } +}); + +$(window).bind('resize', function () { + if($(window).width()<600) { + $('body').addClass('narrow'); + + if ($("#narrowsearch").length == 0) { + narrowInit(); + } + } + else { + $('body').removeClass('narrow'); + } +}); \ No newline at end of file diff --git a/doc/src/template/scripts/superfish.js b/doc/src/template/scripts/superfish.js new file mode 100644 index 0000000..c6a9c7d --- /dev/null +++ b/doc/src/template/scripts/superfish.js @@ -0,0 +1,121 @@ + +/* + * Superfish v1.4.8 - jQuery menu widget + * Copyright (c) 2008 Joel Birch + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt + */ + +;(function($){ + $.fn.superfish = function(op){ + + var sf = $.fn.superfish, + c = sf.c, + $arrow = $([' »'].join('')), + over = function(){ + var $$ = $(this), menu = getMenu($$); + clearTimeout(menu.sfTimer); + $$.showSuperfishUl().siblings().hideSuperfishUl(); + }, + out = function(){ + var $$ = $(this), menu = getMenu($$), o = sf.op; + clearTimeout(menu.sfTimer); + menu.sfTimer=setTimeout(function(){ + o.retainPath=($.inArray($$[0],o.$path)>-1); + $$.hideSuperfishUl(); + if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);} + },o.delay); + }, + getMenu = function($menu){ + var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0]; + sf.op = sf.o[menu.serial]; + return menu; + }, + addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); }; + + return this.each(function() { + var s = this.serial = sf.o.length; + var o = $.extend({},sf.defaults,op); + o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){ + $(this).addClass([o.hoverClass,c.bcClass].join(' ')) + .filter('li:has(ul)').removeClass(o.pathClass); + }); + sf.o[s] = sf.op = o; + + $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() { + if (o.autoArrows) addArrow( $('>a:first-child',this) ); + }) + .not('.'+c.bcClass) + .hideSuperfishUl(); + + var $a = $('a',this); + $a.each(function(i){ + var $li = $a.eq(i).parents('li'); + $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);}); + }); + o.onInit.call(this); + + }).each(function() { + var menuClasses = [c.menuClass]; + if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass); + $(this).addClass(menuClasses.join(' ')); + }); + }; + + var sf = $.fn.superfish; + sf.o = []; + sf.op = {}; + sf.IE7fix = function(){ + var o = sf.op; + if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined) + this.toggleClass(sf.c.shadowClass+'-off'); + }; + sf.c = { + bcClass : 'sf-breadcrumb', + menuClass : 'sf-js-enabled', + anchorClass : 'sf-with-ul', + arrowClass : 'sf-sub-indicator', + shadowClass : 'sf-shadow' + }; + sf.defaults = { + hoverClass : 'sfHover', + pathClass : 'overideThisToUse', + pathLevels : 1, + delay : 800, + animation : {opacity:'show'}, + speed : 'normal', + autoArrows : true, + dropShadows : true, + disableHI : false, // true disables hoverIntent detection + onInit : function(){}, // callback functions + onBeforeShow: function(){}, + onShow : function(){}, + onHide : function(){} + }; + $.fn.extend({ + hideSuperfishUl : function(){ + var o = sf.op, + not = (o.retainPath===true) ? o.$path : ''; + o.retainPath = false; + var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass) + .find('>ul').hide().css('visibility','hidden'); + o.onHide.call($ul); + return this; + }, + showSuperfishUl : function(){ + var o = sf.op, + sh = sf.c.shadowClass+'-off', + $ul = this.addClass(o.hoverClass) + .find('>ul:hidden').css('visibility','visible'); + sf.IE7fix.call($ul); + o.onBeforeShow.call($ul); + $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); }); + return this; + } + }); + +})(jQuery); diff --git a/doc/src/template/style/OfflineStyle.css b/doc/src/template/style/OfflineStyle.css new file mode 100644 index 0000000..ddd580a --- /dev/null +++ b/doc/src/template/style/OfflineStyle.css @@ -0,0 +1,819 @@ +@media screen +{ + html + { + color: #000000; + background: #FFFFFF; + } + body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, p, blockquote, th, td + { + margin: 0; + padding: 0; + } + table + { + border-collapse: collapse; + border-spacing: 0; + } + fieldset, img + { + border: 0; + } + address, caption, cite, code, dfn, em, strong, th, var, optgroup + { + font-style: inherit; + font-weight: inherit; + } + del, ins + { + text-decoration: none; + } + li + { + list-style: none; + } + caption, th + { + text-align: left; + } + h1, h2, h3, h4, h5, h6 + { + font-size: 100%; + } + q:before, q:after + { + content: ''; + } + abbr, acronym + { + border: 0; + font-variant: normal; + } + sup + { + vertical-align: baseline; + } + sub + { + vertical-align: baseline; + } + tt, .qmlreadonly span, .qmldefault span + { + word-spacing:5px; + } + .heading + { + font: normal 600 16px/1.0 Arial; + } + .subtitle + { + font-size: 13px; + } + .small-subtitle + { + font-size: 13px; + } + legend + { + color: #000000; + } + input, button, textarea, select, optgroup, option + { + font-family: inherit; + font-size: inherit; + font-style: inherit; + font-weight: inherit; + } + input, button, textarea, select + { + font-size: 100%; + } + body + { + font: normal 13px/1.2 Verdana; + color: #363534; + } + strong + { + font-weight: bold; + } + em + { + font-style: italic; + } + a + { + color: #00732f; + text-decoration: none; + } + .header, .footer, .wrapper + { + /*min-width: 600px;*/ + max-width: 1500px; + margin: 0 5px; + } + .wrapper + { + position:relative; + top:50px; + } + .wrapper .bd + { + position: relative; + } + + .header, .footer + { + display: block; + clear: both; + overflow: hidden; + } + .header + { + height: 115px; + position: relative; + } + + + .header .qtref + { + position: absolute; + top: 28px; + left: 88px; + width: 302px; + height: 22px; + } + .header .qtref span + { + display: block; + height: 22px; + } + .wrap .content h1 + { + font: 600 18px/1.2 Arial; + } + .wrap .content h2 + { + font: 600 16px/1.2 Arial; + } + .wrap .content h3 + { + font: 600 14px/1.2 Arial; + } + .wrap .content h4 + { + font: 600 12px/1.2 Arial; + } + + .wrap .content p + { + line-height: 20px; + padding: 5px; + } + .wrap .content table p + { + line-height: 20px; + padding: 0px; + } + .wrap .content ul + { + padding-left: 25px; + padding-top: 10px; + } + a:hover + { + color: #4c0033; + text-decoration: underline; + } + .content a:visited + { + color: #4c0033; + text-decoration: none; + } + .content a:visited:hover + { + color: #4c0033; + text-decoration: underline; + } + + pre + { + border: 1px solid #DDDDDD; + margin: 0 20px 10px 10px; + padding: 20px 15px 20px 20px; + overflow-x: auto; + } + table, pre + { + -moz-border-radius: 7px 7px 7px 7px; + background-color: #F6F6F6; + border: 1px solid #E6E6E6; + border-collapse: separate; + font-size: 11px; + /*min-width: 395px;*/ + margin-bottom: 25px; + display: inline-block; + } + thead + { + margin-top: 5px; + font:600 12px/1.2 Arial; + } + th + { + padding: 5px 15px 5px 15px; + background-color: #E1E1E1; + /* border-bottom: 1px solid #E6E6E6;*/ + border-left: 1px solid #E6E6E6; + /* border-right: 1px solid #E6E6E6;*/ + } + td + { + padding: 3px 15px 3px 20px; + /* border-left: 1px solid #E6E6E6; + border-right: 1px solid #E6E6E6;*/ + } + tr.odd td:hover, tr.even td:hover + { + /* border-right: 1px solid #C3C3C3; + border-left: 1px solid #C3C3C3;*/ + } + + td.rightAlign + { + padding: 3px 15px 3px 10px; + } + table tr.odd + { + border-left: 1px solid #E6E6E6; + background-color: #F6F6F6; + color: #66666E; + } + table tr.even + { + border-left: 1px solid #E6E6E6; + background-color: #ffffff; + color: #66666E; + } + table tr.odd td:hover, table tr.even td:hover + { + background-color: #E6E6E6; + } + + span.comment + { + color: #8B0000; + font-style: italic; + } + span.string, span.char + { + color: #254117; + } + + .qmltype + { + text-align: center; + font-size: 160%; + } + .qmlreadonly + { + float: right; + color: #254117; + } + + .qmldefault + { + float: right; + color: red; + } + + .footer + { + border-top:1px solid #E5E5E5; + min-height: 100px; + color: #797775; + font: normal 9px/1 Verdana; + text-align: center; + padding-top: 40px; + margin: 0; + } + + + .wrap + { + margin: 0 5px 0 5px; + } + .wrap .toolbar + { + display:block; + } + + .wrap .breadcrumb ul li + { + float: left; + background: url(../images/breadcrumb.png) no-repeat 0 5px; + padding-left: 15px; + margin-left: 15px; + font-weight: bold; + } + .wrap .breadcrumb ul li.last + { + font-weight: normal; + } + .wrap .breadcrumb ul li a + { + /* color: #363534;*/ + color: #00732F; + } + .wrap .breadcrumb ul li.first + { + background-image: none; + padding-left: 0; + margin-left: 0; + } + .wrap .content + { + word-wrap:break-word; + } + .wrap .content li + { + padding-left: 12px; + background: url(../images/bullet_sq.png) no-repeat 0 5px; + font: normal 400 10pt/1 Verdana; + margin-bottom: 10px; + } + + .offline .wrap .content + { + padding-top: 15px; + } + + .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after + { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; + } + + hr + { + background-color: #E6E6E6; + border: 1px solid #E6E6E6; + height: 1px; + width: 100%; + text-align: left; + margin: 5px 0px 5px 0px; + } + + .content .alignedsummary + { + margin: 5px; + width:100%; + } + + + .toc + { + float: right; + -moz-border-radius: 7px 7px 7px 7px; + background-color: #F6F6F6; + border: 1px solid #DDDDDD; + margin: 0 20px 10px 10px; + padding: 20px 15px 20px 20px; + height: auto; + width: 200px; + } + + .toc h3, .generic a + { + font: 600 12px/1.2 Arial; + } + + .wrap .content .toc ul + { + padding-left: 0px; + } + + + .wrap .content .toc .level2 + { + margin-left: 15px; + } + + .wrap .content .toc .level3 + { + margin-left: 30px; + } + + .content .toc li + { + font: normal 10px/1.2 Verdana; + background: url(../images/bullet_dn.png) no-repeat 0 5px; + } + + + .generic{ + max-width:75%; + } + .generic td{ + padding:0; + } + + .generic .odd .alphaChar{ + background-color: #F6F6F6; + } + + .generic .even .alphaChar{ + background-color: #FFFFFF; + } + + .highlightedCode + { + margin:10px; + } + + .flowList{ + vertical-align:top; + } + .alphaChar{ + width:100%; + background-color:#F6F6F6; + border:1px solid #E6E6E6; + font-size:12pt; + padding-left:10px; + margin-top:10px; + margin-bottom:10px; + } + + .flowList dl{ + } + .flowList dd{ + display:inline-block; + margin-left:10px; + width:250px; + } + .wrap .content .flowList p{ + padding:0px; + } + + .relpage + { + -moz-border-radius: 7px 7px 7px 7px; + border: 1px solid #DDDDDD; + padding: 25px 25px; + clear: both; + } + .relpage ul + { + float: none; + padding: 15px; + } + .content .relpage li + { + font: normal 11px/1.2 Verdana; + } + h3.fn, span.fn + { + background-color: #F6F6F6; + border-width: 1px; + border-style: solid; + border-color: #E6E6E6; + font-weight: bold; + word-spacing:3px; + } + + .functionIndex { + font-size:12pt; + word-spacing:10px; + margin-bottom:10px; + background-color: #F6F6F6; + border-width: 1px; + border-style: solid; + border-color: #E6E6E6; + width:100%; + } + + .centerAlign { text-align:center;} + .rightAlign {text-align:right;} + .leftAlign {text-align:left;} + .topAlign{vertical-align:top } + .functionIndex a{display:inline-block;} + + /* start index box */ + .indexbox + { + width: 100%; + display:inline-block; + } + + .indexboxcont { display: block; } + + .indexboxbar + { + border-bottom:1px solid #E5E5E5; + margin-bottom: 25px; + } + + .indexboxcont .section + { + display: inline-block; + padding:0 2% 0 1%; + vertical-align:top; + } + + .indexboxcont .section { + float: left; + } + + .indexboxcont .section p + { + padding-top: 20px; + padding-bottom: 20px; + } + .indexboxcont .sectionlist + { + display: inline-block; + vertical-align:top; + padding: 0; + } + .indexboxcont .sectionlist ul + { + margin-bottom: 20px; + } + + .indexboxcont .sectionlist ul li + { + line-height: 12px; + } + + .content .indexboxcont li + { + font: normal 600 13px/1 Verdana; + } + + .indexbox a:hover, .indexbox a:visited:hover + { + color: #4c0033; + text-decoration: underline; + } + + .indexbox a:visited + { + color: #00732f; + text-decoration: none; + } + + .indexbox .indexIcon { + width: 11%; + } + + + .indexboxcont:after + { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; + } + + body.offline + { + background-image: none; + } + + .offline .footer { + margin: 0; + } + .offline .header + { + width: 100%; + margin: 0; + height: auto; + background-color: #ffffff; + padding: 10px 0 5px 0; + overflow: visible; + border-bottom: solid #E5E5E5 1px; + z-index:1; + position:fixed; + } + + .offline .header .content + { + } + .offline .header .qtref + { + color: #00732F; + position: static; + float: left; + margin-left: 5px; + font: bold 18px/1 Arial; + } + + .offline .header .qtref:visited + { + color: #00732F; + } + .offline .header .qtref:hover + { + color: #00732F; + text-decoration:none; + } + .offline .header .qtref span + { + background-image: none; + text-indent: 0; + text-decoration:none; + } + + .offline .wrap + { + margin: 0 5px 0 5px; + } + + .offline .wrap .toolbar + { + display:block; + padding-top:5px; + } + + .offline .wrap .breadcrumb ul li { + font-weight: normal; + } + + .offline .wrap .breadcrumb ul li a { + /*color: #44a51c;*/ + } + + .offline .wrap .breadcrumb ul li.last a { + /*color: #363534;*/ + } + + + + .narrow .indexboxcont .section { + width: 64%; + padding-left: 0; + } + + .narrow .indexboxcont .sectionlist { + width: 32.5%; + } + + .header .icon, + .sidebar, + .feedback, + .t_button, + .feedback, + #feedbackBox, + #feedback, + #blurpage, + .indexbox .indexIcon span, + .wrapper .hd, + .offline .indexbox .indexIcon, + .offline .header #nav-logo, + #offlinemenu, + #offlinesearch, + .offline .header #nav-topright, + .offline .header #shortCut , + .offline .wrapper .hd, + .offline .wrapper .ft, + .offline .sidebar, + .offline .wrap .feedback + { + display:none; + } + + /* end offline mode */ +#narrowmenu { + display: none; + float: right; + margin: 15px 40px 0 0; + font-size: 11px; + } + + .narrow #narrowmenu { + display: block; + } + + #narrowsearch{ + display:none; + } + + #narrowmenu ul + { + border-bottom:solid 1px #E5E5E5; + border-left:solid 1px #E5E5E5; + border-right:solid 1px #E5E5E5; + } + + #narrowmenu a { + line-height: 1.1; + background: url(../images/arrow_down.png) no-repeat 100% 50%; + white-space: nowrap; + padding: 0 16px 0 5px; + } + + #narrowmenu li { + margin-left: 20px; + } + + #narrowmenu li li { + margin: 0 0 5px 0; + } + + #narrowmenu li li a { + padding: 0; + background-image: none; + } + + #narrowmenu li, + #narrowmenu li ul { + background-color: #fff; + } + + #narrowmenu li ul { + width: auto; + padding: 5px; + margin-top:-15px; + } + + .sf-menu li:hover ul, .sf-menu li.sfHover ul { + top: 1.2em; + } +.sf-menu, .sf-menu * { + margin: 0; + padding: 0; + list-style: none; +} +.sf-menu { + line-height: 1.0; +} +.sf-menu ul { + position: absolute; + top: -999em; + width: 10em; /* left offset of submenus need to match (see below) */ +} +.sf-menu ul li { + width: 100%; +} +.sf-menu li:hover { + visibility: inherit; /* fixes IE7 'sticky bug' */ +} +.sf-menu li { + float: left; + position: relative; +} +.sf-menu a { + display: block; + position: relative; +} +.sf-menu li:hover ul, +.sf-menu li.sfHover ul { + left: 0; + top: 2.5em; /* match top ul list item height */ + z-index: 99; +} +ul.sf-menu li:hover li ul, +ul.sf-menu li.sfHover li ul { + top: -999em; +} +ul.sf-menu li li:hover ul, +ul.sf-menu li li.sfHover ul { + left: 10em; /* match ul width */ + top: 0; +} +ul.sf-menu li li:hover li ul, +ul.sf-menu li li.sfHover li ul { + top: -999em; +} +ul.sf-menu li li li:hover ul, +ul.sf-menu li li li.sfHover ul { + left: 10em; /* match ul width */ + top: 0; +} + +} +/* end of screen media */ + +/* start of print media */ + +@media print +{ + input, textarea, .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft + { + display: none; + background: none; + } + .content + { + position: absolute; + top: 0px; + left: 0px; + background: none; + display: block; + } +} +/* end of print media */ diff --git a/doc/src/template/style/narrow.css b/doc/src/template/style/narrow.css new file mode 100644 index 0000000..05159aa --- /dev/null +++ b/doc/src/template/style/narrow.css @@ -0,0 +1,250 @@ + /* start narrow mode */ + + body.narrow + { + background-image: none; + } + + .narrow a { + color: #44a51c; + } + + .narrow .header, .narrow .header .content, .narrow .footer, .narrow .wrapper { + margin: 0 7px; + min-width: 300px; + } + + .narrow .footer { + margin: 0; + } + .narrow .header + { + width: 100%; + margin: 0; + height: auto; + background: #fff url(../images/header_bg.png) repeat-x 0 100%; + padding: 10px 0 5px 0; + overflow: visible; + } + + .narrow .header .content + { + } + + .narrow .header #nav-logo + { + display: none; + } + + .narrow .header .qtref + { + width: auto; + height: auto; + color: #363534; + position: static; + float: left; + margin-left: 25px; + font: bold 18px/1 Arial; + } + + .narrow .header .qtref a + { + color: #363534; + } + + .narrow .header .qtref span + { + background-image: none; + text-indent: 0; + } + + .narrow .header #nav-topright + { + display: none; + } + + .narrow .header #shortCut + { + clear: both; + font-weight: normal; + position: static; + float: left; + margin: 15px 0 0 25px; + overflow: hidden; + padding: 0; + height: auto; + } + + .narrow .header #shortCut ul + { + float: none; + margin: 0; + width: auto; + font-size: 11px; + } + + .narrow .header #shortCut ul li + { + background-image: none; + } + + .narrow .header #shortCut ul .shortCut-topleft-active, + .narrow .header #shortCut ul .shortCut-topleft-inactive + { + background-image: none; + height: auto; + padding: 0; + width: auto; + } + .narrow .header #shortCut ul li a + { + color: #44a51c; + } + + .narrow .wrapper .hd + { + background: url(../images/bg_ul_blank.png) no-repeat 0 0; + } + + .narrow .wrapper .bd + { + background: url(../images/bg_l_blank.png) repeat-y 0 0; + } + + .narrow .wrapper .ft + { + background: url(../images/bg_ll_blank.png) no-repeat 0 0; + } + + .narrow .sidebar + { + display: none; + } + + .narrow .wrap + { + margin: 0 5px 0 5px; + } + + .narrow .wrap .toolbar + { + border-bottom: none; + } + + .narrow .wrap .content + { + padding-top: 15px; + } + + .narrow .wrap .feedback + { + display: none; + } + + .narrow .wrap .breadcrumb ul li { + font-weight: normal; + } + + .narrow .wrap .breadcrumb ul li a { + color: #44a51c; + } + + .narrow .wrap .breadcrumb ul li.last a { + color: #363534; + } + + #narrowsearch { + display: none; + } + + .narrow #narrowsearch { + display: block; + float: right; + margin-right: 25px; + _position: relative; + } + + .narrow #narrowsearch fieldset { + _position: absolute; + _margin-top: -1px; + } + + .narrow #narrowsearch { + background: url("http://doc.qt.nokia.com/prototype/html/images/sprites-combined.png") no-repeat scroll -6px -348px transparent; + height: 21px; + padding: 2px 0 0 5px; + width: 167px; + } + + .narrow #narrowsearch input { + border: none; + font: 13px/1.2 Verdana; + height: 19px; + outline: none; + padding: 0; + width: 158px; + *border: 1px solid #fff; + *height: 17px; + _height: 18px; + } + + .narrow .indexbox .indexIcon { + display: none; + } + + .narrow .indexboxcont .section { + width: 64%; + padding-left: 0; + } + + .narrow .indexboxcont .sectionlist { + width: 32.5%; + } + + #narrowmenu { + display: none; + float: right; + margin: 15px 40px 0 0; + font-size: 11px; + } + + .narrow #narrowmenu { + display: block; + } + + #narrowmenu a { + line-height: 1.1; + background: url(../images/arrow_down.png) no-repeat 100% 50%; + white-space: nowrap; + padding: 0 16px 0 5px; + } + + #narrowmenu li { + margin-left: 20px; + } + + #narrowmenu li li { + margin: 0 0 5px 0; + } + + #narrowmenu li li a { + padding: 0; + background-image: none; + } + + #narrowmenu li, + #narrowmenu li ul { + background-color: #fff; + margin-top:-1px; + } + + #narrowmenu li ul { + width: auto; + padding: 5px; + } + + .sf-menu li:hover ul, .sf-menu li.sfHover ul { + top: 1.2em; + } + + /* end narrow mode */ diff --git a/doc/src/template/style/superfish.css b/doc/src/template/style/superfish.css new file mode 100644 index 0000000..0cf0f7d --- /dev/null +++ b/doc/src/template/style/superfish.css @@ -0,0 +1,51 @@ +.sf-menu, .sf-menu * { + margin: 0; + padding: 0; + list-style: none; +} +.sf-menu { + line-height: 1.0; +} +.sf-menu ul { + position: absolute; + top: -999em; + width: 10em; /* left offset of submenus need to match (see below) */ +} +.sf-menu ul li { + width: 100%; +} +.sf-menu li:hover { + visibility: inherit; /* fixes IE7 'sticky bug' */ +} +.sf-menu li { + float: left; + position: relative; +} +.sf-menu a { + display: block; + position: relative; +} +.sf-menu li:hover ul, +.sf-menu li.sfHover ul { + left: 0; + top: 2.5em; /* match top ul list item height */ + z-index: 99; +} +ul.sf-menu li:hover li ul, +ul.sf-menu li.sfHover li ul { + top: -999em; +} +ul.sf-menu li li:hover ul, +ul.sf-menu li li.sfHover ul { + left: 10em; /* match ul width */ + top: 0; +} +ul.sf-menu li li:hover li ul, +ul.sf-menu li li.sfHover li ul { + top: -999em; +} +ul.sf-menu li li li:hover ul, +ul.sf-menu li li li.sfHover ul { + left: 10em; /* match ul width */ + top: 0; +} diff --git a/doc/src/template/style/superfish_skin.css b/doc/src/template/style/superfish_skin.css new file mode 100644 index 0000000..8d84827 --- /dev/null +++ b/doc/src/template/style/superfish_skin.css @@ -0,0 +1,83 @@ + +/*** DEMO SKIN ***/ +.sf-menu { + float: left; + margin-bottom: 1em; +} +.sf-menu a { + border-left: 1px solid #fff; + border-top: 1px solid #CFDEFF; + padding: .75em 1em; + text-decoration:none; +} +.sf-menu a, .sf-menu a:visited { /* visited pseudo selector so IE6 applies text colour*/ + color: #13a; +} +.sf-menu li { + background: #BDD2FF; +} +.sf-menu li li { + background: #AABDE6; +} +.sf-menu li li li { + background: #9AAEDB; +} +.sf-menu li:hover, .sf-menu li.sfHover, +.sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active { + background: #CFDEFF; + outline: 0; +} + +/*** arrows **/ +.sf-menu a.sf-with-ul { + padding-right: 2.25em; + min-width: 1px; /* trigger IE7 hasLayout so spans position accurately */ +} +.sf-sub-indicator { + position: absolute; + display: block; + right: .75em; + top: 1.05em; /* IE6 only */ + width: 10px; + height: 10px; + text-indent: -999em; + overflow: hidden; + background: url('../images/arrows-ffffff.png') no-repeat -10px -100px; /* 8-bit indexed alpha png. IE6 gets solid image only */ +} +a > .sf-sub-indicator { /* give all except IE6 the correct values */ + top: .8em; + background-position: 0 -100px; /* use translucent arrow for modern browsers*/ +} +/* apply hovers to modern browsers */ +a:focus > .sf-sub-indicator, +a:hover > .sf-sub-indicator, +a:active > .sf-sub-indicator, +li:hover > a > .sf-sub-indicator, +li.sfHover > a > .sf-sub-indicator { + background-position: -10px -100px; /* arrow hovers for modern browsers*/ +} + +/* point right for anchors in subs */ +.sf-menu ul .sf-sub-indicator { background-position: -10px 0; } +.sf-menu ul a > .sf-sub-indicator { background-position: 0 0; } +/* apply hovers to modern browsers */ +.sf-menu ul a:focus > .sf-sub-indicator, +.sf-menu ul a:hover > .sf-sub-indicator, +.sf-menu ul a:active > .sf-sub-indicator, +.sf-menu ul li:hover > a > .sf-sub-indicator, +.sf-menu ul li.sfHover > a > .sf-sub-indicator { + background-position: -10px 0; /* arrow hovers for modern browsers*/ +} + +/*** shadows for all but IE6 ***/ +.sf-shadow ul { + background: url('../images/shadow.png') no-repeat bottom right; + padding: 0 8px 9px 0; + -moz-border-radius-bottomleft: 17px; + -moz-border-radius-topright: 17px; + -webkit-border-top-right-radius: 17px; + -webkit-border-bottom-left-radius: 17px; +} +.sf-shadow ul.sf-shadow-off { + background: transparent; +} diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index bf80277..f6b8c06 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -519,14 +519,14 @@ int HtmlGenerator::generateAtom(const Atom *atom, out() << formattingRightMap()[ATOM_FORMATTING_TELETYPE]; break; case Atom::Code: - out() << "
    "
    +	out() << "
    "
                   << trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
                                                      marker,relative))
                   << "
    \n"; break; #ifdef QDOC_QML case Atom::Qml: - out() << "
    "
    +	out() << "
    "
                   << trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
                                                      marker,relative))
                   << "
    \n"; @@ -534,7 +534,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, #endif case Atom::CodeNew: out() << "

    you can rewrite it as

    \n" - << "
    "
    +              << "
    "
                   << trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
                                                      marker,relative))
                   << "
    \n"; @@ -543,7 +543,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, out() << "

    For example, if you have code like

    \n"; // fallthrough case Atom::CodeBad: - out() << "
    "
    +        out() << "
    "
                   << trimmedTrailing(protectEnc(plainCode(indent(codeIndent,atom->string()))))
                   << "
    \n"; break; @@ -1797,31 +1797,51 @@ void HtmlGenerator::generateHeader(const QString& title, out() << " " << shortVersion << protectEnc(title) << "\n"; - out() << " "; - out() << ""; - out() << ""; - out() << ""; - - //out() << " Qt Reference Documentation"; - out() << " \n"; - out() << " \n"; - out() << " \n"; - out() << "\n"; if (offlineDocs) - out() << "\n"; + { + out() << " "; + out() << "\n"; + out() << "\n"; // narrow mainly for Creator + } else - out() << "\n"; + { + out() << " "; + out() << " \n"; + out() << "\n"; + out() << "\n"; + out() << "\n"; + // jquery functions + out() << " \n"; + out() << " \n"; + // menus and small docs js and css + out() << " \n"; + out() << " \n"; + out() << " "; + out() << " "; + + // syntax highlighter js and css + // out() << " \n"; + // out() << " \n"; + // out() << " \n"; + // out() << " \n"; + // out() << " \n"; + + out() << "\n"; + out() << "\n"; + } #ifdef GENERATE_MAC_REFS if (mainPage) @@ -1863,8 +1883,16 @@ void HtmlGenerator::generateFooter(const Node *node) out() << QString(footer).replace("\\" + COMMAND_VERSION, myTree->version()) << QString(address).replace("\\" + COMMAND_VERSION, myTree->version()); - out() << " \n"; + + if (offlineDocs) + { out() << "\n"; + } + else + { + out() << " \n"; + out() << "\n"; + } out() << "\n"; } @@ -1886,7 +1914,7 @@ void HtmlGenerator::generateBrief(const Node *node, CodeMarker *marker, void HtmlGenerator::generateIncludes(const InnerNode *inner, CodeMarker *marker) { if (!inner->includes().isEmpty()) { - out() << "
    "
    +        out() << "
    "
                   << trimmedTrailing(highlightedCode(indent(codeIndent,
                                                             marker->markedUpIncludes(inner->includes())),
                                                      marker,inner))
    @@ -2110,6 +2138,8 @@ void HtmlGenerator::generateNavigationBar(const NavigationBar& bar,
                 out() << "]\n";
     #endif
             }
    +		if (fake->name() != QString("index.html"))
    +			{
             if (bar.current.begin() != 0) {
                 out() << "[Home]\n";
    @@ -2121,6 +2151,7 @@ void HtmlGenerator::generateNavigationBar(const NavigationBar& bar,
                 out() << "]\n";
             }
             out() << "

    \n"; + } } } #endif diff --git a/tools/qdoc3/test/assistant.qdocconf b/tools/qdoc3/test/assistant.qdocconf index 167bb19..4b52992 100644 --- a/tools/qdoc3/test/assistant.qdocconf +++ b/tools/qdoc3/test/assistant.qdocconf @@ -30,6 +30,7 @@ qhp.Assistant.extraFiles = images/bg_l.png \ images/page.png \ images/page_bg.png \ images/sprites-combined.png \ + images/arrow-down.png \ images/spinner.gif \ images/stylesheet-coffee-plastique.png \ images/taskmenuextension-example.png \ @@ -37,6 +38,7 @@ qhp.Assistant.extraFiles = images/bg_l.png \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ + style/OfflineStyle.css \ style/style_ie6.css \ style/style_ie7.css \ style/style_ie8.css \ diff --git a/tools/qdoc3/test/designer.qdocconf b/tools/qdoc3/test/designer.qdocconf index 48e3ea1..b1f37dc 100644 --- a/tools/qdoc3/test/designer.qdocconf +++ b/tools/qdoc3/test/designer.qdocconf @@ -30,6 +30,7 @@ qhp.Designer.extraFiles = images/bg_l.png \ images/page.png \ images/page_bg.png \ images/sprites-combined.png \ + images/arrow-down.png \ images/spinner.gif \ images/stylesheet-coffee-plastique.png \ images/taskmenuextension-example.png \ @@ -37,6 +38,7 @@ qhp.Designer.extraFiles = images/bg_l.png \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ + style/OfflineStyle.css \ style/style_ie6.css \ style/style_ie7.css \ style/style_ie8.css \ diff --git a/tools/qdoc3/test/linguist.qdocconf b/tools/qdoc3/test/linguist.qdocconf index 8974bd7..26fb55c 100644 --- a/tools/qdoc3/test/linguist.qdocconf +++ b/tools/qdoc3/test/linguist.qdocconf @@ -30,13 +30,15 @@ qhp.Linguist.extraFiles = images/bg_l.png \ images/page.png \ images/page_bg.png \ images/sprites-combined.png \ - images/spinner.gif \ + images/arrow-down.png \ +s images/spinner.gif \ images/stylesheet-coffee-plastique.png \ images/taskmenuextension-example.png \ images/coloreditorfactoryimage.png \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ + style/OfflineStyle.css \ style/style_ie6.css \ style/style_ie7.css \ style/style_ie8.css \ diff --git a/tools/qdoc3/test/qdeclarative.qdocconf b/tools/qdoc3/test/qdeclarative.qdocconf index 0f2e381..74fd802 100644 --- a/tools/qdoc3/test/qdeclarative.qdocconf +++ b/tools/qdoc3/test/qdeclarative.qdocconf @@ -41,6 +41,7 @@ qhp.Qml.extraFiles = images/bg_l.png \ images/page.png \ images/page_bg.png \ images/sprites-combined.png \ + images/arrow-down.png \ images/spinner.png \ images/stylesheet-coffee-plastique.png \ images/taskmenuextension-example.png \ @@ -48,6 +49,7 @@ qhp.Qml.extraFiles = images/bg_l.png \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ + style/OfflineStyle.css \ style/style_ie6.css \ style/style_ie7.css \ style/style_ie8.css \ diff --git a/tools/qdoc3/test/qmake.qdocconf b/tools/qdoc3/test/qmake.qdocconf index ea58059..f069129 100644 --- a/tools/qdoc3/test/qmake.qdocconf +++ b/tools/qdoc3/test/qmake.qdocconf @@ -30,6 +30,7 @@ qhp.qmake.extraFiles = images/bg_l.png \ images/page.png \ images/page_bg.png \ images/sprites-combined.png \ + images/arrow-down.png \ images/spinner.gif \ images/stylesheet-coffee-plastique.png \ images/taskmenuextension-example.png \ @@ -37,6 +38,7 @@ qhp.qmake.extraFiles = images/bg_l.png \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ + style/OfflineStyle.css \ style/style_ie6.css \ style/style_ie7.css \ style/style_ie8.css \ diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf index bd363a6..00704ea 100644 --- a/tools/qdoc3/test/qt-build-docs.qdocconf +++ b/tools/qdoc3/test/qt-build-docs.qdocconf @@ -36,6 +36,7 @@ qhp.Qt.extraFiles = index.html \ images/page.png \ images/page_bg.png \ images/sprites-combined.png \ + images/arrow-down.png \ images/spinner.gif \ images/stylesheet-coffee-plastique.png \ images/taskmenuextension-example.png \ @@ -43,6 +44,7 @@ qhp.Qt.extraFiles = index.html \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ + style/OfflineStyle.css \ style/style_ie6.css \ style/style_ie7.css \ style/style_ie8.css \ diff --git a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf index caf5f73..712e23f 100644 --- a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf @@ -44,6 +44,7 @@ qhp.Qt.extraFiles = index.html \ images/page.png \ images/page_bg.png \ images/sprites-combined.png \ + images/arrow-down.png \ images/spinner.gif \ images/stylesheet-coffee-plastique.png \ images/taskmenuextension-example.png \ diff --git a/tools/qdoc3/test/qt-defines.qdocconf b/tools/qdoc3/test/qt-defines.qdocconf index 3e71d07..9e41d93 100644 --- a/tools/qdoc3/test/qt-defines.qdocconf +++ b/tools/qdoc3/test/qt-defines.qdocconf @@ -20,34 +20,49 @@ codeindent = 1 # See also qhp.Qt.extraFiles extraimages.HTML = qt-logo \ trolltech-logo \ - bg_l.png \ - bg_l_blank.png \ - bg_r.png \ - box_bg.png \ - breadcrumb.png \ - bullet_gt.png \ - bullet_dn.png \ - bullet_sq.png \ - bullet_up.png \ - feedbackground.png \ - horBar.png \ - page.png \ - page_bg.png \ - sprites-combined.png \ - spinner.gif \ - taskmenuextension-example.png \ - coloreditorfactoryimage.png \ - dynamiclayouts-example.png \ - stylesheet-coffee-plastique.png + bg_l.png \ + bg_l_blank.png \ + bg_ll_blank.png \ + bg_ul_blank.png \ + header_bg.png \ + bg_r.png \ + box_bg.png \ + breadcrumb.png \ + bullet_gt.png \ + bullet_dn.png \ + bullet_sq.png \ + bullet_up.png \ + arrow_down.png \ + feedbackground.png \ + horBar.png \ + page.png \ + page_bg.png \ + sprites-combined.png \ + spinner.gif \ + stylesheet-coffee-plastique.png \ + taskmenuextension-example.png \ + coloreditorfactoryimage.png \ + dynamiclayouts-example.png \ # This stuff is used by the new doc format. scriptdirs = $QT_SOURCE_TREE/doc/src/template/scripts styledirs = $QT_SOURCE_TREE/doc/src/template/style scripts.HTML = functions.js \ + shBrushCpp.js \ + shCore.js \ + shLegacy.js \ + narrow.js \ + superfish.js \ jquery.js styles.HTML = style.css \ + shCore.css \ + shThemeDefault.css \ + narrow.css \ + superfish.css \ + superfish_skin.css \ + OfflineStyle.css \ style_ie6.css \ style_ie7.css \ style_ie8.css diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index b72a1eb..60f5fb1 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -1,12 +1,19 @@ -HTML.stylesheets = style/style_ie6.css \ +HTML.stylesheets = style/style.css \ + style/OfflineStyle.css \ style/style_ie7.css \ style/style_ie8.css \ - style/style.css + style/style_ie6.css HTML.postheader = "
    \n" \ + "
    \n" \ "
    \n" \ " Home
    \n" \ " Qt Reference Documentation\n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ "
    \n" \ "
    \n" \ "
    \n" \ @@ -35,14 +72,14 @@ HTML.postheader = "
    \n" \ "
    \n" \ " Search index:
    \n" \ "
    \n" \ - "
    \n" \ + " \n" \ "
    \n" \ " \n" \ "
    \n" \ "
    \n" \ "
    \n" \ "
    \n" \ - "

    \n" \ + "

    \n" \ " API Lookup

    \n" \ "
    \n" \ "
      \n" \ @@ -56,7 +93,7 @@ HTML.postheader = "
      \n" \ "
      \n" \ "
    \n" \ "
    \n" \ - "

    \n" \ + "

    \n" \ " Qt Topics

    \n" \ "
    \n" \ "
      \n" \ @@ -68,7 +105,7 @@ HTML.postheader = "
      \n" \ "
      \n" \ "
    \n" \ "
    \n" \ - "

    \n" \ + "

    \n" \ " Examples

    \n" \ "
    \n" \ "
      \n" \ @@ -129,7 +166,7 @@ HTML.footer = " \n" \ "
    \n" \ "
    \n" \ "
    \n" \ - "\n" \ " ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';\n" \ " var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);\n" \ " })();\n" \ - " -->\n" + "\n" diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf index 267d536..edf6d92 100644 --- a/tools/qdoc3/test/qt.qdocconf +++ b/tools/qdoc3/test/qt.qdocconf @@ -28,13 +28,17 @@ qhp.Qt.indexRoot = qhp.Qt.extraFiles = index.html \ images/bg_l.png \ images/bg_l_blank.png \ - images/bg_r.png \ + images/bg_ll_blank.png \ + images/bg_ul_blank.png \ + images/header_bg.png \ + images/bg_r.png \ images/box_bg.png \ images/breadcrumb.png \ images/bullet_gt.png \ images/bullet_dn.png \ images/bullet_sq.png \ images/bullet_up.png \ + images/arrow_down.png \ images/feedbackground.png \ images/horBar.png \ images/page.png \ @@ -47,6 +51,17 @@ qhp.Qt.extraFiles = index.html \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ + scripts/shBrushCpp.js \ + scripts/shCore.js \ + scripts/shLegacy.js \ + scripts/narrow.js \ + scripts/superfish.js \ + style/shCore.css \ + style/shThemeDefault.css \ + style/narrow.css \ + style/superfish.css \ + style/superfish_skin.css \ + style/OfflineStyle.css \ style/style_ie6.css \ style/style_ie7.css \ style/style_ie8.css \ -- cgit v0.12