21 #include "qgis_core.h"
32 #include <QNetworkAccessManager>
34 #include <QTextBrowser>
55 PrivateBrowsingEnabled,
56 JavascriptCanOpenWindows,
57 JavascriptCanAccessClipboard,
58 DeveloperExtrasEnabled,
59 LinksIncludedInFocusChain,
61 PrintElementBackgrounds,
62 OfflineStorageDatabaseEnabled,
63 OfflineWebApplicationCacheEnabled,
65 LocalContentCanAccessRemoteUrls,
68 AcceleratedCompositingEnabled,
69 SpatialNavigationEnabled,
70 LocalContentCanAccessFileUrls,
71 TiledBackingStoreEnabled,
72 FrameFlatteningEnabled,
73 SiteSpecificQuirksEnabled,
74 JavascriptCanCloseWindows,
77 HyperlinkAuditingEnabled,
79 ScrollAnimatorEnabled,
88 void setUserStyleSheetUrl(
const QUrl & )
92 void setAttribute( WebAttribute,
bool )
110 enum LinkDelegationPolicy
113 DelegateExternalLinks,
123 explicit QWebPage( QObject *parent =
nullptr )
136 QPalette palette()
const
141 void setPalette(
const QPalette &palette )
146 void setViewportSize(
const QSize &size )
const
151 void setLinkDelegationPolicy( LinkDelegationPolicy linkDelegationPolicy )
156 QTextBrowser *tb = qobject_cast<QTextBrowser *>( parent() );
160 tb->setOpenExternalLinks( linkDelegationPolicy != DontDelegateLinks );
163 void setNetworkAccessManager( QNetworkAccessManager *networkAccessManager )
165 Q_UNUSED( networkAccessManager )
178 QSize viewportSize()
const
183 QMenu *createStandardContextMenu()
190 void loadFinished(
bool ok );
192 void downloadRequested(
const QNetworkRequest &request );
194 void unsupportedContent( QNetworkReply *reply );
200 virtual void javaScriptConsoleMessage(
const QString &,
int,
const QString & ) {}
237 void setIdentifier(
const QString &identifier ) { mIdentifier = identifier; }
250 if ( mIdentifier.isEmpty() )
253 QgsMessageLog::logMessage( tr(
"%1 (line %2): %3" ).arg( mIdentifier ).arg( lineNumber ).arg( message ), tr(
"JavaScript" ) );
262 #endif // QGSWEBPAGE_H