a Henek-koda production: nicer game config screen, fixed scheme-weapon lock, added scheme editing to config page and some minor stuff
authorHenek
Mon, 22 Nov 2010 00:34:53 +0100
changeset 4410 f9e38ce1e813
parent 4409 a752e543d7b4
child 4411 79fbc444584c
a Henek-koda production: nicer game config screen, fixed scheme-weapon lock, added scheme editing to config page and some minor stuff
QTfrontend/CMakeLists.txt
QTfrontend/ammoSchemeModel.h
QTfrontend/gamecfgwidget.cpp
QTfrontend/gamecfgwidget.h
QTfrontend/hedgewars.qrc
QTfrontend/hwform.cpp
QTfrontend/hwform.h
QTfrontend/pages.cpp
QTfrontend/pages.h
QTfrontend/predefteams.h
QTfrontend/res/lock.png
QTfrontend/res/unlock.png
QTfrontend/teamselect.cpp
QTfrontend/teamselect.h
--- a/QTfrontend/CMakeLists.txt	Sun Nov 21 18:12:20 2010 -0500
+++ b/QTfrontend/CMakeLists.txt	Mon Nov 22 00:34:53 2010 +0100
@@ -150,7 +150,6 @@
 set(	hwfr_hdrs
 	binds.h
 	ui_hwform.h
-	predefteams.h
 	KB.h
 	hwconsts.h
 	)
--- a/QTfrontend/ammoSchemeModel.h	Sun Nov 21 18:12:20 2010 -0500
+++ b/QTfrontend/ammoSchemeModel.h	Mon Nov 22 00:34:53 2010 +0100
@@ -42,6 +42,7 @@
 
     int numberOfDefaultSchemes;
     QStringList predefSchemesNames;
+    QStringList spNames;
 
 public slots:
     void Save();
@@ -54,8 +55,6 @@
 
 private:
     QSettings fileConfig;
-
-    QStringList spNames;
 };
 
 class NetAmmoSchemeModel : public QAbstractTableModel
--- a/QTfrontend/gamecfgwidget.cpp	Sun Nov 21 18:12:20 2010 -0500
+++ b/QTfrontend/gamecfgwidget.cpp	Mon Nov 22 00:34:53 2010 +0100
@@ -47,7 +47,7 @@
     QGridLayout *GBoxOptionsLayout = new QGridLayout(GBoxOptions);
 
     GameSchemes = new QComboBox(GBoxOptions);
-    GBoxOptionsLayout->addWidget(GameSchemes, 0, 1);
+    GBoxOptionsLayout->addWidget(GameSchemes, 0, 2);
     connect(GameSchemes, SIGNAL(currentIndexChanged(int)), this, SLOT(schemeChanged(int)));
 
     GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Game scheme"), GBoxOptions), 0, 0);
@@ -59,13 +59,13 @@
     goToSchemePage->setIconSize(pmEdit.size());
     goToSchemePage->setIcon(pmEdit);
     goToSchemePage->setMaximumWidth(pmEdit.width() + 6);
-    GBoxOptionsLayout->addWidget(goToSchemePage, 0, 2);
-    connect(goToSchemePage, SIGNAL(clicked()), this, SIGNAL(goToSchemes()));
+    GBoxOptionsLayout->addWidget(goToSchemePage, 0, 3);
+    connect(goToSchemePage, SIGNAL(clicked()), this, SLOT(jumpToSchemes()));
 
     GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Weapons"), GBoxOptions), 1, 0);
 
     WeaponsName = new QComboBox(GBoxOptions);
-    GBoxOptionsLayout->addWidget(WeaponsName, 1, 1);
+    GBoxOptionsLayout->addWidget(WeaponsName, 1, 2);
 
     connect(WeaponsName, SIGNAL(currentIndexChanged(int)), this, SLOT(ammoChanged(int)));
 
@@ -74,16 +74,19 @@
     goToWeaponPage->setIconSize(pmEdit.size());
     goToWeaponPage->setIcon(pmEdit);
     goToWeaponPage->setMaximumWidth(pmEdit.width() + 6);
