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 <mythuiwebbrowser.h>

Inheritance diagram for MythWebView:
Inheritance graph
[legend]
Collaboration diagram for MythWebView:
Collaboration graph
[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 376 of file mythuiwebbrowser.cpp.

Member Function Documentation

◆ keyPressEvent()

void MythWebView::keyPressEvent ( QKeyEvent *  event)
override

Definition at line 395 of file mythuiwebbrowser.cpp.

Referenced by MythUIWebBrowser::keyPressEvent().

◆ customEvent()

void MythWebView::customEvent ( QEvent *  e)
override

Definition at line 602 of file mythuiwebbrowser.cpp.

◆ handleUnsupportedContent

void MythWebView::handleUnsupportedContent ( QNetworkReply *  reply)
protectedslot

Definition at line 460 of file mythuiwebbrowser.cpp.

Referenced by MythWebView().

◆ handleDownloadRequested

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

Definition at line 484 of file mythuiwebbrowser.cpp.

Referenced by MythWebView().

◆ createWindow

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

Definition at line 795 of file mythuiwebbrowser.cpp.

◆ showDownloadMenu()

void MythWebView::showDownloadMenu ( void  )
private

Definition at line 699 of file mythuiwebbrowser.cpp.

Referenced by handleUnsupportedContent().

◆ doDownloadRequested()

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

Definition at line 490 of file mythuiwebbrowser.cpp.

Referenced by customEvent(), and handleDownloadRequested().

◆ doDownload()

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

Definition at line 564 of file mythuiwebbrowser.cpp.

Referenced by customEvent(), and doDownloadRequested().

◆ openBusyPopup()

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

Definition at line 577 of file mythuiwebbrowser.cpp.

Referenced by doDownload().

◆ closeBusyPopup()

void MythWebView::closeBusyPopup ( void  )
private

Definition at line 594 of file mythuiwebbrowser.cpp.

Referenced by customEvent().

◆ isMusicFile()

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

Definition at line 743 of file mythuiwebbrowser.cpp.

Referenced by customEvent(), and showDownloadMenu().

◆ isVideoFile()

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

Definition at line 762 of file mythuiwebbrowser.cpp.

Referenced by customEvent(), and showDownloadMenu().

◆ getReplyMimetype()

QString MythWebView::getReplyMimetype ( void  )
private

Definition at line 781 of file mythuiwebbrowser.cpp.

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

◆ getExtensionForMimetype()

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

Definition at line 732 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(), keyPressEvent(), and MythWebView().

◆ 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: