MythTV
master
mythplugins
mythbrowser
mythbrowser
mythbrowser.h
Go to the documentation of this file.
1
#ifndef MYTHBROWSER_H
2
#define MYTHBROWSER_H
3
4
#include <QUrl>
5
6
// MythTV
7
#include <
libmythui/mythdialogbox.h
>
8
#include <
libmythui/mythscreentype.h
>
9
#include <
libmythui/mythuibutton.h
>
10
#include <
libmythui/mythuibuttonlist.h
>
11
#include <
libmythui/mythuiprogressbar.h
>
12
#include <
libmythui/mythuiwebbrowser.h
>
13
14
#include "
bookmarkmanager.h
"
15
16
class
WebPage
;
17
18
class
MythBrowser
:
public
MythScreenType
19
{
20
Q_OBJECT
21
22
public
:
23
MythBrowser
(
MythScreenStack
*parent, QStringList &urlList);
24
~MythBrowser
()
override
;
25
26
bool
Create
(
void
)
override
;
// MythScreenType
27
bool
keyPressEvent
(QKeyEvent *event)
override
;
// MythScreenType
28
29
void
setDefaultSaveDirectory
(
const
QString &saveDir) {
m_defaultSaveDir
= saveDir; }
30
void
setDefaultSaveFilename
(
const
QString &saveFile) {
m_defaultSaveFilename
= saveFile; }
31
32
MythImage
*
GetDefaultFavIcon
(
void
)
33
{
34
if
(
m_defaultFavIcon
)
35
m_defaultFavIcon
->
IncrRef
();
36
return
m_defaultFavIcon
;
37
}
38
39
public
slots:
40
void
slotOpenURL
(
const
QString &url);
41
42
protected
slots:
43
void
slotZoomIn
();
44
void
slotZoomOut
();
45
46
void
slotBack
();
47
void
slotForward
();
48
49
void
slotEnterURL
(
void
)
const
;
50
51
void
slotAddTab
(
const
QString &url,
bool
doSwitch =
true
);
52
void
slotAddTab
() {
slotAddTab
(
""
); }
53
void
slotDeleteTab
(
void
);
54
55
void
slotAddBookmark
(
void
);
56
57
void
slotLoadStarted
(
void
);
58
void
slotLoadFinished
(
bool
OK
);
59
void
slotLoadProgress
(
int
progress
);
60
void
slotTitleChanged
(
const
QString &title);
61
void
slotStatusBarMessage
(
const
QString &text);
62
void
slotTabSelected
(
MythUIButtonListItem
*item);
63
void
slotTabLosingFocus
(
void
);
64
65
private
:
66
MythUIWebBrowser
*
activeBrowser
(
void
);
67
68
void
switchTab
(
int
newTab);
69
70
QStringList
m_urlList
;
71
72
MythUIButtonList
*
m_pageList
{
nullptr
};
73
QList<WebPage*>
m_browserList
;
74
MythUIProgressBar
*
m_progressBar
{
nullptr
};
75
MythUIText
*
m_titleText
{
nullptr
};
76
MythUIText
*
m_statusText
{
nullptr
};
77
MythUIButton
*
m_backButton
{
nullptr
};
78
MythUIButton
*
m_forwardButton
{
nullptr
};
79
MythUIButton
*
m_exitButton
{
nullptr
};
80
81
int
m_currentBrowser
{-1};
82
QUrl
m_url
;
83
QString
m_defaultSaveDir
;
84
QString
m_defaultSaveFilename
;
85
86
Bookmark
m_editBookmark
;
87
88
MythDialogBox
*
m_menuPopup
{
nullptr
};
89
90
MythImage
*
m_defaultFavIcon
{
nullptr
};
91
92
friend
class
WebPage
;
93
};
94
95
#endif
MythBrowser::slotLoadProgress
void slotLoadProgress(int progress)
Definition:
mythbrowser.cpp:286
mythuiprogressbar.h
MythBrowser::m_browserList
QList< WebPage * > m_browserList
Definition:
mythbrowser.h:73
MythBrowser::slotZoomOut
void slotZoomOut()
Definition:
mythbrowser.cpp:231
MythBrowser::activeBrowser
MythUIWebBrowser * activeBrowser(void)
Definition:
mythbrowser.cpp:128
MythBrowser::slotTitleChanged
void slotTitleChanged(const QString &title)
Definition:
mythbrowser.cpp:292
progress
bool progress
Definition:
mythcommflag.cpp:69
bookmarkmanager.h
MythBrowser::m_exitButton
MythUIButton * m_exitButton
Definition:
mythbrowser.h:79
mythdialogbox.h
MythScreenStack
Definition:
mythscreenstack.h:16
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition:
mythscreentype.h:45
MythBrowser::slotTabSelected
void slotTabSelected(MythUIButtonListItem *item)
Definition:
mythbrowser.cpp:305
MythBrowser::m_progressBar
MythUIProgressBar * m_progressBar
Definition:
mythbrowser.h:74
MythBrowser::GetDefaultFavIcon
MythImage * GetDefaultFavIcon(void)
Definition:
mythbrowser.h:32
mythuibuttonlist.h
MythBrowser::slotLoadStarted
void slotLoadStarted(void)
Definition:
mythbrowser.cpp:267
MythBrowser::slotBack
void slotBack()
Definition:
mythbrowser.cpp:241
MythBrowser::m_menuPopup
MythDialogBox * m_menuPopup
Definition:
mythbrowser.h:88
MythUIButtonListItem
Definition:
mythuibuttonlist.h:41
MythBrowser::slotOpenURL
void slotOpenURL(const QString &url)
Definition:
mythbrowser.cpp:221
MythBrowser::setDefaultSaveFilename
void setDefaultSaveFilename(const QString &saveFile)
Definition:
mythbrowser.h:30
MythBrowser::m_url
QUrl m_url
Definition:
mythbrowser.h:82
MythBrowser::~MythBrowser
~MythBrowser() override
Definition:
mythbrowser.cpp:25
MythUIProgressBar
Progress bar widget.
Definition:
mythuiprogressbar.h:12
MythDialogBox
Basic menu dialog, message and a list of options.
Definition:
mythdialogbox.h:166
MythBrowser::slotLoadFinished
void slotLoadFinished(bool OK)
Definition:
mythbrowser.cpp:274
MythUIButton
A single button widget.
Definition:
mythuibutton.h:21
MythBrowser::m_editBookmark
Bookmark m_editBookmark
Definition:
mythbrowser.h:86
MythBrowser::m_forwardButton
MythUIButton * m_forwardButton
Definition:
mythbrowser.h:78
MythBrowser::MythBrowser
MythBrowser(MythScreenStack *parent, QStringList &urlList)
Definition:
mythbrowser.cpp:18
Bookmark
Definition:
bookmarkmanager.h:11
MythBrowser::m_urlList
QStringList m_urlList
Definition:
mythbrowser.h:70
MythBrowser::slotStatusBarMessage
void slotStatusBarMessage(const QString &text)
Definition:
mythbrowser.cpp:299
MythBrowser::setDefaultSaveDirectory
void setDefaultSaveDirectory(const QString &saveDir)
Definition:
mythbrowser.h:29
MythImage::IncrRef
int IncrRef(void) override
Increments reference count.
Definition:
mythimage.cpp:44
MythBrowser::m_backButton
MythUIButton * m_backButton
Definition:
mythbrowser.h:77
MythBrowser::slotForward
void slotForward()
Definition:
mythbrowser.cpp:246
MythBrowser::m_statusText
MythUIText * m_statusText
Definition:
mythbrowser.h:76
MythBrowser::Create
bool Create(void) override
Definition:
mythbrowser.cpp:37
MythUIText
All purpose text widget, displays a text string.
Definition:
mythuitext.h:28
MythBrowser
Definition:
mythbrowser.h:18
MythBrowser::slotZoomIn
void slotZoomIn()
Definition:
mythbrowser.cpp:236
MythBrowser::m_titleText
MythUIText * m_titleText
Definition:
mythbrowser.h:75
MythImage
Definition:
mythimage.h:36
MythBrowser::slotAddBookmark
void slotAddBookmark(void)
Definition:
mythbrowser.cpp:251
MythBrowser::slotDeleteTab
void slotDeleteTab(void)
Definition:
mythbrowser.cpp:181
MythBrowser::slotEnterURL
void slotEnterURL(void) const
Definition:
mythbrowser.cpp:135
MythBrowser::m_currentBrowser
int m_currentBrowser
Definition:
mythbrowser.h:81
MythBrowser::slotAddTab
void slotAddTab()
Definition:
mythbrowser.h:52
MythBrowser::slotTabLosingFocus
void slotTabLosingFocus(void)
Definition:
mythbrowser.cpp:314
OK
static constexpr int OK
Definition:
dvbci.cpp:69
MythBrowser::m_pageList
MythUIButtonList * m_pageList
Definition:
mythbrowser.h:72
mythuibutton.h
WebPage
Definition:
webpage.h:16
MythUIWebBrowser
Web browsing widget.
Definition:
mythuiwebbrowser.h:132
MythBrowser::switchTab
void switchTab(int newTab)
Definition:
mythbrowser.cpp:200
MythBrowser::m_defaultSaveFilename
QString m_defaultSaveFilename
Definition:
mythbrowser.h:84
MythBrowser::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition:
mythbrowser.cpp:319
MythUIButtonList
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
Definition:
mythuibuttonlist.h:191
mythuiwebbrowser.h
MythBrowser::m_defaultFavIcon
MythImage * m_defaultFavIcon
Definition:
mythbrowser.h:90
mythscreentype.h
MythBrowser::m_defaultSaveDir
QString m_defaultSaveDir
Definition:
mythbrowser.h:83
Generated on Sun Jan 19 2025 03:16:43 for MythTV by
1.8.17