-    GBoxOptionsLayout->addWidget(goToWeaponPage, 1, 2);
-
+    GBoxOptionsLayout->addWidget(goToWeaponPage, 1, 3);
     connect(goToWeaponPage, SIGNAL(clicked()), this, SLOT(jumpToWeapons()));
 
-    GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Bind schemes and weapons"), GBoxOptions), 2, 0);
+    //GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Bind schemes with weapons"), GBoxOptions), 2, 0);
 
     bindEntries = new QCheckBox(GBoxOptions);
-    bindEntries->setToolTip(tr("When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)"));
+    bindEntries->setToolTip(tr("When this option is enabled selecting a game scheme will auto-select a weapon"));
     bindEntries->setChecked(true);
-    GBoxOptionsLayout->addWidget(bindEntries, 2, 2);
+    bindEntries->setMaximumWidth(42);
+    bindEntries->setStyleSheet( "QCheckBox::indicator:checked   { image: url(\":/res/lock.png\"); }"
+                                "QCheckBox::indicator:unchecked { image: url(\":/res/unlock.png\");   }" );
+    GBoxOptionsLayout->addWidget(bindEntries, 0, 1, 0, 1, Qt::AlignVCenter);
+    //GBoxOptionsLayout->addWidget(bindEntries, 2, 2);
 
     connect(pMapContainer, SIGNAL(seedChanged(const QString &)), this, SLOT(seedChanged(const QString &)));
     connect(pMapContainer, SIGNAL(mapChanged(const QString &)), this, SLOT(mapChanged(const QString &)));
@@ -93,6 +96,11 @@
     connect(pMapContainer, SIGNAL(newTemplateFilter(int)), this, SLOT(templateFilterChanged(int)));
 }
 
+void GameCFGWidget::jumpToSchemes()
+{
+    emit goToSchemes(GameSchemes->currentIndex());
+}
+
 void GameCFGWidget::jumpToWeapons()
 {
     emit goToWeapons(WeaponsName->currentText());
@@ -280,17 +288,6 @@
             "AMMO",
             QStringList() << WeaponsName->itemText(index) << WeaponsName->itemData(index).toString()
         );
-        if (bindEntries->isChecked() == true) {
-            QString weapName = WeaponsName->itemText(index);
-            for (int i = 0; i < GameSchemes->count(); i++) {
-                 QString schemeName = GameSchemes->itemText(i);
-                 int res = QString::compare(weapName, schemeName, Qt::CaseSensitive);
-                 if (0 == res) {
-                     GameSchemes->setCurrentIndex(i);
-                     break;
-                 }
-            }
-        }
     }
 }
 
@@ -345,6 +342,7 @@
              int res = QString::compare(weapName, schemeName, Qt::CaseSensitive);
              if (0 == res) {
                  WeaponsName->setCurrentIndex(i);
+                 emit ammoChanged(i);
                  break;
              }
         }
--- a/QTfrontend/gamecfgwidget.h	Sun Nov 21 18:12:20 2010 -0500
+++ b/QTfrontend/gamecfgwidget.h	Mon Nov 22 00:34:53 2010 +0100
@@ -53,7 +53,7 @@
 
 signals:
     void paramChanged(const QString & param, const QStringList & value);
-    void goToSchemes();
+    void goToSchemes(int);
     void goToWeapons(const QString & name);
 
 private slots:
@@ -63,6 +63,7 @@
     void seedChanged(const QString &);
     void themeChanged(const QString &);
     void schemeChanged(int);
+    void jumpToSchemes();
     void jumpToWeapons();
     void mapgenChanged(MapGenerator m);
     void maze_sizeChanged(int s);
--- a/QTfrontend/hedgewars.qrc	Sun Nov 21 18:12:20 2010 -0500
+++ b/QTfrontend/hedgewars.qrc	Mon Nov 22 00:34:53 2010 +0100
@@ -103,6 +103,8 @@
     <file>res/follow.png</file>
     <file>res/info.png</file>
     <file>res/kick.png</file>
