KParts
#include <htmlextension.h>
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: KParts::HTMLExtension* extension = KParts::HTMLExtension::childObject(part); KParts::HtmlSettingsInterface* settings = qobject_cast<KParts::HtmlSettingsInterface>(extension); const bool autoLoadImages = settings->attribute(KParts::AutoLoadImages);
- Since
- 4.8.1
Definition at line 245 of file htmlextension.h.
Member Enumeration Documentation
◆ HtmlSettingsType
Settings attribute types.
Definition at line 251 of file htmlextension.h.
◆ JavaScriptAdvice
This enum specifies whether Java/JavaScript execution is allowed.
- Since
- 4.8.2
Enumerator | |
---|---|
JavaScriptDunno | |
JavaScriptAccept | |
JavaScriptReject |
Definition at line 270 of file htmlextension.h.
◆ JSWindowFocusPolicy
This enum specifies the policy for window.focus.
- Since
- 4.8.2
Enumerator | |
---|---|
JSWindowFocusAllow | |
JSWindowFocusIgnore |
Definition at line 323 of file htmlextension.h.
◆ JSWindowMovePolicy
This enum specifies the policy for window.moveBy and .moveTo.
- Since
- 4.8.2
Enumerator | |
---|---|
JSWindowMoveAllow | |
JSWindowMoveIgnore |
Definition at line 303 of file htmlextension.h.
◆ JSWindowOpenPolicy
This enum specifies the policy for window.open.
- Since
- 4.8.2
Enumerator | |
---|---|
JSWindowOpenAllow | |
JSWindowOpenAsk | |
JSWindowOpenDeny | |
JSWindowOpenSmart |
Definition at line 281 of file htmlextension.h.
◆ JSWindowResizePolicy
This enum specifies the policy for window.resizeBy and .resizeTo.
- Since
- 4.8.2
Enumerator | |
---|---|
JSWindowResizeAllow | |
JSWindowResizeIgnore |
Definition at line 313 of file htmlextension.h.
◆ JSWindowStatusPolicy
This enum specifies the policy for window.status and .defaultStatus.
- Since
- 4.8.2
Enumerator | |
---|---|
JSWindowStatusAllow | |
JSWindowStatusIgnore |
Definition at line 293 of file htmlextension.h.
Constructor & Destructor Documentation
◆ ~HtmlSettingsInterface()
|
inlinevirtual |
Destructor.
Definition at line 331 of file htmlextension.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 110 of file htmlextension.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 142 of file htmlextension.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 127 of file htmlextension.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.