equal
deleted
inserted
replaced
23 #include <QStandardItemModel> |
23 #include <QStandardItemModel> |
24 |
24 |
25 #include "frameTeam.h" |
25 #include "frameTeam.h" |
26 #include "teamselhelper.h" |
26 #include "teamselhelper.h" |
27 #include "hwconsts.h" |
27 #include "hwconsts.h" |
|
28 #include "DataManager.h" |
28 |
29 |
29 FrameTeams::FrameTeams(QWidget* parent) : |
30 FrameTeams::FrameTeams(QWidget* parent) : |
30 QFrame(parent), maxHedgehogsPerGame(48), overallHedgehogs(0), mainLayout(this), nonInteractive(false) |
31 QFrame(parent), maxHedgehogsPerGame(48), overallHedgehogs(0), mainLayout(this), nonInteractive(false) |
31 { |
32 { |
32 QPalette newPalette = palette(); |
33 QPalette newPalette = palette(); |
52 } |
53 } |
53 } |
54 } |
54 |
55 |
55 void FrameTeams::resetColors() |
56 void FrameTeams::resetColors() |
56 { |
57 { |
57 currentColor = colorsModel->rowCount() - 1; // ensure next color is the first one |
58 currentColor = DataManager::instance().colorsModel()->rowCount() - 1; // ensure next color is the first one |
58 } |
59 } |
59 |
60 |
60 int FrameTeams::getNextColor() |
61 int FrameTeams::getNextColor() |
61 { |
62 { |
62 currentColor = (currentColor + 1) % colorsModel->rowCount(); |
63 currentColor = (currentColor + 1) % DataManager::instance().colorsModel()->rowCount(); |
63 return currentColor; |
64 return currentColor; |
64 } |
65 } |
65 |
66 |
66 void FrameTeams::addTeam(HWTeam team, bool willPlay) |
67 void FrameTeams::addTeam(HWTeam team, bool willPlay) |
67 { |
68 { |