20 #ifndef __konq_htmlsettings_h__
21 #define __konq_htmlsettings_h__
26 #include <tqstringlist.h>
30 #include <tdelibs_export.h>
32 struct KPerDomainSettings;
33 class TDEHTMLSettingsPrivate;
51 enum KAnimationAdvice {
71 KJSWindowStatusAllow=0,
87 KJSWindowResizeAllow=0,
95 KJSWindowFocusAllow=0,
115 void init(
TDEConfig * config,
bool reset =
true );
123 bool changeCursor()
const;
124 bool underlineLink()
const;
125 bool hoverLink()
const;
126 bool allowTabulation()
const;
127 bool autoSpellCheck()
const;
128 KAnimationAdvice showAnimations()
const;
131 TQString stdFontName()
const;
132 TQString fixedFontName()
const;
133 TQString serifFontName()
const;
134 TQString sansSerifFontName()
const;
135 TQString cursiveFontName()
const;
136 TQString fantasyFontName()
const;
139 void setStdFontName(
const TQString &n);
140 void setFixedFontName(
const TQString &n);
142 int minFontSize()
const;
143 int mediumFontSize()
const;
145 bool jsErrorsEnabled()
const;
146 void setJSErrorsEnabled(
bool enabled);
148 const TQString &encoding()
const;
150 bool followSystemColors()
const;
153 const TQColor& textColor()
const;
154 const TQColor& baseColor()
const;
155 const TQColor& linkColor()
const;
156 const TQColor& vLinkColor()
const;
159 bool autoLoadImages()
const;
160 bool unfinishedImageFrame()
const;
162 bool isOpenMiddleClickEnabled();
163 bool isBackRightClickEnabled();
167 bool isJavaEnabled(
const TQString& hostname = TQString::null );
168 bool isJavaScriptEnabled(
const TQString& hostname = TQString::null );
169 bool isJavaScriptDebugEnabled(
const TQString& hostname = TQString::null );
170 bool isJavaScriptErrorReportingEnabled(
const TQString& hostname = TQString::null )
const;
171 bool isPluginsEnabled(
const TQString& hostname = TQString::null );
174 bool isAdFiltered(
const TQString &url )
const;
175 bool isAdFilterEnabled()
const;
176 bool isHideAdsEnabled()
const;
177 void addAdFilter(
const TQString &url );
180 bool accessKeysEnabled()
const;
182 KJSWindowOpenPolicy windowOpenPolicy(
const TQString& hostname = TQString::null )
const;
183 KJSWindowMovePolicy windowMovePolicy(
const TQString& hostname = TQString::null )
const;
184 KJSWindowResizePolicy windowResizePolicy(
const TQString& hostname = TQString::null )
const;
185 KJSWindowStatusPolicy windowStatusPolicy(
const TQString& hostname = TQString::null )
const;
186 KJSWindowFocusPolicy windowFocusPolicy(
const TQString& hostname = TQString::null )
const;
189 static KJavaScriptAdvice strToAdvice(
const TQString& _str);
190 static void splitDomainAdvice(
const TQString& configStr, TQString &domain,
191 KJavaScriptAdvice &javaAdvice, KJavaScriptAdvice& javaScriptAdvice);
192 static const char* adviceToStr(KJavaScriptAdvice _advice);
202 void readDomainSettings(
TDEConfig *config,
bool reset,
203 bool global, KPerDomainSettings &pd_settings);
205 TQString settingsToCSS()
const;
206 static const TQString &availableFamilies();
208 TQString userStyleSheet()
const;
211 bool isFormCompletionEnabled()
const;
212 int maxFormCompletionItems()
const;
215 bool isAutoDelayedActionsEnabled ()
const;
217 TQValueList< TQPair< TQString, TQChar > > fallbackAccessKeysAssignments()
const;
221 void setJSPopupBlockerPassivePopup(
bool enabled);
222 bool jsPopupBlockerPassivePopup()
const;
225 friend class TDEHTMLFactory;
226 TQString lookupFont(
int i)
const;
228 TDEHTMLSettingsPrivate *d;
229 static TQString *avFamilies;
Settings for the HTML view.
KJavaScriptAdvice
This enum specifies whether Java/JavaScript execution is allowed.
KJSWindowMovePolicy
This enum specifies the policy for window.moveBy and .moveTo.
KJSWindowResizePolicy
This enum specifies the policy for window.resizeBy and .resizeTo.
KJSWindowOpenPolicy
This enum specifies the policy for window.open.
KJSWindowStatusPolicy
This enum specifies the policy for window.status and .defaultStatus.
KJSWindowFocusPolicy
This enum specifies the policy for window.focus.