m_homeEmblem = getEmblemByName(hometeam);
}
+
+// TODO write team class that allows more attributes
+// and aliases for team names
QIcon Match::getEmblemByName(QString team)
{
QIcon i;
- i = QIcon(":/Icons/Frankfurt.png");
+ if (team == "Hannover 96") {
+ i = QIcon(":/Icons/Hannover.png");
+ } else if (team == "FC St. Pauli") {
+ i = QIcon(":/Icons/St.Pauli.png");
+ } else if (team == "Hamburger SV") {
+ i = QIcon(":/Icons/Hamburg.png");
+ } else if (team == "1. FC Kaiserslautern") {
+ i = QIcon(":/Icons/Kaiserslautern.png");
+ } else if (team == "1. FSV Mainz 05") {
+ i = QIcon(":/Icons/Mainz.png");
+ } else if (team == "1899 Hoffenheim") {
+ i = QIcon(":/Icons/Hoffenheim.png");
+ } else if (team == "Borussia M'gladbach") {
+ i = QIcon(":/Icons/Mönchengladbach.png");
+ } else if (team == "VfL Wolfsburg") {
+ i = QIcon(":/Icons/Wolfsburg.png");
+ } else if (team == "SC Freiburg") {
+ i = QIcon(":/Icons/Freiburg.png");
+ } else if (team == "1. FC Köln") {
+ i = QIcon(":/Icons/Köln.png");
+ } else if (team == "1. FC Nürnberg") {
+ i = QIcon(":/Icons/Nürnberg.png");
+ } else if (team == "FC Schalke 04") {
+ i = QIcon(":/Icons/Schalke.png");
+ } else if (team == "VfB Stuttgart") {
+ i = QIcon(":/Icons/Stuttgart.png");
+ } else if (team == "Eintracht Frankfurt") {
+ i = QIcon(":/Icons/Frankfurt.png");
+ } else if (team == "Bayer Leverkusen") {
+ i = QIcon(":/Icons/Leverkusen.png");
+ } else if (team == "Werder Bremen") {
+ i = QIcon(":/Icons/Bremen.png");
+ } else if (team == "Borussia Dortmund") {
+ i = QIcon(":/Icons/Dortmund.png");
+ } else if (team == "Bayern München") {
+ i = QIcon(":/Icons/Bayern.png");
+ } else {
+ i = QIcon();
+ }
+
+
return i;
}