equal
deleted
inserted
replaced
25 #include <QLineEdit> |
25 #include <QLineEdit> |
26 #include <QMessageBox> |
26 #include <QMessageBox> |
27 #include <QDataWidgetMapper> |
27 #include <QDataWidgetMapper> |
28 #include <QSpinBox> |
28 #include <QSpinBox> |
29 |
29 |
30 #include "ammoSchemeModel.h" |
30 #include "gameSchemeModel.h" |
31 #include "pagescheme.h" |
31 #include "pagescheme.h" |
32 #include "FreqSpinBox.h" |
32 #include "FreqSpinBox.h" |
33 #include "MinesTimeSpinBox.h" |
33 #include "MinesTimeSpinBox.h" |
34 |
34 |
35 |
35 |
606 selectScheme->setCurrentIndex(model->rowCount() - 1); |
606 selectScheme->setCurrentIndex(model->rowCount() - 1); |
607 } |
607 } |
608 |
608 |
609 void PageScheme::deleteRow() |
609 void PageScheme::deleteRow() |
610 { |
610 { |
611 int numberOfDefaultSchemes = ((AmmoSchemeModel*)mapper->model())->numberOfDefaultSchemes; |
611 int numberOfDefaultSchemes = ((GameSchemeModel*)mapper->model())->numberOfDefaultSchemes; |
612 if (selectScheme->currentIndex() < numberOfDefaultSchemes) |
612 if (selectScheme->currentIndex() < numberOfDefaultSchemes) |
613 { |
613 { |
614 QMessageBox deniedMsg(this); |
614 QMessageBox deniedMsg(this); |
615 deniedMsg.setIcon(QMessageBox::Warning); |
615 deniedMsg.setIcon(QMessageBox::Warning); |
616 deniedMsg.setWindowTitle(QMessageBox::tr("Schemes - Warning")); |
616 deniedMsg.setWindowTitle(QMessageBox::tr("Schemes - Warning")); |
635 } |
635 } |
636 } |
636 } |
637 |
637 |
638 void PageScheme::schemeSelected(int n) |
638 void PageScheme::schemeSelected(int n) |
639 { |
639 { |
640 int c = ((AmmoSchemeModel*)mapper->model())->numberOfDefaultSchemes; |
640 int c = ((GameSchemeModel*)mapper->model())->numberOfDefaultSchemes; |
641 gbGameModes->setEnabled(n >= c); |
641 gbGameModes->setEnabled(n >= c); |
642 gbBasicSettings->setEnabled(n >= c); |
642 gbBasicSettings->setEnabled(n >= c); |
643 LE_name->setEnabled(n >= c); |
643 LE_name->setEnabled(n >= c); |
644 } |
644 } |
645 |
645 |