+    <file>res/lock.png</file>
+    <file>res/unlock.png</file>
     <file>res/StatsMedal1.png</file>
     <file>res/StatsMedal2.png</file>
     <file>res/StatsMedal3.png</file>
--- a/QTfrontend/hwform.cpp	Sun Nov 21 18:12:20 2010 -0500
+++ b/QTfrontend/hwform.cpp	Mon Nov 22 00:34:53 2010 +0100
@@ -127,8 +127,8 @@
     connect(ui.pageMultiplayer->BtnStartMPGame, SIGNAL(clicked()), this, SLOT(StartMPGame()));
     connect(ui.pageMultiplayer->teamsSelect, SIGNAL(setEnabledGameStart(bool)),
         ui.pageMultiplayer->BtnStartMPGame, SLOT(setEnabled(bool)));
-    connect(ui.pageMultiplayer->teamsSelect, SIGNAL(SetupClicked()), this, SLOT(IntermediateSetup()));
-    connect(ui.pageMultiplayer->gameCFG, SIGNAL(goToSchemes()), this, SLOT(GoToSchemes()));
+    connect(ui.pageMultiplayer, SIGNAL(SetupClicked()), this, SLOT(IntermediateSetup()));
+    connect(ui.pageMultiplayer->gameCFG, SIGNAL(goToSchemes(int)), this, SLOT(GoToScheme(int)));
     connect(ui.pageMultiplayer->gameCFG, SIGNAL(goToWeapons(const QString &)), this, SLOT(GoToSelectWeaponSet(const QString &)));
 
     connect(ui.pagePlayDemo->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
@@ -146,7 +146,9 @@
 #endif
 
     connect(ui.pageOptions->WeaponEdit, SIGNAL(clicked()), this, SLOT(GoToSelectWeapon()));
-    connect(ui.pageOptions->WeaponsButt, SIGNAL(clicked()), this, SLOT(GoToSelectNewWeapon()));
+    connect(ui.pageOptions->WeaponNew, SIGNAL(clicked()), this, SLOT(GoToSelectNewWeapon()));
+    connect(ui.pageOptions->SchemeEdit, SIGNAL(clicked()), this, SLOT(GoToEditScheme()));
+    connect(ui.pageOptions->SchemeNew, SIGNAL(clicked()), this, SLOT(GoToNewScheme()));
     connect(ui.pageSelectWeapon->pWeapons, SIGNAL(weaponsChanged()), this, SLOT(UpdateWeapons()));
 
     connect(ui.pageNet->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
@@ -162,8 +164,8 @@
         ui.pageNetGame->BtnGo, SLOT(setEnabled(bool)));
     connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(setEnabledGameStart(bool)),
         ui.pageNetGame->BtnStart, SLOT(setEnabled(bool)));
