KHTMLSettings
#include <khtml_settings.h>
Public Types | |
enum | KAnimationAdvice { KAnimationDisabled = 0, KAnimationLoopOnce, KAnimationEnabled } |
enum | KDNSPrefetch { KDNSPrefetchDisabled = 0, KDNSPrefetchOnlyWWWAndSLD, KDNSPrefetchEnabled } |
enum | KJavaScriptAdvice { KJavaScriptDunno = 0, KJavaScriptAccept, KJavaScriptReject } |
enum | KJSWindowFocusPolicy { KJSWindowFocusAllow = 0, KJSWindowFocusIgnore } |
enum | KJSWindowMovePolicy { KJSWindowMoveAllow = 0, KJSWindowMoveIgnore } |
enum | KJSWindowOpenPolicy { KJSWindowOpenAllow = 0, KJSWindowOpenAsk, KJSWindowOpenDeny, KJSWindowOpenSmart } |
enum | KJSWindowResizePolicy { KJSWindowResizeAllow = 0, KJSWindowResizeIgnore } |
enum | KJSWindowStatusPolicy { KJSWindowStatusAllow = 0, KJSWindowStatusIgnore } |
enum | KSmoothScrollingMode { KSmoothScrollingDisabled = 0, KSmoothScrollingWhenEfficient, KSmoothScrollingEnabled } |
Public Member Functions | |
KHTMLSettings () | |
KHTMLSettings (const KHTMLSettings &other) | |
virtual | ~KHTMLSettings () |
bool | accessKeysEnabled () const |
void | addAdFilter (const QString &url) |
QString | adFilteredBy (const QString &url, bool *isWhiteListed=nullptr) const |
bool | allowTabulation () const |
bool | autoLoadImages () const |
bool | autoSpellCheck () const |
const QColor & | baseColor () const |
bool | changeCursor () const |
QString | cursiveFontName () const |
KDNSPrefetch | dnsPrefetch () const |
const QString & | encoding () const |
QList< QPair< QString, QChar > > | fallbackAccessKeysAssignments () const |
QString | fantasyFontName () const |
QString | fixedFontName () const |
bool | followSystemColors () const |
bool | hoverLink () const |
void | init () |
void | init (KConfig *config, bool reset=true) |
bool | isAdFiltered (const QString &url) const |
bool | isAdFilterEnabled () const |
bool | isAutoDelayedActionsEnabled () const |
bool | isBackRightClickEnabled () |
bool | isFormCompletionEnabled () const |
bool | isHideAdsEnabled () const |
bool | isJavaEnabled (const QString &hostname=QString()) const |
bool | isJavaScriptDebugEnabled (const QString &hostname=QString()) const |
bool | isJavaScriptEnabled (const QString &hostname=QString()) const |
bool | isJavaScriptErrorReportingEnabled (const QString &hostname=QString()) const |
bool | isOpenMiddleClickEnabled () |
bool | isPluginsEnabled (const QString &hostname=QString()) const |
bool | jsErrorsEnabled () const |
bool | jsPopupBlockerPassivePopup () const |
const QColor & | linkColor () const |
int | maxFormCompletionItems () const |
int | mediumFontSize () const |
int | minFontSize () const |
void | readDomainSettings (const KConfigGroup &config, bool reset, bool global, KPerDomainSettings &pd_settings) |
QString | sansSerifFontName () const |
QString | serifFontName () const |
void | setFixedFontName (const QString &n) |
void | setJSErrorsEnabled (bool enabled) |
void | setJSPopupBlockerPassivePopup (bool enabled) |
void | setStdFontName (const QString &n) |
QString | settingsToCSS () const |
KAnimationAdvice | showAnimations () const |
KSmoothScrollingMode | smoothScrolling () const |
QString | stdFontName () const |
const QColor & | textColor () const |
bool | underlineLink () const |
bool | unfinishedImageFrame () const |
QString | userStyleSheet () const |
const QColor & | vLinkColor () const |
KJSWindowFocusPolicy | windowFocusPolicy (const QString &hostname=QString()) const |
KJSWindowMovePolicy | windowMovePolicy (const QString &hostname=QString()) const |
KJSWindowOpenPolicy | windowOpenPolicy (const QString &hostname=QString()) const |
KJSWindowResizePolicy | windowResizePolicy (const QString &hostname=QString()) const |
KJSWindowStatusPolicy | windowStatusPolicy (const QString &hostname=QString()) const |
Static Public Member Functions | |
static const char * | adviceToStr (KJavaScriptAdvice _advice) |
static const QString & | availableFamilies () |
static void | splitDomainAdvice (const QString &configStr, QString &domain, KJavaScriptAdvice &javaAdvice, KJavaScriptAdvice &javaScriptAdvice) |
static KJavaScriptAdvice | strToAdvice (const QString &_str) |
Detailed Description
Settings for the HTML view.
Definition at line 41 of file khtml_settings.h.
Member Enumeration Documentation
This enum specifies whether Java/JavaScript execution is allowed.
Definition at line 48 of file khtml_settings.h.
This enum specifies the policy for window.focus.
Definition at line 109 of file khtml_settings.h.
This enum specifies the policy for window.moveBy and .moveTo.
Definition at line 93 of file khtml_settings.h.
This enum specifies the policy for window.open.
Definition at line 75 of file khtml_settings.h.
This enum specifies the policy for window.resizeBy and .resizeTo.
Definition at line 101 of file khtml_settings.h.
This enum specifies the policy for window.status and .defaultStatus.
Definition at line 85 of file khtml_settings.h.
Constructor & Destructor Documentation
KHTMLSettings::KHTMLSettings | ( | ) |
Constructor
Definition at line 314 of file khtml_settings.cpp.
|
virtual |
Destructor.
Don't delete any instance by yourself.
Definition at line 327 of file khtml_settings.cpp.
Member Function Documentation
identify the filter which matches url
.
- Parameters
-
url the URL to test. isWhiteListed if not NULL
, set totrue
if the URL matched a whitelist filter; set tofalse
if it matched a blacklist filter.
- Returns
- the filter string that matched, or
QString()
if no filter matched.
- Since
- 4.4
Definition at line 855 of file khtml_settings.cpp.
void KHTMLSettings::init | ( | ) |
Called by constructor and reparseConfiguration.
Definition at line 347 of file khtml_settings.cpp.
void KHTMLSettings::init | ( | KConfig * | config, |
bool | reset = true |
||
) |
Read settings from config
.
- Parameters
-
config is a pointer to KConfig object. reset if true, settings are always set; if false, settings are only set if the config file has a corresponding key.
read maximum age for filter list files, minimum is one day
check if entry is enabled
get url for HTMLFilterList
determine where to cache HTMLFilterList file
determine existence and age of cache file
load cached file if it exists, irrespective of age
if no cache list file exists or if it is too old ...
... in this case, refetch list asynchronously
for later reference, store name of cache file
Definition at line 360 of file khtml_settings.cpp.
bool KHTMLSettings::isAdFiltered | ( | const QString & | url | ) | const |
tests whether url
is filtered.
- Parameters
-
url the URL to test.
- Returns
true
if the URL is blacklisted and is not whitelisted.
Definition at line 844 of file khtml_settings.cpp.
bool KHTMLSettings::isBackRightClickEnabled | ( | ) |
- Deprecated:
- do not use, feature was moved to be only in konqueror
Definition at line 824 of file khtml_settings.cpp.
void KHTMLSettings::readDomainSettings | ( | const KConfigGroup & | config, |
bool | reset, | ||
bool | global, | ||
KPerDomainSettings & | pd_settings | ||
) |
reads from config's
current group, forcing initialization if reset
is true.
- Parameters
-
config is a pointer to KConfig object. reset true if initialization is to be forced. global true if the global domain is to be read. pd_settings will be initialised with the computed (inherited) settings.
Definition at line 237 of file khtml_settings.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 16 2021 22:48:10 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.