QTfrontend/pages.cpp
changeset 1887 d68939b3f7f0
parent 1885 75489216b5b0
child 1889 b8590b604fdd
equal deleted inserted replaced
1886:0bb8f61e5630 1887:d68939b3f7f0
   894 	pageLayout->addWidget(SB_SuddenDeath, 6, 1);
   894 	pageLayout->addWidget(SB_SuddenDeath, 6, 1);
   895 	pageLayout->addWidget(SB_CaseProb, 7, 1);
   895 	pageLayout->addWidget(SB_CaseProb, 7, 1);
   896 	pageLayout->addWidget(LE_name, 8, 1);
   896 	pageLayout->addWidget(LE_name, 8, 1);
   897 
   897 
   898 	mapper = new QDataWidgetMapper(this);
   898 	mapper = new QDataWidgetMapper(this);
       
   899 
       
   900 	BtnBack = addButton(":/res/Exit.png", pageLayout, 10, 0, true);
       
   901 	BtnSave = addButton(":/res/Save.png", pageLayout, 10, 2, true);
       
   902 
       
   903 	connect(BtnSave, SIGNAL(clicked()), mapper, SLOT(toFirst()));
       
   904 }
       
   905 
       
   906 void PageScheme::setModel(QAbstractItemModel * model)
       
   907 {
       
   908 	mapper->setModel(model);
       
   909 	
   899 	mapper->addMapping(LE_name, 0);
   910 	mapper->addMapping(LE_name, 0);
   900 	mapper->addMapping(CB_mode_Forts, 1);
   911 	mapper->addMapping(CB_mode_Forts, 1);
   901 	mapper->addMapping(CB_teamsDivide, 2);
   912 	mapper->addMapping(CB_teamsDivide, 2);
   902 	mapper->addMapping(CB_solid, 3);
   913 	mapper->addMapping(CB_solid, 3);
   903 	mapper->addMapping(CB_border, 4);
   914 	mapper->addMapping(CB_border, 4);
   904 	mapper->addMapping(SB_TurnTime, 5);
   915 	mapper->addMapping(SB_TurnTime, 5);
   905 	mapper->addMapping(SB_InitHealth, 6);
   916 	mapper->addMapping(SB_InitHealth, 6);
   906 	mapper->addMapping(SB_SuddenDeath, 7);
   917 	mapper->addMapping(SB_SuddenDeath, 7);
   907 	mapper->addMapping(SB_CaseProb, 8);
   918 	mapper->addMapping(SB_CaseProb, 8);
   908 }
   919 
       
   920 	mapper->toFirst();
       
   921 }