--- a/QTfrontend/team.cpp Mon Jan 30 23:20:28 2012 +0100
+++ b/QTfrontend/team.cpp Mon Jan 30 17:32:18 2012 -0500
@@ -83,9 +83,9 @@
HWTeam::HWTeam() :
QObject(0)
- , m_difficulty(0)
- , m_numHedgehogs(4)
- , m_isNetTeam(false)
+ , m_difficulty(0)
+ , m_numHedgehogs(4)
+ , m_isNetTeam(false)
{
m_name = QString("Team");
for (int i = 0; i < HEDGEHOGS_PER_TEAM; i++)
@@ -110,23 +110,23 @@
}
HWTeam::HWTeam(const HWTeam & other) :
- QObject(0)
- , OldTeamName(other.OldTeamName)
- , m_name(other.m_name)
- , m_grave(other.m_grave)
- , m_fort(other.m_fort)
- , m_flag(other.m_flag)
- , m_voicepack(other.m_voicepack)
- , m_hedgehogs(other.m_hedgehogs)
- , m_difficulty(other.m_difficulty)
- , m_binds(other.m_binds)
- , m_numHedgehogs(other.m_numHedgehogs)
- , m_color(other.m_color)
- , m_isNetTeam(other.m_isNetTeam)
- , m_owner(other.m_owner)
- , m_campaignProgress(other.m_campaignProgress)
- , m_rounds(other.m_rounds)
- , m_wins(other.m_wins)
+ QObject(0)
+ , OldTeamName(other.OldTeamName)
+ , m_name(other.m_name)
+ , m_grave(other.m_grave)
+ , m_fort(other.m_fort)
+ , m_flag(other.m_flag)
+ , m_voicepack(other.m_voicepack)
+ , m_hedgehogs(other.m_hedgehogs)
+ , m_difficulty(other.m_difficulty)
+ , m_binds(other.m_binds)
+ , m_numHedgehogs(other.m_numHedgehogs)
+ , m_color(other.m_color)
+ , m_isNetTeam(other.m_isNetTeam)
+ , m_owner(other.m_owner)
+ , m_campaignProgress(other.m_campaignProgress)
+ , m_rounds(other.m_rounds)
+ , m_wins(other.m_wins)
// , AchievementProgress(other.AchievementProgress)
{
@@ -266,28 +266,30 @@
for (int t = 0; t < m_numHedgehogs; t++)
{
- sl.push_back(QString("eaddhh %1 %2 %3")
- .arg(QString::number(m_difficulty),
- QString::number(InitHealth),
- m_hedgehogs[t].Name));
- sl.push_back(QString("ehat %1")
- .arg(m_hedgehogs[t].Hat));
+ sl.push_back(QString("eaddhh %1 %2 %3")
+ .arg(QString::number(m_difficulty),
+ QString::number(InitHealth),
+ m_hedgehogs[t].Name));
+ sl.push_back(QString("ehat %1")
+ .arg(m_hedgehogs[t].Hat));
}
return sl;
}
bool HWTeam::isNetTeam() const
{
- return m_isNetTeam;
+ return m_isNetTeam;
}
-bool HWTeam::operator==(const HWTeam& t1) const {
- return m_name==t1.m_name;
+bool HWTeam::operator==(const HWTeam& t1) const
+{
+ return m_name==t1.m_name;
}
-bool HWTeam::operator<(const HWTeam& t1) const {
- return m_name<t1.m_name; // if names are equal - test if it is net team
+bool HWTeam::operator<(const HWTeam& t1) const
+{
+ return m_name<t1.m_name; // if names are equal - test if it is net team
}
@@ -295,58 +297,130 @@
// name
-QString HWTeam::name() const { return m_name; }
- void HWTeam::setName(const QString & name) { m_name = name; }
+QString HWTeam::name() const
+{
+ return m_name;
+}
+void HWTeam::setName(const QString & name)
+{
+ m_name = name;
+}
// single hedgehog
-const HWHog & HWTeam::hedgehog(unsigned int idx) const { return m_hedgehogs[idx]; }
- void HWTeam::setHedgehog(unsigned int idx, HWHog hh) { m_hedgehogs[idx] = hh; }
+const HWHog & HWTeam::hedgehog(unsigned int idx) const
+{
+ return m_hedgehogs[idx];
+}
+void HWTeam::setHedgehog(unsigned int idx, HWHog hh)
+{
+ m_hedgehogs[idx] = hh;
+}
// owner
-QString HWTeam::owner() const { return m_owner; }
+QString HWTeam::owner() const
+{
+ return m_owner;
+}
// difficulty
-unsigned int HWTeam::difficulty() const { return m_difficulty; }
- void HWTeam::setDifficulty(unsigned int level) { m_difficulty = level; }
+unsigned int HWTeam::difficulty() const
+{
+ return m_difficulty;
+}
+void HWTeam::setDifficulty(unsigned int level)
+{
+ m_difficulty = level;
+}
// color
-QColor HWTeam::color() const { return m_color; }
- void HWTeam::setColor(const QColor & color) { m_color = color; }
+QColor HWTeam::color() const
+{
+ return m_color;
+}
+void HWTeam::setColor(const QColor & color)
+{
+ m_color = color;
+}
// binds
-QString HWTeam::keyBind(unsigned int idx) const { return m_binds[idx].strbind; }
- void HWTeam::bindKey(unsigned int idx, const QString & key) { m_binds[idx].strbind = key; }
+QString HWTeam::keyBind(unsigned int idx) const
+{
+ return m_binds[idx].strbind;
+}
+void HWTeam::bindKey(unsigned int idx, const QString & key)
+{
+ m_binds[idx].strbind = key;
+}
// flag
-void HWTeam::setFlag(const QString & flag) { m_flag = flag; }
-QString HWTeam::flag() const { return m_flag; }
+void HWTeam::setFlag(const QString & flag)
+{
+ m_flag = flag;
+}
+QString HWTeam::flag() const
+{
+ return m_flag;
+}
// fort
-void HWTeam::setFort(const QString & fort) { m_fort = fort; }
-QString HWTeam::fort() const { return m_fort; }
+void HWTeam::setFort(const QString & fort)
+{
+ m_fort = fort;
+}
+QString HWTeam::fort() const
+{
+ return m_fort;
+}
// grave
-void HWTeam::setGrave(const QString & grave) { m_grave = grave; }
-QString HWTeam::grave() const { return m_grave; }
+void HWTeam::setGrave(const QString & grave)
+{
+ m_grave = grave;
+}
+QString HWTeam::grave() const
+{
+ return m_grave;
+}
// voicepack - getter/setter
-void HWTeam::setVoicepack(const QString & voicepack) { m_voicepack = voicepack; }
-QString HWTeam::voicepack() const { return m_voicepack; }
+void HWTeam::setVoicepack(const QString & voicepack)
+{
+ m_voicepack = voicepack;
+}
+QString HWTeam::voicepack() const
+{
+ return m_voicepack;
+}
// campaignProgress - getter
-unsigned int HWTeam::campaignProgress() const { return m_campaignProgress; };
+unsigned int HWTeam::campaignProgress() const
+{
+ return m_campaignProgress;
+};
// amount of hedgehogs
-unsigned char HWTeam::numHedgehogs() const { return m_numHedgehogs; }
- void HWTeam::setNumHedgehogs(unsigned char num) { m_numHedgehogs = num; }
+unsigned char HWTeam::numHedgehogs() const
+{
+ return m_numHedgehogs;
+}
+void HWTeam::setNumHedgehogs(unsigned char num)
+{
+ m_numHedgehogs = num;
+}
// rounds+wins - incrementors
-void HWTeam::incRounds() { m_rounds++; }
-void HWTeam::incWins() { m_wins++; }
+void HWTeam::incRounds()
+{
+ m_rounds++;
+}
+void HWTeam::incWins()
+{
+ m_wins++;
+}