MythTV master
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
MythUIWebBrowser Class Reference

Web browsing widget. More...

#include <libmythui/mythuiwebbrowser.h>

Inheritance diagram for MythUIWebBrowser:
[legend]
Collaboration diagram for MythUIWebBrowser:
[legend]

Public Slots

void Back (void)
 Got backward in page history. More...
 
void Forward (void)
 Got forward in page history. More...
 
void ZoomIn (void)
 Increase the text size. More...
 
void ZoomOut (void)
 Decrease the text size. More...
 
void Reload (bool useCache=true)
 
void TriggerPageAction (QWebEnginePage::WebAction action, bool checked=false)
 
- Public Slots inherited from MythUIType
void LoseFocus (void)
 
bool TakeFocus (void)
 
void Activate (void)
 
void Hide (void)
 
void Show (void)
 
void Refresh (void)
 
void UpdateDependState (bool isDefault)
 
void UpdateDependState (MythUIType *dependee, bool isDefault)
 

Signals

void loadStarted (void)
 
void loadFinished (bool ok)
 a page is starting to load More...
 
void loadProgress (int progress)
 a page has finished loading More...
 
void titleChanged (const QString &title)
 % of page loaded More...
 
void statusBarMessage (const QString &text)
 a pages title has changed More...
 
void iconChanged (const QIcon &icon)
 link hit test messages More...
 
void iconUrlChanged (const QUrl &url)
 a pages fav icon has changed More...
 
void fileDownloaded (QString filename)
 a pages fav icon has changed More...
 
- Signals inherited from MythUIType
void RequestUpdate (void)
 
void RequestRegionUpdate (const QRect &)
 
void TakingFocus (void)
 
void LosingFocus (void)
 
void VisibilityChanged (bool Visible)
 
void Showing (void)
 
void Hiding (void)
 
void Enabling (void)
 
void Disabling (void)
 
void FinishedMoving (void)
 
void FinishedFading (void)
 
void DependChanged (bool isDefault)
 

Public Member Functions

 MythUIWebBrowser (MythUIType *parent, const QString &name)
 the classes constructor More...
 
 ~MythUIWebBrowser () override
 the classes destructor More...
 
void Init (void)
 Initializes the widget ready for use. More...
 
void LoadPage (const QUrl &url)
 Loads the specified url and displays it. More...
 
void SetHtml (const QString &html, const QUrl &baseUrl=QUrl())
 Sets the content of the widget to the specified html. More...
 
void LoadUserStyleSheet (const QUrl &url, const QString &name=QString("mythtv"))
 Sets the specified user style sheet. More...
 
void RemoveUserStyleSheet (const QString &name)
 
void SetHttpUserAgent (const QString &userAgent)
 
QWebEngineSettings * GetWebEngineSettings (void)
 
QWebEngineProfile * GetWebEngineProfile (void)
 
void Pulse (void) override
 Pulse is called 70 times a second to trigger a single frame of an animation. More...
 
QIcon GetIcon (void)
 Gets the current page's fav icon. More...
 
QUrl GetUrl (void)
 Gets the current page's url. More...
 
QString GetTitle (void)
 Gets the current page's title. More...
 
void SetActive (bool active)
 Toggles the active state of the widget. More...
 
bool IsActive (void) const
 
bool IsInputToggled (void) const
 returns true if all keypresses are to be passed to the web page More...
 
void SetInputToggled (bool inputToggled)
 
void SetZoom (double zoom)
 Set the text size to specific size. More...
 
float GetZoom (void) const
 Get the current zoom level. More...
 
bool CanGoForward (void)
 Can go forward in page history. More...
 
bool CanGoBack (void)
 Can we go backward in page history. More...
 
void RunJavaScript (const QString &scriptSource)
 
void SendStatusBarMessage (const QString &text)
 
void SetDefaultSaveDirectory (const QString &saveDir)
 
QString GetDefaultSaveDirectory (void)
 
void SetDefaultSaveFilename (const QString &filename)
 
QString GetDefaultSaveFilename (void)
 
void HandleMouseAction (const QString &action)
 
void UpdateBuffer (void)
 
MythScreenTypeGetParentScreen (void)
 
- Public Member Functions inherited from MythUIType
 MythUIType (QObject *parent, const QString &name)
 
virtual void Reset (void)
 Reset the widget to it's original state, should not reset changes made by the theme. More...
 
void AddChild (MythUIType *child)
 Add a child UIType. More...
 
MythUITypeGetChild (const QString &name) const
 Get a named child of this UIType. More...
 
MythUITypeGetChildAt (QPoint p, bool recursive=true, bool focusable=true) const
 Return the first MythUIType at the given coordinates. More...
 
QList< MythUIType * > * GetAllChildren (void)
 Return a list of all child widgets. More...
 
QList< MythUIType * > GetAllDescendants (void)
 
void DeleteChild (const QString &name)
 Delete a named child of this UIType. More...
 
void DeleteChild (MythUIType *child)
 Delete the given UIType if it is a child of this UIType. More...
 
