Torc  0.1
torcevent.h
Go to the documentation of this file.
1 #ifndef TORCEVENT_H
2 #define TORCEVENT_H
3 
4 // Qt
5 #include <QMap>
6 #include <QVariant>
7 #include <QEvent>
8 
9 class TorcEvent : public QEvent
10 {
11  public:
12  TorcEvent(int Event, const QVariantMap &Data = QVariantMap());
13  virtual ~TorcEvent() = default;
14 
15  int GetEvent (void);
16  QVariantMap& Data (void);
17  TorcEvent* Copy (void) const;
18 
19  static Type TorcEventType;
20 
21  private:
22  Q_DISABLE_COPY(TorcEvent)
23  int m_event;
24  QVariantMap m_data;
25 };
26 
27 #endif // TORCEVENT_H
virtual ~TorcEvent()=default
TorcEvent * Copy(void) const
Copy this event.
Definition: torcevent.cpp:82
int GetEvent(void)
Return the Torc action associated with this event.
Definition: torcevent.cpp:65
QVariantMap & Data(void)
Return a reference to the Data contained within this event.
Definition: torcevent.cpp:71
static Type TorcEventType
Register TorcEventType with QEvent.
Definition: torcevent.h:19
TorcEvent(int Event, const QVariantMap &Data=QVariantMap())
The default implementation contains no data.
Definition: torcevent.cpp:57
A general purpose event object.
Definition: torcevent.h:9