QTfrontend/hwform.cpp
changeset 1162 91bf5e3e558d
parent 1150 ae86e36dad2e
child 1163 5186cf914549
equal deleted inserted replaced
1161:edf18b880beb 1162:91bf5e3e558d
    52 	config = new GameUIConfig(this, cfgdir->absolutePath() + "/hedgewars.ini");
    52 	config = new GameUIConfig(this, cfgdir->absolutePath() + "/hedgewars.ini");
    53 
    53 
    54 	UpdateTeamsLists();
    54 	UpdateTeamsLists();
    55 	UpdateWeapons();
    55 	UpdateWeapons();
    56 
    56 
       
    57 	connect(config, SIGNAL(frontendFullscreen(bool)), this, SLOT(onFrontendFullscreen(bool)));
       
    58 	onFrontendFullscreen(config->isFrontendFullscreen());
       
    59 
    57 	connect(ui.pageMain->BtnSinglePlayer,	SIGNAL(clicked()),	this, SLOT(GoToSinglePlayer()));
    60 	connect(ui.pageMain->BtnSinglePlayer,	SIGNAL(clicked()),	this, SLOT(GoToSinglePlayer()));
    58 	connect(ui.pageMain->BtnSetup,	SIGNAL(clicked()),	this, SLOT(GoToSetup()));
    61 	connect(ui.pageMain->BtnSetup,	SIGNAL(clicked()),	this, SLOT(GoToSetup()));
    59 	connect(ui.pageMain->BtnNet,	SIGNAL(clicked()),	this, SLOT(GoToNet()));
    62 	connect(ui.pageMain->BtnNet,	SIGNAL(clicked()),	this, SLOT(GoToNet()));
    60 	connect(ui.pageMain->BtnInfo,	SIGNAL(clicked()),	this, SLOT(GoToInfo()));
    63 	connect(ui.pageMain->BtnInfo,	SIGNAL(clicked()),	this, SLOT(GoToInfo()));
    61 	connect(ui.pageMain->BtnExit, SIGNAL(pressed()), this, SLOT(btnExitPressed()));
    64 	connect(ui.pageMain->BtnExit, SIGNAL(pressed()), this, SLOT(btnExitPressed()));
   123 		this, SLOT(UpdateWeapons())); // executed second
   126 		this, SLOT(UpdateWeapons())); // executed second
   124 	connect(ui.pageSelectWeapon->pWeapons,	SIGNAL(weaponsDeleted()),
   127 	connect(ui.pageSelectWeapon->pWeapons,	SIGNAL(weaponsDeleted()),
   125 		this, SLOT(GoBack())); // executed third
   128 		this, SLOT(GoBack())); // executed third
   126 
   129 
   127 	GoToPage(ID_PAGE_MAIN);
   130 	GoToPage(ID_PAGE_MAIN);
       
   131 }
       
   132 
       
   133 void HWForm::onFrontendFullscreen(bool value)
       
   134 {
       
   135   qDebug() << "fullscreen = " << value;
       
   136   setWindowState(windowState() | (value ? Qt::WindowFullScreen : Qt::WindowNoState));
   128 }
   137 }
   129 
   138 
   130 void HWForm::UpdateWeapons()
   139 void HWForm::UpdateWeapons()
   131 {
   140 {
   132   // FIXME: rewrite this with boost (or TR1/0x)
   141   // FIXME: rewrite this with boost (or TR1/0x)