1/*
2    Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies)
3
4    This library is free software; you can redistribute it and/or
5    modify it under the terms of the GNU Library General Public
6    License as published by the Free Software Foundation; either
7    version 2 of the License, or (at your option) any later version.
8
9    This library is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    Library General Public License for more details.
13
14    You should have received a copy of the GNU Library General Public License
15    along with this library; see the file COPYING.LIB.  If not, write to
16    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17    Boston, MA 02110-1301, USA.
18*/
19
20#ifndef qwebnavigationrequest_p_h
21#define qwebnavigationrequest_p_h
22
23#include "qquickwebview_p.h"
24#include "qwebkitglobal.h"
25
26#include <QtCore/QObject>
27#include <QtCore/QUrl>
28
29class QWebNavigationRequestPrivate;
30
31class QWEBKIT_EXPORT QWebNavigationRequest : public QObject {
32    Q_OBJECT
33    Q_PROPERTY(QUrl url READ url CONSTANT FINAL)
34    Q_PROPERTY(int mouseButton READ mouseButton CONSTANT FINAL)
35    Q_PROPERTY(int keyboardModifiers READ keyboardModifiers CONSTANT FINAL)
36    Q_PROPERTY(QQuickWebView::NavigationRequestAction action READ action WRITE setAction NOTIFY actionChanged FINAL)
37    Q_PROPERTY(QQuickWebView::NavigationType navigationType READ navigationType CONSTANT FINAL)
38
39public:
40    QWebNavigationRequest(const QUrl& url, Qt::MouseButton mouseButton, Qt::KeyboardModifiers keyboardModifiers, QQuickWebView::NavigationType navigationType, QObject* parent = 0);
41    ~QWebNavigationRequest();
42
43    QUrl url() const;
44    int mouseButton() const;
45    int keyboardModifiers() const;
46    QQuickWebView::NavigationRequestAction action() const;
47
48    void setAction(QQuickWebView::NavigationRequestAction action);
49    QQuickWebView::NavigationType navigationType() const;
50
51Q_SIGNALS:
52    void actionChanged();
53
54private:
55    QWebNavigationRequestPrivate* d;
56};
57
58#endif // qwebnavigationrequest_h
59