khtml_settings.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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
00077 bool changeCursor() const;
00078 bool underlineLink() const;
00079 bool hoverLink() const;
00080 KAnimationAdvice showAnimations() const;
00081
00082
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
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
00100 const QColor& textColor() const;
00101 const QColor& linkColor() const;
00102 const QColor& vLinkColor() const;
00103
00104
00105 bool autoLoadImages() const;
00106
00107 bool isBackRightClickEnabled();
00108
00109
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
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
00127 bool isFormCompletionEnabled() const;
00128 int maxFormCompletionItems() const;
00129
00130
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.