コード例 #1
0
ファイル: msg_processor.cpp プロジェクト: Akers/Qtqq
	foreach ( QQMsg *temp, msgs )
	{
		ShareQQMsgPtr msg(temp);
		if ( msg.isNull() )
			continue;

		switch ( msg->type() )
		{
			case QQMsg::kBuddiesStatusChange:
				emit contactStatusChanged(msg->sendUin(),  msg->status(), msg->client_type());
				break;
			case QQMsg::kFriend:
				emit newFriendChatMsg(msg);
				break;
			case QQMsg::kSess:
				emit newSessChatMsg(msg);
				break;
			case QQMsg::kGroup:
				emit newGroupChatMsg(msg);
				break;
			case QQMsg::kSystem:
				emit newSystemMsg(msg);
				break;
			case QQMsg::kSystemG:
				emit newSystemGMsg(msg);
				break;
			default:
				qDebug() << "recived unknown message!" << endl;
				break;
		}
	}
コード例 #2
0
ファイル: msg_processor.cpp プロジェクト: Akers/Qtqq
MsgProcessor::MsgProcessor()
{
	setTerminationEnabled(true);
	qRegisterMetaType<ShareQQMsgPtr>("ShareQQMsgPtr");

	connect(this, SIGNAL(newFriendChatMsg(ShareQQMsgPtr)), this, SIGNAL(newChatMsg(ShareQQMsgPtr)));
	connect(this, SIGNAL(newGroupChatMsg(ShareQQMsgPtr)), this, SIGNAL(newChatMsg(ShareQQMsgPtr)));
	connect(this, SIGNAL(newSessChatMsg(ShareQQMsgPtr)), this, SIGNAL(newChatMsg(ShareQQMsgPtr)));
}
コード例 #3
0
ファイル: chatmsg_processor.cpp プロジェクト: Quan52/Qtqq
ChatMsgProcessor::ChatMsgProcessor()
{
    qRegisterMetaType<ContactStatus>("ContactStatus");

    connect(MsgProcessor::instance(), SIGNAL(newFriendChatMsg(ShareQQMsgPtr)), this, SLOT(onNewChatMsg(ShareQQMsgPtr)));
    connect(MsgProcessor::instance(), SIGNAL(newGroupChatMsg(ShareQQMsgPtr)), this, SLOT(onNewChatMsg(ShareQQMsgPtr)));
    connect(MsgProcessor::instance(), SIGNAL(newSessChatMsg(ShareQQMsgPtr)), this, SLOT(onNewChatMsg(ShareQQMsgPtr)));
    connect(MsgProcessor::instance(), SIGNAL(newOffFileMsg(ShareQQMsgPtr)), this, SLOT(onNewOffFileMsg(ShareQQMsgPtr)));
    connect(ChatDlgManager::instance(), SIGNAL(activatedChatDlgChanged(QQChatDlg *, QQChatDlg *)), this, SLOT(onActivatedChatDlgChanged(QQChatDlg *, QQChatDlg *)));
    connect(StrangerManager::instance(), SIGNAL(newStrangerInfo(QString, Contact *)), this, SLOT(onNewStrangerInfo(QString, Contact *)));
    connect(StrangerManager::instance(), SIGNAL(newStrangerIcon(QString, QPixmap)), this, SLOT(onNewStrangerIcon(QString, QPixmap)));
}