-    connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(SetupClicked()), this, SLOT(IntermediateSetup()));
-    connect(ui.pageNetGame->pGameCFG, SIGNAL(goToSchemes()), this, SLOT(GoToSchemes()));
+    connect(ui.pageNetGame, SIGNAL(SetupClicked()), this, SLOT(IntermediateSetup()));
+    connect(ui.pageNetGame->pGameCFG, SIGNAL(goToSchemes(int)), this, SLOT(GoToScheme(int)));
     connect(ui.pageNetGame->pGameCFG, SIGNAL(goToWeapons(const QString &)), this, SLOT(GoToSelectWeaponSet(const QString &)));
 
     connect(ui.pageRoomsList->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
@@ -209,6 +211,7 @@
     ammoSchemeModel = new AmmoSchemeModel(this, cfgdir->absolutePath() + "/schemes.ini");
     ui.pageScheme->setModel(ammoSchemeModel);
     ui.pageMultiplayer->gameCFG->GameSchemes->setModel(ammoSchemeModel);
+    ui.pageOptions->SchemesName->setModel(ammoSchemeModel);
 
     wBackground = NULL;
     if (config->isFrontendEffects()) {
@@ -420,8 +423,21 @@
     GoToPage(ID_PAGE_NETSERVER);
 }
 
-void HWForm::GoToSchemes()
+void HWForm::GoToScheme(int index)
+{
+    ui.pageScheme->selectScheme->setCurrentIndex(index);
+    GoToPage(ID_PAGE_SCHEME);
+}
+
+void HWForm::GoToNewScheme()
 {
+    ui.pageScheme->newRow();
+    GoToPage(ID_PAGE_SCHEME);
+}
+
+void HWForm::GoToEditScheme()
+{
+    ui.pageScheme->selectScheme->setCurrentIndex(ui.pageOptions->SchemesName->currentIndex());
     GoToPage(ID_PAGE_SCHEME);
 }
 
--- a/QTfrontend/hwform.h	Sun Nov 21 18:12:20 2010 -0500
+++ b/QTfrontend/hwform.h	Mon Nov 22 00:34:53 2010 +0100
@@ -74,7 +74,9 @@
     void GoToSelectWeaponSet(const QString & name);
     void GoToSelectNewWeapon();
     void GoToNetServer();
-    void GoToSchemes();
+    void GoToScheme(int index);
+    void GoToEditScheme();
+    void GoToNewScheme();
     void GoToAdmin();
     void GoToPage(quint8 id);
     void GoBack();
--- a/QTfrontend/pages.cpp	Sun Nov 21 18:12:20 2010 -0500
+++ b/QTfrontend/pages.cpp	Mon Nov 22 00:34:53 2010 +0100
@@ -440,17 +440,22 @@
 {
     QGridLayout * pageLayout = new QGridLayout(this);
 
-    BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true);
+    BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true);
 
     gameCFG = new GameCFGWidget(this);
     pageLayout->addWidget(gameCFG, 0, 0, 1, 2);
 
-    pageLayout->setRowStretch(1, 1);
+    QPushButton * btnSetup = new QPushButton(this);
+    btnSetup->setText(QPushButton::tr("Setup"));
+    connect(btnSetup, SIGNAL(clicked()), this, SIGNAL(SetupClicked()));
+    pageLayout->addWidget(btnSetup, 1, 0, 1, 2);
+
+    pageLayout->setRowStretch(2, 1);
 
     teamsSelect = new TeamSelWidget(this);
-    pageLayout->addWidget(teamsSelect, 0, 2, 2, 2);
+    pageLayout->addWidget(teamsSelect, 0, 2, 3, 2);
 
-    BtnStartMPGame = addButton(tr("Start"), pageLayout, 2, 3);
+    BtnStartMPGame = addButton(tr("Start"), pageLayout, 3, 3);
 }
 
 PageOptions::PageOptions(QWidget* parent) :