void DeleteAllChildren (void)
 Delete all child widgets. More...
 
bool NeedsRedraw (void) const
 
void ResetNeedsRedraw (void)
 
void SetRedraw (void)
 
void SetChildNeedsRedraw (MythUIType *child)
 
bool CanTakeFocus (void) const
 Return if this widget can accept input focus. More...
 
void SetCanTakeFocus (bool set=true)
 Set whether this widget can take focus. More...
 
void SetFocusOrder (int order)
 
void SetFocusedName (const QString &widgetname)
 
QString GetFocusedName (void) const
 
bool IsEnabled (void) const
 
void SetEnabled (bool enable)
 
bool MoveToTop (void)
 
bool MoveChildToTop (MythUIType *child)
 
void ActivateAnimations (MythUIAnimation::Trigger trigger)
 
QList< MythUIAnimation * > * GetAnimations (void)
 
virtual void Pulse (void)
 Pulse is called 70 times a second to trigger a single frame of an animation. More...
 
void Draw (MythPainter *p, int xoffset, int yoffset, int alphaMod=255, QRect clipRect=QRect())
 
void SetPosition (int x, int y)
 Convenience method, calls SetPosition(const MythPoint&) Override that instead to change functionality. More...
 
void SetPosition (QPoint point)
 
virtual void SetPosition (const MythPoint &point)
 
virtual MythPoint GetPosition (void) const
 
virtual void SetSize (QSize size)
 
virtual void SetMinSize (const MythPoint &size)
 Set the minimum size of this widget, for widgets which can be rescaled. More...
 
virtual QSize GetMinSize (void) const
 
virtual void SetArea (const MythRect &rect)
 
virtual void AdjustMinArea (int delta_x, int delta_y, int delta_w, int delta_h)
 Adjust the size of a sibling. More...
 
virtual void VanishSibling (void)
 
virtual void SetMinAreaParent (MythRect actual_area, MythRect allowed_area, MythUIType *child)
 Adjust the size of sibling objects within the button. More...
 
virtual void SetMinArea (const MythRect &rect)
 Set the minimum area based on the given size. More...
 
virtual MythRect GetArea (void) const
 If the object has a minimum area defined, return it, other wise return the default area. More...
 
virtual MythRect GetFullArea (void) const
 
virtual void RecalculateArea (bool recurse=true)
 
void ExpandArea (QRect rect)
 
virtual QRegion GetDirtyArea (void) const
 
bool IsVisible (bool recurse=false) const
 
virtual void SetVisible (bool visible)
 
void MoveTo (QPoint destXY, QPoint speedXY)
 
void AdjustAlpha (int mode, int alphachange, int minalpha=0, int maxalpha=255)
 
void SetAlpha (int newalpha)
 
int GetAlpha (void) const
 
virtual bool keyPressEvent (QKeyEvent *event)
 Key event handler. More...
 
virtual bool inputMethodEvent (QInputMethodEvent *event)
 Input Method event handler. More...
 
virtual bool gestureEvent (MythGestureEvent *event)
 Mouse click/movement handler, receives mouse gesture events from the QCoreApplication event loop. More...
 
virtual void mediaEvent (MythMediaEvent *event)
 Media/Device status event handler, received from MythMediaMonitor. More...
 
MythFontPropertiesGetFont (const QString &text) const
 
bool AddFont (const QString &text, MythFontProperties *fontProp)
 
void SetHelpText (const QString &text)
 
QString GetHelpText (void) const
 
void SetXMLLocation (const QString &filename, int where)
 
QString GetXMLLocation (void) const
 
void SetXMLName (const QString &name)
 
QString GetXMLName (void) const
 
bool IsDeferredLoading (bool recurse=false) const
 
void SetDeferLoad (bool defer)
 
virtual void LoadNow (void)
 Cause images in this and child widgets to be loaded. More...
 
bool ContainsPoint (QPoint point) const
 Check if the given point falls within this widgets area. More...
 
virtual MythPainterGetPainter (void)
 
void SetPainter (MythPainter *painter)
 
void SetCentre (UIEffects::Centre centre)
 
void SetZoom (float zoom)
 
void SetHorizontalZoom (float zoom)
 
void SetVerticalZoom (float zoom)
 
void SetAngle (float angle)
 
void SetDependIsDefault (bool isDefault)
 
void SetReverseDependence (MythUIType *dependee, bool reverse)
 
void SetDependsMap (QMap< QString, QString > dependsMap)
 
QMap< QString, QString > GetDependsMap () const
 

Protected Slots

void slotLoadStarted (void)
 a file has been downloaded More...
 
void slotLoadFinished (bool Ok)
 
void slotLoadProgress (int progress)
 
void slotTitleChanged (const QString &title)
 
void slotStatusBarMessage (const QString &text)
 
void slotIconChanged (const QIcon &icon)
 
void slotIconUrlChanged (const QUrl &url)
 
void slotScrollPositionChanged (QPointF position)
 
void slotContentsSizeChanged (QSizeF size)
 
