khtml_settings.h Source File (khtml Library)

| # khtml Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# khtml_settings.h

    00001 /* This file is part of the KDE project
    00002    Copyright (C) 1999 David Faure <faure@kde.org>
    00003
    00004    This library is free software; you can redistribute it and/or
    00005    modify it under the terms of the GNU Library General Public
    00006    License as published by the Free Software Foundation; either
    00007    version 2 of the License, or (at your option) any later version.
    00008
    00009    This library is distributed in the hope that it will be useful,
    00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00012    Library General Public License for more details.
    00013
    00014    You should have received a copy of the GNU Library General Public License
    00015    along with this library; see the file COPYING.LIB.  If not, write to
    00016    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00017    Boston, MA 02111-1307, USA.
    00018 */
    00019
    00020 #ifndef __konq_htmlsettings_h__
    00021 #define __konq_htmlsettings_h__
    00022
    00023 class KConfig;
    00024 #include <qcolor.h>
    00025 #include <qstring.h>
    00026 #include <qstringlist.h>
    00027 #include <qfont.h>
    00028 #include <qmap.h>
    00029
    00030 class KHTMLSettingsPrivate;
    00031
    00035 class KHTMLSettings
    00036 {
    00037 public:
    00038
    00042     enum KJavaScriptAdvice {
    00043         KJavaScriptDunno=0,
    00044         KJavaScriptAccept,
    00045         KJavaScriptReject
    00046     };
    00047
    00048     enum KAnimationAdvice {
    00049         KAnimationDisabled=0,
    00050         KAnimationLoopOnce,
    00051         KAnimationEnabled
    00052     };
    00053
    00057     KHTMLSettings();
    00058     KHTMLSettings(const KHTMLSettings &other);
    00059
    00063     void init();
    00064
    00069     void init( KConfig * config, bool reset = true );
    00070
    00074     virtual ~KHTMLSettings();
    00075
    00076     // Behaviour settings
    00077     bool changeCursor() const;
    00078     bool underlineLink() const;
    00079     bool hoverLink() const;
    00080     KAnimationAdvice showAnimations() const;
    00081
    00082     // Font settings
    00083     QString stdFontName() const;
    00084     QString fixedFontName() const;
    00085     QString serifFontName() const;
    00086     QString sansSerifFontName() const;
    00087     QString cursiveFontName() const;
    00088     QString fantasyFontName() const;
    00089
    00090     // these two can be set. Mainly for historical reasons (the method in KHTMLPart exists...)
    00091     void setStdFontName(const QString &n);
    00092     void setFixedFontName(const QString &n);
    00093
    00094     int minFontSize() const;
    00095     int mediumFontSize() const;
    00096
    00097     const QString &encoding() const;
    00098
    00099     // Color settings
    00100     const QColor& textColor() const;
    00101     const QColor& linkColor() const;
    00102     const QColor& vLinkColor() const;
    00103
    00104     // Autoload images
    00105     bool autoLoadImages() const;
    00106
    00107     bool isBackRightClickEnabled();
    00108
    00109     // Java and JavaScript
    00110     bool isJavaEnabled( const QString& hostname = QString::null );
    00111     bool isJavaScriptEnabled( const QString& hostname = QString::null );
    00112     bool isJavaScriptDebugEnabled( const QString& hostname = QString::null );
    00113     bool isPluginsEnabled( const QString& hostname = QString::null );
    00114
    00115     // helpers for parsing domain-specific configuration, used in KControl module as well
    00116     static KJavaScriptAdvice strToAdvice(const QString& _str);
    00117     static void splitDomainAdvice(const QString& configStr, QString &domain,
    00118                                   KJavaScriptAdvice &javaAdvice, KJavaScriptAdvice& javaScriptAdvice);
    00119     static const char* adviceToStr(KJavaScriptAdvice _advice);
    00120
    00121     QString settingsToCSS() const;
    00122     static const QString &availableFamilies();
    00123
    00124     QString userStyleSheet() const;
    00125
    00126     // Form completion
    00127     bool isFormCompletionEnabled() const;
    00128     int maxFormCompletionItems() const;
    00129
    00130     // Meta refresh/redirect (http-equiv)
    00131     bool isAutoDelayedActionsEnabled () const;
    00132
    00133 private:
    00134     friend class KHTMLFactory;
    00135     QString lookupFont(int i) const;
    00136
    00137     KHTMLSettingsPrivate *d;
    00138     static QString *avFamilies;
    00139 };
    00140
    00141 #endif

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:34:08 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001