@@ -522,45 +527,78 @@
         }
 
         {
-            // TODO: This box should contain controls for all schemes: game modes and weapons
-
             IconedGroupBox* groupWeapons = new IconedGroupBox(this);
+            
             //groupWeapons->setContentTopPadding(0);
             //groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
             groupWeapons->setIcon(QIcon(":/res/weaponsicon.png"));
             groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
-            groupWeapons->setTitle(QGroupBox::tr("Weapons"));
+            groupWeapons->setTitle(QGroupBox::tr("Schemes and Weapons"));
             QGridLayout * WeaponsLayout = new QGridLayout(groupWeapons);
 
+            QLabel* SchemeLabel = new QLabel(groupWeapons);
+            SchemeLabel->setText(QLabel::tr("Game scheme"));
+            WeaponsLayout->addWidget(SchemeLabel, 1, 0);
+
+            SchemesName = new QComboBox(groupWeapons);
+            WeaponsLayout->addWidget(SchemesName, 1, 1);
+
+            SchemeNew = new QPushButton(groupWeapons);
+            SchemeNew->setToolTip(tr("New scheme"));
+            SchemeNew->setIconSize(pmNew.size());
+            SchemeNew->setIcon(pmNew);
+            SchemeNew->setMaximumWidth(pmNew.width() + 6);
+            WeaponsLayout->addWidget(SchemeNew, 1, 2);
+
+            SchemeEdit = new QPushButton(groupWeapons);
+            SchemeEdit->setToolTip(tr("Edit scheme"));
+            SchemeEdit->setIconSize(pmEdit.size());
+            SchemeEdit->setIcon(pmEdit);
+            SchemeEdit->setMaximumWidth(pmEdit.width() + 6);
+            WeaponsLayout->addWidget(SchemeEdit, 1, 3);
+
+            SchemeDelete = new QPushButton(groupWeapons);
+            SchemeDelete->setToolTip(tr("Delete scheme"));
+            SchemeDelete->setIconSize(pmDelete.size());
+            SchemeDelete->setIcon(pmDelete);
+            SchemeDelete->setMaximumWidth(pmDelete.width() + 6);
+            SchemeDelete->setEnabled(false);
+            SchemeDelete->setVisible(false); // hide for now
+            WeaponsLayout->addWidget(SchemeDelete, 1, 4);
+
+            QLabel* WeaponLabel = new QLabel(groupWeapons);
+            WeaponLabel->setText(QLabel::tr("Weapons"));
+            WeaponsLayout->addWidget(WeaponLabel, 2, 0);
+
             WeaponsName = new QComboBox(groupWeapons);
-            WeaponsLayout->addWidget(WeaponsName, 0, 0);
+            WeaponsLayout->addWidget(WeaponsName, 2, 1);
 
-            WeaponsButt = new QPushButton(groupWeapons);
-            WeaponsButt->setToolTip(tr("New weapon scheme"));
-            WeaponsButt->setIconSize(pmNew.size());
-            WeaponsButt->setIcon(pmNew);
-            WeaponsButt->setMaximumWidth(pmNew.width() + 6);
-            WeaponsLayout->addWidget(WeaponsButt, 0, 1);
+            WeaponNew = new QPushButton(groupWeapons);
+            WeaponNew->setToolTip(tr("New weapon set"));
+            WeaponNew->setIconSize(pmNew.size());
+            WeaponNew->setIcon(pmNew);
+            WeaponNew->setMaximumWidth(pmNew.width() + 6);
+            WeaponsLayout->addWidget(WeaponNew, 2, 2);
 
             WeaponEdit = new QPushButton(groupWeapons);
-            WeaponEdit->setToolTip(tr("Edit weapon scheme"));
+            WeaponEdit->setToolTip(tr("Edit weapon set"));
             WeaponEdit->setIconSize(pmEdit.size());
             WeaponEdit->setIcon(pmEdit);
             WeaponEdit->setMaximumWidth(pmEdit.width() + 6);
-            WeaponsLayout->addWidget(WeaponEdit, 0, 2);
+            WeaponsLayout->addWidget(WeaponEdit, 2, 3);
 
             WeaponDelete = new QPushButton(groupWeapons);
-            WeaponDelete->setToolTip(tr("Delete weapon scheme"));
+            WeaponDelete->setToolTip(tr("Delete weapon set"));
             WeaponDelete->setIconSize(pmDelete.size());
             WeaponDelete->setIcon(pmDelete);
             WeaponDelete->setMaximumWidth(pmDelete.width() + 6);
             WeaponDelete->setEnabled(false);
             WeaponDelete->setVisible(false); // hide for now
-            WeaponsLayout->addWidget(WeaponDelete, 0, 3);
+            WeaponsLayout->addWidget(WeaponDelete, 2, 4);
 
             WeaponTooltip = new QCheckBox(this);
             WeaponTooltip->setText(QCheckBox::tr("Show ammo menu tooltips"));
-            WeaponsLayout->addWidget(WeaponTooltip, 1, 0, 1, 3);
+            WeaponsLayout->addWidget(WeaponTooltip, 3, 0, 1, 4);
 
             gbTBLayout->addWidget(groupWeapons, 1, 0);
         }
