OFF-SOFT.net

This site is support & information site of WEB,and Software. This site might help you that create software or Web Site…perhaps?

Qt (B3) Qt and doxygen

Published on| July 9th, 2009 | No Comment.
Description:
This time, Qt for document management, I would like to write.
Document management and to say, Qt software created in the (library) is a document management in the sense of a detailed design.

Software (library) as a document management such as the detailed design, Free in the most famous, doxygen.
Doxygen This was originally created in Qt is designed to manage documents. (I, until recently, did not know that. )

Therefore, doxygen is, Qt is a strong affinity with. (Of course, signals, slots and the right awareness, and then output to the document. )

This time, the use doxygen, I described how to create simple documents.


Sample source code you used here:

First, doxygen installed
doxygen download site and download the latest version of the above.
The inheritance relationship and UML diagrams including, if necessary, graphviz download as well.

Both, Windows version, so the installer, just follow the install screen.

I've provided only a simple screen.

[doxygen]



Here, you choose to accept.


Here, if you change the installation location, set above.


This specifies that the installation, special, GUI good check is not required unless all tools and samples.


Here, you specify a name to add to the Start menu.
If you do not want to add to the Start menu, "Don't create start menu folder" to check.


Especially if you have not probrem, "Install" to run the installation click.




Without major problems, Once installed, the above screen is displayed, "Next" clicking.
This screen is described as a follow-up link and check the latest version.


Finished with this screen. "Finish" and click Finish.


[graphviz]



Here, if you change the installation location, set above.


Especially you have not probrem, "Next" click to install.




Without problems, especially when you're installing, the screen above, you quit. "Close" and click Finish.


After the installation, make sure that the path is set correctly.
Screen displays the DOS prompt.
[Start] - Programs - Accessories - [Command Prompt]

Let's enter the following two commands.

C:\> doxygen -h
Doxygen version 1.5.9
Copyright Dimitri van Heesch 1997-2008

You can use doxygen in a number of ways:

1) Use doxygen to generate a template configuration file:
    doxygen [-s] -g [configName]

    If - is used for configName doxygen will write to standard output.

2) Use doxygen to update an old configuration file:
    doxygen [-s] -u [configName]

3) Use doxygen to generate documentation using an existing configuration file:
    doxygen [configName]

    If - is used for configName doxygen will read from standard input.

4) Use doxygen to generate a template file controlling the layout of the
   generated documentation:
    doxygen -l layoutFileName.xml

5) Use doxygen to generate a template style sheet file for RTF, HTML or Latex.
    RTF:   doxygen -w rtf styleSheetFile
    HTML:  doxygen -w html headerFile footerFile styleSheetFile [configFile]
    LaTeX: doxygen -w latex headerFile styleSheetFile [configFile]

6) Use doxygen to generate an rtf extensions file
    RTF:   doxygen -e rtf extensionsFile

If -s is specified the comments in the config file will be omitted.
If configName is omitted Doxyfile' will be used as a default.

C:\> dot -?
Usage: dot [-Vv?] [-(GNE)name=val] [-(KTlso)<val>] <dot files>
(additional options for neato)    [-x] [-n<v>]
(additional options for fdp)      [-L(gO)] [-L(nUCT)<val>]
(additional options for memtest)  [-m]
(additional options for config)  [-cv]

 -V          - Print version and exit
 -v          - Enable verbose mode
 -Gname=val  - Set graph attribute 'name' to 'val'
 -Nname=val  - Set node attribute 'name' to 'val'
 -Ename=val  - Set edge attribute 'name' to 'val'
 -Tv         - Set output format to 'v'
 -Kv         - Set layout engine to 'v' (overrides default based on command name)
 -lv         - Use external library 'v'
 -ofile      - Write output to 'file'
 -O          - Automatically generate an output filename based on the input 
            filename with a .'format' appended. (Causes all -ofile options to be ignored.)
 -P          - Internally generate a graph of the current plugins.
 -q[l]       - Set level of message suppression (=1)
 -s[v]       - Scale input by 'v' (=72)
 -y          - Invert y coordinate in output

 -n[v]       - No layout mode 'v' (=1)
 -x          - Reduce graph

 -Lg         - Don't use grid
 -LO         - Use old attractive force
 -Ln<i>      - Set number of iterations to i
 -LU<i>      - Set unscaled factor to i
 -LC<v>      - Set overlap expansion factor to v
 -LT[*]<v>   - Set temperature (temperature factor) to v

 -m          - Memory test (Observe no growth with top. Kill when done.)

 -c          - Configure plugins (Writes $prefix/lib/graphviz/config
               with available plugin information.  Needs write privilege.)
 -v          - Enable verbose mode

C:\>

If help text is displayed as described above is OK.
If not, in itself, the PATH environment variable, add the following directories.
  • % doxygen installation directory% \ bin
  • % graphviz installation directory% \ bin

Try using doxygen
Let's prepare the sample source code
doxygen sample source code you need to try.
Here, doxygen is a sample of examples \ diagrams a, Qt believe (signals, slots are added), and some, let's use something that has changed.
Class, five from the following files.
  • diagrams_a.h
    - Class A defines a
    - No original inheritance
  • diagrams_b.h
    - Class B defines the
    - Former inherits QMainWindow (Qt classes)
  • diagrams_c.h
    - Class C defines a
    - A former inheritance
  • diagrams_d.h
    - Class D define
    - Former inherit A, B
  • diagrams_e.h
    - Class E define
    - D inherited the former

