2 Copyright (C) 2007 Trolltech ASA
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.
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.
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.
19 This class provides all functionality needed for loading images, style sheets and html
20 pages from the web. It has a memory cache for these objects.
23 #ifndef QWEBSETTINGS_H
24 #define QWEBSETTINGS_H
26 #include <qwebkitglobal.h>
28 #include <QtCore/qstring.h>
29 #include <QtGui/qpixmap.h>
30 #include <QtCore/qshareddata.h>
38 class QWebSettingsPrivate;
41 class QWEBKIT_EXPORT QWebSettings
57 PrivateBrowsingEnabled,
58 JavascriptCanOpenWindows,
59 JavascriptCanAccessClipboard,
60 DeveloperExtrasEnabled
65 DefaultFaviconGraphic,
66 TextAreaResizeCornerGraphic
70 MinimumLogicalFontSize,
75 static QWebSettings *defaultSettings();
77 void setFontFamily(FontType type, const QString &family);
78 QString fontFamily(FontType type) const;
79 void resetFontFamily(FontType type);
81 void setFontSize(FontSize type, int size);
82 int fontSize(FontSize type) const;
83 void resetFontSize(FontSize type);
85 void setAttribute(WebAttribute attr, bool on = true);
86 bool testAttribute(WebAttribute attr) const;
87 void clearAttribute(WebAttribute attr);
89 void setUserStyleSheetLocation(const QUrl &location);
90 QUrl userStyleSheetLocation() const;
92 static void setIconDatabaseEnabled(bool enabled, const QString &location = QString());
93 static bool iconDatabaseEnabled();
95 static void setWebGraphic(WebGraphic type, const QPixmap &graphic);
96 static QPixmap webGraphic(WebGraphic type);
99 friend class QWebPagePrivate;
100 friend class QWebSettingsPrivate;
102 Q_DISABLE_COPY(QWebSettings)
105 QWebSettings(WebCore::Settings *settings);
108 QWebSettingsPrivate *d;