/
mythbrowser.h
82 lines (58 loc) · 1.79 KB
/
mythbrowser.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
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
78
79
80
81
82
#ifndef MYTHBROWSER_H
#define MYTHBROWSER_H
#include <QUrl>
#include <mythuiwebbrowser.h>
#include <mythuibuttonlist.h>
#include <mythscreentype.h>
#include <mythdialogbox.h>
#include <mythuiprogressbar.h>
#include "bookmarkmanager.h"
class WebPage;
class MythBrowser : public MythScreenType
{
Q_OBJECT
public:
MythBrowser(MythScreenStack *parent,
QStringList &urlList, float zoom);
~MythBrowser();
bool Create(void);
bool keyPressEvent(QKeyEvent *);
void setDefaultSaveDirectory(const QString saveDir) { m_defaultSaveDir = saveDir; }
public slots:
void slotOpenURL(const QString &url);
protected slots:
void slotZoomIn();
void slotZoomOut();
void slotBack();
void slotForward();
void slotEnterURL(void);
void slotAddTab(const QString &url = "", bool doSwitch = true);
void slotDeleteTab(void);
void slotAddBookmark(void);
void slotLoadStarted(void);
void slotLoadFinished(bool OK);
void slotLoadProgress(int progress);
void slotTitleChanged(const QString &title);
void slotStatusBarMessage(const QString &text);
void slotTabSelected(MythUIButtonListItem *item);
void slotTabLosingFocus(void);
void slotIconChanged(void);
void slotExitingMenu(void);
private:
MythUIWebBrowser* activeBrowser(void);
void switchTab(int newTab);
QStringList m_urlList;
MythUIButtonList *m_pageList;
QList<WebPage*> m_browserList;
MythUIProgressBar *m_progressBar;
MythUIText *m_titleText;
MythUIText *m_statusText;
int m_currentBrowser;
QUrl m_url;
float m_zoom;
QString m_defaultSaveDir;
Bookmark m_editBookmark;
MythDialogBox *m_menuPopup;
friend class WebPage;
};
#endif