MythTV  master
Public Member Functions | Protected Slots | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
MythWebView Class Reference

Subclass of QWebView. More...

#include <libmythui/mythuiwebbrowser.h>

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

Public Member Functions

 MythWebView (QWidget *parent, MythUIWebBrowser *parentBrowser)
 
 ~MythWebView (void) override
 
void keyPressEvent (QKeyEvent *event) override
 
void customEvent (QEvent *e) override
 

Protected Slots

void handleUnsupportedContent (QNetworkReply *reply)
 
void handleDownloadRequested (const QNetworkRequest &request)
 
QWebView * createWindow (QWebPage::WebWindowType type) override
 

Private Member Functions

void showDownloadMenu (void)
 
void doDownloadRequested (const QNetworkRequest &request)
 
void doDownload (const QString &saveFilename)
 
void openBusyPopup (const QString &message)
 
void closeBusyPopup (void)
 
QString getReplyMimetype (void)
 

Static Private Member Functions

static bool isMusicFile (const QString &extension, const QString &mimetype)
 
static bool isVideoFile (const QString &extension, const QString &mimetype)
 
static QString getExtensionForMimetype (const QString &mimetype)
 

Private Attributes

MythWebPagem_webpage {nullptr}
 
MythUIWebBrowserm_parentBrowser {nullptr}
 
BrowserApim_api {nullptr}
 
QNetworkRequest m_downloadRequest
 
QNetworkReply * m_downloadReply {nullptr}
 
MythUIBusyDialogm_busyPopup {nullptr}
 
bool m_downloadAndPlay {false}
 

Detailed Description

Subclass of QWebView.

Note
allows us to intercept keypresses

Definition at line 88 of file mythuiwebbrowser.h.

Constructor & Destructor Documentation

◆ MythWebView()

MythWebView::MythWebView ( QWidget *  parent,
MythUIWebBrowser parentBrowser 
)

Definition at line 356 of file mythuiwebbrowser.cpp.

◆ ~MythWebView()

MythWebView::~MythWebView ( void  )
override

Definition at line 375 of file mythuiwebbrowser.cpp.

Member Function Documentation

◆ keyPressEvent()

void MythWebView::keyPressEvent ( QKeyEvent *  event)
override

Definition at line 394 of file mythuiwebbrowser.cpp.

Referenced by MythUIWebBrowser::keyPressEvent().

◆ customEvent()

void MythWebView::customEvent ( QEvent *  e)
override

Definition at line 603 of file mythuiwebbrowser.cpp.

◆ handleUnsupportedContent

void MythWebView::handleUnsupportedContent ( QNetworkReply *  reply)
protectedslot

Definition at line 459 of file mythuiwebbrowser.cpp.

Referenced by MythWebView().

◆ handleDownloadRequested

void MythWebView::handleDownloadRequested ( const QNetworkRequest &  request)
protectedslot

Definition at line 483 of file mythuiwebbrowser.cpp.

Referenced by MythWebView().

◆ createWindow

QWebView * MythWebView::createWindow ( QWebPage::WebWindowType  type)
overrideprotectedslot

Definition at line 784 of file mythuiwebbrowser.cpp.

◆ showDownloadMenu()

void MythWebView::showDownloadMenu ( void  )
private

Definition at line 695 of file mythuiwebbrowser.cpp.

Referenced by handleUnsupportedContent().

◆ doDownloadRequested()

void MythWebView::doDownloadRequested ( const QNetworkRequest &  request)
private

Definition at line 489 of file mythuiwebbrowser.cpp.

Referenced by customEvent(), and handleDownloadRequested().

◆ doDownload()

void MythWebView::doDownload ( const QString &  saveFilename)
private

Definition at line 565 of file mythuiwebbrowser.cpp.

Referenced by customEvent(), and doDownloadRequested().

◆ openBusyPopup()

void MythWebView::openBusyPopup ( const QString &  message)
private

Definition at line 578 of file mythuiwebbrowser.cpp.

Referenced by doDownload().

◆ closeBusyPopup()

void MythWebView::closeBusyPopup ( void  )
private

Definition at line 595 of file mythuiwebbrowser.cpp.

Referenced by customEvent().

◆ isMusicFile()

bool MythWebView::isMusicFile ( const QString &  extension,
const QString &  mimetype 
)
staticprivate

Definition at line 740 of file mythuiwebbrowser.cpp.

Referenced by customEvent(), and showDownloadMenu().

◆ isVideoFile()

bool MythWebView::isVideoFile ( const QString &  extension,
const QString &  mimetype 
)
staticprivate

Definition at line 755 of file mythuiwebbrowser.cpp.

Referenced by customEvent(), and showDownloadMenu().

◆ getReplyMimetype()

QString MythWebView::getReplyMimetype ( void  )
private

Definition at line 770 of file mythuiwebbrowser.cpp.

Referenced by customEvent(), doDownloadRequested(), and showDownloadMenu().

◆ getExtensionForMimetype()

QString MythWebView::getExtensionForMimetype ( const QString &  mimetype)
staticprivate

Definition at line 727 of file mythuiwebbrowser.cpp.

Referenced by doDownloadRequested().

Member Data Documentation

◆ m_webpage

MythWebPage* MythWebView::m_webpage {nullptr}
private

Definition at line 117 of file mythuiwebbrowser.h.

Referenced by MythWebView(), and ~MythWebView().

◆ m_parentBrowser

MythUIWebBrowser* MythWebView::m_parentBrowser {nullptr}
private

Definition at line 118 of file mythuiwebbrowser.h.

Referenced by doDownloadRequested(), and keyPressEvent().

◆ m_api

BrowserApi* MythWebView::m_api {nullptr}
private

Definition at line 119 of file mythuiwebbrowser.h.

Referenced by MythWebView(), and ~MythWebView().

◆ m_downloadRequest

QNetworkRequest MythWebView::m_downloadRequest
private

◆ m_downloadReply

QNetworkReply* MythWebView::m_downloadReply {nullptr}
private

◆ m_busyPopup

MythUIBusyDialog* MythWebView::m_busyPopup {nullptr}
private

Definition at line 122 of file mythuiwebbrowser.h.

Referenced by closeBusyPopup(), and openBusyPopup().

◆ m_downloadAndPlay

bool MythWebView::m_downloadAndPlay {false}
private

Definition at line 123 of file mythuiwebbrowser.h.

Referenced by customEvent(), doDownloadRequested(), and handleUnsupportedContent().


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