Debian Codegraph @

addon/doxywizard/expert.h

raw
1 /******************************************************************************
2 *
3 * Copyright (C) 1997-2019 by Dimitri van Heesch.
4 *
5 * Permission to use, copy, modify, and distribute this software and its
6 * documentation under the terms of the GNU General Public License is hereby
7 * granted. No representations are made about the suitability of this software
8 * for any purpose. It is provided "as is" without express or implied warranty.
9 * See the GNU General Public License for more details.
10 *
11 */
12
13 #ifndef EXPERT_H
14 #define EXPERT_H
15
16 #include <QSplitter>
17 #include <QDomElement>
18 #include <QHash>
19
20 #include "docintf.h"
21 #include "adapter.h"
22
23 class QTreeWidget;
24 class QTreeWidgetItem;
25 class QStackedWidget;
26 class QSettings;
27 class QTextBrowser;
28 class QPushButton;
29 class Input;
30
31 class Expert : public QSplitter, public DocIntf
32 {
33 Q_OBJECT
34
35 public:
36 Expert();
37 ~Expert();
38 void loadSettings(QSettings *);
39 void saveSettings(QSettings *);
40 void loadConfig(const QString &fileName);
41 bool writeConfig(QTextStream &t,bool brief,bool condensed, bool convert);
42 QByteArray saveInnerState () const;
43 bool restoreInnerState ( const QByteArray & state );
44 const QHash<QString,Input*> &modelData() const { return m_options; }
45 void resetToDefaults();
46 bool htmlOutputPresent(const QString &workingDir) const;
47 bool pdfOutputPresent(const QString &workingDir) const;
48 QString getHtmlOutputIndex(const QString &workingDir) const;
49
50 // DocIntf methods
51 void setHeader(const char *name);
52 void add(const char *name,const char *doc);
53
54 public slots:
55 void activateTopic(QTreeWidgetItem *,QTreeWidgetItem *);
56 QWidget *createTopicWidget(QDomElement &elem);
57 void refresh();
58
59 private slots:
60 void showHelp(Input *);
61 void nextTopic();
62 void prevTopic();
63
64 signals:
65 void changed();
66 void done();
67
68 private:
69 void createTopics(const QDomElement &);
70 void saveTopic(QTextStream &t,QDomElement &elem,TextCodecAdapter *codec,bool brief,bool dondensed,bool convert);
71
72 QSplitter *m_splitter;
73 QTextBrowser *m_helper;
74 QTreeWidget *m_treeWidget;
75 QStackedWidget *m_topicStack;
76 QHash<QString,QWidget *> m_topics;
77 QHash<QString,QObject *> m_optionWidgets;
78 QHash<QString,Input *> m_options;
79 QPushButton *m_next;
80 QPushButton *m_prev;
81 QDomElement m_rootElement;
82 bool m_inShowHelp;
83 QString m_header;
84 };
85
86 #endif