blob: 0e46a5321e0f62a031f63622f5deb50a014fc87c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
|
#ifndef DOXYWIZARD_H
#define DOXYWIZARD_H
#include <qvbox.h>
#include <qtabdialog.h>
#include <qmainwindow.h>
#include <qsettings.h>
#include <qstringlist.h>
class QLineEdit;
class QCheckBox;
class QPushButton;
class QComboBox;
class QButtonGroup;
class QTextEdit;
class QLabel;
class QProcess;
class QTimer;
class QPopupMenu;
enum OptLang { Lang_Cpp, Lang_C, Lang_Java, Lang_CS };
enum HtmlStyle { HS_Plain, HS_TreeView, HS_CHM };
enum TexStyle { TS_PDFHyper, TS_PDF, TS_PS };
enum DiagramMode { DM_None, DM_Builtin, DM_Dot };
class Step1 : public QWidget
{
Q_OBJECT
public:
Step1(QWidget *parent);
QString getProjectName() const;
QString getProjectNumber() const;
QString getSourceDir() const;
bool scanRecursively() const;
QString getDestinationDir() const;
void setProjectName(const QString &name);
void setProjectNumber(const QString &num);
void setSourceDir(const QString &dir);
void setRecursiveScan(bool enable);
void setDestinationDir(const QString &dir);
private slots:
void selectSourceDir();
void selectDestinationDir();
private:
QLineEdit *m_projName;
QLineEdit *m_projNumber;
QLineEdit *m_sourceDir;
QLineEdit *m_destDir;
QCheckBox *m_recursive;
QPushButton *m_srcSelectDir;
QPushButton *m_dstSelectDir;
};
class Step2 : public QWidget
{
public:
Step2(QWidget *parent);
bool crossReferencingEnabled() const;
void enableCrossReferencing();
bool extractAll() const;
bool crossReferencing() const;
OptLang optimizeFor() const;
void setExtractAll(bool enable);
void setCrossReferencing(bool enable);
void setOptimizeFor(OptLang lang);
private:
QButtonGroup *m_extractMode;
QButtonGroup *m_optimizeLang;
QCheckBox *m_crossRef;
};
class Step3 : public QWidget
{
Q_OBJECT
public:
Step3(QWidget *parent);
bool htmlEnabled() const;
bool latexEnabled() const;
bool manEnabled() const;
bool rtfEnabled() const;
bool xmlEnabled() const;
bool searchEnabled() const;
HtmlStyle htmlStyle() const;
TexStyle texStyle() const;
void setHtmlEnabled(bool);
void setLatexEnabled(bool);
void setManEnabled(bool);
void setRtfEnabled(bool);
void setXmlEnabled(bool);
void setSearchEnabled(bool);
void setHtmlStyle(HtmlStyle);
void setTexStyle(TexStyle);
private slots:
void latexStateChange(int state);
void htmlStateChange(int state);
private:
QButtonGroup *m_texOptions;
QVBox *m_texOptionBox;
QButtonGroup *m_htmlOptions;
QVBox *m_htmlOptionBox;
QCheckBox *m_htmlEnabled;
QCheckBox *m_latexEnabled;
QCheckBox *m_manEnabled;
QCheckBox *m_rtfEnabled;
QCheckBox *m_xmlEnabled;
QCheckBox *m_searchEnabled;
};
class Step4 : public QWidget
{
Q_OBJECT
public:
Step4(QWidget *parent);
void disableCallGraphs();
bool callGraphEnabled() const;
DiagramMode diagramMode() const;
bool classDiagram() const;
bool collaborationDiagram() const;
bool includeGraph() const;
bool includedByGraph() const;
bool inheritanceGraph() const;
bool callGraph() const;
void setDiagramMode(DiagramMode mode);
void setClassDiagram(bool enable);
void setCollaborationDiagram(bool enable);
void setIncludeGraph(bool enable);
void setIncludedByGraph(bool enable);
void setInheritanceGraph(bool enable);
void setCallGraph(bool enable);
private slots:
void diagramModeChanged(int);
private:
QButtonGroup *m_diagramMode;
QVBox *m_dotOptions;
QCheckBox *m_dotClass;
QCheckBox *m_dotCollaboration;
QCheckBox *m_dotInclude;
QCheckBox *m_dotIncludedBy;
QCheckBox *m_dotInheritance;
QCheckBox *m_dotCall;
};
class Wizard : public QTabDialog
{
Q_OBJECT
public:
Wizard(QWidget *parent);
void disableCallGraphs();
// step1
QString getProjectName() const { return m_step1->getProjectName(); }
QString getProjectNumber() const { return m_step1->getProjectNumber(); }
QString getSourceDir() const { return m_step1->getSourceDir(); }
bool scanRecursively() const { return m_step1->scanRecursively(); }
QString getDestinationDir() const { return m_step1->getDestinationDir(); }
void setProjectName(const QString &name) { m_step1->setProjectName(name); }
void setProjectNumber(const QString &num) { m_step1->setProjectNumber(num); }
void setSourceDir(const QString &dir) { m_step1->setSourceDir(dir); }
void setRecursiveScan(bool enable) { m_step1->setRecursiveScan(enable); }
void setDestinationDir(const QString &dir) { m_step1->setDestinationDir(dir); }
// step2
bool extractAll() const { return m_step2->extractAll(); }
bool crossReferencing() const { return m_step2->crossReferencing(); }
OptLang optimizeFor() const { return m_step2->optimizeFor(); }
void setExtractAll(bool enable) { m_step2->setExtractAll(enable); }
void setCrossReferencing(bool enable) { m_step2->setCrossReferencing(enable); }
void setOptimizeFor(OptLang lang) { m_step2->setOptimizeFor(lang); }
// step3
bool htmlEnabled() const { return m_step3->htmlEnabled(); }
bool latexEnabled() const { return m_step3->latexEnabled(); }
bool manEnabled() const { return m_step3->manEnabled(); }
bool rtfEnabled() const { return m_step3->rtfEnabled(); }
bool xmlEnabled() const { return m_step3->xmlEnabled(); }
bool searchEnabled() const { return m_step3->searchEnabled(); }
HtmlStyle htmlStyle() const { return m_step3->htmlStyle(); }
TexStyle texStyle() const { return m_step3->texStyle(); }
void setHtmlEnabled(bool enable) { m_step3->setHtmlEnabled(enable); }
void setLatexEnabled(bool enable) { m_step3->setLatexEnabled(enable); }
void setManEnabled(bool enable) { m_step3->setManEnabled(enable); }
void setRtfEnabled(bool enable) { m_step3->setRtfEnabled(enable); }
void setXmlEnabled(bool enable) { m_step3->setXmlEnabled(enable); }
void setSearchEnabled(bool enable) { m_step3->setSearchEnabled(enable); }
void setHtmlStyle(HtmlStyle style) { m_step3->setHtmlStyle(style); }
void setTexStyle(TexStyle style) { m_step3->setTexStyle(style); }
// step4
DiagramMode diagramMode() const { return m_step4->diagramMode(); }
bool classDiagram() const { return m_step4->classDiagram(); }
bool collaborationDiagram() const { return m_step4->collaborationDiagram(); }
bool includeGraph() const { return m_step4->includeGraph(); }
bool includedByGraph() const { return m_step4->includedByGraph(); }
bool inheritanceGraph() const { return m_step4->inheritanceGraph(); }
bool callGraph() const { return m_step4->callGraph(); }
void setDiagramMode(DiagramMode mode) { m_step4->setDiagramMode(mode); }
void setClassDiagram(bool enable) { m_step4->setClassDiagram(enable); }
void setCollaborationDiagram(bool enable) { m_step4->setCollaborationDiagram(enable); }
void setIncludeGraph(bool enable) { m_step4->setIncludeGraph(enable); }
void setIncludedByGraph(bool enable) { m_step4->setIncludedByGraph(enable); }
void setInheritanceGraph(bool enable) { m_step4->setInheritanceGraph(enable); }
void setCallGraph(bool enable) { m_step4->setCallGraph(enable); }
private:
Step1 *m_step1;
Step2 *m_step2;
Step3 *m_step3;
Step4 *m_step4;
};
class MainWidget : public QMainWindow
{
Q_OBJECT
public:
MainWidget(QWidget *parent=0);
~MainWidget();
void loadConfigFromFile(const QString &);
private slots:
void launchWizard();
void launchExpert();
void loadConfigFile();
void selectWorkingDir();
void updateRunnable(const QString &newDirName);
void saveDefaults();
void saveConfigFile();
void runDoxygen();
void readStdout();
void runComplete();
void about();
void manual();
void resetConfig();
void openRecent(int);
void quit();
void saveLog();
private:
void setConfigSaved(bool);
void addRecentFile(const QString &);
QPushButton *m_wizard;
QPushButton *m_expert;
QPushButton *m_load;
QPushButton *m_save;
QPushButton *m_defaults;
QLineEdit *m_workingDir;
QPushButton *m_selWorkingDir;
QPushButton *m_run;
QPushButton *m_saveLog;
QLabel *m_runStatus;
QProcess *m_runProcess;
QLabel *m_saveStatus;
QLabel *m_outputHeading;
QTextEdit *m_outputLog;
QTimer *m_timer;
QSettings m_settings;
QPopupMenu *m_recentMenu;
bool m_configSaved;
bool m_running;
QString m_configFileName;
QStringList m_recentFiles;
};
#endif
|