Search for usage in LXR

#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

◆ KJavaScriptAdvice

This enum specifies whether Java/JavaScript execution is allowed.

Definition at line 48 of file khtml_settings.h.

◆ KJSWindowFocusPolicy

This enum specifies the policy for window.focus.

Definition at line 109 of file khtml_settings.h.

◆ KJSWindowMovePolicy

This enum specifies the policy for window.moveBy and .moveTo.

Definition at line 93 of file khtml_settings.h.

◆ KJSWindowOpenPolicy

This enum specifies the policy for

Definition at line 75 of file khtml_settings.h.

◆ KJSWindowResizePolicy

This enum specifies the policy for window.resizeBy and .resizeTo.

Definition at line 101 of file khtml_settings.h.

◆ KJSWindowStatusPolicy

This enum specifies the policy for window.status and .defaultStatus.

Definition at line 85 of file khtml_settings.h.

Constructor & Destructor Documentation

◆ KHTMLSettings()

KHTMLSettings::KHTMLSettings ( )


Definition at line 314 of file khtml_settings.cpp.

◆ ~KHTMLSettings()

KHTMLSettings::~KHTMLSettings ( )


Don't delete any instance by yourself.

Definition at line 327 of file khtml_settings.cpp.

Member Function Documentation

◆ adFilteredBy()

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

identify the filter which matches url.

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.
the filter string that matched, or QString() if no filter matched.

Definition at line 855 of file khtml_settings.cpp.

◆ init() [1/2]

void KHTMLSettings::init ( )

Called by constructor and reparseConfiguration.

Definition at line 347 of file khtml_settings.cpp.

◆ init() [2/2]

void KHTMLSettings::init ( KConfig config,
bool  reset = true 

Read settings from config.

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.

◆ isAdFiltered()

bool KHTMLSettings::isAdFiltered ( const QString url) const

tests whether url is filtered.

urlthe URL to test.
true if the URL is blacklisted and is not whitelisted.

Definition at line 844 of file khtml_settings.cpp.

◆ isBackRightClickEnabled()

bool KHTMLSettings::isBackRightClickEnabled ( )
do not use, feature was moved to be only in konqueror

Definition at line 824 of file khtml_settings.cpp.

◆ readDomainSettings()

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.

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-2022 The KDE developers.
Generated on Thu Aug 11 2022 03:57:28 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.