OxideQWebPreferences Class

Web settings More...

Header: #include <oxideqwebpreferences.h>
Instantiated By: WebPreferences
Inherits: QObject

Properties

Public Functions

OxideQWebPreferences(QObject * parent = nullptr)
~OxideQWebPreferences()
bool allowFileAccessFromFileUrls() const
bool allowScriptsToCloseWindows() const
bool allowUniversalAccessFromFileUrls() const
bool appCacheEnabled() const
bool canDisplayInsecureContent() const
bool canRunInsecureContent() const
QString defaultEncoding() const
unsigned defaultFixedFontSize() const
unsigned defaultFontSize() const
QString fixedFontFamily() const
bool hyperlinkAuditingEnabled() const
bool javascriptCanAccessClipboard() const
bool javascriptEnabled() const
bool loadsImagesAutomatically() const
bool localStorageEnabled() const
unsigned minimumFontSize() const
bool passwordEchoEnabled() const
bool remoteFontsEnabled() const
QString sansSerifFontFamily() const
QString serifFontFamily() const
void setAllowFileAccessFromFileUrls(bool allow)
void setAllowScriptsToCloseWindows(bool allow)
void setAllowUniversalAccessFromFileUrls(bool allow)
void setAppCacheEnabled(bool enabled)
void setCanDisplayInsecureContent(bool allow)
void setCanRunInsecureContent(bool allow)
void setDefaultEncoding(const QString & encoding)
void setDefaultFixedFontSize(unsigned size)
void setDefaultFontSize(unsigned size)
void setFixedFontFamily(const QString & font)
void setHyperlinkAuditingEnabled(bool enabled)
void setJavascriptCanAccessClipboard(bool allow)
void setJavascriptEnabled(bool enabled)
void setLoadsImagesAutomatically(bool enabled)
void setLocalStorageEnabled(bool enabled)
void setMinimumFontSize(unsigned size)
void setPasswordEchoEnabled(bool enabled)
void setRemoteFontsEnabled(bool enabled)
void setSansSerifFontFamily(const QString & font)
void setSerifFontFamily(const QString & font)
void setStandardFontFamily(const QString & font)
void setTabsToLinks(bool enabled)
void setTextAreasAreResizable(bool enabled)
QString standardFontFamily() const
bool tabsToLinks() const
bool textAreasAreResizable() const

Signals

void allowFileAccessFromFileUrlsChanged()
void allowScriptsToCloseWindowsChanged()
void allowUniversalAccessFromFileUrlsChanged()
void appCacheEnabledChanged()
void canDisplayInsecureContentChanged()
void canRunInsecureContentChanged()
void defaultEncodingChanged()
void defaultFixedFontSizeChanged()
void defaultFontSizeChanged()
void fixedFontFamilyChanged()
void hyperlinkAuditingEnabledChanged()
void javascriptCanAccessClipboardChanged()
void javascriptEnabledChanged()
void loadsImagesAutomaticallyChanged()
void localStorageEnabledChanged()
void minimumFontSizeChanged()
void passwordEchoEnabledChanged()
void remoteFontsEnabledChanged()
void sansSerifFontFamilyChanged()
void serifFontFamilyChanged()
void standardFontFamilyChanged()
void tabsToLinksChanged()
void textAreasAreResizableChanged()

Additional Inherited Members

Detailed Description

Web settings

OxideQWebPreferences contains a collection of settings for a webview.

Property Documentation

allowFileAccessFromFileUrls : bool

Whether to disable same-origin restrictions between file: URLs. The default is false.

By default, unique file: URLs are treated as unique origins for the purposes of the Same-origin policy. Enabling this causes all file: URLs to be treated as a single origin.

Note: This is a dangerous option and should generally not be used in production code. Application developers should think carefully before enabling this option to ensure that they are fully aware of its consequences. This option should never be enabled in web browsers.

Access functions:

bool allowFileAccessFromFileUrls() const
void setAllowFileAccessFromFileUrls(bool allow)

Notifier signal:

void allowFileAccessFromFileUrlsChanged()

allowScriptsToCloseWindows : bool

Whether web content can request to close a window via window.close. The default is false.

Note: Web content can always request to close windows that were opened by it via window.open(), regardless of this preference.

Access functions:

bool allowScriptsToCloseWindows() const
void setAllowScriptsToCloseWindows(bool allow)

Notifier signal:

void allowScriptsToCloseWindowsChanged()

allowUniversalAccessFromFileUrls : bool

Whether to disable same-origin restrictions for pages loaded via file: URLs. The default is false.

Note: This is a dangerous option and should generally not be used in production code. Application developers should think carefully before enabling this option to ensure that they are fully aware of its consequences. This option should never be enabled in web browsers.

Access functions:

bool allowUniversalAccessFromFileUrls() const
void setAllowUniversalAccessFromFileUrls(bool allow)

Notifier signal:

void allowUniversalAccessFromFileUrlsChanged()

appCacheEnabled : bool

Whether the offline application cache is enabled. The default is false.

Access functions:

bool appCacheEnabled() const
void setAppCacheEnabled(bool enabled)

Notifier signal:

void appCacheEnabledChanged()

canDisplayInsecureContent : bool

Whether to allow the display of passive mixed content. The default is true.

Passive mixed content includes images and videos loaded over an insecure connection in to a page that was loaded over a secure connection. Passive mixed content can't access other parts of a web page or change the behaviour of it, but an attacker could replace the content a user sees or otherwise infer the user's browsing habits because the connections aren't private.

