QTfrontend/ammoSchemeModel.cpp
changeset 2017 7845c77c8d31
parent 1974 77a9416ceead
child 2023 41d3afaa20c7
equal deleted inserted replaced
2016:73b0bcc4396d 2017:7845c77c8d31
    30 		<< QVariant(false)         // border         4
    30 		<< QVariant(false)         // border         4
    31 		<< QVariant(false)         // low gravity    5
    31 		<< QVariant(false)         // low gravity    5
    32 		<< QVariant(false)         // laser sight    6
    32 		<< QVariant(false)         // laser sight    6
    33 		<< QVariant(false)         // invulnerable   7
    33 		<< QVariant(false)         // invulnerable   7
    34 		<< QVariant(true)          // add mines      8
    34 		<< QVariant(true)          // add mines      8
    35 		<< QVariant(100)           // damage modfier 9
    35 		<< QVariant(false)         // vampiric       9
    36 		<< QVariant(45)            // turn time      10
    36 		<< QVariant(false)         // karma          10
    37 		<< QVariant(100)           // init health    11
    37 		<< QVariant(100)           // damage modfier 11
    38 		<< QVariant(15)            // sudden death   12
    38 		<< QVariant(45)            // turn time      12
    39 		<< QVariant(5)             // case prob      13
    39 		<< QVariant(100)           // init health    13
       
    40 		<< QVariant(15)            // sudden death   14
       
    41 		<< QVariant(5)             // case prob      15
    40 		;
    42 		;
    41 
    43 
    42 AmmoSchemeModel::AmmoSchemeModel(QObject* parent, const QString & fileName) :
    44 AmmoSchemeModel::AmmoSchemeModel(QObject* parent, const QString & fileName) :
    43 	QAbstractTableModel(parent),
    45 	QAbstractTableModel(parent),
    44 	numberOfDefaultSchemes(4),
    46 	numberOfDefaultSchemes(4),
    59 		<< "border"           //  4
    61 		<< "border"           //  4
    60 		<< "lowgrav"          //  5
    62 		<< "lowgrav"          //  5
    61 		<< "laser"            //  6
    63 		<< "laser"            //  6
    62 		<< "invulnerability"  //  7
    64 		<< "invulnerability"  //  7
    63 		<< "mines"            //  8
    65 		<< "mines"            //  8
    64 		<< "damagefactor"     //  9
    66 		<< "vampiric"         //  9
    65 		<< "turntime"         // 10
    67 		<< "karma"            // 10
    66 		<< "health"           // 11
    68 		<< "damagefactor"     // 11
    67 		<< "suddendeath"      // 12
    69 		<< "turntime"         // 12
    68 		<< "caseprobability"  // 13
    70 		<< "health"           // 13
       
    71 		<< "suddendeath"      // 14
       
    72 		<< "caseprobability"  // 15
    69 		;
    73 		;
    70 
    74 
    71 	QList<QVariant> proMode;
    75 	QList<QVariant> proMode;
    72 	proMode
    76 	proMode
    73 		<< predefSchemesNames[1]   // name           0
    77 		<< predefSchemesNames[1]   // name           0
    77 		<< QVariant(false)         // border         4
    81 		<< QVariant(false)         // border         4
    78 		<< QVariant(false)         // low gravity    5
    82 		<< QVariant(false)         // low gravity    5
    79 		<< QVariant(false)         // laser sight    6
    83 		<< QVariant(false)         // laser sight    6
    80 		<< QVariant(false)         // invulnerable   7
    84 		<< QVariant(false)         // invulnerable   7
    81 		<< QVariant(false)         // add mines      8
    85 		<< QVariant(false)         // add mines      8
    82 		<< QVariant(100)           // damage modfier 9
    86 		<< QVariant(false)         // vampiric       9
    83 		<< QVariant(15)            // turn time      10
    87 		<< QVariant(false)         // karma          10
    84 		<< QVariant(100)           // init health    11
    88 		<< QVariant(100)           // damage modfier 11
    85 		<< QVariant(15)            // sudden death   12
    89 		<< QVariant(15)            // turn time      12
    86 		<< QVariant(0)             // case prob      13
    90 		<< QVariant(100)           // init health    13
       
    91 		<< QVariant(15)            // sudden death   14
       
    92 		<< QVariant(0)             // case prob      15
    87 		;
    93 		;
    88 
    94 
    89 	QList<QVariant> shoppa;
    95 	QList<QVariant> shoppa;
    90 	shoppa
    96 	shoppa
    91 		<< predefSchemesNames[2]   // name           0
    97 		<< predefSchemesNames[2]   // name           0
    95 		<< QVariant(true)          // border         4
   101 		<< QVariant(true)          // border         4
    96 		<< QVariant(false)         // low gravity    5
   102 		<< QVariant(false)         // low gravity    5
    97 		<< QVariant(false)         // laser sight    6
   103 		<< QVariant(false)         // laser sight    6
    98 		<< QVariant(false)         // invulnerable   7
   104 		<< QVariant(false)         // invulnerable   7
    99 		<< QVariant(false)         // add mines      8
   105 		<< QVariant(false)         // add mines      8
   100 		<< QVariant(100)           // damage modfier 9
   106 		<< QVariant(false)         // vampiric       9
   101 		<< QVariant(30)            // turn time      10
   107 		<< QVariant(false)         // karma          10
   102 		<< QVariant(100)           // init health    11
   108 		<< QVariant(100)           // damage modfier 11
   103 		<< QVariant(50)            // sudden death   12
   109 		<< QVariant(30)            // turn time      12
   104 		<< QVariant(1)             // case prob      13
   110 		<< QVariant(100)           // init health    13
       
   111 		<< QVariant(50)            // sudden death   14
       
   112 		<< QVariant(1)             // case prob      15
   105 		;
   113 		;
   106 
   114 
   107 	QList<QVariant> basketball;
   115 	QList<QVariant> basketball;
   108 	basketball
   116 	basketball
   109 		<< predefSchemesNames[3]   // name           0
   117 		<< predefSchemesNames[3]   // name           0
   113 		<< QVariant(true)          // border         4
   121 		<< QVariant(true)          // border         4
   114 		<< QVariant(true)          // low gravity    5
   122 		<< QVariant(true)          // low gravity    5
   115 		<< QVariant(false)         // laser sight    6
   123 		<< QVariant(false)         // laser sight    6
   116 		<< QVariant(true)          // invulnerable   7
   124 		<< QVariant(true)          // invulnerable   7
   117 		<< QVariant(false)         // add mines      8
   125 		<< QVariant(false)         // add mines      8
   118 		<< QVariant(100)           // damage modfier 9
   126 		<< QVariant(false)         // vampiric       9
   119 		<< QVariant(30)            // turn time      10
   127 		<< QVariant(false)         // karma          10
   120 		<< QVariant(100)           // init health    11
   128 		<< QVariant(100)           // damage modfier 11
   121 		<< QVariant(15)            // sudden death   12
   129 		<< QVariant(30)            // turn time      12
   122 		<< QVariant(0)             // case prob      13
   130 		<< QVariant(100)           // init health    13
       
   131 		<< QVariant(15)            // sudden death   14
       
   132 		<< QVariant(0)             // case prob      15
   123 		;
   133 		;
   124 
   134 
   125 	schemes.append(defaultScheme);
   135 	schemes.append(defaultScheme);
   126 	schemes.append(proMode);
   136 	schemes.append(proMode);
   127 	schemes.append(shoppa);
   137 	schemes.append(shoppa);