• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdehtml
 

tdehtml

  • tdehtml
tdehtml_settings.h
1/* This file is part of the KDE project
2 Copyright (C) 1999 David Faure <faure@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19
20#ifndef __konq_htmlsettings_h__
21#define __konq_htmlsettings_h__
22
23class TDEConfig;
24#include <tqcolor.h>
25#include <tqstring.h>
26#include <tqstringlist.h>
27#include <tqfont.h>
28#include <tqmap.h>
29
30#include <tdelibs_export.h>
31
32struct KPerDomainSettings;
33class TDEHTMLSettingsPrivate;
34
38class TDEHTML_EXPORT TDEHTMLSettings
39{
40public:
41
45 enum KJavaScriptAdvice {
46 KJavaScriptDunno=0,
47 KJavaScriptAccept,
48 KJavaScriptReject
49 };
50
51 enum KAnimationAdvice {
52 KAnimationDisabled=0,
53 KAnimationLoopOnce,
54 KAnimationEnabled
55 };
56
60 enum KJSWindowOpenPolicy {
61 KJSWindowOpenAllow=0,
62 KJSWindowOpenAsk,
63 KJSWindowOpenDeny,
64 KJSWindowOpenSmart
65 };
66
70 enum KJSWindowStatusPolicy {
71 KJSWindowStatusAllow=0,
72 KJSWindowStatusIgnore
73 };
74
78 enum KJSWindowMovePolicy {
79 KJSWindowMoveAllow=0,
80 KJSWindowMoveIgnore
81 };
82
86 enum KJSWindowResizePolicy {
87 KJSWindowResizeAllow=0,
88 KJSWindowResizeIgnore
89 };
90
94 enum KJSWindowFocusPolicy {
95 KJSWindowFocusAllow=0,
96 KJSWindowFocusIgnore
97 };
98
102 TDEHTMLSettings();
103 TDEHTMLSettings(const TDEHTMLSettings &other);
104
108 void init();
109
115 void init( TDEConfig * config, bool reset = true );
116
120 virtual ~TDEHTMLSettings();
121
122 // Behavior settings
123 bool changeCursor() const;
124 bool underlineLink() const;
125 bool hoverLink() const;
126 bool allowTabulation() const;
127 bool autoSpellCheck() const;
128 KAnimationAdvice showAnimations() const;
129
130 // Font settings
131 TQString stdFontName() const;
132 TQString fixedFontName() const;
133 TQString serifFontName() const;
134 TQString sansSerifFontName() const;
135 TQString cursiveFontName() const;
136 TQString fantasyFontName() const;
137
138 // these two can be set. Mainly for historical reasons (the method in TDEHTMLPart exists...)
139 void setStdFontName(const TQString &n);
140 void setFixedFontName(const TQString &n);
141
142 int minFontSize() const;
143 int mediumFontSize() const;
144
145 bool jsErrorsEnabled() const;
146 void setJSErrorsEnabled(bool enabled);
147
148 const TQString &encoding() const;
149
150 bool followSystemColors() const;
151
152 // Color settings
153 const TQColor& textColor() const;
154 const TQColor& baseColor() const;
155 const TQColor& linkColor() const;
156 const TQColor& vLinkColor() const;
157
158 // Autoload images
159 bool autoLoadImages() const;
160 bool unfinishedImageFrame() const;
161
162 bool isOpenMiddleClickEnabled();
163 bool isBackRightClickEnabled();
164
165 // Java and JavaScript
166 // ### BIC make these const
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 );
172
173 // AdBlocK Filtering
174 bool isAdFiltered( const TQString &url ) const;
175 bool isAdFilterEnabled() const;
176 bool isHideAdsEnabled() const;
177 void addAdFilter( const TQString &url );
178
179 // Access Keys
180 bool accessKeysEnabled() const;
181
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;
187
188 // helpers for parsing domain-specific configuration, used in KControl module as well
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);
193
202 void readDomainSettings(TDEConfig *config, bool reset,
203 bool global, KPerDomainSettings &pd_settings);
204
205 TQString settingsToCSS() const;
206 static const TQString &availableFamilies();
207
208 TQString userStyleSheet() const;
209
210 // Form completion
211 bool isFormCompletionEnabled() const;
212 int maxFormCompletionItems() const;
213
214 // Meta refresh/redirect (http-equiv)
215 bool isAutoDelayedActionsEnabled () const;
216
217 TQValueList< TQPair< TQString, TQChar > > fallbackAccessKeysAssignments() const;
218
219 // Whether to show passive popup when windows are blocked
220 // @since 3.5
221 void setJSPopupBlockerPassivePopup(bool enabled);
222 bool jsPopupBlockerPassivePopup() const;
223
224private:
225 friend class TDEHTMLFactory;
226 TQString lookupFont(int i) const;
227
228 TDEHTMLSettingsPrivate *d;
229 static TQString *avFamilies;
230};
231
232#endif
TDEConfig
TDEHTMLSettings
Settings for the HTML view.
Definition: tdehtml_settings.h:39
TDEHTMLSettings::KJavaScriptAdvice
KJavaScriptAdvice
This enum specifies whether Java/JavaScript execution is allowed.
Definition: tdehtml_settings.h:45
TDEHTMLSettings::KJSWindowMovePolicy
KJSWindowMovePolicy
This enum specifies the policy for window.moveBy and .moveTo.
Definition: tdehtml_settings.h:78
TDEHTMLSettings::KJSWindowResizePolicy
KJSWindowResizePolicy
This enum specifies the policy for window.resizeBy and .resizeTo.
Definition: tdehtml_settings.h:86
TDEHTMLSettings::KJSWindowOpenPolicy
KJSWindowOpenPolicy
This enum specifies the policy for window.open.
Definition: tdehtml_settings.h:60
TDEHTMLSettings::KJSWindowStatusPolicy
KJSWindowStatusPolicy
This enum specifies the policy for window.status and .defaultStatus.
Definition: tdehtml_settings.h:70
TDEHTMLSettings::KJSWindowFocusPolicy
KJSWindowFocusPolicy
This enum specifies the policy for window.focus.
Definition: tdehtml_settings.h:94

tdehtml

Skip menu "tdehtml"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdehtml

Skip menu "tdehtml"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdehtml by doxygen 1.9.4
This website is maintained by Timothy Pearson.