|
| 1 | +// qwebsettings.sip generated by MetaSIP |
| 2 | +// |
| 3 | +// This file is part of the QtWebKit Python extension module. |
| 4 | +// |
| 5 | +// Copyright (c) 2020 Riverbank Computing Limited <info@riverbankcomputing.com> |
| 6 | +// |
| 7 | +// This file is part of PyQt5. |
| 8 | +// |
| 9 | +// This file may be used under the terms of the GNU General Public License |
| 10 | +// version 3.0 as published by the Free Software Foundation and appearing in |
| 11 | +// the file LICENSE included in the packaging of this file. Please review the |
| 12 | +// following information to ensure the GNU General Public License version 3.0 |
| 13 | +// requirements will be met: http://www.gnu.org/copyleft/gpl.html. |
| 14 | +// |
| 15 | +// If you do not wish to use this file under the terms of the GPL version 3.0 |
| 16 | +// then you may purchase a commercial license. For more information contact |
| 17 | +// info@riverbankcomputing.com. |
| 18 | +// |
| 19 | +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
| 20 | +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
| 21 | + |
| 22 | + |
| 23 | +class QWebSettings |
| 24 | +{ |
| 25 | +%TypeHeaderCode |
| 26 | +#include <qwebsettings.h> |
| 27 | +%End |
| 28 | + |
| 29 | +public: |
| 30 | + enum FontFamily |
| 31 | + { |
| 32 | + StandardFont, |
| 33 | + FixedFont, |
| 34 | + SerifFont, |
| 35 | + SansSerifFont, |
| 36 | + CursiveFont, |
| 37 | + FantasyFont, |
| 38 | + }; |
| 39 | + |
| 40 | + enum WebAttribute |
| 41 | + { |
| 42 | + AutoLoadImages, |
| 43 | + JavascriptEnabled, |
| 44 | + JavaEnabled, |
| 45 | + PluginsEnabled, |
| 46 | + PrivateBrowsingEnabled, |
| 47 | + JavascriptCanOpenWindows, |
| 48 | + JavascriptCanCloseWindows, |
| 49 | + JavascriptCanAccessClipboard, |
| 50 | + DeveloperExtrasEnabled, |
| 51 | + LinksIncludedInFocusChain, |
| 52 | + ZoomTextOnly, |
| 53 | + PrintElementBackgrounds, |
| 54 | + OfflineStorageDatabaseEnabled, |
| 55 | + OfflineWebApplicationCacheEnabled, |
| 56 | + LocalStorageDatabaseEnabled, |
| 57 | + LocalStorageEnabled, |
| 58 | + LocalContentCanAccessRemoteUrls, |
| 59 | + DnsPrefetchEnabled, |
| 60 | + XSSAuditingEnabled, |
| 61 | + AcceleratedCompositingEnabled, |
| 62 | + SpatialNavigationEnabled, |
| 63 | + LocalContentCanAccessFileUrls, |
| 64 | + TiledBackingStoreEnabled, |
| 65 | + FrameFlatteningEnabled, |
| 66 | + SiteSpecificQuirksEnabled, |
| 67 | + WebGLEnabled, |
| 68 | + HyperlinkAuditingEnabled, |
| 69 | + CSSRegionsEnabled, |
| 70 | + CSSGridLayoutEnabled, |
| 71 | + ScrollAnimatorEnabled, |
| 72 | + CaretBrowsingEnabled, |
| 73 | + NotificationsEnabled, |
| 74 | +%If (Qt_5_2_0 -) |
| 75 | + WebAudioEnabled, |
| 76 | +%End |
| 77 | +%If (Qt_5_4_0 -) |
| 78 | + Accelerated2dCanvasEnabled, |
| 79 | + MediaSourceEnabled, |
| 80 | + MediaEnabled, |
| 81 | + WebSecurityEnabled, |
| 82 | + FullScreenSupportEnabled, |
| 83 | + ImagesEnabled, |
| 84 | + AllowRunningInsecureContent, |
| 85 | + ErrorPageEnabled, |
| 86 | +%End |
| 87 | + }; |
| 88 | + |
| 89 | + enum WebGraphic |
| 90 | + { |
| 91 | + MissingImageGraphic, |
| 92 | + MissingPluginGraphic, |
| 93 | + DefaultFrameIconGraphic, |
| 94 | + TextAreaSizeGripCornerGraphic, |
| 95 | + InputSpeechButtonGraphic, |
| 96 | + SearchCancelButtonGraphic, |
| 97 | + SearchCancelButtonPressedGraphic, |
| 98 | + }; |
| 99 | + |
| 100 | + enum FontSize |
| 101 | + { |
| 102 | + MinimumFontSize, |
| 103 | + MinimumLogicalFontSize, |
| 104 | + DefaultFontSize, |
| 105 | + DefaultFixedFontSize, |
| 106 | + }; |
| 107 | + |
| 108 | + static QWebSettings *globalSettings(); |
| 109 | + void setFontFamily(QWebSettings::FontFamily which, const QString &family); |
| 110 | + QString fontFamily(QWebSettings::FontFamily which) const; |
| 111 | + void resetFontFamily(QWebSettings::FontFamily which); |
| 112 | + void setFontSize(QWebSettings::FontSize type, int size); |
| 113 | + int fontSize(QWebSettings::FontSize type) const; |
| 114 | + void resetFontSize(QWebSettings::FontSize type); |
| 115 | + void setAttribute(QWebSettings::WebAttribute attr, bool on); |
| 116 | + bool testAttribute(QWebSettings::WebAttribute attr) const; |
| 117 | + void resetAttribute(QWebSettings::WebAttribute attr); |
| 118 | + void setUserStyleSheetUrl(const QUrl &location); |
| 119 | + QUrl userStyleSheetUrl() const; |
| 120 | + static void setIconDatabasePath(const QString &location); |
| 121 | + static QString iconDatabasePath(); |
| 122 | + static void clearIconDatabase(); |
| 123 | + static QIcon iconForUrl(const QUrl &url); |
| 124 | + static void setPluginSearchPaths(const QStringList& paths); |
| 125 | + static QStringList pluginSearchPaths(); |
| 126 | + static void setWebGraphic(QWebSettings::WebGraphic type, const QPixmap &graphic); |
| 127 | + static QPixmap webGraphic(QWebSettings::WebGraphic type); |
| 128 | + static void setMaximumPagesInCache(int pages); |
| 129 | + static int maximumPagesInCache(); |
| 130 | + static void setObjectCacheCapacities(int cacheMinDeadCapacity, int cacheMaxDead, int totalCapacity); |
| 131 | + |
| 132 | +private: |
| 133 | + QWebSettings(); |
| 134 | + QWebSettings(const QWebSettings &); |
| 135 | + ~QWebSettings(); |
| 136 | + |
| 137 | +public: |
| 138 | + static void setOfflineStoragePath(const QString &path); |
| 139 | + static QString offlineStoragePath(); |
| 140 | + static void setOfflineStorageDefaultQuota(qint64 maximumSize); |
| 141 | + static qint64 offlineStorageDefaultQuota(); |
| 142 | + void setDefaultTextEncoding(const QString &encoding); |
| 143 | + QString defaultTextEncoding() const; |
| 144 | + static void setOfflineWebApplicationCachePath(const QString &path); |
| 145 | + static QString offlineWebApplicationCachePath(); |
| 146 | + static void setOfflineWebApplicationCacheQuota(qint64 maximumSize); |
| 147 | + static qint64 offlineWebApplicationCacheQuota(); |
| 148 | + void setLocalStoragePath(const QString &path); |
| 149 | + QString localStoragePath() const; |
| 150 | + static void clearMemoryCaches(); |
| 151 | + static void enablePersistentStorage(const QString &path = QString()); |
| 152 | + |
| 153 | + enum ThirdPartyCookiePolicy |
| 154 | + { |
| 155 | + AlwaysAllowThirdPartyCookies, |
| 156 | + AlwaysBlockThirdPartyCookies, |
| 157 | + AllowThirdPartyWithExistingCookies, |
| 158 | + }; |
| 159 | + |
| 160 | + void setThirdPartyCookiePolicy(QWebSettings::ThirdPartyCookiePolicy); |
| 161 | + QWebSettings::ThirdPartyCookiePolicy thirdPartyCookiePolicy() const; |
| 162 | +%If (Qt_5_1_0 -) |
| 163 | + void setCSSMediaType(const QString &); |
| 164 | +%End |
| 165 | +%If (Qt_5_1_0 -) |
| 166 | + QString cssMediaType() const; |
| 167 | +%End |
| 168 | +}; |
0 commit comments