QTfrontend/pages.cpp
changeset 1887 d68939b3f7f0
parent 1885 75489216b5b0
child 1889 b8590b604fdd
--- a/QTfrontend/pages.cpp	Thu Mar 12 13:55:47 2009 +0000
+++ b/QTfrontend/pages.cpp	Thu Mar 12 20:19:33 2009 +0000
@@ -896,6 +896,17 @@
 	pageLayout->addWidget(LE_name, 8, 1);
 
 	mapper = new QDataWidgetMapper(this);
+
+	BtnBack = addButton(":/res/Exit.png", pageLayout, 10, 0, true);
+	BtnSave = addButton(":/res/Save.png", pageLayout, 10, 2, true);
+
+	connect(BtnSave, SIGNAL(clicked()), mapper, SLOT(toFirst()));
+}
+
+void PageScheme::setModel(QAbstractItemModel * model)
+{
+	mapper->setModel(model);
+	
 	mapper->addMapping(LE_name, 0);
 	mapper->addMapping(CB_mode_Forts, 1);
 	mapper->addMapping(CB_teamsDivide, 2);
@@ -905,4 +916,6 @@
 	mapper->addMapping(SB_InitHealth, 6);
 	mapper->addMapping(SB_SuddenDeath, 7);
 	mapper->addMapping(SB_CaseProb, 8);
+
+	mapper->toFirst();
 }