doxywizard.h 1.86 KB
Newer Older
1 2
#ifndef DOXYWIZARD_H
#define DOXYWIZARD_H
3

4 5 6
#include <QMainWindow>
#include <QSettings>
#include <QStringList>
7

8 9 10
class Expert;
class Wizard;
class QLabel;
11 12 13
class QLineEdit;
class QPushButton;
class QTextEdit;
14
class QMenu;
15 16
class QProcess;
class QTimer;
17

18
class MainWindow : public QMainWindow
19
{
20
    Q_OBJECT
21 22

  public:
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
    static MainWindow &instance();
    void loadConfigFromFile(const QString &fileName);
    void loadSettings();
    void saveSettings();
    void closeEvent(QCloseEvent *event);
    QString configFileName() const { return m_fileName; }
    void updateTitle();

  public slots:
    void manual();
    void about();
    void openConfig();
    bool saveConfig();
    bool saveConfigAs();
    void makeDefaults();
    void resetToDefaults();
    void selectTab(int);
    void quit();
41 42

  private slots:
43
    void openRecent(QAction *action);
44
    void selectWorkingDir();
45
    void updateWorkingDir();
46 47 48
    void runDoxygen();
    void readStdout();
    void runComplete();
49
    void showHtmlOutput();
50
    void saveLog();
51 52
    void showSettings();
    void configChanged();
53
    void clearRecent();
54
    
55
  private:
56 57 58 59 60 61 62 63 64
    MainWindow();
    void saveConfig(const QString &fileName);
    void addRecentFile(const QString &fileName);
    void updateConfigFileName(const QString &fileName);
    void setWorkingDir(const QString &dirName);
    void updateLaunchButtonState();
    bool discardUnsavedChanges(bool saveOption=true);

    QLineEdit *m_workingDir;
65 66 67
    QPushButton *m_selWorkingDir;
    QPushButton *m_run;
    QPushButton *m_saveLog;
68 69 70 71 72 73 74 75 76 77 78 79
    QPushButton *m_launchHtml;
    QPushButton *m_launchPdf;
    QTextEdit *m_outputLog;
    QLabel *m_runStatus;
    Expert *m_expert;
    Wizard *m_wizard;
    QString m_fileName;
    QSettings m_settings;
    QMenu *m_recentMenu;
    QStringList m_recentFiles;
    QProcess *m_runProcess;
    QTimer *m_timer;
80
    bool m_running;
81
    bool m_modified;
82 83 84
};

#endif