/* * File: QCefSetting.h * Project: QCefView * Created: 29th March 2016 * Author: Sheen * Source: https://github.com/cefview/qcefview * Docs: https://cefview.github.io/QCefView/ */ #ifndef QCEFSETTING_H #define QCEFSETTING_H #pragma once #include #pragma region qt_headers #include #include #include #include #pragma endregion class QCefSettingPrivate; /// /// Represents the settings for individual browser /// class QCEFVIEW_EXPORT QCefSetting { Q_DECLARE_PRIVATE(QCefSetting) QScopedPointer d_ptr; friend class QCefView; public: /// /// Constructs the QCefSetting instance /// QCefSetting(); /// /// Constructs the QCefSetting instance from existing one /// /// The existing QCefSetting instance QCefSetting(const QCefSetting& other); /// /// Assigns the existing QCefSetting instance to current /// /// QCefSetting& operator=(const QCefSetting& other); /// /// Destructs the instance /// ~QCefSetting(); /// /// Sets the initial size of the browser /// /// The initial size void setWindowInitialSize(const QSize& size); /// /// Gets the initial size of the browser /// /// const QSize windowInitialSize() const; /// /// Sets the standard font family /// /// The font family void setStandardFontFamily(const QString& value); /// /// Gets the standard font family /// /// The font family const QString standardFontFamily() const; /// /// Sets the fixed font family /// /// The font family void setFixedFontFamily(const QString& value); /// /// Gets the fixed font family /// /// The font family const QString fixedFontFamily() const; /// /// Sets the serif font family /// /// The font family void setSerifFontFamily(const QString& value); /// /// Gets the serif font family /// /// The font family const QString serifFontFamily() const; /// /// Sets the sans serif font family /// /// The font family void setSansSerifFontFamily(const QString& value); /// /// Gets the sans serif font family /// /// The font family const QString sansSerifFontFamily() const; /// /// Sets the cursive font family /// /// The font family void setCursiveFontFamily(const QString& value); /// /// Gets the cursive font family /// /// The font family const QString cursiveFontFamily() const; /// /// Sets the fantasy font family /// /// The font family void setFantasyFontFamily(const QString& value); /// /// Gets the fantasy font family /// /// The font family const QString fantasyFontFamily() const; /// /// Sets the default encoding /// /// The encoding name void setDefaultEncoding(const QString& value); /// /// Gets the default encoding /// /// The encoding name const QString defaultEncoding() const; #if CEF_VERSION_MAJOR < 118 /// /// Sets the acceptable language list /// /// The acceptable languate list void setAcceptLanguageList(const QString& value); /// /// Gets the acceptable language list /// /// The acceptable languate list const QString acceptLanguageList() const; #endif /// /// Sets the frame rate in window less mode /// /// The frame rate void setWindowlessFrameRate(const int value); /// /// Gets the frame rate in window less mode /// /// The frame rate const QVariant windowlessFrameRate() const; /// /// Sets the default font size /// /// The font size void setDefaultFontSize(const int value); /// /// Gets the default font size /// /// The font size const QVariant defaultFontSize() const; /// /// Sets the default fixed font size /// /// The font size void setDefaultFixedFontSize(const int value); /// /// Gets the default fixed font size /// /// The font size const QVariant defaultFixedFontSize() const; /// /// Sets the minimum font size /// /// The font size void setMinimumFontSize(const int value); /// /// Gets the minimum font size /// /// The font size const QVariant minimumFontSize() const; /// /// Sets the minimum logical font size /// /// The font size void setMinimumLogicalFontSize(const int value); /// /// Gets the minimum logical font size /// /// The font size const QVariant minimumLogicalFontSize() const; /// /// Sets to enable or disable remote fonts /// /// True to enable; false to disable void setRemoteFonts(const bool value); /// /// Gets whether to enable or disable the remote fonts /// /// True to enable; false to disable const QVariant remoteFonts() const; /// /// Sets to enable or disable Javascript /// /// True to enable; false to disable void setJavascript(const bool value); /// /// Gets whether to enable or disable Javascript /// /// True to enable; false to disable const QVariant javascript() const; /// /// Sets to enable or disable the permission of closing window from Javascript /// /// True to enable; false to disable void setJavascriptCloseWindows(const bool value); /// /// Gets whether to enable or disable the permission of closing window from Javascript /// /// True to enable; false to disable const QVariant javascriptCloseWindows() const; /// /// Sets to enable or disable the permission of accessing clipboard from Javascript /// /// True to enable; false to disable void setJavascriptAccessClipboard(const bool value); /// /// Gets whether to enable or disable the permission of accessing clipboard from Javascript /// /// True to enable; false to disable const QVariant javascriptAccessClipboard() const; /// /// Sets to enable or disable the permission of pasting DOM in Javascript /// /// True to enable; false to disable void setJavascriptDomPaste(const bool value); /// /// Gets whether to enable or disable the permission of pasting DOM in Javascript /// /// True to enable; false to disable const QVariant javascriptDomPaste() const; #if CEF_VERSION_MAJOR < 100 /// /// Sets to enable or disable plugins /// /// True to enable; false to disable void setPlugins(const bool value); /// /// Gets whether to enable or disable plugins /// /// True to enable; false to disable const QVariant plugins() const; #endif /// /// Sets to enable or disable the permission of loading images /// /// True to enable; false to disable void setImageLoading(const bool value); /// /// Gets whether to enable or disable the permission of loading images /// /// True to enable; false to disable const QVariant imageLoading() const; /// /// Sets to enable or disable the shrinking image standalone to fit /// /// True to enable; false to disable void setImageShrinkStandaloneToFit(const bool value); /// /// Gets whether to enable or disable the shrinking image standalone to fit /// /// True to enable; false to disable const QVariant imageShrinkStandaloneToFit() const; /// /// Sets to enable or disable the resizing of text area /// /// True to enable; false to disable void setTextAreaResize(const bool value); /// /// Gets whether to enable or disable the resizing of text area /// /// True to enable; false to disable const QVariant textAreaResize() const; /// /// Sets to enable or disable tab to links /// /// True to enable; false to disable void setTabToLinks(const bool value); /// /// Gets whether to enable or disable tab to links /// /// True to enable; false to disable const QVariant tabToLinks() const; /// /// Sets to enable or disable local storage /// /// True to enable; false to disable void setLocalStorage(const bool value); /// /// Gets whether to enable or disable local storage /// /// True to enable; false to disable const QVariant localStorage() const; /// /// Sets to enable or disable database /// /// True to enable; false to disable void setDatabases(const bool value); /// /// Gets whether to enable or disable database /// /// True to enable; false to disable const QVariant databases() const; /// /// Sets to enable or disable webGL /// /// True to enable; false to disable void setWebGL(const bool value); /// /// Gets whether to enable or disable webGL /// /// True to enable; false to disable const QVariant webGL() const; /// /// Sets the background color /// /// The color /// /// This only works if the web page has no background color set. The alpha component value /// will be adjusted to 0 or 255, it means if you pass a value with alpha value /// in the range of [1, 255], it will be accepted as 255. The default value is inherited from /// /// void setBackgroundColor(const QColor& value); /// /// Gets the background color /// /// The color const QVariant backgroundColor() const; #if CEF_VERSION_MAJOR >= 125 /// /// /// /// void setHardwareAcceleration(const bool value); /// /// /// /// const bool hardwareAcceleration() const; #endif }; Q_DECLARE_METATYPE(QCefSetting); #endif