#ifndef QWKPREFERENCES_H
#define QWKPREFERENCES_H
#include "qwebkitglobal.h"
class QWKPage;
class QWKPreferencesPrivate;
class QWEBKIT_EXPORT QWKPreferences {
public:
enum FontFamily {
StandardFont,
FixedFont,
SerifFont,
SansSerifFont,
CursiveFont,
FantasyFont
};
enum WebAttribute {
AutoLoadImages,
JavascriptEnabled,
PluginsEnabled,
OfflineWebApplicationCacheEnabled,
LocalStorageEnabled,
XSSAuditingEnabled,
FrameFlatteningEnabled,
PrivateBrowsingEnabled,
DeveloperExtrasEnabled,
DnsPrefetchEnabled
};
enum FontSize {
MinimumFontSize,
DefaultFontSize,
DefaultFixedFontSize
};
static QWKPreferences* sharedPreferences();
void setFontFamily(FontFamily which, const QString& family);
QString fontFamily(FontFamily which) const;
void setAttribute(WebAttribute attr, bool on);
bool testAttribute(WebAttribute attr) const;
void setFontSize(FontSize type, int size);
int fontSize(FontSize type) const;
private:
Q_DISABLE_COPY(QWKPreferences)
QWKPreferences();
~QWKPreferences();
QWKPreferencesPrivate *d;
friend class QWKPage;
friend class QWKPreferencesPrivate;
};
#endif // QWKPREFERENCES_H