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 QColorbaseColor () const
 
bool changeCursor () const
 
QString cursiveFontName () const
 
KDNSPrefetch dnsPrefetch () const
 
const QStringencoding () 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 QColorlinkColor () 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 QColortextColor () const
 
bool underlineLink () const
 
bool unfinishedImageFrame () const
 
QString userStyleSheet () const
 
const QColorvLinkColor () 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 QStringavailableFamilies ()
 
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.

KHTMLSettings::~KHTMLSettings ( )
virtual

Destructor.

Don't delete any instance by yourself.

Definition at line 327 of file khtml_settings.cpp.

Member Function Documentation

QString KHTMLSettings::adFilteredBy ( const QString url,
bool *  isWhiteListed = nullptr 
) const

identify the filter which matches url.

Parameters
urlthe URL to test.
isWhiteListedif not NULL, set to true if the URL matched a whitelist filter; set to false 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
configis a pointer to KConfig object.
resetif 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
urlthe 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
configis a pointer to KConfig object.
resettrue if initialization is to be forced.
globaltrue if the global domain is to be read.
pd_settingswill 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:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 1 2020 22:35:42 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.