void slotLinkClicked (const QUrl &url)
 
void slotTopScreenChanged (MythScreenType *screen)
 
void slotScrollBarShowing (void)
 
void slotScrollBarHiding (void)
 
void slotLosingFocus ()
 
void slotTakingFocus ()
 
void slotRenderProcessTerminated (QWebEnginePage::RenderProcessTerminationStatus terminationStatus, int exitCode)
 
static void slotFullScreenRequested (QWebEngineFullScreenRequest fullScreenRequest)
 
void slotWindowCloseRequested (void)
 

Protected Member Functions

void SetBackgroundColor (QColor color)
 Sets the default background color. More...
 
void ResetScrollBars (void)
 
void UpdateScrollBars (void)
 
bool IsOnTopScreen (void)
 is our containing screen the top screen? More...
 
void Finalize (void) override
 Perform any post-xml parsing initialisation tasks. More...
 
void DrawSelf (MythPainter *p, int xoffset, int yoffset, int alphaMod, QRect clipRect) override
 
bool ParseElement (const QString &filename, QDomElement &element, bool showWarnings) override
 Parse the xml definition of this widget setting the state of the object accordingly. More...
 
void CopyFrom (MythUIType *base) override
 Copy this widgets state from another. More...
 
void CreateCopy (MythUIType *parent) override
 Copy the state of this widget to the one given, it must be of the same type. More...
 
- Protected Member Functions inherited from MythUIType
 ~MythUIType () override
 
void customEvent (QEvent *event) override
 
virtual void DrawSelf (MythPainter *p, int xoffset, int yoffset, int alphaMod, QRect clipRect)
 
void AddFocusableChildrenToList (FocusInfoType &focusList)
 
void HandleAlphaPulse ()
 Handle one frame of an alpha (transparency) change animation. More...
 
void HandleMovementPulse ()
 Handle one frame of a movement animation. More...
 
int CalcAlpha (int alphamod) const
 
void ConnectDependants (bool recurse=false)
 
virtual bool ParseElement (const QString &filename, QDomElement &element, bool showWarnings)
 Parse the xml definition of this widget setting the state of the object accordingly. More...
 
virtual void CopyFrom (MythUIType *base)
 Copy this widgets state from another. More...
 
virtual void CreateCopy (MythUIType *parent)
 Copy the state of this widget to the one given, it must be of the same type. More...
 
virtual void Finalize (void)
 Perform any post-xml parsing initialisation tasks. More...
 

Protected Attributes

MythScreenTypem_parentScreen { nullptr }
 
QWebEngineView * m_webEngine { nullptr }
 
MythRect m_browserArea
 
MythRect m_actualBrowserArea
 
MythImagem_image { nullptr }
 
bool m_active { false }
 
bool m_wasActive { false }
 
bool m_initialized { false }
 
QElapsedTimer m_lastUpdateTime
 
int m_updateInterval { 0 }
 
qreal m_zoom { 1.0 }
 
QColor m_bgColor
 
QUrl m_widgetUrl
 
QString m_userCssFile
 
QString m_defaultSaveDir
 
QString m_defaultSaveFilename
 
bool m_inputToggled { false }
 
QString m_lastMouseAction
 
int m_mouseKeyCount { 0 }
 
QElapsedTimer m_lastMouseActionTime
 
MythUIScrollBarm_horizontalScrollbar { nullptr }
 
MythUIScrollBarm_verticalScrollbar { nullptr }
 
- Protected Attributes inherited from MythUIType
QList< MythUIType * > m_childrenList
 
QMap< QString, QString > m_dependsMap
 
QList< QPair< MythUIType *, bool > > m_dependsValue
 
QList< int > m_dependOperator
 
bool m_visible {true}
 
bool m_hasFocus {false}
 
bool m_canHaveFocus {false}
 
bool m_enabled {true}
 
bool m_enableInitiator {false}
 
bool m_initiator {false}
 
bool m_vanish {false}
 
bool m_vanished {false}
 
bool m_isDependDefault {false}
 
QMap< MythUIType *, boolm_reverseDepend
 
QString m_focusedName
 
int m_focusOrder {0}
 
MythRect m_area {0,0,0,0}
 
MythRect m_minArea {0,0,0,0}
 
MythPoint m_minSize
 
QRegion m_dirtyRegion {0,0,0,0}
 
bool m_needsRedraw {false}
 
UIEffects m_effects
 
int m_alphaChangeMode {0}
 
int m_alphaChange {0}
 
int m_alphaMin {0}
 
int m_alphaMax {255}
 
bool m_moving {false}
 
QPoint m_xyDestination {0,0}
 
QPoint m_xySpeed {0,0}
 
FontMapm_fonts {nullptr}
 
MythUITypem_parent {nullptr}
 
MythPainterm_painter {nullptr}
 
QList< MythUIAnimation * > m_animations
 
QString m_helptext
 
QString m_xmlName
 
QString m_xmlLocation
 
bool m_deferload {false}
 
