Go to the documentation of this file.
57 LOG(VB_GENERAL, LOG_ERR,
"Cannot load screen 'browser'");
65 QString favIcon =
"mb_default_favicon.png";
68 if (QFile::exists(favIcon))
70 QImage image(favIcon);
77 auto *page =
new WebPage(
this, browser);
83 page->SetActive(
true);
120 for (
int x = 1; x <
m_urlList.size(); x++)
139 QString message = tr(
"Enter URL");
144 if (dialog->Create())
153 QString name = QString(
"browser%1").arg(
m_browserList.size() + 1);
155 name.toLatin1().constData());
158 QString newUrl = url;
160 if (newUrl.isEmpty())
161 newUrl =
"http://www.google.com";
163 if (!newUrl.startsWith(
"http://") && !newUrl.startsWith(
"https://") &&
164 !newUrl.startsWith(
"file:/") )
165 newUrl.prepend(
"http://");
166 page->getBrowser()->LoadPage(QUrl::fromEncoded(newUrl.toLocal8Bit()));
168 page->SetActive(
false);
224 if (!sUrl.startsWith(
"http://") && !sUrl.startsWith(
"https://") &&
225 !sUrl.startsWith(
"file:/") )
226 sUrl.prepend(
"http://");
260 true, mainStack,
"bookmarkeditor");
263 if (editor->Create())
271 item->
SetText(tr(
"Loading..."));
330 for (
int i = 0; i < actions.size() && !handled; i++)
333 QString
action = actions[i];
340 QString label = tr(
"Actions");
368 else if (
action ==
"INFO")
375 else if (
action ==
"ESCAPE")
379 else if (
action ==
"PREVTAB")
385 else if (
action ==
"NEXTTAB")
388 if (pos < m_pageList->GetCount() - 1)
391 else if (
action ==
"DELETE")
MythScreenStack * GetMainStack()
bool CanGoForward(void)
Can go forward in page history.
void slotLoadProgress(int progress)
void SetReturnEvent(QObject *retobject, const QString &resultid)
void Forward(void)
Got forward in page history.
QList< WebPage * > m_browserList
MythUIWebBrowser * activeBrowser(void)
void slotTitleChanged(const QString &title)
bool CanGoBack(void)
Can we go backward in page history.
MythImage * GetFormatImage()
Returns a blank reference counted image in the format required for the Draw functions for this painte...
MythUIButton * m_exitButton
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Screen in which all other widgets are contained and rendered.
void slotTabSelected(MythUIButtonListItem *item)
MythUIProgressBar * m_progressBar
void loadProgress(int progress)
void slotLoadStarted(void)
MythUIType * GetFocusWidget(void) const
virtual MythRect GetArea(void) const
If the object has a minimum area defined, return it, other wise return the default area.
MythDialogBox * m_menuPopup
void LoadPage(const QUrl &url)
Loads the specified url and displays it.
void slotOpenURL(const QString &url)
void ZoomOut(void)
Decrease the text size.
Site category, name and URL edit screen.
bool TranslateKeyPress(const QString &Context, QKeyEvent *Event, QStringList &Actions, bool AllowJumps=true)
Get a list of actions for a keypress in the given context.
bool SetFocusWidget(MythUIType *widget=nullptr)
void ZoomIn(void)
Increase the text size.
void AddButton(const QString &title)
Basic menu dialog, message and a list of options.
bool Create(void) override
void BuildFocusList(void)
void slotLoadFinished(bool OK)
MythUIButton * m_forwardButton
int DecrRef(void) override
Decrements reference count and deletes on 0.
QUrl GetUrl(void)
Gets the current page's url.
MythBrowser(MythScreenStack *parent, QStringList &urlList)
void SetEnabled(bool enable)
MythScreenStack * GetScreenStack() const
void slotStatusBarMessage(const QString &text)
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
MythUIButton * m_backButton
MythUIText * m_statusText
bool Create(void) override
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
void slotAddBookmark(void)
void Back(void)
Got backward in page history.
void slotEnterURL(void) const
virtual void SetText(const QString &text)
virtual void PopScreen(MythScreenType *screen=nullptr, bool allowFade=true, bool deleteScreen=true)
void slotTabLosingFocus(void)
MythMainWindow * GetMythMainWindow(void)
MythUIButtonList * m_pageList
MythScreenStack * GetStack(const QString &Stackname)
void statusBarMessage(const QString &text)
Dialog prompting the user to enter a text string.
void switchTab(int newTab)
void Assign(const QImage &img)
MythPainter * GetMythPainter(void)
QString m_defaultSaveFilename
MythUIHelper * GetMythUI()
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
MythImage * m_defaultFavIcon
void loadFinished(bool OK)
void PauseIdleTimer(bool Pause)
Pause the idle timeout timer.