Пример #1
0
ServerProxy::ServerProxy(Protocol *protocol) :
	AbstractServerProxy(protocol)
{
	qDebug("ServerProxy::ServerProxy");

	mServerSocket = new TibiaSocket(this);
	connect(mServerSocket, SIGNAL(connected()), protocol, SLOT(onServerConnect()));
	connect(mServerSocket, SIGNAL(messageRecived(NetworkMessage&)), protocol, SLOT(onRecvServerMessage(NetworkMessage&)));
	connect(mServerSocket, SIGNAL(disconnected()), protocol, SLOT(onServerDisconnect()));
}
Пример #2
0
void Guitest::init(){
    gui = new clientGUI;

    QObject::connect(gui, SIGNAL(sendConnectInfo(QString,int,QString)), this, SLOT(login(QString,int,QString)));
    QObject::connect(this, SIGNAL(connected()), gui, SLOT(wasConnected()));
    QObject::connect(gui, SIGNAL(sendMsg(QString)), this, SLOT(sendMsg(QString)));
    QObject::connect(this, SIGNAL(newMessage(QString,QString)), gui, SLOT(gotMessage(QString,QString)));
    QObject::connect(gui, SIGNAL(updateStatus(QString)), this, SLOT(status(QString)));
    QObject::connect(this, SIGNAL(listUpdate(QMap<QString,QString>&)), gui, SLOT(updateList(QMap<QString,QString>&)));
    QObject::connect(this, SIGNAL(sendError(QString)), gui, SLOT(catchError(QString)));
    QObject::connect(this, SIGNAL(sendServerDisconnect()), gui, SLOT(onServerDisconnect()));

}