QColor m_borderColor {Qt::black}
 

Additional Inherited Members

- Static Public Member Functions inherited from XMLParseBase
static QString getFirstText (QDomElement &element)
 
static bool parseBool (const QString &text)
 
static bool parseBool (QDomElement &element)
 
static MythPoint parsePoint (const QString &text, bool normalize=true)
 
static MythPoint parsePoint (QDomElement &element, bool normalize=true)
 
static QSize parseSize (const QString &text, bool normalize=true)
 
static QSize parseSize (QDomElement &element, bool normalize=true)
 
static MythRect parseRect (const QString &text, bool normalize=true)
 
static MythRect parseRect (QDomElement &element, bool normalize=true)
 
static int parseAlignment (const QString &text)
 
static int parseAlignment (QDomElement &element)
 
static QBrush parseGradient (const QDomElement &element)
 
static QString parseText (QDomElement &element)
 
static MythUITypeGetGlobalObjectStore (void)
 
static void ClearGlobalObjectStore (void)
 
static void ParseChildren (const QString &filename, QDomElement &element, MythUIType *parent, bool showWarnings)
 
static MythUITypeParseUIType (const QString &filename, QDomElement &element, const QString &type, MythUIType *parent, MythScreenType *screen, bool showWarnings, QMap< QString, QString > &parentDependsMap)
 
static bool WindowExists (const QString &xmlfile, const QString &windowname)
 
static bool LoadWindowFromXML (const QString &xmlfile, const QString &windowname, MythUIType *parent)
 
static bool LoadBaseTheme (void)
 
static bool LoadBaseTheme (const QString &baseTheme)
 
static bool CopyWindowFromBase (const QString &windowname, MythScreenType *win)
 
- Static Protected Member Functions inherited from MythUIType
static int NormX (int width)
 
static int NormY (int height)
 

Detailed Description

Web browsing widget.

Provide a web browser widget.

Can load and render local and remote html. Supports netscape plugins.

This widget can display HTML documents from the net, a file or passed to it as a QString.

This is how you would add the widget to a theme file :-

 <webbrowser name="webbrowser">
      <url>http://www.google.com/</url>
      <area>20,55,760,490</area>
      <zoom>1.4</zoom>
      <background color="white"/>
 </webbrowser>

area is the screen area the widget should use. zoom is the initial text size. background is the default background color to use.

The widget has two modes of operation active and inactive. When it's active and has focus it will show the mouse pointer, links will respond when clicked, the highlighed link can be changed and activated using the keyboard. In inactive mode it will just display a static image of the web document, you can scroll it but that is all.

One thing to be aware of is you cannot show popups above this widget when it is in active mode and has focus so either call Active(false) or move the focus to another widget before showing the popup.

Definition at line 73 of file mythuiwebbrowser.h.

Constructor & Destructor Documentation

◆ MythUIWebBrowser()

MythUIWebBrowser::MythUIWebBrowser ( MythUIType parent,
const QString &  name 
)

the classes constructor

Parameters
parentthe parent of this widget
namethe name of this widget

Definition at line 510 of file mythuiwebbrowser.cpp.

Referenced by CreateCopy().

◆ ~MythUIWebBrowser()

MythUIWebBrowser::~MythUIWebBrowser ( void  )
override

the classes destructor

Definition at line 695 of file mythuiwebbrowser.cpp.

Member Function Documentation

◆ Back

void MythUIWebBrowser::Back ( void  )
slot

◆ CanGoBack()

bool MythUIWebBrowser::CanGoBack ( void  )

Can we go backward in page history.

Returns
Return true if it is possible to go backward in the pages visited history

Definition at line 988 of file mythuiwebbrowser.cpp.

◆ CanGoForward()

bool MythUIWebBrowser::CanGoForward ( void  )

Can go forward in page history.

Returns
Return true if it is possible to go forward in the pages visited history

Definition at line 975 of file mythuiwebbrowser.cpp.

◆ CopyFrom()

void MythUIWebBrowser::CopyFrom ( MythUIType base)
overrideprotectedvirtual

Copy this widgets state from another.

Reimplemented from MythUIType.

Definition at line 1409 of file mythuiwebbrowser.cpp.

◆ CreateCopy()

void MythUIWebBrowser::CreateCopy ( MythUIType parent)
overrideprotectedvirtual

Copy the state of this widget to the one given, it must be of the same type.

Reimplemented from MythUIType.

Definition at line 1434 of file mythuiwebbrowser.cpp.

◆ DrawSelf()

void MythUIWebBrowser::DrawSelf ( MythPainter p,
int  xoffset,
int  yoffset,
int  alphaMod,
QRect  clipRect 
)
overrideprotectedvirtual

Reimplemented from MythUIType.

Definition at line 1263 of file mythuiwebbrowser.cpp.

◆ fileDownloaded

void MythUIWebBrowser::fileDownloaded ( QString  filename)
signal

a pages fav icon has changed

◆ Finalize()

void MythUIWebBrowser::Finalize ( void  )
overrideprotectedvirtual

