14#include <QRegularExpression>
16#include <QtGui/QValidator>
51 explicit Message(QObject *parent =
nullptr);
77 void parseType(QString msg);
78 void parseFrom(QString msg);
79 void parseTo(QString msg);
80 void parseSpecial(QString msg);
IRC消息类 将原始数据传入其中,由该类对接收到的消息进行解析、分类、格式化
Definition: Message.h:22
QString rawMsg()
Definition: Message.cpp:92
Type
消息类型
Definition: Message.h:29
@ Common
常规消息
Definition: Message.h:39
@ Quit
退出频道消息
Definition: Message.h:35
@ Join
加入信息
Definition: Message.h:34
@ None
未知消息
Definition: Message.h:30
@ Num
数字类信息,相当于状态码
Definition: Message.h:38
@ Ping
服务器定期Ping消息
Definition: Message.h:31
@ Notice
注意信息
Definition: Message.h:33
@ Nick
昵称相关信息
Definition: Message.h:36
@ Kick
踢人信息
Definition: Message.h:37
@ Error
报错信息
Definition: Message.h:32
QString myNick()
Definition: Message.cpp:110
Who to()
Definition: Message.cpp:74
Who from()
Definition: Message.cpp:56
QString server()
Definition: Message.cpp:47
QString toName()
Definition: Message.cpp:83
Type msgType()
Definition: Message.cpp:29
Who
消息发送者
Definition: Message.h:45
@ Me
用户自己发送的消息
Definition: Message.h:49
@ Channel
频道消息
Definition: Message.h:47
@ User
其他用户发送的消息
Definition: Message.h:48
@ Server
服务器发送的消息
Definition: Message.h:46
Message * parse()
Definition: Message.cpp:123
QString mainMsg()
Definition: Message.cpp:101
QString fromName()
Definition: Message.cpp:65
Message(QObject *parent=nullptr)
有参构造函数
Definition: Message.cpp:21
int time()
Definition: Message.cpp:119
QString typeStr()
Definition: Message.cpp:38
~Message() override
默认析构函数