QTfrontend/ammoSchemeModel.cpp
changeset 2882 b9aceb3fe3d6
parent 2881 70d7976fa829
child 2891 e1f902eb0cfe
equal deleted inserted replaced
2881:70d7976fa829 2882:b9aceb3fe3d6
    44 		<< QVariant(100)           // init health    18
    44 		<< QVariant(100)           // init health    18
    45 		<< QVariant(15)            // sudden death   19
    45 		<< QVariant(15)            // sudden death   19
    46 		<< QVariant(5)             // case prob      20
    46 		<< QVariant(5)             // case prob      20
    47 		<< QVariant(3)             //  mines time    21
    47 		<< QVariant(3)             //  mines time    21
    48 		<< QVariant(4)             //  landadds      22
    48 		<< QVariant(4)             //  landadds      22
       
    49 		<< QVariant(0)             // mine dud pct   23
    49 		;
    50 		;
    50 
    51 
    51 AmmoSchemeModel::AmmoSchemeModel(QObject* parent, const QString & fileName) :
    52 AmmoSchemeModel::AmmoSchemeModel(QObject* parent, const QString & fileName) :
    52 	QAbstractTableModel(parent),
    53 	QAbstractTableModel(parent),
    53 	numberOfDefaultSchemes(4),
    54 	numberOfDefaultSchemes(4),
    83 		<< "health"           // 18
    84 		<< "health"           // 18
    84 		<< "suddendeath"      // 19
    85 		<< "suddendeath"      // 19
    85 		<< "caseprobability"  // 20
    86 		<< "caseprobability"  // 20
    86 		<< "minestime"        // 21
    87 		<< "minestime"        // 21
    87 		<< "landadds"         // 22
    88 		<< "landadds"         // 22
       
    89 		<< "minedudpct"       // 23
    88 		;
    90 		;
    89 
    91 
    90 	QList<QVariant> proMode;
    92 	QList<QVariant> proMode;
    91 	proMode
    93 	proMode
    92 		<< predefSchemesNames[1]   // name           0
    94 		<< predefSchemesNames[1]   // name           0
   110 		<< QVariant(100)           // init health    18
   112 		<< QVariant(100)           // init health    18
   111 		<< QVariant(15)            // sudden death   19
   113 		<< QVariant(15)            // sudden death   19
   112 		<< QVariant(0)             // case prob      20
   114 		<< QVariant(0)             // case prob      20
   113 		<< QVariant(3)             //  mines time    21
   115 		<< QVariant(3)             //  mines time    21
   114 		<< QVariant(4)             //  landadds      22
   116 		<< QVariant(4)             //  landadds      22
       
   117 		<< QVariant(0)             // mine dud pct   23
   115 		;
   118 		;
   116 
   119 
   117 	QList<QVariant> shoppa;
   120 	QList<QVariant> shoppa;
   118 	shoppa
   121 	shoppa
   119 		<< predefSchemesNames[2]   // name           0
   122 		<< predefSchemesNames[2]   // name           0
   130 		<< QVariant(false)         // artillery      11
   133 		<< QVariant(false)         // artillery      11
   131 		<< QVariant(true)          // random order   12
   134 		<< QVariant(true)          // random order   12
   132 		<< QVariant(false)         // king           13
   135 		<< QVariant(false)         // king           13
   133 		<< QVariant(false)         // place hog      14
   136 		<< QVariant(false)         // place hog      14
   134 		<< QVariant(true)          // shared ammo    15
   137 		<< QVariant(true)          // shared ammo    15
   135 		<< QVariant(100)           // damage modfier 15
   138 		<< QVariant(100)           // damage modfier 16
   136 		<< QVariant(30)            // turn time      16
   139 		<< QVariant(30)            // turn time      17
   137 		<< QVariant(100)           // init health    17
   140 		<< QVariant(100)           // init health    18
   138 		<< QVariant(50)            // sudden death   18
   141 		<< QVariant(50)            // sudden death   19
   139 		<< QVariant(1)             // case prob      19
   142 		<< QVariant(1)             // case prob      20
   140 		<< QVariant(3)             //  mines time    20
   143 		<< QVariant(3)             //  mines time    21
   141 		<< QVariant(4)             //  landadds      21
   144 		<< QVariant(4)             //  landadds      22
       
   145 		<< QVariant(0)             // mine dud pct   23
   142 		;
   146 		;
   143 
   147 
   144 	QList<QVariant> basketball;
   148 	QList<QVariant> basketball;
   145 	basketball
   149 	basketball
   146 		<< predefSchemesNames[3]   // name           0
   150 		<< predefSchemesNames[3]   // name           0
   164 		<< QVariant(100)           // init health    18
   168 		<< QVariant(100)           // init health    18
   165 		<< QVariant(15)            // sudden death   19
   169 		<< QVariant(15)            // sudden death   19
   166 		<< QVariant(0)             // case prob      20
   170 		<< QVariant(0)             // case prob      20
   167 		<< QVariant(3)             //  mines time    21
   171 		<< QVariant(3)             //  mines time    21
   168 		<< QVariant(4)             //  landadds      22
   172 		<< QVariant(4)             //  landadds      22
       
   173 		<< QVariant(0)             // mine dud pct   23
   169 		;
   174 		;
   170 
   175 
   171 	QList<QVariant> minefield;
   176 	QList<QVariant> minefield;
   172 	minefield
   177 	minefield
   173 		<< predefSchemesNames[4]   // name           0
   178 		<< predefSchemesNames[4]   // name           0
   191 		<< QVariant(50)            // init health    18
   196 		<< QVariant(50)            // init health    18
   192 		<< QVariant(15)            // sudden death   19
   197 		<< QVariant(15)            // sudden death   19
   193 		<< QVariant(0)             // case prob      20
   198 		<< QVariant(0)             // case prob      20
   194 		<< QVariant(0)             //  mines time    21
   199 		<< QVariant(0)             //  mines time    21
   195 		<< QVariant(50)            //  landadds      22
   200 		<< QVariant(50)            //  landadds      22
       
   201 		<< QVariant(0)             // mine dud pct   23
   196 		;
   202 		;
   197 
   203 
   198 	schemes.append(defaultScheme);
   204 	schemes.append(defaultScheme);
   199 	schemes.append(proMode);
   205 	schemes.append(proMode);
   200 	schemes.append(shoppa);
   206 	schemes.append(shoppa);