Perform any post-xml parsing initialisation tasks.

This is called after the widget has been created and it's state established by ParseElement() or CopyFrom(). A derived class should use this to perform any initialisation tasks which should occur after this point.

Reimplemented from MythUIType.

Definition at line 523 of file mythuiwebbrowser.cpp.

◆ Forward

void MythUIWebBrowser::Forward ( void  )
slot

Got forward in page history.

Definition at line 1010 of file mythuiwebbrowser.cpp.

Referenced by MythWebEngineView::handleKeyPress(), and MythBrowser::slotForward().

◆ GetDefaultSaveDirectory()

QString MythUIWebBrowser::GetDefaultSaveDirectory ( void  )
inline

Definition at line 118 of file mythuiwebbrowser.h.

◆ GetDefaultSaveFilename()

QString MythUIWebBrowser::GetDefaultSaveFilename ( void  )
inline

Definition at line 121 of file mythuiwebbrowser.h.

◆ GetIcon()

QIcon MythUIWebBrowser::GetIcon ( void  )

Gets the current page's fav icon.

Returns
return the icon if one is available

Definition at line 1022 of file mythuiwebbrowser.cpp.

◆ GetParentScreen()

MythScreenType * MythUIWebBrowser::GetParentScreen ( void  )
inline

Definition at line 127 of file mythuiwebbrowser.h.

Referenced by MythWebEngineView::handleKeyPress().

◆ GetTitle()

QString MythUIWebBrowser::GetTitle ( void  )

Gets the current page's title.

Returns
return the page title

Definition at line 1046 of file mythuiwebbrowser.cpp.

Referenced by WebPage::slotLoadFinished().

◆ GetUrl()

QUrl MythUIWebBrowser::GetUrl ( void  )

Gets the current page's url.

Returns
return the url

Definition at line 1034 of file mythuiwebbrowser.cpp.

Referenced by MythBrowser::slotAddBookmark().

◆ GetWebEngineProfile()

QWebEngineProfile * MythUIWebBrowser::GetWebEngineProfile ( void  )

Definition at line 815 of file mythuiwebbrowser.cpp.

◆ GetWebEngineSettings()

QWebEngineSettings * MythUIWebBrowser::GetWebEngineSettings ( void  )

Definition at line 807 of file mythuiwebbrowser.cpp.

◆ GetZoom()

float MythUIWebBrowser::GetZoom ( void  ) const

Get the current zoom level.

Returns
the zoom level

Definition at line 965 of file mythuiwebbrowser.cpp.

◆ HandleMouseAction()

void MythUIWebBrowser::HandleMouseAction ( const QString &  action)

Definition at line 1276 of file mythuiwebbrowser.cpp.

Referenced by MythWebEngineView::handleKeyPress().

◆ iconChanged

void MythUIWebBrowser::iconChanged ( const QIcon &  icon)
signal

link hit test messages

Referenced by slotIconChanged(), and WebPage::WebPage().

◆ iconUrlChanged

void MythUIWebBrowser::iconUrlChanged ( const QUrl &  url)
signal

a pages fav icon has changed

Referenced by slotIconUrlChanged().

◆ Init()

void MythUIWebBrowser::Init ( void  )

Initializes the widget ready for use.

Note
This is usually called for you when the widget is finalized during the theme file parsing but if you manually add this widget to a screen you will have to call this function after setting the widgets screen area.

Definition at line 537 of file mythuiwebbrowser.cpp.

Referenced by MythFlashPlayer::Create(), Finalize(), and WebPage::WebPage().

◆ IsActive()

bool MythUIWebBrowser::IsActive ( void  ) const
inline

Definition at line 101 of file mythuiwebbrowser.h.

◆ IsInputToggled()

bool MythUIWebBrowser::IsInputToggled ( void  ) const
inline

returns true if all keypresses are to be passed to the web page

Definition at line 104 of file mythuiwebbrowser.h.

Referenced by MythWebEngineView::handleKeyPress().

◆ IsOnTopScreen()

bool MythUIWebBrowser::IsOnTopScreen ( void  )
protected

is our containing screen the top screen?

Definition at line 1180 of file mythuiwebbrowser.cpp.

Referenced by slotTopScreenChanged().

◆ loadFinished

void MythUIWebBrowser::loadFinished ( bool  ok)
signal

a page is starting to load

Referenced by slotLoadFinished(), and WebPage::WebPage().

◆ LoadPage()

void MythUIWebBrowser::LoadPage ( const QUrl &  url)

Loads the specified url and displays it.

Parameters
urlThe url to load

Definition at line 716 of file mythuiwebbrowser.cpp.

Referenced by MythFlashPlayer::Create(), Init(), slotLinkClicked(), and MythBrowser::slotOpenURL().

◆ loadProgress

void MythUIWebBrowser::loadProgress ( int  progress)
signal

a page has finished loading

Referenced by slotLoadProgress(), and WebPage::WebPage().

◆ loadStarted

void MythUIWebBrowser::loadStarted ( void  )
signal

