QTfrontend/team.cpp
changeset 7258 722e8a0d89dc
parent 7254 aa4461ec7737
child 7313 162bc562335b
equal deleted inserted replaced
7256:5b97b9946cde 7258:722e8a0d89dc
    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)
   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