[diagrams_a.h]
1
2
3
4
5
6
7
8
#ifndef _DIAGRAMS_A_H
#define _DIAGRAMS_A_H
class A 
{
public: 
	A *m_self;
};
#endif

[diagrams_b.h]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef _DIAGRAMS_B_H
#define _DIAGRAMS_B_H
#include <QMainWindow>
class A;
class B : public QMainWindow
{
	Q_OBJECT
public: 
	A *m_a;
 
protected slots: 
	void slotB(int n);
 
signals: 
	void sigB(int n);
};
#endif

[diagrams_c.h]
1
2
3
4
5
6
7
8
9
10
#ifndef _DIAGRAMS_C_H
#define _DIAGRAMS_C_H
#include "diagrams_c.h"
class D;
class C : public A 
{
public:
	D *m_d;
};
#endif

[diagrams_d.h]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef _DIAGRAM_D_H
#define _DIAGRAM_D_H
#include "diagrams_a.h"
#include "diagrams_b.h"
class C;
class D : virtual protected  A, private B 
{
	Q_OBJECT
public: 
	C m_c;
 
protected slots: 
	void slotD(int n);
 
signals: 
	void sigD(int n);
};
#endif

[diagrams_e.h]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef _DIAGRAM_E_H
#define _DIAGRAM_E_H
#include "diagrams_d.h"
class E : public D 
{
	Q_OBJECT
 
private slots: 
	void slotE(int n);
 
signals: 
	void sigE(int n);
};
#endif

doxygen's config file (parameters) Create a
Second, doxygen doxygen Try to set a parameter file (config file).
Here, doxygen is a sample of examples \ diagrams, let's use something that has changed.

Parameter name Commentary
PROJECT_NAME Specify the name of the project.
Example) "Diagrams"
OUTPUT_DIRECTORY The destination directory name (logical path).
Cases) diagrams
HAVE_DOT DOT tool (Figure) Specifies whether to use.
Cases) YES
EXTRACT_ALL All document entities (elements) you want to expand.
Cases) YES
GENERATE_LATEX LATEX output to the specified format.
Cases) NO
GENERATE_MAN MAN or specify the output format.
Cases) NO
GENERATE_RTF RTF format (MiscroSoft Word) Specifies whether output.
Cases) NO
CASE_SENSE_NAMES Doxygen or specify the output file name to uppercase. (NO: to output in lower case)
Cases) NO
ENABLE_PREPROCESSING Specify C preprocessor or evaluated.
Cases) YES
INPUT File directory (path logic).
Cases).
FILE_PATTERNS Specify a file pattern.
Cases) diagrams_ *. h
QUIET Doxygen always specify whether to display the message. (NO: to show)
Cases) YES
JAVADOC_AUTOBRIEF Specify whether to enable JvaDoc comments format.
Cases) YES
QT_AUTOBRIEF Qt Specifies whether to enable comment form.
Cases) YES
EXTRACT_PRIVATE private method, you specify whether to print the members.
Cases) YES

Roughly, if the consciousness of so many parameters, for now, you can create a document.
This, diagrams.cfg then save the file. Below are the contents. This is a simple text file.

[diagrams.cfg]
PROJECT_NAME       = "Diagrams"
OUTPUT_DIRECTORY   = diagrams
HAVE_DOT           = YES
EXTRACT_ALL        = YES
GENERATE_LATEX     = NO
GENERATE_MAN       = NO
GENERATE_RTF       = NO
CASE_SENSE_NAMES = NO
ENABLE_PREPROCESSING       = YES
INPUT              = .
FILE_PATTERNS      = diagrams_*.h
QUIET              = YES
JAVADOC_AUTOBRIEF = YES
QT_AUTOBRIEF      = YES
EXTRACT_PRIVATE        = YES

Create a document with doxygen
When you're ready now, doxygen, you can create a document by typing the following command.

%diagrams.cfg Directory%> doxygen diagrams.cfg
%diagrams.cfg Directory%> 

It's easy. Just specify the file name.
When complete, the logical path of the config file as html and diagrams to be created directory.
Click index.html in it, let's see.


The following is a Class B screen is displayed.


Right, is shown in Figure inheritance relationship. The signal is displayed correctly slots.


doxygen in the other, QtAssistant can use the HELP file.
Getting this, I just have a high affinity.
So, then, QtAssistant let's use the HELP file.



Add to your favorites(bookmarks): はてなブックマークへ追加するdel.icio.usLivedoor ClipYahoo!FC2Nifty ClipPOOKMARK. AirlinesBuzzurl(バザール)Choixnewsing

Trackback URL

After Admin approves this comment, it will be shown.


Comments

Leave a Reply





*




Contents

Recent Posts


Tag Cloud

Links

Site Description

This site is support & information site of WEB,and Software. This site might help you that create software or Web Site…perhaps?

Add to your favorites(bookmarks)

はてなブックマークへ追加するdel.icio.usLivedoor ClipYahoo!FC2Nifty ClipPOOKMARK. AirlinesBuzzurl(バザール)Choixnewsing