Warning, /sdk/doxyqml/README.md is written in an unsupported language. File is not indexed.

0001 [![Build Status](https://travis-ci.org/agateau/doxyqml.svg?branch=master)](https://travis-ci.org/agateau/doxyqml)
0002 [![Coverage Status](https://coveralls.io/repos/github/agateau/doxyqml/badge.svg?branch=master)](https://coveralls.io/github/agateau/doxyqml?branch=master)
0003 
0004 # Goals
0005 
0006 Doxyqml lets you use Doxygen to document your QML classes.
0007 
0008 It integrates as a Doxygen input filter to turn .qml files into pseudo-C++
0009 which Doxygen can then use to generate documentation.
0010 
0011 # Installing
0012 
0013 Doxyqml uses the standard Python setup tools, so you can install it with pip:
0014 
0015     pip3 install doxyqml
0016 
0017 or manually with:
0018 
0019     python3 setup.py install
0020 
0021 # Telling Doxygen to use Doxyqml
0022 
0023 To tell Doxygen about Doxyqml you must make a few changes to your Doxygen
0024 configuration file.
0025 
0026 1. Add the .qml extension to the `FILTER_PATTERNS` key:
0027 
0028         FILTER_PATTERNS = *.qml=doxyqml
0029 
0030    Note: on Windows Doxyqml installs itself in the `Scripts` folder of your
0031    Python installation. If this folder is not in the PATH, either add it or use
0032    the full path to Doxyqml here (but that is less portable across machines)
0033 
0034 2. Add the .qml extension to `FILE_PATTERNS`:
0035 
0036         FILE_PATTERNS = *.qml
0037 
0038 3. Since Doxygen 1.8.8, you must also add the .qml extension to
0039    `EXTENSION_MAPPING`:
0040 
0041         EXTENSION_MAPPING = qml=C++
0042 
0043 # Documenting types
0044 
0045 QML is partially-typed: functions are untyped, properties and signals are.
0046 Doxyqml provides a way to define types when they are missing or not precise
0047 enough.
0048 
0049 ## Functions
0050 
0051 Functions in QML are untyped, but you can define types in the documentation
0052 like this:
0053 
0054 ```qml
0055 /**
0056  * Create a user
0057  * @param type:string firstname User firstname
0058  * @param type:string lastname User lastname
0059  * @param type:int User age
0060  * @return type:User The User object
0061  */
0062 function createUser(firstname, lastname, age);
0063 ```
0064 
0065 ## Properties
0066 
0067 QML properties are typed, so Doxyqml uses them by default. You can nevertheless
0068 overwrite the type using the same `type:<name>` syntax. This is useful to
0069 document property aliases:
0070 
0071 ```qml
0072 /** type:string The user lastname */
0073 property alias lastname: someObject.text
0074 ```
0075 
0076 ## Signals
0077 
0078 QML signals are typed, so there is no need to use the `type:<name>` syntax to
0079 document their parameters. Using `type:<name>` syntax in signal documentation
0080 will not work: Doxyqml won't strip it out and Doxygen will confuse it with the
0081 parameter name.
0082 
0083 ```qml
0084 /**
0085  * User just logged in
0086  * @param user The user which logged in
0087  */
0088 signal loggedIn(User user)
0089 ```
0090 
0091 ## Extracting internal elements
0092 
0093 QML elements with an id are exported as private member variables. If you
0094 set the `EXTRACT_ALL` and `EXTRACT_PRIVATE` Doxygen keys to `YES`, then
0095 these elements will be visible in the generated documentation.