doxywizard.h 1.93 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
class QTabWidget;
18

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

  public:
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
    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();
42 43

  private slots:
44
    void openRecent(QAction *action);
45
    void selectWorkingDir();
46
    void updateWorkingDir();
47 48 49
    void runDoxygen();
    void readStdout();
    void runComplete();
50
    void showHtmlOutput();
51
    void saveLog();
52 53
    void showSettings();
    void configChanged();
54
    void clearRecent();
55
    void selectRunTab();
56
    
57
  private:
58 59 60 61 62 63 64 65 66
    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;
67 68 69
    QPushButton *m_selWorkingDir;
    QPushButton *m_run;
    QPushButton *m_saveLog;
70 71 72 73 74 75 76 77 78 79 80 81
    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;
82
    QTabWidget *m_tabs;
83
    bool m_running;
84
    bool m_modified;
85 86 87
};

#endif