Friday, March 2, 2012

Doxygen - Automatic Qt/C++ Documentation

I came across a nifty application today: Doxygen.  Doxygen is able to parse your raw source files for a variety of languages (with special support for Qt's signals and slots) and turn it into documentation.  I've seen the output of Doxygen before with Qwt and several other libraries, but I never realized that it could be automated.

I will definitely start documenting my code with Doxygen.  You can expect that Monterey v2.0 and it's corresponding classes will all be Doxygen'ed.

If you want to check out my *very* basic test of Doxygen, you can see it's automatic documentation of my QPID class here.

Hope this helps!

Chris

2 comments:

  1. Hi Chris,
    I saw the documentation of your code.
    Can you tell me how to generate the doxygen documentation of header file (. h) in Qt applications?
    I did some tests on my code but I can not get your same results (for example, separated sections for slots and signal, etc.).
    Do you use special configuration in the file generated by "doxygen -g filename"?

    ReplyDelete
  2. Sorry, i set:

    EXTRACT_ALL = YES
    EXTRACT_PRIVATE = YES
    EXTRACT_STATIC = YES

    and all works fine. ;)
    Thanks.

    ReplyDelete