summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-05-01 03:32:57 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-05-01 03:32:57 (GMT)
commit1276c6ff207ee2d5228a6282f2a632ba0c206f25 (patch)
tree8fd9c80c50645bc89ee656fe76ff3a5d94ea9ef8 /src/declarative/fx
parente93e5076e11a7a9cfdd4b9cb1a2d4dbf1f579177 (diff)
downloadQt-1276c6ff207ee2d5228a6282f2a632ba0c206f25.zip
Qt-1276c6ff207ee2d5228a6282f2a632ba0c206f25.tar.gz
Qt-1276c6ff207ee2d5228a6282f2a632ba0c206f25.tar.bz2
Support userStyleSheetUrl.
Diffstat (limited to 'src/declarative/fx')
-rw-r--r--src/declarative/fx/qfxwebview.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/declarative/fx/qfxwebview.cpp b/src/declarative/fx/qfxwebview.cpp
index fe694ea..eb2f7d2 100644
--- a/src/declarative/fx/qfxwebview.cpp
+++ b/src/declarative/fx/qfxwebview.cpp
@@ -106,6 +106,8 @@ class QFxWebSettings : public QObject {
Q_PROPERTY(bool offlineWebApplicationCacheEnabled READ offlineWebApplicationCacheEnabled WRITE setOfflineWebApplicationCacheEnabled)
Q_PROPERTY(bool localStorageDatabaseEnabled READ localStorageDatabaseEnabled WRITE setLocalStorageDatabaseEnabled)
+ Q_PROPERTY(QString userStyleSheetUrl READ userStyleSheetUrl WRITE setUserStyleSheetUrl)
+
public:
QFxWebSettings() {}
@@ -138,6 +140,9 @@ public:
bool localStorageDatabaseEnabled() const { return s->testAttribute(QWebSettings::LocalStorageDatabaseEnabled); }
void setLocalStorageDatabaseEnabled(bool on) { s->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, on); }
+ QString userStyleSheetUrl() const { return s->userStyleSheetUrl(); }
+ void setUserStyleSheetUrl(const QString& url) { s->setUserStyleSheetUrl(url); }
+
QWebSettings *s;
};
@@ -951,6 +956,21 @@ QWebPage *QFxWebView::page() const
}
// The QObject interface to settings().
+/*!
+ \qmlproperty QWebSettings WebView::settings
+
+ This property gives access to the settings controlling the web view.
+
+ See QWebSettings for the list of sub-properties.
+
+ \code
+ WebView {
+ settings.pluginsEnabled: true
+ settings.userStyleSheetUrl: "mystyle.css"
+ ...
+ }
+ \endcode
+*/
QObject *QFxWebView::settingsObject() const
{
Q_D(const QFxWebView);