@@ -730,7 +768,7 @@
             hr->setFixedHeight(10);
             GBAlayout->addWidget(hr);
 
-                QLabel *restartNote = new QLabel(this);
+            QLabel *restartNote = new QLabel(this);
             restartNote->setText(QString("* ") + QLabel::tr("Restart game to apply"));
             restartNote->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
             GBAlayout->addWidget(restartNote);
@@ -895,19 +933,24 @@
     // chatwidget
     pChatWidget = new HWChatWidget(this, gameSettings, sdli, true);
     pChatWidget->setShowReady(true); // show status bulbs by default
-    pageLayout->addWidget(pChatWidget, 1, 0, 1, 2);
+    pageLayout->addWidget(pChatWidget, 2, 0, 1, 2);
     pageLayout->setRowStretch(1, 100);
 
     pGameCFG = new GameCFGWidget(this);
     pageLayout->addWidget(pGameCFG, 0, 0);
 
+    QPushButton * btnSetup = new QPushButton(this);
+    btnSetup->setText(QPushButton::tr("Setup"));
+    connect(btnSetup, SIGNAL(clicked()), this, SIGNAL(SetupClicked()));
+    pageLayout->addWidget(btnSetup, 1, 0);
+
     pNetTeamsWidget = new TeamSelWidget(this);
     pNetTeamsWidget->setAcceptOuter(true);
-    pageLayout->addWidget(pNetTeamsWidget, 0, 1);
+    pageLayout->addWidget(pNetTeamsWidget, 0, 1, 2, 1);
 
 
     QHBoxLayout * bottomLayout = new QHBoxLayout;
-    pageLayout->addLayout(bottomLayout, 3, 0, 1, 2);
+    pageLayout->addLayout(bottomLayout, 4, 0, 1, 2);
 
     BtnBack = addButton(":/res/Exit.png", bottomLayout, 0, true);
 
@@ -1658,31 +1701,31 @@
     glBSLayout->addWidget(SB_HealthDecrease,5,2,1,1);
 
     l = new QLabel(gbBasicSettings);
-    l->setText(QLabel::tr("Crate Drops"));
+    l->setText(QLabel::tr("% Rope Length"));
     l->setWordWrap(true);
     glBSLayout->addWidget(l,6,0,1,1);
     l = new QLabel(gbBasicSettings);
     l->setFixedSize(32,32);
-    l->setPixmap(QPixmap(":/res/iconBox.png"));
+    l->setPixmap(QPixmap(":/res/iconRope.png"));
     glBSLayout->addWidget(l,6,1,1,1);
-    SB_CaseProb = new FreqSpinBox(gbBasicSettings);
-    SB_CaseProb->setRange(0, 9);
-    SB_CaseProb->setValue(5);
-    glBSLayout->addWidget(SB_CaseProb,6,2,1,1);
+    SB_RopeModifier = new QSpinBox(gbBasicSettings);
+    SB_RopeModifier->setRange(25, 999);
+    SB_RopeModifier->setValue(100);
+    SB_RopeModifier->setSingleStep(25);
+    glBSLayout->addWidget(SB_RopeModifier,6,2,1,1);
 
     l = new QLabel(gbBasicSettings);
-    l->setText(QLabel::tr("% Rope Length"));
+    l->setText(QLabel::tr("Crate Drops"));
     l->setWordWrap(true);
     glBSLayout->addWidget(l,7,0,1,1);
     l = new QLabel(gbBasicSettings);
     l->setFixedSize(32,32);
-    l->setPixmap(QPixmap(":/res/iconRope.png"));
+    l->setPixmap(QPixmap(":/res/iconBox.png"));
     glBSLayout->addWidget(l,7,1,1,1);
