QTfrontend/team.cpp
changeset 7278 000e4543f204
parent 7258 722e8a0d89dc
child 7313 162bc562335b
equal deleted inserted replaced
7238:313b2ecc4441 7278:000e4543f204
    24 #include <QSettings>
    24 #include <QSettings>
    25 #include <QStandardItemModel>
    25 #include <QStandardItemModel>
    26 
    26 
    27 #include "team.h"
    27 #include "team.h"
    28 #include "hwform.h"
    28 #include "hwform.h"
       
    29 #include "DataManager.h"
    29 
    30 
    30 HWTeam::HWTeam(const QString & teamname) :
    31 HWTeam::HWTeam(const QString & teamname) :
    31     QObject(0)
    32     QObject(0)
    32     , m_difficulty(0)
    33     , m_difficulty(0)
    33     , m_numHedgehogs(4)
    34     , m_numHedgehogs(4)
   148         m_name = other.m_name;
   149         m_name = other.m_name;
   149         m_grave = other.m_grave;
   150         m_grave = other.m_grave;
   150         m_fort = other.m_fort;
   151         m_fort = other.m_fort;
   151         m_flag = other.m_flag;
   152         m_flag = other.m_flag;
   152         m_voicepack = other.m_voicepack;
   153         m_voicepack = other.m_voicepack;
   153 //        m_hedgehogs = other.m_hedgehogs;
   154         m_hedgehogs = other.m_hedgehogs;
   154         m_difficulty = other.m_difficulty;
   155         m_difficulty = other.m_difficulty;
   155 //        m_binds = other.m_binds;
   156         m_binds = other.m_binds;
   156         m_numHedgehogs = other.m_numHedgehogs;
   157         m_numHedgehogs = other.m_numHedgehogs;
   157         m_color = other.m_color;
   158         m_color = other.m_color;
   158         m_isNetTeam = other.m_isNetTeam;
   159         m_isNetTeam = other.m_isNetTeam;
   159         m_owner = other.m_owner;
   160         m_owner = other.m_owner;
   160         m_campaignProgress = other.m_campaignProgress;
   161         m_campaignProgress = other.m_campaignProgress;
   349     return m_color;
   350     return m_color;
   350 }
   351 }
   351 
   352 
   352 QColor HWTeam::qcolor() const
   353 QColor HWTeam::qcolor() const
   353 {
   354 {
   354     return colorsModel->item(m_color)->data().value<QColor>();
   355     return DataManager::instance().colorsModel()->item(m_color)->data().value<QColor>();
   355 }
   356 }
   356 
   357 
   357 void HWTeam::setColor(int color)
   358 void HWTeam::setColor(int color)
   358 {
   359 {
   359     m_color = color % colorsModel->rowCount();
   360     m_color = color % DataManager::instance().colorsModel()->rowCount();
   360 }
   361 }
   361 
   362 
   362 
   363 
   363 // binds
   364 // binds
   364 QString HWTeam::keyBind(unsigned int idx) const
   365 QString HWTeam::keyBind(unsigned int idx) const