summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@nokia.com>2011-02-25 13:31:55 (GMT)
committerMartin Smith <martin.smith@nokia.com>2011-02-25 13:31:55 (GMT)
commita68ec4d56b2ce39ff1a7c1ba226404322f37e819 (patch)
treec40a4ddc5a30e20d5f45ceddc885e734c4379108 /tools
parentd068fc93425cce786d74d8f6d4376a4fdfc49914 (diff)
downloadQt-a68ec4d56b2ce39ff1a7c1ba226404322f37e819.zip
Qt-a68ec4d56b2ce39ff1a7c1ba226404322f37e819.tar.gz
Qt-a68ec4d56b2ce39ff1a7c1ba226404322f37e819.tar.bz2
qdoc: Began adding descriptions for QML commands.
Diffstat (limited to 'tools')
-rw-r--r--tools/qdoc3/doc/qdoc-manual.qdoc121
-rw-r--r--tools/qdoc3/htmlgenerator.cpp6
2 files changed, 123 insertions, 4 deletions
diff --git a/tools/qdoc3/doc/qdoc-manual.qdoc b/tools/qdoc3/doc/qdoc-manual.qdoc
index afe8082..21e6b27 100644
--- a/tools/qdoc3/doc/qdoc-manual.qdoc
+++ b/tools/qdoc3/doc/qdoc-manual.qdoc
@@ -1172,7 +1172,6 @@
{newcode-command} {\\newcode} and \l {oldcode-command}
{\\oldcode}.
-
\target badcode-command
\section1 \\badcode
@@ -1284,6 +1283,53 @@
and emits a warning.
See also \l {newcode-command} {\\newcode} and \l {badcode-command} {\\badcode}.
+
+ \target qml-command
+ \section1 \\qml \span {class="newStuff"} {(new)}
+
+ The \\qml and \\endqml commands enclose a snippet of QML source
+ code. Currently, QDoc handles \\qml and \\endqml exactly the same
+ as \\code and \\endcode.
+
+ \code
+ / *!
+ \qml
+ import QtQuick 1.0
+
+ Row {
+ Rectangle {
+ width: 100; height: 100
+ color: "blue"
+ transform: Translate { y: 20 }
+ }
+ Rectangle {
+ width: 100; height: 100
+ color: "red"
+ transform: Translate { y: -20 }
+ }
+ }
+ \endqml
+ * /
+ \endcode
+
+ QDoc renders this as:
+
+ \qml
+ import QtQuick 1.0
+
+ Row {
+ Rectangle {
+ width: 100; height: 100
+ color: "blue"
+ transform: Translate { y: 20 }
+ }
+ Rectangle {
+ width: 100; height: 100
+ color: "red"
+ transform: Translate { y: -20 }
+ }
+ }
+ \endqml
*/
/*!
@@ -5360,6 +5406,79 @@
\l{QTreeWidgetItem::type()} {type()}.
\endquotation
+
+ \target qmlclass-command
+ \section1 \\qmlclass
+
+ The \\qmlclass command is for documenting a QML class that is
+ instantiated by a C++ class. The command has two arguments. The
+ first argument is the name of the QML class. The second argument
+ is the name of the C++ class that instantiates the QML class.
+
+ \code
+ / *!
+ \qmlclass Transform QGraphicsTransform
+ \ingroup qml-transform-elements
+ \since 4.7
+ \brief The Transform elements provide a way of building
+ advanced transformations on Items.
+
+ The Transform element is a base type which cannot be
+ instantiated directly. The following concrete Transform types
+ are available:
+
+ \list
+ \o \l Rotation
+ \o \l Scale
+ \o \l Translate
+ \endlist
+
+ The Transform elements let you create and control advanced
+ transformations that can be configured independently using
+ specialized properties.
+
+ You can assign any number of Transform elements to an \l
+ Item. Each Transform is applied in order, one at a time.
+
+ * /
+ \endcode
+
+ This example generates the \l
+ {http://doc.trolltech.com/4.7/qml-transform.html} {QML Trasform
+ Element} page. The \\qmlclass comment should include the \l
+ {since-command} {\\since} command, because all QML elements are
+ new. It should also include the \l{brief-command} {\\brief}
+ command. And since every QML class is a member of a group of QML
+ classes, it should also include one or more
+ \l{ingroup-command}{\\ingroup} commands.
+
+ \target qmlproperty-command
+ \section1 \\qmlproperty
+
+ \target qmlattachedproperty-command
+ \section1 \\qmlattachedproperty
+
+ \target inherits-command
+ \section1 \\inherits
+
+ \target qmlsignal-command
+ \section1 \\qmlsignal
+
+ \target qmlattachedsignal-command
+ \section1 \\qmlattachedsignal
+
+ \target qmlmethod-command
+ \section1 \\qmlmethod
+
+ \target qmlattachedmethod-command
+ \section1 \\qmlattachedmethod
+
+ \target default-command
+ \section1 \\default
+
+ \target qmlbasictype-command
+ \section1 \\qmlbasictype
+
*/
/*!
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 69bd259..3e25cb7 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -79,9 +79,9 @@ QString HtmlGenerator::sinceTitles[] =
" New Properties",
" New Variables",
" New QML Elements",
- " New Qml Properties",
- " New Qml Signals",
- " New Qml Methods",
+ " New QML Properties",
+ " New QML Signals",
+ " New QML Methods",
""
};