~abreu-alexandre/oxide/add-quota-permission-context-support

« back to all changes in this revision

Viewing changes to qt/quick/api/oxideqquickscriptmessagehandler.h

  • Committer: Chris Coulson
  • Date: 2016-01-13 18:16:11 UTC
  • Revision ID: chris.coulson@canonical.com-20160113181611-vo55lgwngvcj9u1h
Various clean-ups in soon-to-be-public headers. Also, we rename header files based on whether they're going to be public or not

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
// License along with this library; if not, write to the Free Software
16
16
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
17
17
 
18
 
#ifndef _OXIDE_QT_QUICK_API_SCRIPT_MESSAGE_HANDLER_P_H_
19
 
#define _OXIDE_QT_QUICK_API_SCRIPT_MESSAGE_HANDLER_P_H_
20
 
 
21
 
#include <QJSValue>
22
 
#include <QList>
23
 
#include <QObject>
24
 
#include <QQmlParserStatus>
25
 
#include <QScopedPointer>
26
 
#include <QString>
27
 
#include <QtGlobal>
28
 
#include <QtQml>
29
 
#include <QUrl>
 
18
#ifndef OXIDE_QTQUICK_SCRIPT_MESSAGE_HANDLER
 
19
#define OXIDE_QTQUICK_SCRIPT_MESSAGE_HANDLER
 
20
 
 
21
#include <QtCore/QList>
 
22
#include <QtCore/QObject>
 
23
#include <QtCore/QScopedPointer>
 
24
#include <QtCore/QString>
 
25
#include <QtCore/QtGlobal>
 
26
#include <QtCore/QUrl>
 
27
#include <QtQml/QJSValue>
 
28
#include <QtQml/QQmlParserStatus>
 
29
#include <QtQml/QtQml>
 
30
 
 
31
#include <OxideQtQuick/oxideqquickglobal.h>
30
32
 
31
33
class OxideQQuickScriptMessageHandlerPrivate;
32
34
 
33
 
class Q_DECL_EXPORT OxideQQuickScriptMessageHandler : public QObject,
34
 
                                                      public QQmlParserStatus {
 
35
class OXIDE_QTQUICK_EXPORT OxideQQuickScriptMessageHandler
 
36
    : public QObject,
 
37
      public QQmlParserStatus {
35
38
  Q_OBJECT
36
39
  Q_PROPERTY(QString msgId READ msgId WRITE setMsgId NOTIFY msgIdChanged)
37
40
  Q_PROPERTY(QList<QUrl> contexts READ contexts WRITE setContexts NOTIFY contextsChanged)
41
44
 
42
45
 public:
43
46
  OxideQQuickScriptMessageHandler(QObject* parent = nullptr);
44
 
  virtual ~OxideQQuickScriptMessageHandler();
 
47
  ~OxideQQuickScriptMessageHandler() Q_DECL_OVERRIDE;
45
48
 
46
49
  QString msgId() const;
47
50
  void setMsgId(const QString& id);
52
55
  QJSValue callback() const;
53
56
  void setCallback(const QJSValue& callback);
54
57
 
55
 
  void classBegin();
56
 
  void componentComplete();
57
 
 
58
58
 Q_SIGNALS:
59
59
  void msgIdChanged();
60
60
  void contextsChanged();
61
61
  void callbackChanged();
62
62
 
 
63
 protected:
 
64
  // QQmlParserStatus implementation
 
65
  void classBegin() Q_DECL_OVERRIDE;
 
66
  void componentComplete() Q_DECL_OVERRIDE;
 
67
 
63
68
 private:
64
69
  QScopedPointer<OxideQQuickScriptMessageHandlerPrivate> d_ptr;
65
70
};
66
71
 
67
72
QML_DECLARE_TYPE(OxideQQuickScriptMessageHandler)
68
73
 
69
 
#endif // _OXIDE_QT_QUICK_API_SCRIPT_MESSAGE_HANDLER_P_H_
 
74
#endif // OXIDE_QTQUICK_SCRIPT_MESSAGE_HANDLER