--- a/QTfrontend/gamecfgwidget.cpp Mon Mar 16 19:55:56 2009 +0000
+++ b/QTfrontend/gamecfgwidget.cpp Mon Mar 16 20:55:10 2009 +0000
@@ -48,6 +48,7 @@
GameSchemes = new QComboBox(GBoxOptions);
GBoxOptionsLayout->addWidget(GameSchemes, 0, 1);
+ connect(GameSchemes, SIGNAL(currentIndexChanged(int)), this, SLOT(schemeChanged(int)));
QPushButton * goToSchemePage = new QPushButton(GBoxOptions);
goToSchemePage->setText(tr("Edit schemes"));
@@ -240,3 +241,14 @@
{
emit paramChanged("THEME", QStringList(value));
}
+
+void GameCFGWidget::schemeChanged(int value)
+{
+ QStringList sl;
+
+ int size = GameSchemes->model()->columnCount();
+ for(int i = 0; i < size; ++i)
+ sl << schemeData(i).toString();
+
+ emit paramChanged("SCHEME", sl);
+}
--- a/QTfrontend/gamecfgwidget.h Mon Mar 16 19:55:56 2009 +0000
+++ b/QTfrontend/gamecfgwidget.h Mon Mar 16 20:55:10 2009 +0000
@@ -59,6 +59,7 @@
void templateFilterChanged(int);
void seedChanged(const QString &);
void themeChanged(const QString &);
+ void schemeChanged(int);
private:
QGridLayout mainLayout;
--- a/QTfrontend/hwform.cpp Mon Mar 16 19:55:56 2009 +0000
+++ b/QTfrontend/hwform.cpp Mon Mar 16 20:55:10 2009 +0000
@@ -582,12 +582,7 @@
connect(hwnet, SIGNAL(teamColorChanged(const HWTeam&)),
ui.pageNetGame->pNetTeamsWidget, SLOT(changeTeamColor(const HWTeam&)));
-// config stuff
- connect(hwnet, SIGNAL(paramChanged(const QString &, const QStringList &)), ui.pageNetGame->pGameCFG, SLOT(setParam(const QString &, const QStringList &)));
- connect(ui.pageNetGame->pGameCFG, SIGNAL(paramChanged(const QString &, const QStringList &)), hwnet, SLOT(onParamChanged(const QString &, const QStringList &)));
- connect(hwnet, SIGNAL(configAsked()), ui.pageNetGame->pGameCFG, SLOT(fullNetConfig()));
-
-
+// disconnect
connect(hwnet, SIGNAL(Disconnected()), this, SLOT(ForcedDisconnect()), Qt::QueuedConnection);
hwnet->Connect(hostName, port, nick);
@@ -821,6 +816,7 @@
ui.pageNetGame->setMasterMode(true);
ui.pageNetGame->restrictJoins->setChecked(false);
ui.pageNetGame->restrictTeamAdds->setChecked(false);
+ ui.pageNetGame->pGameCFG->GameSchemes->setModel(ammoSchemeModel);
if (hwnet)
{
--- a/QTfrontend/newnetclient.cpp Mon Mar 16 19:55:56 2009 +0000
+++ b/QTfrontend/newnetclient.cpp Mon Mar 16 20:55:10 2009 +0000
@@ -40,11 +40,17 @@
loginStep(0),
netClientState(0)
{
+// socket stuff
connect(&NetSocket, SIGNAL(readyRead()), this, SLOT(ClientRead()));
connect(&NetSocket, SIGNAL(connected()), this, SLOT(OnConnect()));
connect(&NetSocket, SIGNAL(disconnected()), this, SLOT(OnDisconnect()));
connect(&NetSocket, SIGNAL(error(QAbstractSocket::SocketError)), this,
SLOT(displayError(QAbstractSocket::SocketError)));
+
+// config stuff
+ connect(this, SIGNAL(paramChanged(const QString &, const QStringList &)), pGameCFGWidget, SLOT(setParam(const QString &, const QStringList &)));
+ connect(pGameCFGWidget, SIGNAL(paramChanged(const QString &, const QStringList &)), this, SLOT(onParamChanged(const QString &, const QStringList &)));
+ connect(this, SIGNAL(configAsked()), pGameCFGWidget, SLOT(fullNetConfig()));
}
HWNewNet::~HWNewNet()