Referenced by WebPage::WebPage().

◆ LoadUserStyleSheet()

void MythUIWebBrowser::LoadUserStyleSheet ( const QUrl &  url,
const QString &  name = QString("mythtv") 
)

Sets the specified user style sheet.

Parameters
urlThe url to the style sheet

Definition at line 746 of file mythuiwebbrowser.cpp.

Referenced by Init().

◆ ParseElement()

bool MythUIWebBrowser::ParseElement ( const QString &  filename,
QDomElement &  element,
bool  showWarnings 
)
overrideprotectedvirtual

Parse the xml definition of this widget setting the state of the object accordingly.

Reimplemented from MythUIType.

Definition at line 1359 of file mythuiwebbrowser.cpp.

◆ Pulse()

void MythUIWebBrowser::Pulse ( void  )
overridevirtual

Pulse is called 70 times a second to trigger a single frame of an animation.

This changes the alpha value of the widget

Reimplemented from MythUIType.

Definition at line 1244 of file mythuiwebbrowser.cpp.

◆ Reload

void MythUIWebBrowser::Reload ( bool  useCache = true)
slot

Definition at line 929 of file mythuiwebbrowser.cpp.

Referenced by MythWebEngineView::handleKeyPress().

◆ RemoveUserStyleSheet()

void MythUIWebBrowser::RemoveUserStyleSheet ( const QString &  name)

Definition at line 782 of file mythuiwebbrowser.cpp.

Referenced by LoadUserStyleSheet().

◆ ResetScrollBars()

void MythUIWebBrowser::ResetScrollBars ( void  )
protected

Definition at line 1341 of file mythuiwebbrowser.cpp.

Referenced by LoadPage(), SetHtml(), and SetZoom().

◆ RunJavaScript()

void MythUIWebBrowser::RunJavaScript ( const QString &  scriptSource)

Definition at line 1058 of file mythuiwebbrowser.cpp.

Referenced by MythFlashPlayer::runJavaScript().

◆ SendStatusBarMessage()

void MythUIWebBrowser::SendStatusBarMessage ( const QString &  text)

Definition at line 1064 of file mythuiwebbrowser.cpp.

Referenced by MythWebEngineView::handleKeyPress().

◆ SetActive()

void MythUIWebBrowser::SetActive ( bool  active)

Toggles the active state of the widget.

Parameters
activethe new active state
Note
When in an active state the widget will show the mouse pointer, generate status bar changed signals, allow the active link to be changed using the keyboard etc.
Warning
If you want to show another screen or popup above the screen owning a MythUIWebBrowser you must first set the active state to false.

Definition at line 861 of file mythuiwebbrowser.cpp.

Referenced by MythFlashPlayer::Create(), WebPage::SetActive(), slotTakingFocus(), and slotTopScreenChanged().

◆ SetBackgroundColor()

void MythUIWebBrowser::SetBackgroundColor ( QColor  color)
protected

Sets the default background color.

Parameters
colorthe color to use
Note
This will only be used if the HTML document being displayed doesn't specify a background color to use.

Definition at line 837 of file mythuiwebbrowser.cpp.

Referenced by Init().

◆ SetDefaultSaveDirectory()

void MythUIWebBrowser::SetDefaultSaveDirectory ( const QString &  saveDir)

Definition at line 945 of file mythuiwebbrowser.cpp.

◆ SetDefaultSaveFilename()

void MythUIWebBrowser::SetDefaultSaveFilename ( const QString &  filename)

Definition at line 953 of file mythuiwebbrowser.cpp.

◆ SetHtml()

void MythUIWebBrowser::SetHtml ( const QString &  html,
const QUrl &  baseUrl = QUrl() 
)

Sets the content of the widget to the specified html.

Parameters
htmlthe html to display
baseUrlExternal objects referenced in the HTML document are located relative to baseUrl.

Definition at line 732 of file mythuiwebbrowser.cpp.

◆ SetHttpUserAgent()

void MythUIWebBrowser::SetHttpUserAgent ( const QString &  userAgent)

Definition at line 823 of file mythuiwebbrowser.cpp.

Referenced by Init().

◆ SetInputToggled()

void MythUIWebBrowser::SetInputToggled ( bool  inputToggled)
inline

Definition at line 105 of file mythuiwebbrowser.h.

Referenced by MythWebEngineView::handleKeyPress().

◆ SetZoom()

void MythUIWebBrowser::SetZoom ( double  zoom)

Set the text size to specific size.

Parameters
zoomThe size to use. Useful values are between 0.3 and 5.0

Definition at line 913 of file mythuiwebbrowser.cpp.

Referenced by Init(), ZoomIn(), and ZoomOut().

◆ slotContentsSizeChanged

void MythUIWebBrowser::slotContentsSizeChanged ( QSizeF  size)
protectedslot

Definition at line 1147 of file mythuiwebbrowser.cpp.

Referenced by Init().

◆ slotFullScreenRequested

