aboutsummaryrefslogtreecommitdiff
path: root/src/webengine/webprofile.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/webengine/webprofile.h')
-rw-r--r--src/webengine/webprofile.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/src/webengine/webprofile.h b/src/webengine/webprofile.h
index 1ec2b88..66154af 100644
--- a/src/webengine/webprofile.h
+++ b/src/webengine/webprofile.h
@@ -17,15 +17,31 @@
#include <QVector>
#include <QWebEngineProfile>
#include <QWebEngineSettings>
-#include <profileinterface.h>
class WebProfileManager;
-class WebProfile : public Profile
+class WebProfile : public QWebEngineProfile
{
friend class WebProfileManager;
Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
+ Q_PROPERTY(QString search READ search WRITE setSearch NOTIFY searchChanged)
+ Q_PROPERTY(QUrl homepage READ homepage WRITE setHomepage NOTIFY homepageChanged)
+ Q_PROPERTY(QUrl newtab READ newtab WRITE setNewtab NOTIFY newtabChanged)
+
+ // QWebEngineProfile should-be properties
+ Q_PROPERTY(QString cachePath READ cachePath WRITE setCachePath NOTIFY propertyChanged)
+ Q_PROPERTY(QString persistentStoragePath READ persistentStoragePath WRITE setPersistentStoragePath NOTIFY propertyChanged)
+ Q_PROPERTY(int persistentCookiesPolicy READ persistentCookiesPolicy WRITE setPersistentCookiesPolicy NOTIFY propertyChanged)
+
+ Q_PROPERTY(QString httpAcceptLanguage READ httpAcceptLanguage WRITE setHttpAcceptLanguage NOTIFY propertyChanged)
+ Q_PROPERTY(int httpCacheMaximumSize READ httpCacheMaximumSize WRITE setHttpCacheMaximumSize NOTIFY propertyChanged)
+ Q_PROPERTY(int httpCacheType READ httpCacheType WRITE setHttpCacheType NOTIFY propertyChanged)
+ Q_PROPERTY(QString httpUserAgent READ httpUserAgent WRITE setHttpUserAgent NOTIFY propertyChanged)
+
+ Q_PROPERTY(bool spellCheckEnabled READ isSpellCheckEnabled WRITE setSpellCheckEnabled NOTIFY propertyChanged)
+
public:
static WebProfile *defaultProfile();
static void setDefaultProfile(WebProfile *profile);
@@ -69,6 +85,17 @@ public:
void setSpellCheckEnabled(bool enable);
+signals:
+ void nameChanged(const QString &name);
+ void searchChanged(const QString &url);
+ void homepageChanged(const QUrl &url);
+ void newtabChanged(const QUrl &url);
+
+ void propertyChanged(const QString &name, const QVariant &value);
+ void attributeChanged(const QWebEngineSettings::WebAttribute attribute, const bool value);
+ void headerChanged(const QString &name, const QString &value);
+ void headerRemoved(const QString &name);
+
protected:
// off-the-record constructor
explicit WebProfile(const QString &name, QObject *parent = nullptr);