equal
deleted
inserted
replaced
|
1 #ifndef DOXYWIZARD_H |
|
2 #define DOXYWIZARD_H |
|
3 |
|
4 #include <QMainWindow> |
|
5 #include <QSettings> |
|
6 #include <QStringList> |
|
7 |
|
8 class Expert; |
|
9 class Wizard; |
|
10 class QLabel; |
|
11 class QLineEdit; |
|
12 class QPushButton; |
|
13 class QTextEdit; |
|
14 class QMenu; |
|
15 class QProcess; |
|
16 class QTimer; |
|
17 |
|
18 class MainWindow : public QMainWindow |
|
19 { |
|
20 Q_OBJECT |
|
21 |
|
22 public: |
|
23 static MainWindow &instance(); |
|
24 void loadConfigFromFile(const QString &fileName); |
|
25 void loadSettings(); |
|
26 void saveSettings(); |
|
27 void closeEvent(QCloseEvent *event); |
|
28 QString configFileName() const { return m_fileName; } |
|
29 void updateTitle(); |
|
30 |
|
31 public slots: |
|
32 void manual(); |
|
33 void about(); |
|
34 void openConfig(); |
|
35 bool saveConfig(); |
|
36 bool saveConfigAs(); |
|
37 void makeDefaults(); |
|
38 void resetToDefaults(); |
|
39 void selectTab(int); |
|
40 void quit(); |
|
41 |
|
42 private slots: |
|
43 void openRecent(QAction *action); |
|
44 void selectWorkingDir(); |
|
45 void updateWorkingDir(); |
|
46 void runDoxygen(); |
|
47 void readStdout(); |
|
48 void runComplete(); |
|
49 void showHtmlOutput(); |
|
50 void saveLog(); |
|
51 void showSettings(); |
|
52 void configChanged(); |
|
53 |
|
54 private: |
|
55 MainWindow(); |
|
56 void saveConfig(const QString &fileName); |
|
57 void addRecentFile(const QString &fileName); |
|
58 void updateConfigFileName(const QString &fileName); |
|
59 void setWorkingDir(const QString &dirName); |
|
60 void updateLaunchButtonState(); |
|
61 bool discardUnsavedChanges(bool saveOption=true); |
|
62 |
|
63 QLineEdit *m_workingDir; |
|
64 QPushButton *m_selWorkingDir; |
|
65 QPushButton *m_run; |
|
66 QPushButton *m_saveLog; |
|
67 QPushButton *m_launchHtml; |
|
68 QPushButton *m_launchPdf; |
|
69 QTextEdit *m_outputLog; |
|
70 QLabel *m_runStatus; |
|
71 Expert *m_expert; |
|
72 Wizard *m_wizard; |
|
73 QString m_fileName; |
|
74 QSettings m_settings; |
|
75 QMenu *m_recentMenu; |
|
76 QStringList m_recentFiles; |
|
77 QProcess *m_runProcess; |
|
78 QTimer *m_timer; |
|
79 bool m_running; |
|
80 bool m_modified; |
|
81 }; |
|
82 |
|
83 #endif |