QTfrontend/ui/page/pagescheme.cpp
changeset 15650 e63748a3aa52
parent 14860 e239378a9400
child 15666 3997d85b3d2e
equal deleted inserted replaced
15649:ea189ee9394f 15650:e63748a3aa52
   555 void PageScheme::connectSignals()
   555 void PageScheme::connectSignals()
   556 {
   556 {
   557     connect(BtnCopy, SIGNAL(clicked()), this, SLOT(copyRow()));
   557     connect(BtnCopy, SIGNAL(clicked()), this, SLOT(copyRow()));
   558     connect(BtnNew, SIGNAL(clicked()), this, SLOT(newRow()));
   558     connect(BtnNew, SIGNAL(clicked()), this, SLOT(newRow()));
   559     connect(BtnDelete, SIGNAL(clicked()), this, SLOT(deleteRow()));
   559     connect(BtnDelete, SIGNAL(clicked()), this, SLOT(deleteRow()));
       
   560     connect(CB_WorldEdge, SIGNAL(currentIndexChanged(int)), this, SLOT(worldEdgeChanged(int)));
   560     mapper = new QDataWidgetMapper(this);
   561     mapper = new QDataWidgetMapper(this);
   561     connect(selectScheme, SIGNAL(currentIndexChanged(int)), mapper, SLOT(setCurrentIndex(int)));
   562     connect(selectScheme, SIGNAL(currentIndexChanged(int)), mapper, SLOT(setCurrentIndex(int)));
   562     connect(selectScheme, SIGNAL(currentIndexChanged(int)), this, SLOT(schemeSelected(int)));
   563     connect(selectScheme, SIGNAL(currentIndexChanged(int)), this, SLOT(schemeSelected(int)));
   563 }
   564 }
   564 
   565 
   682     if(topLeft.column() == 0) {
   683     if(topLeft.column() == 0) {
   683         checkDupe();
   684         checkDupe();
   684     };
   685     };
   685 }
   686 }
   686 
   687 
       
   688 void PageScheme::worldEdgeChanged(int n)
       
   689 {
       
   690     if (mapper->itemDelegate()) 
       
   691     {
       
   692         mapper->itemDelegate()->commitData(CB_WorldEdge);
       
   693     }    
       
   694 }
       
   695 
   687 void PageScheme::schemeSelected(int n)
   696 void PageScheme::schemeSelected(int n)
   688 {
   697 {
   689     int c = ((GameSchemeModel*)mapper->model())->numberOfDefaultSchemes;
   698     int c = ((GameSchemeModel*)mapper->model())->numberOfDefaultSchemes;
   690     gbGameModes->setEnabled(n >= c);
   699     gbGameModes->setEnabled(n >= c);
   691     gbBasicSettings->setEnabled(n >= c);
   700     gbBasicSettings->setEnabled(n >= c);