Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Documentation for Qt documentation comments? Qt + Doxygen? [closed]

Where can I find documentation for Qt documentation comments? I'm referring to how Qt uses a specific style for documentation comments, like so:

/*!
    \class MyClassName
    \brief The MyClassName class is used as an example on Stack Overflow.

    This class serves a few functions, the most important being:

    \list
        \i So people can understand my question.
        \i So people can have a few laughs at the comedy in my example.
    \endlist
 */

...you get the picture. So where can I find information about all the switches, like \class, \list, \brief, etc. Also, what tool(s) do I use to generate documentation files from these comments in my source files? Does Doxygen support this syntax?

like image 496
Jake Petroules Avatar asked Jun 17 '10 05:06

Jake Petroules


People also ask

How do you write a good comment on doxygen?

doxygen Getting started with doxygen Commenting your code //! //! ... text ... //! Note the 2 slashes to end the normal comment block and start a special comment block.

How do I add comments in doxygen?

Once specified, you can generate the comment stub by typing the respective “///” or “/**” above a function, or by using the (Ctrl+/) shortcut.

Where do doxygen comments go?

The common sense tells that the Doxygen comment blocks have to be put in the header files where the classes, structs, enums, functions, declarations are.


3 Answers

Don't use qdoc. It is deprecated. Use Doxygen, which is based on qdoc anyway.

That said, the documentation (in qdoc format :-D ) is here.

like image 187
sml Avatar answered Oct 15 '22 10:10

sml


There are two parts of doxygen that are qt-specific: the Qt Comment Style and the QT_AUTOBRIEF Doxyfile configuration tag. These are simply parts of doxygen that are used by QT. All doxygen comments used by QT are regular doxygen stuff. So you just need to read up on doxygen.

Or perhaps are you really looking for documentation of QT internals, such as information on d-Pointers as contained in this blog entry

Qt Style Comments: The /*! text */ comment style is called the "Qt Style" of doxygen comments. The ! marks the entire comment block as a doxygen comment block. It is a standard, optional part of doxygen.

QT_AUTOBRIEF setting: if the "QT_AUTOBRIEF" tag is set to TRUE in the Doxyfile, the first line of a Qt style comment block is automatically interpreted as the \brief description.

From the doygen GUI help:

QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first line (until the first dot) of a Qt-style comment as the brief description. If set to NO, the comments will behave just like regular Qt-style comments (thus requiring an explicit \brief command for a brief description.)

like image 21
sschilz Avatar answered Oct 15 '22 10:10

sschilz


Use doxygen to create documentation

It can generate an on-line documentation browser (in HTML) and/or an off-line reference manual (LaTeX) from a set of documented source files. There is also support for generating output in RTF (MS-Word), PostScript, hyperlinked PDF, compressed HTML, and Unix man pages. The documentation is extracted directly from the sources, which makes it much easier to keep the documentation consistent with the source code.

You can configure doxygen to extract the code structure from undocumented source files. This is very useful to quickly find your way in large source distributions. You can also visualize the relations between the various elements by means of include dependency graphs, inheritance diagrams, and collaboration diagrams, which are all generated automatically.

http://www.doxygen.nl/

like image 23
Pardeep Avatar answered Oct 15 '22 11:10

Pardeep