# HG changeset patch # User sheepluva # Date 1336044340 -7200 # Node ID 08642c7da4a3b5e05be51a8b45995e799bbc4bbf # Parent c0b32404ef74b254e3e3968eaff844758ca3fe7b add DLC button to net game room diff -r c0b32404ef74 -r 08642c7da4a3 QTfrontend/hwform.cpp --- a/QTfrontend/hwform.cpp Thu May 03 12:33:08 2012 +0200 +++ b/QTfrontend/hwform.cpp Thu May 03 13:25:40 2012 +0200 @@ -195,6 +195,9 @@ connect(ui.pageMain->BtnDataDownload, SIGNAL(clicked()), pageSwitchMapper, SLOT(map())); pageSwitchMapper->setMapping(ui.pageMain->BtnDataDownload, ID_PAGE_DATADOWNLOAD); + connect(ui.pageNetGame, SIGNAL(DLCClicked()), pageSwitchMapper, SLOT(map())); + pageSwitchMapper->setMapping(ui.pageNetGame, ID_PAGE_DATADOWNLOAD); + //connect(ui.pageMain->BtnExit, SIGNAL(pressed()), this, SLOT(btnExitPressed())); //connect(ui.pageMain->BtnExit, SIGNAL(clicked()), this, SLOT(btnExitClicked())); diff -r c0b32404ef74 -r 08642c7da4a3 QTfrontend/ui/page/pagedata.cpp --- a/QTfrontend/ui/page/pagedata.cpp Thu May 03 12:33:08 2012 +0200 +++ b/QTfrontend/ui/page/pagedata.cpp Thu May 03 13:25:40 2012 +0200 @@ -222,7 +222,10 @@ return false; } - m_contentDownloaded = true; + if (this->isVisible()) + m_contentDownloaded = true; + else + DataManager::instance().reload(); } file.close(); diff -r c0b32404ef74 -r 08642c7da4a3 QTfrontend/ui/page/pagenetgame.cpp --- a/QTfrontend/ui/page/pagenetgame.cpp Thu May 03 12:33:08 2012 +0200 +++ b/QTfrontend/ui/page/pagenetgame.cpp Thu May 03 13:25:40 2012 +0200 @@ -63,6 +63,9 @@ { QHBoxLayout * bottomLayout = new QHBoxLayout; + btnDLC = addButton(tr("DLC"), bottomLayout, 0); + btnDLC->setWhatsThis(tr("Downloadable Content")); + leRoomName = new HistoryLineEdit(this,10); leRoomName->setMaxLength(60); leRoomName->setMinimumWidth(200); @@ -77,21 +80,23 @@ BtnGo->setMinimumHeight(50); bottomLayout->addWidget(leRoomName); - BtnUpdate = addButton(QAction::tr("Update"), bottomLayout, 1); + BtnUpdate = addButton(QAction::tr("Update"), bottomLayout, 2); bottomLayout->addStretch(); bottomLayout->addWidget(BtnGo); - BtnMaster = addButton(tr("Control"), bottomLayout, 3); + BtnMaster = addButton(tr("Control"), bottomLayout, 4); bottomLayout->insertStretch(3, 100); - BtnStart = addButton(QAction::tr("Start"), bottomLayout, 3); + BtnStart = addButton(QAction::tr("Start"), bottomLayout, 4); return bottomLayout; } void PageNetGame::connectSignals() { + connect(btnDLC, SIGNAL(clicked()), this, SIGNAL(DLCClicked())); + connect(btnSetup, SIGNAL(clicked()), this, SIGNAL(SetupClicked())); connect(BtnUpdate, SIGNAL(clicked()), this, SLOT(onUpdateClick())); diff -r c0b32404ef74 -r 08642c7da4a3 QTfrontend/ui/page/pagenetgame.h --- a/QTfrontend/ui/page/pagenetgame.h Thu May 03 12:33:08 2012 +0200 +++ b/QTfrontend/ui/page/pagenetgame.h Thu May 03 13:25:40 2012 +0200 @@ -65,6 +65,7 @@ signals: void SetupClicked(); + void DLCClicked(); void askForUpdateRoomName(const QString &); private: @@ -76,6 +77,7 @@ HistoryLineEdit * leRoomName; QPushButton * btnSetup; + QPushButton * btnDLC; }; #endif