-
 KDE-Apps.org Applications for the KDE-Desktop 
 GTK-Apps.org Applications using the GTK Toolkit 
 GnomeFiles.org Applications for GNOME 
 MeeGo-Central.org Applications for MeeGo 
 CLI-Apps.org Command Line Applications 
 Qt-Apps.org Free Qt Applications 
 Qt-Prop.org Proprietary Qt Applications 
 Maemo-Apps.org Applications for the Maemo Plattform 
 Java-Apps.org Free Java Applications 
 eyeOS-Apps.org Free eyeOS Applications 
 Wine-Apps.org Wine Applications 
 Server-Apps.org Server Applications 
 apps.ownCloud.com ownCloud Applications 
--
-
 KDE-Look.org Artwork for the KDE-Desktop 
 GNOME-Look.org Artwork for the GNOME-Desktop 
 Xfce-Look.org Artwork for the Xfce-Desktop 
 Box-Look.org Artwork for your Windowmanager 
 E17-Stuff.org Artwork for Enlightenment 
 Beryl-Themes.org Artwork for the Beryl Windowmanager 
 Compiz-Themes.org Artwork for the Compiz Windowmanager 
 EDE-Look.org Themes for your EDE Desktop 
--
-
 Debian-Art.org Stuff for Debian 
 Gentoo-Art.org Artwork for Gentoo Linux 
 SUSE-Art.org Artwork for openSUSE 
 Ubuntu-Art.org Artwork for Ubuntu 
 Kubuntu-Art.org Artwork for Kubuntu 
 LinuxMint-Art.org Artwork for Linux Mint 
 Arch-Stuff.org Art And Stuff for Arch Linux 
 Frugalware-Art.org Themes for Frugalware 
 Fedora-Art.org Artwork for Fedora Linux 
 Mandriva-Art.org Artwork for Mandriva Linux 
--
-
 KDE-Files.org Files for KDE Applications 
 OpenTemplate.org Documents for OpenOffice.org
 GIMPStuff.org Files for GIMP
 InkscapeStuff.org Files for Inkscape
 ScribusStuff.org Files for Scribus
 BlenderStuff.org Textures and Objects for Blender
 VLC-Addons.org Themes and Extensions for VLC
--
-
 KDE-Help.org Support for your KDE Desktop 
 GNOME-Help.org Support for your GNOME Desktop 
 Xfce-Help.org Support for your Xfce Desktop 
--
openDesktop.orgopenDesktop.org:   Applications   Artwork   Linux Distributions   Documents    LinuxDaily.com    Linux42.org    OpenSkillz.com   
 
Artwork
News
Groups
Knowledge
Events
Forum
People
Jobs
Register
Login

-
- News . 
0
votes
click to vote up

Aurélien Gâteau: Introducing Doxyqml


Published Jan 14 2013 via RSS

If you are a developer, chances are you have already read a documentation created with Doxygen. Doxygen is a widespread tool to produce documentation from source code. We use it in KDE to document our C++ libraries on api.kde.org.

We use QML more and more within KDE, especially in the Plasma world: on the desktop, where many existing Plasma applets have already been rewritten in QML, and on touch devices with Plasma Active, which is 100% QML. To maintain consistency, we are building a set of reusable QML components, and those components need a good documentation

Unfortunately, Doxygen does not support QML out of the box. That is the reason why I created Doxyqml.

Doxyqml is a QML input filter for Doxygen, it uses Doxygen input filter mechanism to turn QML into code which Doxygen can process.

Doxyqml has been deployed on api.kde.org. It is currently used to document the QML Plasma components which are shipped with kde-runtime.

QML specificities

In the spirit of Doxygen, Doxyqml tries to extract as much as possible from the code itself, to avoid duplication. For example, a property can be documented this way:

Item {
    /// The text color of the element
    property color textColor
}

Doxyqml will correctly extract the type of the textColor property as color.

But what if the property is an alias? Something like this:

Item {
    /// The text color of the element
    property alias foregroundColor: innerText.color

    Text {
        id: innerText
    }
}

Doxyqml does not resolve aliases. In this case you need to help it a bit by providing the type. You can do so with a type:<name> annotation:

Item {
    /// type:color The text color of the widget
    property alias foregroundColor: innerText.color

    Text {
        id: innerText
    }
}

Types annotations are also used to document functions. Arguments and return values of QML functions are untyped, so you must use the type:<name> syntax to document them. Here is an example from the README:

/**
 * Create a user
 * @param type:string firstname User firstname
 * @param type:string lastname User lastname
 * @param type:int User age
 * @return type:User The User object
 */
function createUser(firstname, lastname, age);

Signal parameters, on the other hand, are completely typed. Doxyqml will extract the parameter types for you.

What about QDoc?

Qt QML components are documented with QDoc, a tool similar to Doxygen, created by Qt developers themselves. Using QDoc could have been an option, but doing it so would have forced us to either:

  • Use Doxygen for C++ code and QDoc for QML. But using two different tools makes it difficult to produce a consistent documentation.

Or

  • Migrate our existing C++ documentation to use QDoc. Going that way meant giving up on Doxygen features we use which QDoc lacks, such as source code browsing or class diagrams.

Get it

You can get Doxyqml from its project page.

Flattr this



BackRead original postSend to a friend

Add comment

Add comment
Show all posts




-

-
Do you like or dislike Ubuntu Unity?
 Yes, unity is alien technology!
 It is less confusing than Gnome 3 default, shell.
 Granny thinks it is much more usable than Gnome 2
 Canonical is embarrasing itself with this split project
 Gnome 3 default shell is much better
 I dislike Unity, Gnome 3 default shell is alien technology!
 None of the above, I like the 2Gb for free and Apple alike behavior. Will post a comment instead

resultmore




 
 
 Who we are
Contact
More about us
Frequently Asked Questions
Register
Twitter
Blog
Explore
Artwork
Jobs
Knowledge
Events
People
Updates on identi.ca
Updates on Twitter
Facebook App
Content RSS   
News RSS   
Discussion RSS   
Events RSS   

Participate
Groups
Forum
Add Artwork
Public API
About KDE-Look.org
Legal Notice
Spreadshirt Shop
CafePress Shop
Advertising
Sponsor us
Report Abuse
 

Copyright 2001-2014 KDE-Look.org Team  
All rights reserved. KDE-Look.org is not liable for any content or goods on this site.
All contributors are responsible for the lawfulness of their uploads.
KDE and K Desktop Environment are trademarks of KDE e.V.