Lobby::Lobby(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Lobby)
{
    roomSet = NULL;
    ui->setupUi(this);
    setWindowTitle("Welcome back, " + dataInterface->nickName);
    ui->label->setToolTip(QStringLiteral("联系方式:[email protected]"));
    logic->setLobby(this);
    connect(ui->tableWidget, SIGNAL(clicked(QModelIndex)), this, SLOT(onItemClicked(QModelIndex)));
    connect(ui->createButton, SIGNAL(clicked()), this, SLOT(onCreateRoom()));
    connect(ui->refreshButton, SIGNAL(clicked()), this, SLOT(onRefreshList()));
    onRefreshList();

	this->setWindowFlags(this->windowFlags()&Qt::WindowMaximizeButtonHint);
}
void GUIDebugWindow::onDeleteSquad(MyGUI::Widget* _sender)
{
	std::string path = "GameData/StoryData/SquadData/";
	DataLibrary::getSingletonPtr()->delNode(path+mSquadName->getCaption());
	onRefreshList(NULL);
}
void GUIDebugWindow::onAddSquad(MyGUI::Widget* _sender)
{
	AVGSquadManager::getSingleton().addNewSquad(mSquadLeader->getCaption(),mSquadName->getCaption());
	onRefreshList(NULL);
}