Debian Codegraph @

addon/doxywizard/doxywizard.h

raw
1 /******************************************************************************
2 *
3 * Copyright (C) 1997-2019 by Dimitri van Heesch.
4 *
5 * Permission to use, copy, modify, and distribute this software and its
6 * documentation under the terms of the GNU General Public License is hereby
7 * granted. No representations are made about the suitability of this software
8 * for any purpose. It is provided "as is" without express or implied warranty.
9 * See the GNU General Public License for more details.
10 *
11 */
12
13 #ifndef DOXYWIZARD_H
14 #define DOXYWIZARD_H
15
16 #include <QMainWindow>
17 #include <QSettings>
18 #include <QStringList>
19
20 class Expert;
21 class Wizard;
22 class QLabel;
23 class QCheckBox;
24 class QLineEdit;
25 class QPushButton;
26 class QTextBrowser;
27 class QMenu;
28 class QProcess;
29 class QTimer;
30 class QTabWidget;
31
32 class MainWindow : public QMainWindow
33 {
34 Q_OBJECT
35
36 public:
37 static MainWindow &instance();
38 void loadConfigFromFile(const QString &fileName);
39 void loadSettings();
40 void saveSettings();
41 void closeEvent(QCloseEvent *event);
42 QString configFileName() const { return m_fileName; }
43 void updateTitle();
44 // access routines for outputLog pane
45 void outputLogStart();
46 void outputLogText(QString text);
47 void outputLogFinish();
48
49 public slots:
50 void manual();
51 void about();
52 void openConfig();
53 bool saveConfig();
54 bool saveConfigAs();
55 void makeDefaults();
56 void resetToDefaults();
57 void selectTab(int);
58 void quit();
59
60 private slots:
61 void openRecent(QAction *action);
62 void selectWorkingDir();
63 void updateWorkingDir();
64 void runDoxygen();
65 void runDoxygenMenu();
66 void readStdout();
67 void runComplete();
68 void showHtmlOutput();
69 void saveLog();
70 void showSettings();
71 void configChanged();
72 void clearRecent();
73 void selectRunTab();
74
75 private:
76 MainWindow();
77 void saveConfig(const QString &fileName);
78 void addRecentFile(const QString &fileName);
79 void addRecentFileList(const QString &fileName);
80 void updateRecentFile(void);
81 void updateConfigFileName(const QString &fileName);
82 void setWorkingDir(const QString &dirName);
83 void updateLaunchButtonState();
84 bool discardUnsavedChanges(bool saveOption=true);
85
86 QLineEdit *m_workingDir;
87 QLineEdit *m_runOptions;
88 QPushButton *m_selWorkingDir;
89 QPushButton *m_run;
90 QAction *m_runMenu;
91 QPushButton *m_saveLog;
92 QCheckBox *m_showCondensedSettings;
93 QPushButton *m_launchHtml;
94 QPushButton *m_launchPdf;
95 QTextBrowser *m_outputLog;
96 QLabel *m_runStatus;
97 Expert *m_expert;
98 Wizard *m_wizard;
99 QWidget *m_runTab;
100 QString m_fileName;
101 QSettings m_settings;
102 QMenu *m_recentMenu;
103 QStringList m_recentFiles;
104 QAction *m_resetDefault;
105 QAction *m_clearRecent;
106 QProcess *m_runProcess;
107 QTimer *m_timer;
108 QTabWidget *m_tabs;
109 int m_outputLogTextCount = 0;
110 bool m_running;
111 bool m_modified;
112 };
113
114 /*! \brief This class serves as a namespace for global variables used by the doxygen wizard.
115 *
116 * All fields in this class are public and static, so they can be used directly.
117 */
118 class DoxygenWizard
119 {
120 public:
121 static bool debugFlag;
122 };
123 #endif