[go: up one dir, main page]

Menu

[r703]: / htmlreader.h  Maximize  Restore  History

Download this file

78 lines (63 with data), 2.3 kB

 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/* Marcion
Copyright (C) 2009-2015 Milan Konvicka
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
#ifndef HTMLREADER_H
#define HTMLREADER_H
#include "mdocumentbase.h"
#include "textbrowserext.h"
#include "mwindowswidget.h"
#include <QWidget>
#include <QTextCodec>
namespace Ui {
class CHtmlReader;
}
class CHtmlReader : public QWidget, public MDocumentBase {
Q_OBJECT
public:
friend class MContentBook;
CHtmlReader(QWidget *parent = 0);
CHtmlReader(QString const & title,QString const & filename,
CBookTextBrowser::Script script,
QString const & show_text=QString(),
QWidget *parent = 0);
~CHtmlReader();
void init(QString const & title,QString const & filename,
CBookTextBrowser::Script script,
QString const & show_text=QString(),
bool allow_font=false);
void goHome();
void loadPage(QUrl const &);
protected:
//void changeEvent(QEvent *e);
CTextBrowserExt * browser();
private:
Ui::CHtmlReader *ui;
QUrl _home;
static QList<QByteArray> _charsets;
protected:
//CMessages * const messages;
void keyPressEvent(QKeyEvent * event);
private slots:
void on_btReload_clicked();
void on_btZoomOut_clicked();
void on_btZoomIn_clicked();
void on_btShowPanel_clicked();
void on_btNext_clicked();
void on_btPrev_clicked();
void on_btHome_clicked();
void on_brContent_historyFBChanged(int,bool);
void on_grpCharset_toggled(bool arg1);
void on_cmbCharset_activated(int );
void slot_anchorClicked(QUrl url);
};
#endif // HTMLREADER_H