--- a/QTfrontend/AbstractPage.h Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/AbstractPage.h Sat Sep 24 16:22:10 2011 +0200
@@ -50,7 +50,8 @@
{
Q_OBJECT
- public:
+ signals:
+ void goBack();
protected:
AbstractPage(QWidget* parent = 0) {
--- a/QTfrontend/hwform.cpp Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/hwform.cpp Sat Sep 24 16:22:10 2011 +0200
@@ -140,6 +140,12 @@
UpdateCampaignPage(0);
UpdateWeapons();
+ // connect all goBack signals
+ int nPages = ui.Pages->count();
+
+ for (int i = 0; i < nPages; i++)
+ connect(ui.Pages->widget(i), SIGNAL(goBack()), this, SLOT(GoBack()));
+
pageSwitchMapper = new QSignalMapper(this);
connect(pageSwitchMapper, SIGNAL(mapped(int)), this, SLOT(GoToPage(int)));
@@ -164,16 +170,12 @@
connect(ui.pageMain->BtnExit, SIGNAL(pressed()), this, SLOT(btnExitPressed()));
connect(ui.pageMain->BtnExit, SIGNAL(clicked()), this, SLOT(btnExitClicked()));
- connect(ui.pageInfo->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
- connect(ui.pageDataDownload->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
-
connect(ui.pageEditTeam->BtnTeamSave, SIGNAL(clicked()), this, SLOT(TeamSave()));
connect(ui.pageEditTeam->BtnTeamDiscard, SIGNAL(clicked()), this, SLOT(TeamDiscard()));
connect(ui.pageEditTeam->signalMapper2, SIGNAL(mapped(const int &)), this, SLOT(RandomName(const int &)));
connect(ui.pageEditTeam->randTeamButton, SIGNAL(clicked()), this, SLOT(RandomNames()));
- connect(ui.pageMultiplayer->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pageMultiplayer->BtnStartMPGame, SIGNAL(clicked()), this, SLOT(StartMPGame()));
connect(ui.pageMultiplayer->teamsSelect, SIGNAL(setEnabledGameStart(bool)),
ui.pageMultiplayer->BtnStartMPGame, SLOT(setEnabled(bool)));
@@ -182,13 +184,11 @@
connect(ui.pageMultiplayer->gameCFG, SIGNAL(goToWeapons(int)), this, SLOT(GoToSelectWeaponSet(int)));
connect(ui.pageMultiplayer->gameCFG, SIGNAL(goToDrawMap()), pageSwitchMapper, SLOT(map()));
pageSwitchMapper->setMapping(ui.pageMultiplayer->gameCFG, ID_PAGE_DRAWMAP);
-
- connect(ui.pagePlayDemo->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+
connect(ui.pagePlayDemo->BtnPlayDemo, SIGNAL(clicked()), this, SLOT(PlayDemo()));
connect(ui.pagePlayDemo->DemosList, SIGNAL(doubleClicked (const QModelIndex &)), this, SLOT(PlayDemo()));
- connect(ui.pageOptions->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pageOptions->BtnNewTeam, SIGNAL(clicked()), this, SLOT(NewTeam()));
connect(ui.pageOptions->BtnEditTeam, SIGNAL(clicked()), this, SLOT(EditTeam()));
connect(ui.pageOptions->BtnDeleteTeam, SIGNAL(clicked()), this, SLOT(DeleteTeam()));
@@ -204,17 +204,14 @@
connect(ui.pageOptions->SchemeDelete, SIGNAL(clicked()), this, SLOT(DeleteScheme()));
connect(ui.pageSelectWeapon->pWeapons, SIGNAL(weaponsChanged()), this, SLOT(UpdateWeapons()));
- connect(ui.pageNet->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pageNet->BtnSpecifyServer, SIGNAL(clicked()), this, SLOT(NetConnect()));
connect(ui.pageNet->BtnNetSvrStart, SIGNAL(clicked()), pageSwitchMapper, SLOT(map()));
pageSwitchMapper->setMapping(ui.pageNet->BtnNetSvrStart, ID_PAGE_NETSERVER);
connect(ui.pageNet, SIGNAL(connectClicked(const QString &, quint16)), this, SLOT(NetConnectServer(const QString &, quint16)));
- connect(ui.pageNetServer->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pageNetServer->BtnStart, SIGNAL(clicked()), this, SLOT(NetStartServer()));
- connect(ui.pageNetGame->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(setEnabledGameStart(bool)),
ui.pageNetGame->BtnStart, SLOT(setEnabled(bool)));
connect(ui.pageNetGame, SIGNAL(SetupClicked()), this, SLOT(IntermediateSetup()));
@@ -223,14 +220,11 @@
connect(ui.pageNetGame->pGameCFG, SIGNAL(goToDrawMap()), pageSwitchMapper, SLOT(map()));
pageSwitchMapper->setMapping(ui.pageNetGame->pGameCFG, ID_PAGE_DRAWMAP);
- connect(ui.pageRoomsList->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pageRoomsList->BtnAdmin, SIGNAL(clicked()), pageSwitchMapper, SLOT(map()));
pageSwitchMapper->setMapping(ui.pageRoomsList->BtnAdmin, ID_PAGE_ADMIN);
connect(ui.pageInfo->BtnSnapshots, SIGNAL(clicked()), this, SLOT(OpenSnapshotFolder()));
- connect(ui.pageInfo->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
- connect(ui.pageGameStats->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pageGameStats, SIGNAL(saveDemoRequested()), this, SLOT(saveDemoWithCustomName()));
connect(ui.pageSinglePlayer->BtnSimpleGamePage, SIGNAL(clicked()), this, SLOT(SimpleGame()));
@@ -245,16 +239,12 @@
connect(ui.pageSinglePlayer->BtnLoad, SIGNAL(clicked()), this, SLOT(GoToSaves()));
connect(ui.pageSinglePlayer->BtnDemos, SIGNAL(clicked()), this, SLOT(GoToDemos()));
- connect(ui.pageSinglePlayer->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pageTraining->BtnStartTrain, SIGNAL(clicked()), this, SLOT(StartTraining()));
- connect(ui.pageTraining->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pageCampaign->BtnStartCampaign, SIGNAL(clicked()), this, SLOT(StartCampaign()));
- connect(ui.pageCampaign->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pageCampaign->CBTeam, SIGNAL(currentIndexChanged(int)), this, SLOT(UpdateCampaignPage(int)));
- connect(ui.pageSelectWeapon->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pageSelectWeapon->BtnDelete, SIGNAL(clicked()),
ui.pageSelectWeapon->pWeapons, SLOT(deleteWeaponsName())); // executed first
@@ -263,16 +253,10 @@
//connect(ui.pageSelectWeapon->pWeapons, SIGNAL(weaponsDeleted()),
// this, SLOT(GoBack())); // executed third
- connect(ui.pageScheme->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
- connect(ui.pageAdmin->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
-
- connect(ui.pageNetType->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pageNetType->BtnLAN, SIGNAL(clicked()), this, SLOT(GoToNet()));
connect(ui.pageNetType->BtnOfficialServer, SIGNAL(clicked()), this, SLOT(NetConnectOfficialServer()));
- connect(ui.pageDrawMap->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
-
connect(ui.pageConnecting, SIGNAL(cancelConnection()), this, SLOT(GoBack()));
@@ -957,7 +941,7 @@
connect(ui.pageAdmin, SIGNAL(setServerMessageOld(const QString&)), hwnet, SLOT(setServerMessageOld(const QString &)));
connect(ui.pageAdmin, SIGNAL(setProtocol(int)), hwnet, SLOT(setLatestProtocolVar(int)));
connect(ui.pageAdmin, SIGNAL(askServerVars()), hwnet, SLOT(askServerVars()));
- connect(ui.pageAdmin->pbClearAccountsCache, SIGNAL(clicked()), hwnet, SLOT(clearAccountsCache()));
+ connect(ui.pageAdmin, SIGNAL(clearAccountsCache()), hwnet, SLOT(clearAccountsCache()));
// disconnect
connect(hwnet, SIGNAL(Disconnected(const QString&)), this, SLOT(ForcedDisconnect(const QString&)), Qt::QueuedConnection);
--- a/QTfrontend/pageadmin.cpp Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pageadmin.cpp Sat Sep 24 16:22:10 2011 +0200
@@ -73,14 +73,15 @@
// 5
pbClearAccountsCache = addButton(tr("Clear Accounts Cache"), pageLayout, 5, 0);
+ connect(pbClearAccountsCache, SIGNAL(clicked()), this, SIGNAL(clearAccountsCache()));
// 6
pbSetSM = addButton(tr("Set data"), pageLayout, 6, 0, 1, 3);
+
// 7
BtnBack = addButton(":/res/Exit.png", pageLayout, 7, 0, true);
-
- connect(pbSetSM, SIGNAL(clicked()), this, SLOT(smChanged()));
+ connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
}
void PageAdmin::smChanged()
--- a/QTfrontend/pageadmin.h Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pageadmin.h Sat Sep 24 16:22:10 2011 +0200
@@ -28,9 +28,6 @@
public:
PageAdmin(QWidget* parent = 0);
- QPushButton * BtnBack;
- QPushButton * pbClearAccountsCache;
-
private:
QLineEdit * leServerMessageNew;
QLineEdit * leServerMessageOld;
@@ -38,6 +35,8 @@
QPushButton * pbAsk;
QSpinBox * sbProtocol;
QTextBrowser * tb;
+ QPushButton * BtnBack;
+ QPushButton * pbClearAccountsCache;
private slots:
void smChanged();
@@ -52,6 +51,7 @@
void setServerMessageOld(const QString & str);
void setProtocol(int proto);
void askServerVars();
+ void clearAccountsCache();
};
#endif
--- a/QTfrontend/pagecampaign.cpp Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagecampaign.cpp Sat Sep 24 16:22:10 2011 +0200
@@ -42,5 +42,7 @@
BtnStartCampaign->setText(QPushButton::tr("Go!"));
pageLayout->addWidget(BtnStartCampaign, 2, 2);
+
BtnBack = addButton(":/res/Exit.png", pageLayout, 4, 0, true);
+ connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
}
--- a/QTfrontend/pagecampaign.h Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagecampaign.h Sat Sep 24 16:22:10 2011 +0200
@@ -29,9 +29,11 @@
PageCampaign(QWidget* parent = 0);
QPushButton *BtnStartCampaign;
- QPushButton *BtnBack;
QComboBox *CBSelect;
QComboBox *CBTeam;
+
+private:
+ QPushButton *BtnBack;
};
#endif
--- a/QTfrontend/pagedata.cpp Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagedata.cpp Sat Sep 24 16:22:10 2011 +0200
@@ -41,7 +41,6 @@
pageLayout->setColumnStretch(1, 1);
pageLayout->setColumnStretch(2, 1);
- BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true);
web = new DataBrowser(this);
connect(web, SIGNAL(anchorClicked(QUrl)), this, SLOT(request(const QUrl&)));
@@ -52,6 +51,10 @@
pageLayout->addLayout(progressBarsLayout, 1, 0, 1, 3);
fetchList();
+
+
+ BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true);
+ connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
}
void PageDataDownload::request(const QUrl &url)
--- a/QTfrontend/pagedata.h Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagedata.h Sat Sep 24 16:22:10 2011 +0200
@@ -34,12 +34,11 @@
public:
PageDataDownload(QWidget* parent = 0);
- QPushButton *BtnBack;
-
public slots:
void fetchList();
private:
+ QPushButton *BtnBack;
DataBrowser *web;
QHash<QNetworkReply*, QProgressBar *> progressBars;
QVBoxLayout *progressBarsLayout;
--- a/QTfrontend/pagedrawmap.cpp Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagedrawmap.cpp Sat Sep 24 16:22:10 2011 +0200
@@ -32,7 +32,10 @@
QPushButton * pbLoad = addButton(tr("Load"), pageLayout, 2, 0);
QPushButton * pbSave = addButton(tr("Save"), pageLayout, 3, 0);
+
BtnBack = addButton(":/res/Exit.png", pageLayout, 5, 0, true);
+ connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
+
drawMapWidget = new DrawMapWidget(this);
pageLayout->addWidget(drawMapWidget, 0, 1, 5, 1);
--- a/QTfrontend/pagedrawmap.h Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagedrawmap.h Sat Sep 24 16:22:10 2011 +0200
@@ -30,9 +30,10 @@
public:
PageDrawMap(QWidget* parent = 0);
- QPushButton * BtnBack;
+ DrawMapWidget * drawMapWidget;
- DrawMapWidget * drawMapWidget;
+private:
+ QPushButton * BtnBack;
private slots:
void load();
--- a/QTfrontend/pagegamestats.cpp Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagegamestats.cpp Sat Sep 24 16:22:10 2011 +0200
@@ -49,10 +49,13 @@
BtnSave->setStyleSheet("QPushButton{margin: 12px 0px 12px 0px;}");
connect(BtnSave, SIGNAL(clicked()), this, SIGNAL(saveDemoRequested()));
+
BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true);
BtnBack->setFixedHeight(BtnSave->height());
BtnBack->setFixedWidth(BtnBack->width()+2);
BtnBack->setStyleSheet("QPushButton{margin: 22px 0 9px 2px;}");
+ connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
+
QGroupBox * gb = new QGroupBox(this);
QVBoxLayout * gbl = new QVBoxLayout;
--- a/QTfrontend/pagegamestats.h Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagegamestats.h Sat Sep 24 16:22:10 2011 +0200
@@ -43,7 +43,6 @@
public:
PageGameStats(QWidget* parent = 0);
- QPushButton *BtnBack;
QPushButton *BtnSave;
QLabel *labelGameStats;
QLabel *labelGameWin;
@@ -64,6 +63,8 @@
QMap<quint32, QVector<quint32> > healthPoints;
unsigned int playerPosition;
quint32 lastColor;
+
+ QPushButton *BtnBack;
};
#endif // STATSPAGE_H
--- a/QTfrontend/pageinfo.cpp Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pageinfo.cpp Sat Sep 24 16:22:10 2011 +0200
@@ -30,8 +30,11 @@
pageLayout->setColumnStretch(2, 1);
BtnSnapshots = addButton(":/res/Star.png", pageLayout, 1, 2, true);
- BtnBack = addButton(":/res/Exit.png", pageLayout, 1, 0, true);
about = new About(this);
pageLayout->addWidget(about, 0, 0, 1, 3);
+
+
+ BtnBack = addButton(":/res/Exit.png", pageLayout, 1, 0, true);
+ connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
}
--- a/QTfrontend/pageinfo.h Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pageinfo.h Sat Sep 24 16:22:10 2011 +0200
@@ -31,8 +31,10 @@
PageInfo(QWidget* parent = 0);
QPushButton *BtnSnapshots;
+ About *about;
+
+private:
QPushButton *BtnBack;
- About *about;
};
#endif
--- a/QTfrontend/pagemultiplayer.cpp Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagemultiplayer.cpp Sat Sep 24 16:22:10 2011 +0200
@@ -28,8 +28,6 @@
{
QGridLayout * pageLayout = new QGridLayout(this);
- BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true);
-
gameCFG = new GameCFGWidget(this);
pageLayout->addWidget(gameCFG, 0, 0, 1, 2);
@@ -44,4 +42,8 @@
pageLayout->addWidget(teamsSelect, 0, 2, 3, 2);
BtnStartMPGame = addButton(tr("Start"), pageLayout, 3, 3);
+
+
+ BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true);
+ connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
}
--- a/QTfrontend/pagemultiplayer.h Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagemultiplayer.h Sat Sep 24 16:22:10 2011 +0200
@@ -31,11 +31,13 @@
public:
PageMultiplayer(QWidget* parent = 0);
- QPushButton *BtnBack;
GameCFGWidget *gameCFG;
TeamSelWidget *teamsSelect;
QPushButton *BtnStartMPGame;
+private:
+ QPushButton *BtnBack;
+
signals:
void SetupClicked();
};
--- a/QTfrontend/pagenet.cpp Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagenet.cpp Sat Sep 24 16:22:10 2011 +0200
@@ -41,7 +41,10 @@
BtnNetSvrStart->setVisible(haveServer);
pageLayout->addWidget(BtnNetSvrStart, 4, 2);
+
BtnBack = addButton(":/res/Exit.png", pageLayout, 4, 0, true);
+ connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
+
ConnGroupBox = new QGroupBox(this);
ConnGroupBox->setTitle(QGroupBox::tr("Net game"));
--- a/QTfrontend/pagenet.h Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagenet.h Sat Sep 24 16:22:10 2011 +0200
@@ -30,7 +30,6 @@
QPushButton* BtnUpdateSList;
QTableView * tvServersList;
- QPushButton * BtnBack;
QPushButton * BtnNetConnect;
QPushButton * BtnNetSvrStart;
QPushButton * BtnSpecifyServer;
@@ -38,6 +37,7 @@
private:
QGroupBox * ConnGroupBox;
QGridLayout * GBClayout;
+ QPushButton * BtnBack;
private slots:
void slotConnect();
--- a/QTfrontend/pagenetgame.cpp Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagenetgame.cpp Sat Sep 24 16:22:10 2011 +0200
@@ -59,7 +59,10 @@
QHBoxLayout * bottomLayout = new QHBoxLayout;
pageLayout->addLayout(bottomLayout, 4, 0, 1, 2);
+
BtnBack = addButton(":/res/Exit.png", bottomLayout, 0, true);
+ connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
+
leRoomName = new QLineEdit(this);
leRoomName->setMaxLength(60);
--- a/QTfrontend/pagenetgame.h Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagenetgame.h Sat Sep 24 16:22:10 2011 +0200
@@ -33,7 +33,6 @@
public:
PageNetGame(QWidget* parent, QSettings * config, SDLInteraction * sdli);
- QPushButton *BtnBack;
QPushButton *BtnGo;
QPushButton *BtnMaster;
QPushButton *BtnStart;
@@ -49,6 +48,9 @@
TeamSelWidget* pNetTeamsWidget;
GameCFGWidget* pGameCFG;
+private:
+ QPushButton *BtnBack;
+
public slots:
void setReadyStatus(bool isReady);
void onUpdateClick();
--- a/QTfrontend/pagenetserver.cpp Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagenetserver.cpp Sat Sep 24 16:22:10 2011 +0200
@@ -36,7 +36,10 @@
pageLayout->setRowStretch(0, 1);
pageLayout->setRowStretch(1, 0);
+
BtnBack =addButton(":/res/Exit.png", pageLayout, 1, 0, true);
+ connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
+
BtnStart = new QPushButton(this);
BtnStart->setFont(*font14);
--- a/QTfrontend/pagenetserver.h Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagenetserver.h Sat Sep 24 16:22:10 2011 +0200
@@ -28,7 +28,6 @@
public:
PageNetServer(QWidget* parent = 0);
- QPushButton *BtnBack;
QPushButton *BtnStart;
QPushButton *BtnDefault;
QLabel *labelSD;
@@ -36,6 +35,9 @@
QLabel *labelPort;
QSpinBox *sbPort;
+private:
+ QPushButton *BtnBack;
+
private slots:
void setDefaultPort();
};
--- a/QTfrontend/pagenettype.cpp Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagenettype.cpp Sat Sep 24 16:22:10 2011 +0200
@@ -37,5 +37,7 @@
// hack: temporary deactivated - requires server modifications that aren't backward compatible (yet)
//BtnOfficialServer->setEnabled(false);
+
BtnBack = addButton(":/res/Exit.png", pageLayout, 4, 0, true);
+ connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
}
--- a/QTfrontend/pagenettype.h Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagenettype.h Sat Sep 24 16:22:10 2011 +0200
@@ -28,9 +28,11 @@
public:
PageNetType(QWidget* parent = 0);
- QPushButton * BtnBack;
QPushButton * BtnLAN;
QPushButton * BtnOfficialServer;
+
+private:
+ QPushButton * BtnBack;
};
#endif
--- a/QTfrontend/pageoptions.cpp Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pageoptions.cpp Sat Sep 24 16:22:10 2011 +0200
@@ -401,10 +401,12 @@
BtnSaveOptions = addButton(":/res/Save.png", pageLayout, 2, 2, true);
BtnSaveOptions->setStyleSheet("QPushButton{margin: 12px 0px 12px 0px;}");
+
BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true);
BtnBack->setFixedHeight(BtnSaveOptions->height());
BtnBack->setFixedWidth(BtnBack->width()+2);
BtnBack->setStyleSheet("QPushButton{margin: 22px 0 9px 2px;}");
+ connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
previousQuality = this->SLQuality->value();
previousResolutionIndex = this->CBResolution->currentIndex();
--- a/QTfrontend/pageoptions.h Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pageoptions.h Sat Sep 24 16:22:10 2011 +0200
@@ -43,7 +43,6 @@
QComboBox *CBLanguage;
- QPushButton *BtnBack;
IconedGroupBox *teamsBox;
QPushButton *BtnNewTeam;
QPushButton *BtnEditTeam;
@@ -81,6 +80,7 @@
bool previousFullscreenValue;
int previousResolutionIndex;
int previousQuality;
+ QPushButton *BtnBack;
private slots:
void forceFullscreen(int index);
--- a/QTfrontend/pageplayrecord.cpp Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pageplayrecord.cpp Sat Sep 24 16:22:10 2011 +0200
@@ -37,8 +37,6 @@
pageLayout->setColumnStretch(2, 1);
pageLayout->setRowStretch(2, 100);
- BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true);
-
BtnPlayDemo = new QPushButton(this);
BtnPlayDemo->setFont(*font14);
BtnPlayDemo->setText(QPushButton::tr("Play demo"));
@@ -58,6 +56,10 @@
connect(BtnRenameRecord, SIGNAL(clicked()), this, SLOT(renameRecord()));
connect(BtnRemoveRecord, SIGNAL(clicked()), this, SLOT(removeRecord()));
+
+
+ BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true);
+ connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
}
void PagePlayDemo::FillFromDir(RecordType rectype)
--- a/QTfrontend/pageplayrecord.h Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pageplayrecord.h Sat Sep 24 16:22:10 2011 +0200
@@ -41,7 +41,6 @@
void FillFromDir(RecordType rectype);
bool isSave();
- QPushButton *BtnBack;
QPushButton *BtnPlayDemo;
QPushButton *BtnRenameRecord;
QPushButton *BtnRemoveRecord;
@@ -49,6 +48,7 @@
private:
RecordType recType;
+ QPushButton *BtnBack;
private slots:
void renameRecord();
--- a/QTfrontend/pageroomslist.cpp Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pageroomslist.cpp Sat Sep 24 16:22:10 2011 +0200
@@ -53,9 +53,9 @@
roomsList->setSelectionMode(QAbstractItemView::SingleSelection);
pageLayout->addWidget(roomsList, 1, 0, 3, 2);
pageLayout->setRowStretch(2, 100);
-
+
QHBoxLayout * filterLayout = new QHBoxLayout();
-
+
QLabel * stateLabel = new QLabel(this);
stateLabel->setText(tr("State:"));
CBState = new QComboBox(this);
@@ -65,7 +65,7 @@
filterLayout->addWidget(stateLabel);
filterLayout->addWidget(CBState);
filterLayout->addSpacing(30);
-
+
QLabel * ruleLabel = new QLabel(this);
ruleLabel->setText(tr("Rules:"));
CBRules = new QComboBox(this);
@@ -77,7 +77,7 @@
filterLayout->addWidget(ruleLabel);
filterLayout->addWidget(CBRules);
filterLayout->addSpacing(30);
-
+
QLabel * weaponLabel = new QLabel(this);
weaponLabel->setText(tr("Weapons:"));
CBWeapons = new QComboBox(this);
@@ -108,7 +108,10 @@
BtnRefresh = addButton(tr("Refresh"), pageLayout, 3, 2);
BtnClear = addButton(tr("Clear"), pageLayout, 4, 2);
+
BtnBack = addButton(":/res/Exit.png", pageLayout, 6, 0, true);
+ connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
+
lblCount = new QLabel(this);
pageLayout->addWidget(lblCount, 6, 1, Qt::AlignHCenter);
@@ -129,7 +132,7 @@
connect(CBWeapons, SIGNAL(currentIndexChanged (int)), this, SLOT(onRefreshClick()));
connect(searchText, SIGNAL(textChanged (const QString &)), this, SLOT(onRefreshClick()));
connect(this, SIGNAL(askJoinConfirmation (const QString &)), this, SLOT(onJoinConfirmation(const QString &)), Qt::QueuedConnection);
-
+
gameInLobby = false;
}
--- a/QTfrontend/pageroomslist.h Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pageroomslist.h Sat Sep 24 16:22:10 2011 +0200
@@ -35,7 +35,6 @@
QLineEdit * roomName;
QLineEdit * searchText;
QTableWidget * roomsList;
- QPushButton * BtnBack;
QPushButton * BtnCreate;
QPushButton * BtnJoin;
QPushButton * BtnRefresh;
@@ -52,6 +51,7 @@
QString gameInLobbyName;
QStringList listFromServer;
AmmoSchemeModel * ammoSchemeModel;
+ QPushButton * BtnBack;
public slots:
void setRoomsList(const QStringList & list);
--- a/QTfrontend/pagescheme.cpp Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagescheme.cpp Sat Sep 24 16:22:10 2011 +0200
@@ -390,7 +390,11 @@
mapper = new QDataWidgetMapper(this);
+
BtnBack = addButton(":/res/Exit.png", pageLayout, 16, 0, true);
+ connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
+
+
BtnCopy = addButton(tr("Copy"), pageLayout, 16, 2);
BtnNew = addButton(tr("New"), pageLayout, 16, 3);
BtnDelete = addButton(tr("Delete"), pageLayout, 16, 4);
--- a/QTfrontend/pagescheme.h Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagescheme.h Sat Sep 24 16:22:10 2011 +0200
@@ -31,7 +31,6 @@
public:
PageScheme(QWidget* parent = 0);
- QPushButton * BtnBack;
QPushButton * BtnCopy;
QPushButton * BtnNew;
QPushButton * BtnDelete;
@@ -46,6 +45,8 @@
void deleteRow();
private:
+ QPushButton * BtnBack;
+
QDataWidgetMapper * mapper;
ToggleButtonWidget * TBW_mode_Forts;
ToggleButtonWidget * TBW_teamsDivide;
--- a/QTfrontend/pageselectweapon.cpp Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pageselectweapon.cpp Sat Sep 24 16:22:10 2011 +0200
@@ -32,7 +32,11 @@
pWeapons = new SelWeaponWidget(cAmmoNumber, this);
pageLayout->addWidget(pWeapons, 0, 0, 1, 5);
+
BtnBack = addButton(":/res/Exit.png", pageLayout, 1, 0, 2, 1, true);
+ connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
+
+
BtnDefault = addButton(tr("Default"), pageLayout, 1, 3);
BtnNew = addButton(tr("New"), pageLayout, 1, 2);
BtnCopy = addButton(tr("Copy"), pageLayout, 2, 2);
--- a/QTfrontend/pageselectweapon.h Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pageselectweapon.h Sat Sep 24 16:22:10 2011 +0200
@@ -35,9 +35,11 @@
QPushButton *BtnDelete;
QPushButton *BtnNew;
QPushButton *BtnCopy;
- QPushButton *BtnBack;
SelWeaponWidget* pWeapons;
QComboBox* selectWeaponSet;
+
+private:
+ QPushButton *BtnBack;
};
#endif
--- a/QTfrontend/pagesingleplayer.cpp Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagesingleplayer.cpp Sat Sep 24 16:22:10 2011 +0200
@@ -51,7 +51,11 @@
BtnTrainPage = addButton(":/res/Trainings.png", middleLine, 1, true);
BtnTrainPage->setToolTip(tr("Training Mode (Practice your skills in a range of training missions). IN DEVELOPMENT"));
+
BtnBack = addButton(":/res/Exit.png", bottomLine, 0, true);
+ connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
+
+
bottomLine->addStretch();
BtnDemos = addButton(":/res/Record.png", bottomLine, 1, true);
--- a/QTfrontend/pagesingleplayer.h Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagesingleplayer.h Sat Sep 24 16:22:10 2011 +0200
@@ -36,8 +36,10 @@
QPushButton *BtnMultiplayer;
QPushButton *BtnLoad;
QPushButton *BtnDemos;
+ GameCFGWidget *gameCFG;
+
+private:
QPushButton *BtnBack;
- GameCFGWidget *gameCFG;
};
#endif
--- a/QTfrontend/pagetraining.cpp Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagetraining.cpp Sat Sep 24 16:22:10 2011 +0200
@@ -63,5 +63,7 @@
BtnStartTrain->setText(QPushButton::tr("Go!"));
pageLayout->addWidget(BtnStartTrain, 1, 2);
+
BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true);
+ connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
}
--- a/QTfrontend/pagetraining.h Sat Sep 24 04:53:53 2011 +0200
+++ b/QTfrontend/pagetraining.h Sat Sep 24 16:22:10 2011 +0200
@@ -29,8 +29,10 @@
PageTraining(QWidget* parent = 0);
QPushButton *BtnStartTrain;
+ QComboBox *CBSelect;
+
+private:
QPushButton *BtnBack;
- QComboBox *CBSelect;
};
#endif