Access functions:

bool canDisplayInsecureContent() const
void setCanDisplayInsecureContent(bool allow)

Notifier signal:

void canDisplayInsecureContentChanged()

canRunInsecureContent : bool

Whether to allow the execution of active mixed content. The default is false.

Active mixed content includes CSS and scripts loaded over an insecure connection in to a page that was loaded over a secure connection. Because active mixed content can change the behaviour of a page and steal sensitive information, it compromises the security of a page entirely.

Access functions:

bool canRunInsecureContent() const
void setCanRunInsecureContent(bool allow)

Notifier signal:

void canRunInsecureContentChanged()

defaultEncoding : QString

The default character set, used for pages that don't define a character set.

Access functions:

QString defaultEncoding() const
void setDefaultEncoding(const QString & encoding)

Notifier signal:

void defaultEncodingChanged()

defaultFixedFontSize : unsigned

The default fixed font size in points.

Access functions:

unsigned defaultFixedFontSize() const
void setDefaultFixedFontSize(unsigned size)

Notifier signal:

void defaultFixedFontSizeChanged()

defaultFontSize : unsigned

The default font size in points.

Access functions:

unsigned defaultFontSize() const
void setDefaultFontSize(unsigned size)

Notifier signal:

void defaultFontSizeChanged()

fixedFontFamily : QString

The default fixed font family for characters from the Unicode Common script.

The default value is dependent on the system's font configuration.

Access functions:

QString fixedFontFamily() const
void setFixedFontFamily(const QString & font)

Notifier signal:

void fixedFontFamilyChanged()

hyperlinkAuditingEnabled : bool

Whether to notify the URLs specified by the ping attribute when a user clicks on an anchor element. The default is true.

Access functions:

bool hyperlinkAuditingEnabled() const
void setHyperlinkAuditingEnabled(bool enabled)

Notifier signal:

void hyperlinkAuditingEnabledChanged()

javascriptCanAccessClipboard : bool

Whether javascript can use the various clipboard related editing commands via document.execCommand(). The default is false.

Access functions:

bool javascriptCanAccessClipboard() const
void setJavascriptCanAccessClipboard(bool allow)

Notifier signal:

void javascriptCanAccessClipboardChanged()

javascriptEnabled : bool

Whether JavaScript is enabled. The default is true.

Access functions:

bool javascriptEnabled() const
void setJavascriptEnabled(bool enabled)

Notifier signal:

void javascriptEnabledChanged()

loadsImagesAutomatically : bool

Whether to load images automatically when a page loads. The default is true.

If this is set to false, images aren't loaded when a page loads, and image elements are replaced by a placeholder.

Access functions:

bool loadsImagesAutomatically() const
void setLoadsImagesAutomatically(bool enabled)

Notifier signal:

void loadsImagesAutomaticallyChanged()

localStorageEnabled : bool

Whether the DOM local storage API is enabled. The default is false.

Access functions:

bool localStorageEnabled() const
void setLocalStorageEnabled(bool enabled)

Notifier signal:

void localStorageEnabledChanged()

minimumFontSize : unsigned

The minimum font size in points.

Access functions:

unsigned minimumFontSize() const
void setMinimumFontSize(unsigned size)

Notifier signal:

void minimumFontSizeChanged()

passwordEchoEnabled : bool

Whether password echo is enabled. The default is false.

When password echo is enabled, actual characters are displayed when a user inputs text in to an <input type="password"> element.

Access functions:

bool passwordEchoEnabled() const
void setPasswordEchoEnabled(bool enabled)

Notifier signal:

void passwordEchoEnabledChanged()

remoteFontsEnabled : bool

Whether support for remote web fonts is enabled. The default is true.

Access functions:

bool remoteFontsEnabled() const
void setRemoteFontsEnabled(bool enabled)

Notifier signal:

void remoteFontsEnabledChanged()

sanSerifFontFamily : QString

The default Sans Serif font family for characters from the Unicode Common script.

The default value is dependent on the system's font configuration.

Access functions:

QString sansSerifFontFamily() const
void setSansSerifFontFamily(const QString & font)

Notifier signal:

void sansSerifFontFamilyChanged()

serifFontFamily : QString

The default Serif font family for characters from the Unicode Common script.

The default value is dependent on the system's font configuration.

Access functions:

QString serifFontFamily() const
void setSerifFontFamily(const QString & font)

Notifier signal:

void serifFontFamilyChanged()

standardFontFamily : QString

The default standard font family for characters from the Unicode Common script.

The default value is dependent on the system's font configuration.

Access functions:

QString standardFontFamily() const
void setStandardFontFamily(const QString & font)

Notifier signal:

void standardFontFamilyChanged()

Whether HTML anchor elements are keyboard focusable by pressing the TAB key. The default is true.

Access functions:

bool tabsToLinks() const
void setTabsToLinks(bool enabled)

Notifier signal:

void tabsToLinksChanged()

textAreasAreResizable : bool

Whether <textarea> elements are resizable. The default is true.

Access functions:

bool textAreasAreResizable() const
void setTextAreasAreResizable(bool enabled)

Notifier signal:

void textAreasAreResizableChanged()

Member Function Documentation

OxideQWebPreferences::OxideQWebPreferences(QObject * parent = nullptr)

Construct a new preferences instance and make it a child of parent.

OxideQWebPreferences::~OxideQWebPreferences()