MythTV  master
Public Member Functions | Protected Slots | 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)
 
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)
 
bool isMusicFile (const QString &extension, const QString &mimetype)
 
bool isVideoFile (const QString &extension, const QString &mimetype)
 
QString getReplyMimetype (void)
 
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 346 of file mythuiwebbrowser.cpp.

◆ ~MythWebView()

MythWebView::~MythWebView ( void  )

Definition at line 366 of file mythuiwebbrowser.cpp.

Member Function Documentation

◆ keyPressEvent()

void MythWebView::keyPressEvent ( QKeyEvent *  event)
override

Definition at line 385 of file mythuiwebbrowser.cpp.

Referenced by MythUIWebBrowser::keyPressEvent().

◆ customEvent()

void MythWebView::customEvent ( QEvent *  e)
override

Definition at line 591 of file mythuiwebbrowser.cpp.

◆ handleUnsupportedContent

void MythWebView::handleUnsupportedContent ( QNetworkReply *  reply)
protectedslot

Definition at line 450 of file mythuiwebbrowser.cpp.

Referenced by MythWebView().

◆ handleDownloadRequested

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

Definition at line 472 of file mythuiwebbrowser.cpp.

Referenced by MythWebView().

◆ createWindow

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

Definition at line 774 of file mythuiwebbrowser.cpp.

◆ showDownloadMenu()

void MythWebView::showDownloadMenu ( void  )
private

Definition at line 678 of file mythuiwebbrowser.cpp.

Referenced by handleUnsupportedContent().

◆ doDownloadRequested()

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

Definition at line 478 of file mythuiwebbrowser.cpp.

Referenced by customEvent(), and handleDownloadRequested().

◆ doDownload()

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

Definition at line 553 of file mythuiwebbrowser.cpp.

Referenced by customEvent(), and doDownloadRequested().

◆ openBusyPopup()

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

Definition at line 566 of file mythuiwebbrowser.cpp.

Referenced by doDownload().

◆ closeBusyPopup()

void MythWebView::closeBusyPopup ( void  )
private

Definition at line 583 of file mythuiwebbrowser.cpp.

Referenced by customEvent().

◆ isMusicFile()

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

Definition at line 722 of file mythuiwebbrowser.cpp.

Referenced by customEvent(), and showDownloadMenu().

◆ isVideoFile()

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

Definition at line 741 of file mythuiwebbrowser.cpp.

Referenced by customEvent(), and showDownloadMenu().

◆ getReplyMimetype()

QString MythWebView::getReplyMimetype ( void  )
private

Definition at line 760 of file mythuiwebbrowser.cpp.

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

◆ getExtensionForMimetype()

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

Definition at line 711 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: