32 lines
1.0 KiB
C++
32 lines
1.0 KiB
C++
|
#include <QtGui/QApplication>
|
||
|
#include "mainwindow.h"
|
||
|
#include "ui_mainwindow.h"
|
||
|
#include "observerclientmodel.h"
|
||
|
|
||
|
int main(int argc, char *argv[])
|
||
|
{
|
||
|
QApplication a(argc, argv);
|
||
|
MainWindow w;
|
||
|
w.show();
|
||
|
|
||
|
TObserverClientModel observerClient;
|
||
|
|
||
|
w.ObserverClientModel = &observerClient;
|
||
|
observerClient.MainWindowPtr = &w;
|
||
|
|
||
|
w.OpenMap();
|
||
|
|
||
|
w.GetUi()->ConnectButton->PressedHandler = boost::bind(&TObserverClientModel::OnConnectButtonPressed, &observerClient);
|
||
|
w.GetUi()->UpdateDataButton->PressedHandler = boost::bind(&TObserverClientModel::OnUpdateInfoButtonPressed, &observerClient);
|
||
|
|
||
|
|
||
|
w.GetUi()->DisconnectButton->PressedHandler = boost::bind(&TObserverClientModel::Finish, &observerClient);
|
||
|
|
||
|
w.GetUi()->MapTypeButton->PressedHandler = boost::bind(&TObserverClientModel::OnChangeMapTypeButtonPressed, &observerClient);
|
||
|
|
||
|
w.GetUi()->ChatSendButton->PressedHandler = boost::bind(&TObserverClientModel::OnChatSendClick, &observerClient);
|
||
|
|
||
|
|
||
|
return a.exec();
|
||
|
}
|