diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-05-05 04:58:06 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-05-05 04:58:06 (GMT) |
commit | e8f2cc813ba4faf41677f65c51a990eea5df4308 (patch) | |
tree | 900af52bbf469d827de9f76f9a4653e77addeeed /tools | |
parent | fab8fa152901cb84132f11b52f950c0dbb6d7a23 (diff) | |
download | Qt-e8f2cc813ba4faf41677f65c51a990eea5df4308.zip Qt-e8f2cc813ba4faf41677f65c51a990eea5df4308.tar.gz Qt-e8f2cc813ba4faf41677f65c51a990eea5df4308.tar.bz2 |
Improve QML documentation viewing in Assistant.
The element pages now load correctly. A separate QML 'book' is also
generated, which will be targeted at non-C++ programmers.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qdoc3/helpprojectwriter.cpp | 3 | ||||
-rw-r--r-- | tools/qdoc3/test/qml.qdocconf | 77 | ||||
-rw-r--r-- | tools/qdoc3/tree.cpp | 9 |
3 files changed, 87 insertions, 2 deletions
diff --git a/tools/qdoc3/helpprojectwriter.cpp b/tools/qdoc3/helpprojectwriter.cpp index 85bd898..16ee5f2 100644 --- a/tools/qdoc3/helpprojectwriter.cpp +++ b/tools/qdoc3/helpprojectwriter.cpp @@ -126,6 +126,9 @@ void HelpProjectWriter::readSelectors(SubProject &subproject, const QStringList subTypeHash["module"] = Node::Module; subTypeHash["page"] = Node::Page; subTypeHash["externalpage"] = Node::ExternalPage; +#ifdef QDOC_QML + subTypeHash["qmlclass"] = Node::QmlClass; +#endif QSet<Node::SubType> allSubTypes = QSet<Node::SubType>::fromList(subTypeHash.values()); diff --git a/tools/qdoc3/test/qml.qdocconf b/tools/qdoc3/test/qml.qdocconf new file mode 100644 index 0000000..3a7d76a --- /dev/null +++ b/tools/qdoc3/test/qml.qdocconf @@ -0,0 +1,77 @@ +include(compat.qdocconf) +include(macros.qdocconf) +include(qt-cpp-ignore.qdocconf) +include(qt-html-templates.qdocconf) +include(qt-defines.qdocconf) + +project = Qml +description = Qml Reference Documentation +url = http://doc.qtsoftware.com/4.6 + +edition.Console.modules = QtCore QtDBus QtNetwork QtScript QtSql QtXml \ + QtXmlPatterns QtTest +edition.Desktop.modules = QtCore QtDBus QtGui QtNetwork QtOpenGL QtScript QtSql QtSvg \ + QtWebKit QtXml QtXmlPatterns Qt3Support QtHelp \ + QtDesigner QtAssistant QAxContainer Phonon \ + QAxServer QtUiTools QtTest QtDBus +edition.DesktopLight.modules = QtCore QtDBus QtGui Qt3SupportLight QtTest +edition.DesktopLight.groups = -graphicsview-api + +qhp.projects = Qml + +qhp.Qml.file = qml.qhp +qhp.Qml.namespace = com.trolltech.qml.460 +qhp.Qml.virtualFolder = qdoc +qhp.Qml.indexTitle = Qml Reference + +# Files not referenced in any qdoc file +# See also extraimages.HTML +qhp.Qml.extraFiles = classic.css \ + images/qt-logo.png + +qhp.Qml.filterAttributes = qt 4.6.0 qtrefdoc +qhp.Qml.customFilters.Qt.name = Qt 4.6.0 +qhp.Qml.customFilters.Qt.filterAttributes = qt 4.6.0 +qhp.Qml.subprojects = classes +qhp.Qml.subprojects.classes.title = Elements +qhp.Qml.subprojects.classes.indexTitle = Qml Elements +qhp.Qml.subprojects.classes.selectors = fake:qmlclass +qhp.Qml.subprojects.classes.sortPages = true + +language = Cpp + +headerdirs = $QT_SOURCE_TREE/src/declarative +sourcedirs = $QT_SOURCE_TREE/src/declarative \ + $QT_SOURCE_TREE/doc/src/declarative + +sources += $QT_SOURCE_TREE/doc/src/tutorials/declarative.qdoc + +sources.fileextensions = "*.cpp *.qdoc" +examples.fileextensions = "*.cpp *.h *.js *.qml" + +exampledirs = $QT_SOURCE_TREE/doc/src \ + $QT_SOURCE_TREE/examples \ + $QT_SOURCE_TREE/examples/tutorials \ + $QT_SOURCE_TREE \ + $QT_SOURCE_TREE/qmake/examples \ + $QT_SOURCE_TREE/src/3rdparty/webkit/WebKit/qt/docs +imagedirs = $QT_SOURCE_TREE/doc/src/images \ + $QT_SOURCE_TREE/examples \ + $QT_SOURCE_TREE/doc/src/declarative/pics +outputdir = $QT_BUILD_TREE/doc-build/html-qml +tagfile = $QT_BUILD_TREE/doc-build/html-qml/qt.tags +base = file:$QT_BUILD_TREE/doc/html-qml + +HTML.stylesheets = classic.css + +HTML.postheader = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n" \ + "<tr>\n" \ + "<td align=\"left\" valign=\"top\">" \ + "<img src=\"images/qt-logo.png\" align=\"left\" border=\"0\"/>" \ + "</td>\n" \ + "<td width=\"1\"> </td>" \ + "<td class=\"postheader\" valign=\"center\" align=\"left\">" \ + "<a href=\"qmlreference.html\">" \ + "<font color=\"#004faf\">Home</font></a>" \ + "</td>\n" \ + "</tr></table>" diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp index 539db51..b91de65 100644 --- a/tools/qdoc3/tree.cpp +++ b/tools/qdoc3/tree.cpp @@ -1901,9 +1901,14 @@ QString Tree::fullDocumentLocation(const Node *node) const else return ""; } - else if (node->type() == Node::Fake) + else if (node->type() == Node::Fake) { +#ifdef QDOC_QML + if (node->subType() == Node::QmlClass) + return "qml-" + node->fileBase() + ".html"; + else +#endif return node->fileBase() + ".html"; - else if (node->fileBase().isEmpty()) + } else if (node->fileBase().isEmpty()) return ""; QString parentName; |