expert.h
Go to the documentation of this file.
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  void refresh();
46 
47  private slots:
48  void showHelp(Input *);
49  void nextTopic();
50  void prevTopic();
51 
52  signals:
53  void changed();
54  void done();
55 
56  private:
57  void createTopics(const QDomElement &);
58  void saveTopic(QTextStream &t,QDomElement &elem,QTextCodec *codec,bool brief);
59 
60  QSplitter *m_splitter;
61  QTextBrowser *m_helper;
62  QTreeWidget *m_treeWidget;
63  QStackedWidget *m_topicStack;
64  QHash<QString,QWidget *> m_topics;
65  QHash<QString,QObject *> m_optionWidgets;
66  QHash<QString,Input *> m_options;
67  QPushButton *m_next;
68  QPushButton *m_prev;
69  QDomElement m_rootElement;
72 };
73 
74 #endif
static QCString name
Definition: declinfo.cpp:673
void activateTopic(QTreeWidgetItem *, QTreeWidgetItem *)
Definition: expert.cpp:692
void setHeader(const char *name)
Definition: expert.cpp:43
QTreeWidget * m_treeWidget
Definition: expert.h:62
void saveTopic(QTextStream &t, QDomElement &elem, QTextCodec *codec, bool brief)
Definition: expert.cpp:739
bool brief
bool writeConfig(QTextStream &t, bool brief)
Definition: expert.cpp:780
QWidget * createTopicWidget(QDomElement &elem)
Definition: expert.cpp:477
bool htmlOutputPresent(const QString &workingDir) const
Definition: expert.cpp:898
Definition: expert.h:19
QSplitter * m_splitter
Definition: expert.h:60
QByteArray saveInnerState() const
Definition: expert.cpp:811
QHash< QString, Input * > m_options
Definition: expert.h:66
void refresh()
Definition: expert.cpp:954
QPushButton * m_next
Definition: expert.h:67
QHash< QString, QObject * > m_optionWidgets
Definition: expert.h:65
QString m_header
Definition: expert.h:71
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Definition: qstring.h:350
Definition: docintf.h:4
QString getHtmlOutputIndex(const QString &workingDir) const
Definition: expert.cpp:907
void add(const char *name, const char *doc)
Definition: expert.cpp:48
const QHash< QString, Input * > & modelData() const
Definition: expert.h:32
void nextTopic()
Definition: expert.cpp:838
void createTopics(const QDomElement &)
Definition: expert.cpp:120
void showHelp(Input *)
Definition: expert.cpp:821
~Expert()
Definition: expert.cpp:110
fileName
Definition: dumpTree.py:9
QStackedWidget * m_topicStack
Definition: expert.h:63
QPushButton * m_prev
Definition: expert.h:68
Expert()
Definition: expert.cpp:59
void saveSettings(QSettings *)
Definition: expert.cpp:719
bool restoreInnerState(const QByteArray &state)
Definition: expert.cpp:816
Definition: input.h:9
QTextBrowser * m_helper
Definition: expert.h:61
The QTextStream class provides basic functions for reading and writing text using a QIODevice...
Definition: qtextstream.h:53
void loadSettings(QSettings *)
Definition: expert.cpp:703
QCString doc
QDomElement m_rootElement
Definition: expert.h:69
void done()
void loadConfig(const QString &fileName)
Definition: expert.cpp:733
void prevTopic()
Definition: expert.cpp:853
Provides conversion between text encodings.
Definition: qtextcodec.h:62
QHash< QString, QWidget * > m_topics
Definition: expert.h:64
bool pdfOutputPresent(const QString &workingDir) const
Definition: expert.cpp:934
bool m_inShowHelp
Definition: expert.h:70
void changed()
void resetToDefaults()
Definition: expert.cpp:861