-    SB_RopeModifier = new QSpinBox(gbBasicSettings);
-    SB_RopeModifier->setRange(25, 999);
-    SB_RopeModifier->setValue(100);
-    SB_RopeModifier->setSingleStep(25);
-    glBSLayout->addWidget(SB_RopeModifier,7,2,1,1);
+    SB_CaseProb = new FreqSpinBox(gbBasicSettings);
+    SB_CaseProb->setRange(0, 9);
+    SB_CaseProb->setValue(5);
+    glBSLayout->addWidget(SB_CaseProb,7,2,1,1);
 
     l = new QLabel(gbBasicSettings);
     l->setText(QLabel::tr("% Health Crates"));
--- a/QTfrontend/pages.h	Sun Nov 21 18:12:20 2010 -0500
+++ b/QTfrontend/pages.h	Mon Nov 22 00:34:53 2010 +0100
@@ -196,6 +196,9 @@
     GameCFGWidget *gameCFG;
     TeamSelWidget *teamsSelect;
     QPushButton *BtnStartMPGame;
+
+signals:
+    void SetupClicked();
 };
 
 class PageOptions : public AbstractPage
@@ -205,11 +208,16 @@
 public:
     PageOptions(QWidget* parent = 0);
 
-    QPushButton *WeaponsButt;
+    QCheckBox *WeaponTooltip;
+    QPushButton *WeaponNew;
     QPushButton *WeaponEdit;
     QPushButton *WeaponDelete;
     QComboBox *WeaponsName;
-    QCheckBox *WeaponTooltip;
+    QPushButton *SchemeNew;
+    QPushButton *SchemeEdit;
+    QPushButton *SchemeDelete;
+    QComboBox *SchemesName;
+
     QComboBox *CBLanguage;
 
     QPushButton *BtnBack;
@@ -314,6 +322,9 @@
 public slots:
     void setReadyStatus(bool isReady);
     void setMasterMode(bool isMaster);
+
+signals:
+    void SetupClicked();
 };
 
 class PageInfo : public AbstractPage
@@ -455,9 +466,14 @@
     QPushButton * BtnNew;
     QPushButton * BtnDelete;
     QPushButton * BtnSave;
+    QComboBox * selectScheme;
 
     void setModel(QAbstractItemModel * model);
 
+public slots:
+    void newRow();
+    void deleteRow();
+
 private:
     QDataWidgetMapper * mapper;
     ToggleButtonWidget * TBW_mode_Forts;
@@ -499,15 +515,13 @@
     QSpinBox * SB_Explosives;
     QSpinBox * SB_RopeModifier;
     QLineEdit * LE_name;
-    QComboBox * selectScheme;
 
     QGroupBox * gbGameModes;
     QGroupBox * gbBasicSettings;
 
 private slots:
-    void newRow();
-    void deleteRow();
     void schemeSelected(int);
+
 };
 
 class PageAdmin : public AbstractPage