void MythUIWebBrowser::slotFullScreenRequested ( QWebEngineFullScreenRequest  fullScreenRequest)
staticprotectedslot

Definition at line 1087 of file mythuiwebbrowser.cpp.

Referenced by Init().

◆ slotIconChanged

void MythUIWebBrowser::slotIconChanged ( const QIcon &  icon)
protectedslot

Definition at line 1132 of file mythuiwebbrowser.cpp.

Referenced by Init().

◆ slotIconUrlChanged

void MythUIWebBrowser::slotIconUrlChanged ( const QUrl &  url)
protectedslot

Definition at line 1137 of file mythuiwebbrowser.cpp.

Referenced by Init().

◆ slotLinkClicked

void MythUIWebBrowser::slotLinkClicked ( const QUrl &  url)
protectedslot

Definition at line 1127 of file mythuiwebbrowser.cpp.

◆ slotLoadFinished

void MythUIWebBrowser::slotLoadFinished ( bool  Ok)
protectedslot

Definition at line 1106 of file mythuiwebbrowser.cpp.

Referenced by Init().

◆ slotLoadProgress

void MythUIWebBrowser::slotLoadProgress ( int  progress)
protectedslot

Definition at line 1112 of file mythuiwebbrowser.cpp.

Referenced by Init().

◆ slotLoadStarted

void MythUIWebBrowser::slotLoadStarted ( void  )
protectedslot

a file has been downloaded

Referenced by Init().

◆ slotLosingFocus

void MythUIWebBrowser::slotLosingFocus ( void  )
protectedslot

Definition at line 1075 of file mythuiwebbrowser.cpp.

Referenced by Init().

◆ slotRenderProcessTerminated

void MythUIWebBrowser::slotRenderProcessTerminated ( QWebEnginePage::RenderProcessTerminationStatus  terminationStatus,
int  exitCode 
)
protectedslot

Definition at line 1081 of file mythuiwebbrowser.cpp.

Referenced by Init().

◆ slotScrollBarHiding

void MythUIWebBrowser::slotScrollBarHiding ( void  )
protectedslot

Definition at line 1159 of file mythuiwebbrowser.cpp.

Referenced by Init().

◆ slotScrollBarShowing

void MythUIWebBrowser::slotScrollBarShowing ( void  )
protectedslot

Definition at line 1152 of file mythuiwebbrowser.cpp.

Referenced by Init().

◆ slotScrollPositionChanged

void MythUIWebBrowser::slotScrollPositionChanged ( QPointF  position)
protectedslot

Definition at line 1142 of file mythuiwebbrowser.cpp.

Referenced by Init().

◆ slotStatusBarMessage

void MythUIWebBrowser::slotStatusBarMessage ( const QString &  text)
protectedslot

Definition at line 1122 of file mythuiwebbrowser.cpp.

Referenced by Init(), SendStatusBarMessage(), and SetZoom().

◆ slotTakingFocus

void MythUIWebBrowser::slotTakingFocus ( void  )
protectedslot

Definition at line 1069 of file mythuiwebbrowser.cpp.

Referenced by Init().

◆ slotTitleChanged

void MythUIWebBrowser::slotTitleChanged ( const QString &  title)
protectedslot

Definition at line 1117 of file mythuiwebbrowser.cpp.

Referenced by Init().

◆ slotTopScreenChanged

void MythUIWebBrowser::slotTopScreenChanged ( MythScreenType screen)
protectedslot

Definition at line 1165 of file mythuiwebbrowser.cpp.

Referenced by Init().

◆ slotWindowCloseRequested

void MythUIWebBrowser::slotWindowCloseRequested ( void  )
protectedslot

Definition at line 1092 of file mythuiwebbrowser.cpp.

Referenced by Init().

◆ statusBarMessage

void MythUIWebBrowser::statusBarMessage ( const QString &  text)
signal

a pages title has changed

Referenced by slotStatusBarMessage(), and WebPage::WebPage().

◆ titleChanged

void MythUIWebBrowser::titleChanged ( const QString &  title)
signal

% of page loaded

Referenced by slotTitleChanged(), and WebPage::WebPage().

◆ TriggerPageAction

void MythUIWebBrowser::TriggerPageAction ( QWebEnginePage::WebAction  action,
bool  checked = false 
)
slot

Definition at line 937 of file mythuiwebbrowser.cpp.

Referenced by Reload().

◆ UpdateBuffer()

void MythUIWebBrowser::UpdateBuffer ( void  )

◆ UpdateScrollBars()

void MythUIWebBrowser::UpdateScrollBars ( void  )
protected

◆ ZoomIn

void MythUIWebBrowser::ZoomIn ( void  )
slot

Increase the text size.

Definition at line 896 of file mythuiwebbrowser.cpp.

Referenced by MythWebEngineView::handleKeyPress(), and MythBrowser::slotZoomIn().

◆ ZoomOut

void MythUIWebBrowser::ZoomOut ( void  )
slot

Decrease the text size.

Definition at line 904 of file mythuiwebbrowser.cpp.

