QTfrontend/pages.cpp
changeset 1984 955b049eb099
parent 1977 2284d7fefe4f
child 2017 7845c77c8d31
--- a/QTfrontend/pages.cpp	Mon Apr 13 12:17:40 2009 +0000
+++ b/QTfrontend/pages.cpp	Mon Apr 13 12:23:29 2009 +0000
@@ -863,8 +863,8 @@
 
 	pageLayout->addWidget(gb, 1,0,13,4);
 	
-	QGroupBox * gbGameModes = new QGroupBox(QGroupBox::tr("Game Modifiers"), gb);
-	QGroupBox * gbBasicSettings = new QGroupBox(QGroupBox::tr("Basic Settings"), gb);
+	gbGameModes = new QGroupBox(QGroupBox::tr("Game Modifiers"), gb);
+	gbBasicSettings = new QGroupBox(QGroupBox::tr("Basic Settings"), gb);
 
 	gbGameModes->setStyleSheet(".QGroupBox {"
 			"background-color: #130f2c; background-image:url();"
@@ -1014,6 +1014,7 @@
 	connect(BtnNew, SIGNAL(clicked()), this, SLOT(newRow()));
 	connect(BtnDelete, SIGNAL(clicked()), this, SLOT(deleteRow()));
 	connect(selectScheme, SIGNAL(currentIndexChanged(int)), mapper, SLOT(setCurrentIndex(int)));
+	connect(selectScheme, SIGNAL(currentIndexChanged(int)), this, SLOT(schemeSelected(int)));
 }
 
 void PageScheme::setModel(QAbstractItemModel * model)
@@ -1052,6 +1053,13 @@
 	model->removeRow(selectScheme->currentIndex());
 }
 
+void PageScheme::schemeSelected(int n)
+{
+	gbGameModes->setEnabled(n >= 4); // FIXME: derive number from model
+	gbBasicSettings->setEnabled(n >= 4);
+	LE_name->setEnabled(n >= 4);
+}
+
 /////////////////////////////////////////////////
 
 PageAdmin::PageAdmin(QWidget* parent) :