- explicit NetworkDataEvent(EventManager::EventType type, Network *network, const QByteArray &data)
- : NetworkEvent(type, network),
- _data(data)
- {}
+ explicit NetworkSplitEvent(EventManager::EventType type,
+ Network *network,
+ const QString &channel,
+ const QStringList &users,
+ const QString &quitMsg)
+ : NetworkEvent(type, network),
+ _channel(channel),
+ _users(users),
+ _quitMsg(quitMsg)
+ {}
+
+ inline QString channel() const { return _channel; }
+ inline QStringList users() const { return _users; }
+ inline QString quitMessage() const { return _quitMsg; }
+
+protected:
+ explicit NetworkSplitEvent(EventManager::EventType type, QVariantMap &map, Network *network);
+ void toVariantMap(QVariantMap &map) const;
+
+ virtual inline QString className() const { return "NetworkSplitEvent"; }
+ virtual inline void debugInfo(QDebug &dbg) const
+ {
+ NetworkEvent::debugInfo(dbg);
+ dbg.nospace() << ", channel = " << qPrintable(channel())
+ << ", users = " << users()
+ << ", quitmsg = " << quitMessage();
+ }