35
35
class OxideQLoadEvent;
36
class OxideQNavigationRequest;
37
class OxideQNewViewRequest;
36
38
class OxideQWebPreferences;
37
39
class OxideQQuickNavigationHistory;
38
40
class OxideQQuickScriptMessageHandler;
59
61
class OxideQQuickWebView : public QQuickItem {
64
Q_ENUMS(LogMessageSeverityLevel);
61
66
Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged)
62
67
Q_PROPERTY(QString title READ title NOTIFY titleChanged)
63
68
Q_PROPERTY(bool canGoBack READ canGoBack NOTIFY navigationHistoryChanged)
64
69
Q_PROPERTY(bool canGoForward READ canGoForward NOTIFY navigationHistoryChanged)
65
Q_PROPERTY(bool incognito READ incognito WRITE setIncognito)
70
Q_PROPERTY(bool incognito READ incognito WRITE setIncognito NOTIFY incognitoChanged)
66
71
Q_PROPERTY(bool loading READ loading NOTIFY loadingChanged)
67
72
Q_PROPERTY(int loadProgress READ loadProgress NOTIFY loadProgressChanged)
68
73
Q_PROPERTY(OxideQQuickWebFrame* rootFrame READ rootFrame NOTIFY rootFrameChanged)
75
80
Q_PROPERTY(QQmlComponent* promptDialog READ promptDialog WRITE setPromptDialog NOTIFY promptDialogChanged)
76
81
Q_PROPERTY(QQmlComponent* beforeUnloadDialog READ beforeUnloadDialog WRITE setBeforeUnloadDialog NOTIFY beforeUnloadDialogChanged)
83
Q_PROPERTY(QQmlComponent* filePicker READ filePicker WRITE setFilePicker NOTIFY filePickerChanged)
78
85
Q_PROPERTY(OxideQQuickWebContext* context READ context WRITE setContext NOTIFY contextChanged)
79
86
Q_PROPERTY(OxideQWebPreferences* preferences READ preferences WRITE setPreferences NOTIFY preferencesChanged)
81
88
Q_PROPERTY(OxideQQuickNavigationHistory* navigationHistory READ navigationHistory CONSTANT)
90
Q_PROPERTY(OxideQNewViewRequest* request READ request WRITE setRequest)
83
92
Q_DECLARE_PRIVATE(OxideQQuickWebView)
86
95
OxideQQuickWebView(QQuickItem* parent = NULL);
87
96
virtual ~OxideQQuickWebView();
98
enum LogMessageSeverityLevel {
99
LogSeverityVerbose = -1,
103
LogSeverityErrorReport,
89
107
void componentComplete();
124
142
QQmlComponent* beforeUnloadDialog() const;
125
143
void setBeforeUnloadDialog(QQmlComponent* before_unload_dialog);
145
QQmlComponent* filePicker() const;
146
void setFilePicker(QQmlComponent* file_picker);
127
148
OxideQQuickWebContext* context() const;
128
149
void setContext(OxideQQuickWebContext* context);
133
154
OxideQQuickNavigationHistory* navigationHistory();
156
OxideQNewViewRequest* request() const;
157
void setRequest(OxideQNewViewRequest* request);
135
159
static OxideQQuickWebViewAttached* qmlAttachedProperties(QObject* object);
154
179
void confirmDialogChanged();
155
180
void promptDialogChanged();
156
181
void beforeUnloadDialogChanged();
182
void filePickerChanged();
157
183
void contextChanged();
158
184
void preferencesChanged();
159
185
void messageHandlersChanged();
162
void visibilityChangedListener();
186
void navigationRequested(OxideQNavigationRequest *request);
187
void newViewRequested(OxideQNewViewRequest* request);
188
void javaScriptConsoleMessage(LogMessageSeverityLevel level,
189
const QString& message,
191
const QString& sourceId);
165
Q_PRIVATE_SLOT(d_func(), void contextInitialized());
194
Q_PRIVATE_SLOT(d_func(), void contextConstructed());
166
195
Q_PRIVATE_SLOT(d_func(), void contextWillBeDestroyed());
168
virtual void geometryChanged(const QRectF& newGeometry,
169
const QRectF& oldGeometry);
197
void geometryChanged(const QRectF& newGeometry,
198
const QRectF& oldGeometry) Q_DECL_FINAL;
199
void itemChange(QQuickItem::ItemChange change,
200
const QQuickItem::ItemChangeData& value) Q_DECL_FINAL;
171
202
QScopedPointer<OxideQQuickWebViewPrivate> d_ptr;