- explicit NetworkDataEvent(EventManager::EventType type, Network *network, const QByteArray &data)
- : NetworkEvent(type, network),
- _data(data)
- {}
+ explicit NetworkDataEvent(EventManager::EventType type, Network *network, const QByteArray &data)
+ : NetworkEvent(type, network),
+ _data(data)
+ {}
+
+ inline QByteArray data() const { return _data; }
+ inline void setData(const QByteArray &data) { _data = data; }
+
+protected:
+ explicit NetworkDataEvent(EventManager::EventType type, QVariantMap &map, Network *network);
+ void toVariantMap(QVariantMap &map) const;
+
+ virtual inline QString className() const { return "NetworkDataEvent"; }
+ virtual inline void debugInfo(QDebug &dbg) const
+ {
+ NetworkEvent::debugInfo(dbg);
+ dbg.nospace() << ", data = " << data();
+ }