QTfrontend/team.cpp
changeset 314 83773ccf4f09
parent 312 c36d0b34ac3d
child 319 7f3bd9e31f18
equal deleted inserted replaced
313:b26dbb909c4e 314:83773ccf4f09
    24 #include "hwform.h"
    24 #include "hwform.h"
    25 #include "predefteams.h"
    25 #include "predefteams.h"
    26 #include "pages.h"
    26 #include "pages.h"
    27 #include "hwconsts.h"
    27 #include "hwconsts.h"
    28 
    28 
       
    29 #include <QStringList>
       
    30 #include <QDebug>
       
    31 
    29 HWTeam::HWTeam(const QString & teamname) :
    32 HWTeam::HWTeam(const QString & teamname) :
    30   difficulty(0)
    33   difficulty(0)
    31 {
    34 {
    32 	TeamName = teamname;
    35 	TeamName = teamname;
    33 	OldTeamName = TeamName;
    36 	OldTeamName = TeamName;
    37 	for(int i = 0; i < BINDS_NUMBER; i++)
    40 	for(int i = 0; i < BINDS_NUMBER; i++)
    38 	{
    41 	{
    39 		binds[i].action = cbinds[i].action;
    42 		binds[i].action = cbinds[i].action;
    40 		binds[i].strbind = cbinds[i].strbind;
    43 		binds[i].strbind = cbinds[i].strbind;
    41 	}
    44 	}
       
    45 }
       
    46 
       
    47 HWTeam::HWTeam(const QStringList& strLst)
       
    48 {
       
    49   if(strLst.size()<9) throw HWTeamConstructException();
       
    50   TeamName=strLst[0];
       
    51   for(int i = 0; i < 8; i++) HHName[i]=strLst[i+1];
    42 }
    52 }
    43 
    53 
    44 HWTeam::HWTeam(quint8 num) :
    54 HWTeam::HWTeam(quint8 num) :
    45   difficulty(0)
    55   difficulty(0)
    46 {
    56 {