MythTV  master
Classes | Functions | Variables
mythuiwebbrowser.cpp File Reference

Provide a web browser widget. More...

#include "mythuiwebbrowser.h"
#include <chrono>
#include <thread>
#include <QApplication>
#include <QWebFrame>
#include <QWebHistory>
#include <QPainter>
#include <QDir>
#include <QBuffer>
#include <QStyle>
#include <QKeyEvent>
#include <QDomDocument>
#include <QNetworkCookieJar>
#include <QNetworkConfiguration>
#include "libmythbase/mythcorecontext.h"
#include "libmythbase/mythdb.h"
#include "libmythbase/mythdirs.h"
#include "libmythbase/mythdownloadmanager.h"
#include "libmythbase/mythlogging.h"
#include "mythpainter.h"
#include "mythimage.h"
#include "mythmainwindow.h"
#include "mythfontproperties.h"
#include "mythuihelper.h"
#include "mythdialogbox.h"
#include "mythprogressdialog.h"
#include "mythuiscrollbar.h"
Include dependency graph for mythuiwebbrowser.cpp:

Go to the source code of this file.

Classes

struct  MimeType
 

Functions

static void DestroyNetworkAccessManager (void)
 
static QNetworkAccessManager * GetNetworkAccessManager (void)
 

Variables

static const std::vector< MimeTypeSupportedMimeTypes
 
static MythNetworkAccessManagernetworkManager = nullptr
 
const QString kgetType
 Key event handler. More...
 

Detailed Description

Provide a web browser widget.

Author
Paul Harrison pharr.nosp@m.ison.nosp@m.@myth.nosp@m.tv.o.nosp@m.rg

Definition in file mythuiwebbrowser.cpp.

Function Documentation

◆ DestroyNetworkAccessManager()

static void DestroyNetworkAccessManager ( void  )
static

Definition at line 91 of file mythuiwebbrowser.cpp.

Referenced by GetNetworkAccessManager().

◆ GetNetworkAccessManager()

static QNetworkAccessManager* GetNetworkAccessManager ( void  )
static

Definition at line 100 of file mythuiwebbrowser.cpp.

Referenced by MythWebPage::MythWebPage().

Variable Documentation

◆ SupportedMimeTypes

const std::vector<MimeType> SupportedMimeTypes
static
Initial value:
{
{ "audio/mpeg3", "mp3", false },
{ "audio/x-mpeg-3", "mp3", false },
{ "audio/mpeg", "mp2", false },
{ "audio/x-mpeg", "mp2", false },
{ "audio/ogg", "ogg", false },
{ "audio/ogg", "oga", false },
{ "audio/flac", "flac", false },
{ "audio/x-ms-wma", "wma", false },
{ "audio/wav", "wav", false },
{ "audio/x-wav", "wav", false },
{ "audio/ac3", "ac3", false },
{ "audio/x-ac3", "ac3", false },
{ "audio/x-oma", "oma", false },
{ "audio/x-realaudio", "ra", false },
{ "audio/dts", "dts", false },
{ "audio/x-dts", "dts", false },
{ "audio/aac", "aac", false },
{ "audio/x-aac", "aac", false },
{ "audio/m4a", "m4a", false },
{ "audio/x-m4a", "m4a", false },
{ "video/mpeg", "mpg", true },
{ "video/mpeg", "mpeg", true },
{ "video/x-ms-wmv", "wmv", true },
{ "video/x-ms-wmv", "avi", true },
{ "application/x-troff-msvideo", "avi", true },
{ "video/avi", "avi", true },
{ "video/msvideo", "avi", true },
{ "video/x-msvideo", "avi", true }
}

Definition at line 51 of file mythuiwebbrowser.cpp.

Referenced by MythWebView::getExtensionForMimetype(), MythWebView::isMusicFile(), and MythWebView::isVideoFile().

◆ networkManager

MythNetworkAccessManager* networkManager = nullptr
static

◆ kgetType

const QString kgetType
Initial value:
{ QStringLiteral("\
function activeElement()\
{\
var type;\
type = document.activeElement.type;\
return type;\
}\
activeElement();") }

Key event handler.

Parameters
eventKeypress event

Definition at line 385 of file mythuiwebbrowser.cpp.

Referenced by MythWebView::keyPressEvent().