# khtml Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# KHTMLSettings Class Reference

Settings for the HTML view. More...

`#include <khtml_settings.h>`

Collaboration diagram for KHTMLSettings:

[legend]
List of all members.

## Public Types

enum | KJavaScriptAdvice { KJavaScriptDunno = 0, KJavaScriptAccept, KJavaScriptReject }
enum | KAnimationAdvice { KAnimationDisabled = 0, KAnimationLoopOnce, KAnimationEnabled }
enum | KJSWindowOpenPolicy { KJSWindowOpenAllow = 0, KJSWindowOpenAsk, KJSWindowOpenDeny, KJSWindowOpenSmart }
enum | KJSWindowStatusPolicy { KJSWindowStatusAllow = 0, KJSWindowStatusIgnore }
enum | KJSWindowMovePolicy { KJSWindowMoveAllow = 0, KJSWindowMoveIgnore }
enum | KJSWindowResizePolicy { KJSWindowResizeAllow = 0, KJSWindowResizeIgnore }
enum | KJSWindowFocusPolicy { KJSWindowFocusAllow = 0, KJSWindowFocusIgnore }

## Public Member Functions

| KHTMLSettings (const KHTMLSettings &other)
void | init ()
void | init (KConfig *config, bool reset=true)
virtual | ~KHTMLSettings ()
bool | changeCursor () const
bool | underlineLink () const
bool | hoverLink () const
bool | allowTabulation () const
bool | autoSpellCheck () const
KAnimationAdvice | showAnimations () const
QString | stdFontName () const
QString | fixedFontName () const
QString | serifFontName () const
QString | sansSerifFontName () const
QString | cursiveFontName () const
QString | fantasyFontName () const
void | setStdFontName (const QString &n)
void | setFixedFontName (const QString &n)
int | minFontSize () const
int | mediumFontSize () const
bool | jsErrorsEnabled () const
void | setJSErrorsEnabled (bool enabled)
const QString & | encoding () const
bool | followSystemColors () const
const QColor & | textColor () const
const QColor & | baseColor () const
const QColor & | linkColor () const
const QColor & | vLinkColor () const
bool | autoLoadImages () const
bool | unfinishedImageFrame () const
bool | isOpenMiddleClickEnabled ()
bool | isBackRightClickEnabled ()
bool | isJavaEnabled (const QString &hostname=QString::null)
bool | isJavaScriptEnabled (const QString &hostname=QString::null)
bool | isJavaScriptDebugEnabled (const QString &hostname=QString::null)
bool | isJavaScriptErrorReportingEnabled (const QString &hostname=QString::null) const
bool | isPluginsEnabled (const QString &hostname=QString::null)
KJSWindowOpenPolicy | windowOpenPolicy (const QString &hostname=QString::null) const
KJSWindowMovePolicy | windowMovePolicy (const QString &hostname=QString::null) const
KJSWindowResizePolicy | windowResizePolicy (const QString &hostname=QString::null) const
KJSWindowStatusPolicy | windowStatusPolicy (const QString &hostname=QString::null) const
KJSWindowFocusPolicy | windowFocusPolicy (const QString &hostname=QString::null) const
void | readDomainSettings (KConfig *config, bool reset, bool global, KPerDomainSettings &pd_settings)
QString | settingsToCSS () const
QString | userStyleSheet () const
bool | isFormCompletionEnabled () const
int | maxFormCompletionItems () const
bool | isAutoDelayedActionsEnabled () const

## Static Public Member Functions

static KJavaScriptAdvice | strToAdvice (const QString &_str)
static void | splitDomainAdvice (const QString &configStr, QString &domain, KJavaScriptAdvice &javaAdvice, KJavaScriptAdvice &javaScriptAdvice)
static const char * | adviceToStr (KJavaScriptAdvice _advice)
static const QString & | availableFamilies ()

## Friends

class | KHTMLFactory

## Detailed Description

Settings for the HTML view.

Definition at line 38 of file khtml_settings.h.

## Member Enumeration Documentation

enum KHTMLSettings::KJavaScriptAdvice

| This enum specifies whether Java/JavaScript execution is allowed. Definition at line 45 of file khtml_settings.h.

enum KHTMLSettings::KJSWindowOpenPolicy

| This enum specifies the policy for window.open. Definition at line 60 of file khtml_settings.h.

enum KHTMLSettings::KJSWindowStatusPolicy

| This enum specifies the policy for window.status and .defaultStatus. Definition at line 70 of file khtml_settings.h.

enum KHTMLSettings::KJSWindowMovePolicy

| This enum specifies the policy for window.moveBy and .moveTo. Definition at line 78 of file khtml_settings.h.

enum KHTMLSettings::KJSWindowResizePolicy

| This enum specifies the policy for window.resizeBy and .resizeTo. Definition at line 86 of file khtml_settings.h.

enum KHTMLSettings::KJSWindowFocusPolicy

| This enum specifies the policy for window.focus. Definition at line 94 of file khtml_settings.h.

## Constructor & Destructor Documentation

KHTMLSettings::~KHTMLSettings | ( |  | ) | `[virtual]`

| Destructor. Don't delete any instance by yourself. Definition at line 261 of file khtml_settings.cc.

## Member Function Documentation

void KHTMLSettings::init | ( |  | ) |

| Called by constructor and reparseConfiguration. Definition at line 281 of file khtml_settings.cc. References KGlobal::config().

void KHTMLSettings::init | ( | KConfig * | config,
|  | bool | reset = `true`
| ) |

Read settings from `config`.

Parameters:

  | reset | if true, settings are always set; if false, settings are only set if the config file has a corresponding key.

Definition at line 293 of file khtml_settings.cc.

References QString::append(), QMap::begin(), QMap::clear(), QMap::end(), QFont::family(), QMap::find(), KConfigBase::group(), QMap::insert(), QString::lower(), and readDomainSettings().

void KHTMLSettings::readDomainSettings | ( | KConfig * | config,
|  | bool | reset,
|  | bool | global,
|  | KPerDomainSettings & | pd_settings
| ) |

reads from `config's` current group, forcing initialization if `reset` is true.

Parameters:

  | global | true if the global domain is to be read.
  | pd_settings | will be initialised with the computed (inherited) settings.

Definition at line 180 of file khtml_settings.cc.

References QString::fromLatin1().

Referenced by init().

The documentation for this class was generated from the following files:

- khtml_settings.h
- khtml_factory.cpp
- khtml_settings.cc

This file is part of the documentation for khtml Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:33:24 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003