2c6544638664dc7d5a11be44bdcd5d2b350e9ca9
[platform/upstream/doxygen.git] / addon / doxywizard / expert.h
1 #ifndef EXPERT_H
2 #define EXPERT_H
3
4 #include <QSplitter>
5 #include <QDomElement>
6 #include <QHash>
7
8 #include "docintf.h"
9
10 class QTreeWidget;
11 class QTreeWidgetItem;
12 class QStackedWidget;
13 class QSettings;
14 class QTextBrowser;
15 class QTextCodec;
16 class QPushButton;
17 class Input;
18
19 class Expert : public QSplitter, public DocIntf
20 {
21     Q_OBJECT
22
23   public:
24     Expert();
25    ~Expert();
26     void loadSettings(QSettings *);
27     void saveSettings(QSettings *);
28     void loadConfig(const QString &fileName);
29     bool writeConfig(QTextStream &t,bool brief);
30     QByteArray saveInnerState () const;
31     bool restoreInnerState ( const QByteArray & state );
32     const QHash<QString,Input*> &modelData() const { return m_options; }
33     void resetToDefaults();
34     bool htmlOutputPresent(const QString &workingDir) const;
35     bool pdfOutputPresent(const QString &workingDir) const;
36     QString getHtmlOutputIndex(const QString &workingDir) const;
37
38     // DocIntf methods
39     void setHeader(const char *name);
40     void add(const char *name,const char *doc);
41   
42   public slots:
43     void activateTopic(QTreeWidgetItem *,QTreeWidgetItem *);
44     QWidget *createTopicWidget(QDomElement &elem);
45
46   private slots:
47     void showHelp(Input *);
48     void nextTopic();
49     void prevTopic();
50
51   signals:
52     void changed();
53
54   private:
55     void createTopics(const QDomElement &);
56     void saveTopic(QTextStream &t,QDomElement &elem,QTextCodec *codec,bool brief);
57
58     QSplitter               *m_splitter;
59     QTextBrowser            *m_helper;
60     QTreeWidget             *m_treeWidget;
61     QStackedWidget          *m_topicStack;
62     QHash<QString,QWidget *> m_topics;
63     QHash<QString,QObject *> m_optionWidgets;
64     QHash<QString,Input *>   m_options;
65     QPushButton             *m_next;
66     QPushButton             *m_prev;
67     QDomElement              m_rootElement;
68     bool                     m_inShowHelp;
69     QString                  m_header;
70 };
71
72 #endif