QTfrontend/ammoSchemeModel.cpp
changeset 2726 a84fc5113d01
parent 2703 fbde0d971ba6
child 2762 2fbc8d35eb52
equal deleted inserted replaced
2725:89908847b155 2726:a84fc5113d01
    34 		<< QVariant(true)          // add mines      8
    34 		<< QVariant(true)          // add mines      8
    35 		<< QVariant(false)         // vampiric       9
    35 		<< QVariant(false)         // vampiric       9
    36 		<< QVariant(false)         // karma          10
    36 		<< QVariant(false)         // karma          10
    37 		<< QVariant(false)         // artillery      11
    37 		<< QVariant(false)         // artillery      11
    38 		<< QVariant(true)          // random order   12
    38 		<< QVariant(true)          // random order   12
    39 		<< QVariant(100)           // damage modfier 13
    39 		<< QVariant(false)         // king           13
    40 		<< QVariant(45)            // turn time      14
    40 		<< QVariant(100)           // damage modfier 14
    41 		<< QVariant(100)           // init health    15
    41 		<< QVariant(45)            // turn time      15
    42 		<< QVariant(15)            // sudden death   16
    42 		<< QVariant(100)           // init health    16
    43 		<< QVariant(5)             // case prob      17
    43 		<< QVariant(15)            // sudden death   17
    44 		<< QVariant(3)             //  mines time    18
    44 		<< QVariant(5)             // case prob      18
    45 		<< QVariant(4)             //  landadds      19
    45 		<< QVariant(3)             //  mines time    19
       
    46 		<< QVariant(4)             //  landadds      20
    46 		;
    47 		;
    47 
    48 
    48 AmmoSchemeModel::AmmoSchemeModel(QObject* parent, const QString & fileName) :
    49 AmmoSchemeModel::AmmoSchemeModel(QObject* parent, const QString & fileName) :
    49 	QAbstractTableModel(parent),
    50 	QAbstractTableModel(parent),
    50 	numberOfDefaultSchemes(4),
    51 	numberOfDefaultSchemes(4),
    70 		<< "mines"            //  8
    71 		<< "mines"            //  8
    71 		<< "vampiric"         //  9
    72 		<< "vampiric"         //  9
    72 		<< "karma"            // 10
    73 		<< "karma"            // 10
    73 		<< "artillery"        // 11
    74 		<< "artillery"        // 11
    74 		<< "randomorder"      // 12
    75 		<< "randomorder"      // 12
    75 		<< "damagefactor"     // 13
    76 		<< "king"             // 13
    76 		<< "turntime"         // 14
    77 		<< "damagefactor"     // 14
    77 		<< "health"           // 15
    78 		<< "turntime"         // 15
    78 		<< "suddendeath"      // 16
    79 		<< "health"           // 16
    79 		<< "caseprobability"  // 17
    80 		<< "suddendeath"      // 17
    80 		<< "minestime"        // 18
    81 		<< "caseprobability"  // 18
    81 		<< "landadds"         // 19
    82 		<< "minestime"        // 19
       
    83 		<< "landadds"         // 20
    82 		;
    84 		;
    83 
    85 
    84 	QList<QVariant> proMode;
    86 	QList<QVariant> proMode;
    85 	proMode
    87 	proMode
    86 		<< predefSchemesNames[1]   // name           0
    88 		<< predefSchemesNames[1]   // name           0
    94 		<< QVariant(false)         // add mines      8
    96 		<< QVariant(false)         // add mines      8
    95 		<< QVariant(false)         // vampiric       9
    97 		<< QVariant(false)         // vampiric       9
    96 		<< QVariant(false)         // karma          10
    98 		<< QVariant(false)         // karma          10
    97 		<< QVariant(false)         // artillery      11
    99 		<< QVariant(false)         // artillery      11
    98 		<< QVariant(true)          // random order   12
   100 		<< QVariant(true)          // random order   12
    99 		<< QVariant(100)           // damage modfier 13
   101 		<< QVariant(false)         // king           13
   100 		<< QVariant(15)            // turn time      14
   102 		<< QVariant(100)           // damage modfier 14
   101 		<< QVariant(100)           // init health    15
   103 		<< QVariant(15)            // turn time      15
   102 		<< QVariant(15)            // sudden death   16
   104 		<< QVariant(100)           // init health    16
   103 		<< QVariant(0)             // case prob      17
   105 		<< QVariant(15)            // sudden death   17
   104 		<< QVariant(3)             //  mines time    18
   106 		<< QVariant(0)             // case prob      18
   105 		<< QVariant(4)             //  landadds      19
   107 		<< QVariant(3)             //  mines time    19
       
   108 		<< QVariant(4)             //  landadds      20
   106 		;
   109 		;
   107 
   110 
   108 	QList<QVariant> shoppa;
   111 	QList<QVariant> shoppa;
   109 	shoppa
   112 	shoppa
   110 		<< predefSchemesNames[2]   // name           0
   113 		<< predefSchemesNames[2]   // name           0
   118 		<< QVariant(false)         // add mines      8
   121 		<< QVariant(false)         // add mines      8
   119 		<< QVariant(false)         // vampiric       9
   122 		<< QVariant(false)         // vampiric       9
   120 		<< QVariant(false)         // karma          10
   123 		<< QVariant(false)         // karma          10
   121 		<< QVariant(false)         // artillery      11
   124 		<< QVariant(false)         // artillery      11
   122 		<< QVariant(true)          // random order   12
   125 		<< QVariant(true)          // random order   12
   123 		<< QVariant(100)           // damage modfier 13
   126 		<< QVariant(false)         // king           13
   124 		<< QVariant(30)            // turn time      14
   127 		<< QVariant(100)           // damage modfier 14
   125 		<< QVariant(100)           // init health    15
   128 		<< QVariant(30)            // turn time      15
   126 		<< QVariant(50)            // sudden death   16
   129 		<< QVariant(100)           // init health    16
   127 		<< QVariant(1)             // case prob      17
   130 		<< QVariant(50)            // sudden death   17
   128 		<< QVariant(3)             //  mines time    18
   131 		<< QVariant(1)             // case prob      18
   129 		<< QVariant(4)             //  landadds      19
   132 		<< QVariant(3)             //  mines time    19
       
   133 		<< QVariant(4)             //  landadds      20
   130 		;
   134 		;
   131 
   135 
   132 	QList<QVariant> basketball;
   136 	QList<QVariant> basketball;
   133 	basketball
   137 	basketball
   134 		<< predefSchemesNames[3]   // name           0
   138 		<< predefSchemesNames[3]   // name           0
   142 		<< QVariant(false)         // add mines      8
   146 		<< QVariant(false)         // add mines      8
   143 		<< QVariant(false)         // vampiric       9
   147 		<< QVariant(false)         // vampiric       9
   144 		<< QVariant(false)         // karma          10
   148 		<< QVariant(false)         // karma          10
   145 		<< QVariant(false)         // artillery      11
   149 		<< QVariant(false)         // artillery      11
   146 		<< QVariant(true)          // random order   12
   150 		<< QVariant(true)          // random order   12
   147 		<< QVariant(100)           // damage modfier 13
   151 		<< QVariant(false)         // king           13
   148 		<< QVariant(30)            // turn time      14
   152 		<< QVariant(100)           // damage modfier 14
   149 		<< QVariant(100)           // init health    15
   153 		<< QVariant(30)            // turn time      15
   150 		<< QVariant(15)            // sudden death   16
   154 		<< QVariant(100)           // init health    16
   151 		<< QVariant(0)             // case prob      17
   155 		<< QVariant(15)            // sudden death   17
   152 		<< QVariant(3)             //  mines time    18
   156 		<< QVariant(0)             // case prob      18
   153 		<< QVariant(4)             //  landadds      19
   157 		<< QVariant(3)             //  mines time    19
       
   158 		<< QVariant(4)             //  landadds      20
   154 		;
   159 		;
   155 
   160 
   156 	QList<QVariant> minefield;
   161 	QList<QVariant> minefield;
   157 	minefield
   162 	minefield
   158 		<< predefSchemesNames[4]   // name           0
   163 		<< predefSchemesNames[4]   // name           0
   166 		<< QVariant(true)          // add mines      8
   171 		<< QVariant(true)          // add mines      8
   167 		<< QVariant(false)         // vampiric       9
   172 		<< QVariant(false)         // vampiric       9
   168 		<< QVariant(false)         // karma          10
   173 		<< QVariant(false)         // karma          10
   169 		<< QVariant(false)         // artillery      11
   174 		<< QVariant(false)         // artillery      11
   170 		<< QVariant(true)          // random order   12
   175 		<< QVariant(true)          // random order   12
   171 		<< QVariant(150)           // damage modfier 13
   176 		<< QVariant(false)         // king           13
   172 		<< QVariant(30)            // turn time      14
   177 		<< QVariant(150)           // damage modfier 14
   173 		<< QVariant(50)            // init health    15
   178 		<< QVariant(30)            // turn time      15
   174 		<< QVariant(15)            // sudden death   16
   179 		<< QVariant(50)            // init health    16
   175 		<< QVariant(0)             // case prob      17
   180 		<< QVariant(15)            // sudden death   17
   176 		<< QVariant(0)             //  mines time    18
   181 		<< QVariant(0)             // case prob      18
   177 		<< QVariant(50)            //  landadds      19
   182 		<< QVariant(0)             //  mines time    19
       
   183 		<< QVariant(50)            //  landadds      20
   178 		;
   184 		;
   179 
   185 
   180 	schemes.append(defaultScheme);
   186 	schemes.append(defaultScheme);
   181 	schemes.append(proMode);
   187 	schemes.append(proMode);
   182 	schemes.append(shoppa);
   188 	schemes.append(shoppa);