-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhelp_view.h
41 lines (38 loc) · 989 Bytes
/
help_view.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <QWidget>
#include <QFile>
#include <QTextStream>
#include <QWebView>
#include <QSplitter>
#include <QListWidget>
#include "ui_logview.h"
#include "QMap"
class QSettings;
class HelpViewer : public QWidget{
Q_OBJECT
HelpViewer(QWidget *parent = 0);
~HelpViewer();
static HelpViewer *hlp;
static HelpViewer &getHlp();
void ChangeHelpPage(QString name);
public:
static void ShowWindow();
static void ChangePage(QString name);
static void CloseWindow();
static void LoadPrefs(QSettings &settings);
static void StorePrefs(QSettings &settings);
static void RaiseWindow();
private slots:
void on_CloseButton_pressed();
void followLink(const QUrl &url);
void currentTextChanged(const QString ¤tText);
private:
void readFile();
void addPage(QString name, QString page);
bool ReadContents();
Ui::LogViewerForm ui;
QWebView *viewer;
QListWidget *contents;
QHBoxLayout *layout;
QSplitter *splitter;
QMap<QString, QString> pages;
};