Referenced by MythWebEngineView::handleKeyPress(), and MythBrowser::slotZoomOut().

Member Data Documentation

◆ m_active

bool MythUIWebBrowser::m_active { false }
protected

Definition at line 187 of file mythuiwebbrowser.h.

Referenced by SetActive(), slotTopScreenChanged(), and UpdateBuffer().

◆ m_actualBrowserArea

MythRect MythUIWebBrowser::m_actualBrowserArea
protected

Definition at line 183 of file mythuiwebbrowser.h.

Referenced by DrawSelf(), Init(), and UpdateScrollBars().

◆ m_bgColor

QColor MythUIWebBrowser::m_bgColor
protected

Definition at line 194 of file mythuiwebbrowser.h.

Referenced by CopyFrom(), Init(), and ParseElement().

◆ m_browserArea

MythRect MythUIWebBrowser::m_browserArea
protected

Definition at line 182 of file mythuiwebbrowser.h.

Referenced by CopyFrom(), Init(), and ParseElement().

◆ m_defaultSaveDir

QString MythUIWebBrowser::m_defaultSaveDir
protected

Definition at line 197 of file mythuiwebbrowser.h.

Referenced by CopyFrom(), and SetDefaultSaveDirectory().

◆ m_defaultSaveFilename

QString MythUIWebBrowser::m_defaultSaveFilename
protected

Definition at line 198 of file mythuiwebbrowser.h.

Referenced by CopyFrom(), and SetDefaultSaveFilename().

◆ m_horizontalScrollbar

MythUIScrollBar* MythUIWebBrowser::m_horizontalScrollbar { nullptr }
protected

Definition at line 205 of file mythuiwebbrowser.h.

Referenced by Init(), ResetScrollBars(), and UpdateScrollBars().

◆ m_image

MythImage* MythUIWebBrowser::m_image { nullptr }
protected

Definition at line 185 of file mythuiwebbrowser.h.

Referenced by DrawSelf(), Init(), UpdateBuffer(), and ~MythUIWebBrowser().

◆ m_initialized

bool MythUIWebBrowser::m_initialized { false }
protected

Definition at line 189 of file mythuiwebbrowser.h.

Referenced by Init().

◆ m_inputToggled

bool MythUIWebBrowser::m_inputToggled { false }
protected

Definition at line 200 of file mythuiwebbrowser.h.

◆ m_lastMouseAction

QString MythUIWebBrowser::m_lastMouseAction
protected

Definition at line 201 of file mythuiwebbrowser.h.

Referenced by HandleMouseAction().

◆ m_lastMouseActionTime

QElapsedTimer MythUIWebBrowser::m_lastMouseActionTime
protected

Definition at line 203 of file mythuiwebbrowser.h.

Referenced by HandleMouseAction().

◆ m_lastUpdateTime

QElapsedTimer MythUIWebBrowser::m_lastUpdateTime
protected

Definition at line 190 of file mythuiwebbrowser.h.

Referenced by MythUIWebBrowser(), and Pulse().

◆ m_mouseKeyCount

int MythUIWebBrowser::m_mouseKeyCount { 0 }
protected

Definition at line 202 of file mythuiwebbrowser.h.

Referenced by HandleMouseAction().

◆ m_parentScreen

MythScreenType* MythUIWebBrowser::m_parentScreen { nullptr }
protected

Definition at line 179 of file mythuiwebbrowser.h.

Referenced by Init(), and IsOnTopScreen().

◆ m_updateInterval

int MythUIWebBrowser::m_updateInterval { 0 }
protected

Definition at line 191 of file mythuiwebbrowser.h.

Referenced by CopyFrom(), ParseElement(), and Pulse().

◆ m_userCssFile

QString MythUIWebBrowser::m_userCssFile
protected

Definition at line 196 of file mythuiwebbrowser.h.

Referenced by CopyFrom(), Init(), and ParseElement().

◆ m_verticalScrollbar

MythUIScrollBar* MythUIWebBrowser::m_verticalScrollbar { nullptr }
protected

Definition at line 206 of file mythuiwebbrowser.h.

Referenced by Init(), ResetScrollBars(), and UpdateScrollBars().

◆ m_wasActive

bool MythUIWebBrowser::m_wasActive { false }
protected

Definition at line 188 of file mythuiwebbrowser.h.

Referenced by SetActive(), and slotTopScreenChanged().

◆ m_webEngine

QWebEngineView* MythUIWebBrowser::m_webEngine { nullptr }
protected

◆ m_widgetUrl

QUrl MythUIWebBrowser::m_widgetUrl
protected

Definition at line 195 of file mythuiwebbrowser.h.

Referenced by CopyFrom(), Init(), and ParseElement().

◆ m_zoom

qreal MythUIWebBrowser::m_zoom { 1.0 }
protected

Definition at line 193 of file mythuiwebbrowser.h.

Referenced by CopyFrom(), GetZoom(), Init(), ParseElement(), SetZoom(), ZoomIn(), and ZoomOut().


The documentation for this class was generated from the following files: