diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/linguist/lupdate/qml.cpp | 14 | ||||
-rw-r--r-- | tools/qdoc3/htmlgenerator.cpp | 68 | ||||
-rw-r--r-- | tools/qdoc3/test/classic.css | 103 |
3 files changed, 118 insertions, 67 deletions
diff --git a/tools/linguist/lupdate/qml.cpp b/tools/linguist/lupdate/qml.cpp index 78a9afd..f33eae3 100644 --- a/tools/linguist/lupdate/qml.cpp +++ b/tools/linguist/lupdate/qml.cpp @@ -49,12 +49,12 @@ QT_BEGIN_NAMESPACE -#include "parser/javascriptengine_p.h" -#include "parser/javascriptparser_p.h" -#include "parser/javascriptlexer_p.h" -#include "parser/javascriptnodepool_p.h" -#include "parser/javascriptastvisitor_p.h" -#include "parser/javascriptast_p.h" +#include "parser/qmljsengine_p.h" +#include "parser/qmljsparser_p.h" +#include "parser/qmljslexer_p.h" +#include "parser/qmljsnodepool_p.h" +#include "parser/qmljsastvisitor_p.h" +#include "parser/qmljsast_p.h" #include <QCoreApplication> #include <QFile> @@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE #include <iostream> #include <cstdlib> -using namespace JavaScript; +using namespace QmlJS; class FindTrCalls: protected AST::Visitor { diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 7a64f5f..d18be12 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -701,13 +701,17 @@ int HtmlGenerator::generateAtom(const Atom *atom, else if (atom->string() == ATOM_LIST_VALUE) { threeColumnEnumValueTable = isThreeColumnEnumValueTable(atom); if (threeColumnEnumValueTable) { - out() << "<p><table border=\"1\" cellpadding=\"2\" cellspacing=\"1\" width=\"100%\">\n" - "<tr><th width=\"25%\">Constant</th><th width=\"15%\">Value</th>" - "<th width=\"60%\">Description</th></tr>\n"; + out() << "<p><table class=\"valuelist\" border=\"1\" cellpadding=\"2\" " + << "cellspacing=\"1\" width=\"100%\">\n" + << "<tr><th width=\"25%\">Constant</th>" + << "<th width=\"15%\">Value</th>" + << "<th width=\"60%\">Description</th></tr>\n"; } else { - out() << "<p><table border=\"1\" cellpadding=\"2\" cellspacing=\"1\" width=\"40%\">\n" - << "<tr><th width=\"60%\">Constant</th><th width=\"40%\">Value</th></tr>\n"; + out() << "<p><table class=\"valuelist\" border=\"1\" cellpadding=\"2\" " + << "cellspacing=\"1\" width=\"40%\">\n" + << "<tr><th width=\"60%\">Constant</th><th " + << "width=\"40%\">Value</th></tr>\n"; } } else { @@ -881,14 +885,17 @@ int HtmlGenerator::generateAtom(const Atom *atom, } if (!atom->string().isEmpty()) { if (atom->string().contains("%")) - out() << "<p><table width=\"" << atom->string() << "\" " + out() << "<p><table class=\"generic\" width=\"" << atom->string() << "\" " << "align=\"center\" cellpadding=\"2\" " << "cellspacing=\"1\" border=\"0\">\n"; - else - out() << "<p><table align=\"center\" cellpadding=\"2\" cellspacing=\"1\" border=\"0\">\n"; + else { + out() << "<p><table class=\"generic\" align=\"center\" cellpadding=\"2\" " + << "cellspacing=\"1\" border=\"0\">\n"; + } } else { - out() << "<p><table align=\"center\" cellpadding=\"2\" cellspacing=\"1\" border=\"0\">\n"; + out() << "<p><table class=\"generic\" align=\"center\" cellpadding=\"2\" " + << "cellspacing=\"1\" border=\"0\">\n"; } numTableRows = 0; break; @@ -1102,6 +1109,7 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, if (!s->inherited.isEmpty()) needOtherSection = true; } else { + out() << "<hr />\n"; out() << "<a name=\"" << registerRef((*s).name.toLower()) << "\"></a>\n"; @@ -1637,9 +1645,9 @@ void HtmlGenerator::generateTableOfContents(const Node *node, QString tdTag; if (numColumns > 1) { - tdTag = "<td width=\"" + - QString::number((100 + numColumns - 1) / numColumns) + "%\">"; - out() << "<p><table width=\"100%\">\n<tr valign=\"top\">" << tdTag << "\n"; + tdTag = "<td width=\"" + QString::number((100 + numColumns - 1) / numColumns) + "%\">"; + out() << "<p><table class=\"toc\" width=\"100%\">\n<tr valign=\"top\">" + << tdTag << "\n"; } // disable nested links in table of contents @@ -1879,7 +1887,8 @@ void HtmlGenerator::generateAnnotatedList(const Node *relative, CodeMarker *marker, const QMap<QString, const Node *> &nodeMap) { - out() << "<p><table width=\"100%\" class=\"annotated\" cellpadding=\"2\" cellspacing=\"1\" border=\"0\">\n"; + out() << "<p><table width=\"100%\" class=\"annotated\" cellpadding=\"2\" " + << "cellspacing=\"1\" border=\"0\">\n"; int row = 0; foreach (const QString &name, nodeMap.keys()) { @@ -2036,7 +2045,7 @@ void HtmlGenerator::generateCompactList(const Node *relative, } firstOffset[NumColumns] = classMap.count(); - out() << "<p><table width=\"100%\">\n"; + out() << "<p><table class=\"generic\" width=\"100%\">\n"; for (k = 0; k < numRows; k++) { out() << "<tr>\n"; for (i = 0; i < NumColumns; i++) { @@ -2362,12 +2371,12 @@ void HtmlGenerator::generateSectionList(const Section& section, name_alignment = false; } if (name_alignment) { - out() << "<table border=\"0\" cellpadding=\"0\" " + out() << "<table class=\"alignedsummary\" border=\"0\" cellpadding=\"0\" " << "cellspacing=\"0\" width=\"100%\">\n"; } else { if (twoColumn) - out() << "<p><table width=\"100%\" " + out() << "<p><table class=\"propsummary\" width=\"100%\" " << "border=\"0\" cellpadding=\"0\"" << " cellspacing=\"0\">\n" << "<tr><td width=\"45%\" valign=\"top\">"; @@ -2424,7 +2433,7 @@ void HtmlGenerator::generateSectionInheritedList(const Section& section, QList<QPair<ClassNode *, int> >::ConstIterator p = section.inherited.begin(); while (p != section.inherited.end()) { if (nameAlignment) - out() << "<li><div bar=2 class=\"fn\"></div>"; + out() << "<li><div bar=\"2\" class=\"fn\"></div>"; else out() << "<li><div class=\"fn\"></div>"; out() << (*p).second << " "; @@ -2485,7 +2494,7 @@ void HtmlGenerator::generateSynopsis(const Node *node, QString HtmlGenerator::highlightedCode(const QString& markedCode, CodeMarker *marker, const Node *relative, - CodeMarker::SynopsisStyle style, + CodeMarker::SynopsisStyle , bool nameAlignment) { QString src = markedCode; @@ -2498,8 +2507,6 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode, // replace all <@link> tags: "(<@link node=\"([^\"]+)\">).*(</@link>)" static const QString linkTag("link"); - if (src.contains("setAcceptDrops")) - qDebug() << "SRC:" << src; bool done = false; for (int i = 0, n = src.size(); i < n;) { if (src.at(i) == charLangle && src.at(i + 1).unicode() == '@') { @@ -2664,12 +2671,13 @@ void HtmlGenerator::generateSectionList(const Section& section, bool twoColumn = false; if (style == CodeMarker::SeparateList) { twoColumn = (section.members.count() >= 16); - } else if (section.members.first()->type() == Node::Property) { + } + else if (section.members.first()->type() == Node::Property) { twoColumn = (section.members.count() >= 5); } if (twoColumn) - out() << "<p><table width=\"100%\" border=\"0\" cellpadding=\"0\"" - " cellspacing=\"0\">\n" + out() << "<p><table class=\"generic\" width=\"100%\" border=\"0\" " + << "cellpadding=\"0\" cellspacing=\"0\">\n" << "<tr><td width=\"45%\" valign=\"top\">"; out() << "<ul>\n"; @@ -2712,7 +2720,7 @@ void HtmlGenerator::generateSectionInheritedList(const Section& section, { QList<QPair<ClassNode *, int> >::ConstIterator p = section.inherited.begin(); while (p != section.inherited.end()) { - out() << "<li><div bar=2 class=\"fn\"></div>"; + out() << "<li><div bar=\"2\" class=\"fn\"></div>"; out() << (*p).second << " "; if ((*p).second == 1) { out() << section.singularMember; @@ -3771,7 +3779,9 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, generateQmlItem(qpn, relative, marker, false); out() << "</td></tr>"; if (qpgn->isDefault()) { - out() << "<div class=\"qmlitem\">" + out() << "</table>" + << "</div></div>" + << "<div class=\"qmlitem\">" << "<div class=\"qmlproto\">" << "<table class=\"qmlname\">" << "<tr><td><font color=\"green\">" @@ -3841,10 +3851,10 @@ void HtmlGenerator::generateQmlInherits(const QmlClassNode* cn, generateText(text, cn, marker); out() << "</p>"; } - else - qDebug() << "generateQmlInherits(): " - << "Inherited element not documented -->" - << linkPair.first; +// else +// qDebug() << "generateQmlInherits(): " +// << "Inherited element not documented -->" +// << linkPair.first; } } } diff --git a/tools/qdoc3/test/classic.css b/tools/qdoc3/test/classic.css index 45d63db..79bcb80 100644 --- a/tools/qdoc3/test/classic.css +++ b/tools/qdoc3/test/classic.css @@ -14,12 +14,64 @@ H3 { h3.fn,span.fn { - background-color: #e0eff6; + background-color: #eee; border-width: 1px; border-style: solid; - border-color: #3388be #e0eff6 #e9f8ff #e0eff6; + border-color: #ddd; font-weight: bold; padding: 6px 0px 6px 10px; + margin: 42px 0px 0px 0px; +} + +hr { + border: 0; + color: #a0a0a0; + background-color: #ccc; + height: 1px; + width: 100%; + text-align: left; + margin: 34px 0px 34px 0px; +} + +table.valuelist { + border-width: 1px 1px 1px 1px; + border-style: solid; + border-color: #dddddd; + border-collapse: collapse; + background-color: #f0f0f0; +} + +table.indextable { + border-width: 1px 1px 1px 1px; + border-collapse: collapse; + background-color: #f0f0f0; + border-color:#555; +} + + +table.valuelist th { + border-width: 1px 1px 1px 2px; + padding: 4px; + border-style: solid; + border-color: #666; + color:white; + background-color:#666; +} + +th.titleheader { + border-width: 1px 0px 1px 0px; + padding: 4px; + border-style: solid; + border-color: #444; + color:white; + background-color:#555555; +} + +p { + + margin-left: 4px; + margin-top: 8px; + margin-bottom: 8px; } a:link @@ -64,42 +116,31 @@ body color: black } +table.generic, table.annotated +{ + border-width: 1px; + border-color:#bbb; + border-style:solid; + border-collapse:collapse; +} + table td.memItemLeft { - width: 200px; - padding: 1px 0px 0px 8px; + width: 160px; + padding: 2px 0px 0px 8px; margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; + border-width: 1px; + border-color: #E0E0E0; + border-style: none; font-size: 100%; white-space: nowrap } + table td.memItemRight { - padding: 1px 8px 0px 8px; + padding: 2px 8px 0px 8px; margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; + border-width: 1px; + border-color: #E0E0E0; + border-style: none; font-size: 100%; } |