KParts::HtmlSettingsInterface
#include <KParts/HtmlSettingsInterface>

Public Types | |
enum | HtmlSettingsType { AutoLoadImages, DnsPrefetchEnabled, JavaEnabled, JavascriptEnabled, MetaRefreshEnabled, PluginsEnabled, PrivateBrowsingEnabled, OfflineStorageDatabaseEnabled, OfflineWebApplicationCacheEnabled, LocalStorageEnabled, UserDefinedStyleSheetURL } |
enum | JavaScriptAdvice { JavaScriptDunno = 0, JavaScriptAccept, JavaScriptReject } |
enum | JSWindowFocusPolicy { JSWindowFocusAllow = 0, JSWindowFocusIgnore } |
enum | JSWindowMovePolicy { JSWindowMoveAllow = 0, JSWindowMoveIgnore } |
enum | JSWindowOpenPolicy { JSWindowOpenAllow = 0, JSWindowOpenAsk, JSWindowOpenDeny, JSWindowOpenSmart } |
enum | JSWindowResizePolicy { JSWindowResizeAllow = 0, JSWindowResizeIgnore } |
enum | JSWindowStatusPolicy { JSWindowStatusAllow = 0, JSWindowStatusIgnore } |
Public Member Functions | |
virtual | ~HtmlSettingsInterface () |
virtual QVariant | htmlSettingsProperty (HtmlSettingsType type) const =0 |
virtual bool | setHtmlSettingsProperty (HtmlSettingsType type, const QVariant &value)=0 |
Static Public Member Functions | |
static const char * | javascriptAdviceToText (JavaScriptAdvice advice) |
static void | splitDomainAdvice (const QString &text, QString &domain, JavaScriptAdvice &javaAdvice, JavaScriptAdvice &javaScriptAdvice) |
static JavaScriptAdvice | textToJavascriptAdvice (const QString &text) |
Detailed Description
An interface for modifying the settings of browser engines.
This interface provides a generic means for querying or changing the settings of browser engines that implement it.
To use this class simply cast an instance of the HTMLExtension object using qobject_cast<KParts::HtmlSettingsInterface>.
Example:
- Since
- 4.8.1
Definition at line 39 of file htmlsettingsinterface.h.
Member Enumeration Documentation
◆ HtmlSettingsType
Settings attribute types.
Definition at line 45 of file htmlsettingsinterface.h.
◆ JavaScriptAdvice
This enum specifies whether Java/JavaScript execution is allowed.
- Since
- 4.8.2
Definition at line 64 of file htmlsettingsinterface.h.
◆ JSWindowFocusPolicy
This enum specifies the policy for window.focus.
- Since
- 4.8.2
Definition at line 117 of file htmlsettingsinterface.h.
◆ JSWindowMovePolicy
This enum specifies the policy for window.moveBy and .moveTo.
- Since
- 4.8.2
Definition at line 97 of file htmlsettingsinterface.h.
◆ JSWindowOpenPolicy
This enum specifies the policy for window.open.
- Since
- 4.8.2
Definition at line 75 of file htmlsettingsinterface.h.
◆ JSWindowResizePolicy
This enum specifies the policy for window.resizeBy and .resizeTo.
- Since
- 4.8.2
Definition at line 107 of file htmlsettingsinterface.h.
◆ JSWindowStatusPolicy
This enum specifies the policy for window.status and .defaultStatus.
- Since
- 4.8.2
Definition at line 87 of file htmlsettingsinterface.h.
Constructor & Destructor Documentation
◆ ~HtmlSettingsInterface()
|
inlinevirtual |
Destructor.
Definition at line 125 of file htmlsettingsinterface.h.
Member Function Documentation
◆ htmlSettingsProperty()
|
pure virtual |
Returns the value of the browser engine's attribute type
.
◆ javascriptAdviceToText()
|
static |
A convenience function Returns the text for the given JavascriptAdvice advice
.
If advice
is not either JavaScriptAccept or JavaScriptReject, this function returns a NULL string.
- Since
- 4.8.2
Definition at line 14 of file htmlsettingsinterface.cpp.
◆ setHtmlSettingsProperty()
|
pure virtual |
Sets the value of the browser engine's attribute type
to value
.
◆ splitDomainAdvice()
|
static |
A convenience function that splits text
into domain
, javaAdvice
and jScriptAdvice
.
If text
is empty or does not contain the proper delimiter (':'), this function will set domain
to text
and the other two parameters to JavaScriptDunno.
- Since
- 4.8.2
Definition at line 46 of file htmlsettingsinterface.cpp.
◆ textToJavascriptAdvice()
|
static |
A convenience function that returns the javascript advice for text
.
If text is not either "accept" or "reject", this function returns JavaScriptDunno.
- Since
- 4.8.2
Definition at line 31 of file htmlsettingsinterface.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:53:51 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.