--- a/QTfrontend/predefteams.h	Sun Nov 21 18:12:20 2010 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
- * Hedgewars, a free turn based strategy game
- * Copyright (c) 2006-2010 Andrey Korotaev <unC0Rr@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
-
-#ifndef PREDEFTEAMS_H
-#define PREDEFTEAMS_H
-
-#include <QtGlobal>
-
-#define PREDEFTEAMS_COUNT 3
-/*
-struct PredefinedTeam
-{
-    const char * TeamName;
-    const char * hh0name;
-    const char * hh1name;
-    const char * hh2name;
-    const char * hh3name;
-    const char * hh4name;
-    const char * hh5name;
-    const char * hh6name;
-    const char * hh7name;
-    const char * hh0hat;
-    const char * hh1hat;
-    const char * hh2hat;
-    const char * hh3hat;
-    const char * hh4hat;
-    const char * hh5hat;
-    const char * hh6hat;
-    const char * hh7hat;
-    QString Grave;
-    QString Fort;
-};
-
-
-const PredefinedTeam pteams[PREDEFTEAMS_COUNT] =
-{
-    {
-        QT_TRANSLATE_NOOP("teams", "Hedgehogs"),
-        QT_TRANSLATE_NOOP("teams", "hedgehog 1"),
-        QT_TRANSLATE_NOOP("teams", "hedgehog 2"),
-        QT_TRANSLATE_NOOP("teams", "hedgehog 3"),
-        QT_TRANSLATE_NOOP("teams", "hedgehog 4"),
-        QT_TRANSLATE_NOOP("teams", "hedgehog 5"),
-        QT_TRANSLATE_NOOP("teams", "hedgehog 6"),
-        QT_TRANSLATE_NOOP("teams", "hedgehog 7"),
-        QT_TRANSLATE_NOOP("teams", "hedgehog 8"),
-        "NoHat",
-        "NoHat",
-        "NoHat",
-        "NoHat",
-        "NoHat",
-        "NoHat",
-        "NoHat",
-        "NoHat",
-        "Simple", "Island"
-    },
-    {
-        QT_TRANSLATE_NOOP("teams", "Goddess"),
-        QT_TRANSLATE_NOOP("teams", "Isis"),
-        QT_TRANSLATE_NOOP("teams", "Astarte"),
-        QT_TRANSLATE_NOOP("teams", "Diana"),
-        QT_TRANSLATE_NOOP("teams", "Aphrodite"),
-        QT_TRANSLATE_NOOP("teams", "Hecate"),
-        QT_TRANSLATE_NOOP("teams", "Demeter"),
-        QT_TRANSLATE_NOOP("teams", "Kali"),
-        QT_TRANSLATE_NOOP("teams", "Inanna"),
-        "NoHat",
-        "NoHat",
-        "NoHat",
-        "NoHat",
-        "NoHat",
-        "NoHat",
-        "NoHat",
-        "NoHat",
-        "Bone", "Island"
-    },
-    {
-        QT_TRANSLATE_NOOP("teams", "Fruits"),
-        QT_TRANSLATE_NOOP("teams", "Banana"),
-        QT_TRANSLATE_NOOP("teams", "Apple"),
-        QT_TRANSLATE_NOOP("teams", "Orange"),
-        QT_TRANSLATE_NOOP("teams", "Lemon"),
-        QT_TRANSLATE_NOOP("teams", "Pineapple"),
-        QT_TRANSLATE_NOOP("teams", "Mango"),
-        QT_TRANSLATE_NOOP("teams", "Peach"),
-        QT_TRANSLATE_NOOP("teams", "Plum"),
-        "banana",
-        "apple",
-        "orange",
-        "lemon",
-        "NoHat",
-        "NoHat",
-        "NoHat",
-        "NoHat",
-        "coffin", "Barrelhouse"
-    }
-};
-*/
-#endif // PREDEFTEAMS_H
Binary file QTfrontend/res/lock.png has changed
Binary file QTfrontend/res/unlock.png has changed
--- a/QTfrontend/teamselect.cpp	Sun Nov 21 18:12:20 2010 -0500
+++ b/QTfrontend/teamselect.cpp	Mon Nov 22 00:34:53 2010 +0100
@@ -233,10 +233,6 @@
     p.setColor(QPalette::Window, QColor(0x00, 0x00, 0x00));
     addScrArea(framePlaying, p.color(QPalette::Window).light(105), 250);
     addScrArea(frameDontPlaying, p.color(QPalette::Window).dark(105), 0);
-    QPushButton * btnSetup = new QPushButton(this);
-    btnSetup->setText(QPushButton::tr("Setup"));
-    connect(btnSetup, SIGNAL(clicked()), this, SIGNAL(SetupClicked()));
-    mainLayout.addWidget(btnSetup);
 }
 
 void TeamSelWidget::setAcceptOuter(bool acceptOuter)
--- a/QTfrontend/teamselect.h	Sun Nov 21 18:12:20 2010 -0500
+++ b/QTfrontend/teamselect.h	Mon Nov 22 00:34:53 2010 +0100
@@ -56,7 +56,6 @@
 
  signals:
   void setEnabledGameStart(bool);
-  void SetupClicked();
   void teamWillPlay(HWTeam team);
   void teamNotPlaying(const HWTeam& team);
   void hhogsNumChanged(const HWTeam&);