1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
/****************************************************************************
**
** Copyright (c) 2015 Digia Plc
** For any questions to Digia, please use contact form at http://qt.digia.com/
**
** All Rights Reserved.
**
** NOTICE: All information contained herein is, and remains
** the property of Digia Plc and its suppliers,
** if any. The intellectual and technical concepts contained
** herein are proprietary to Digia Plc
** and its suppliers and may be covered by Finnish and Foreign Patents,
** patents in process, and are protected by trade secret or copyright law.
** Dissemination of this information or reproduction of this material
** is strictly forbidden unless prior written permission is obtained
** from Digia Plc.
****************************************************************************/
#ifndef SCXMLEVENT_H
#define SCXMLEVENT_H
#include "scxmlglobals.h"
#include <QEvent>
#include <QStringList>
#include <QVariantList>
namespace Scxml {
class SCXML_EXPORT ScxmlEvent: public QEvent {
public:
static QEvent::Type scxmlEventType;
enum EventType { Platform, Internal, External };
ScxmlEvent(const QByteArray &name = QByteArray(), EventType eventType = External,
const QVariantList &dataValues = QVariantList(), const QStringList &dataNames = QStringList(),
const QByteArray &sendid = QByteArray (),
const QString &origin = QString (), const QString &origintype = QString (),
const QByteArray &invokeid = QByteArray());
QByteArray name() const { return m_name; }
EventType eventType() const { return m_type; }
QString scxmlType() const;
QByteArray sendid() const { return m_sendid; }
QString origin() const { return m_origin; }
QString origintype() const { return m_origintype; }
QByteArray invokeid() const { return m_invokeid; }
QVariantList dataValues() const { return m_dataValues; }
QStringList dataNames() const { return m_dataNames; }
void reset(const QByteArray &name, EventType eventType = External,
QVariantList dataValues = QVariantList(), const QByteArray &sendid = QByteArray(),
const QString &origin = QString(), const QString &origintype = QString(),
const QByteArray &invokeid = QByteArray());
void clear();
private:
QByteArray m_name;
EventType m_type;
QVariantList m_dataValues; // extra data
QStringList m_dataNames; // extra data
QByteArray m_sendid; // if set, or id of <send> if failure
QString m_origin; // uri to answer by setting the target of send, empty for internal and platform events
QString m_origintype; // type to answer by setting the type of send, empty for internal and platform events
QByteArray m_invokeid; // id of the invocation that triggered the child process if this was invoked
};
} // namespace Scxml
#endif // SCXMLEVENT_H
|