use mp3s instead of wav which seems to work...
[buliscores] / src / src / matchdaymodel.cpp
index 6ed7de7..52e01fc 100644 (file)
@@ -61,17 +61,17 @@ QVariant MatchDayModel::data(const QModelIndex& index, int role) const
         case MatchState:
             switch(match->state()) {
             case Match::NotStarted:
-                return QIcon(":/bullet-grey").pixmap(15,15);
+                return QIcon(":/bullet-grey").pixmap(20,20);
                 break;
             case Match::FirstHalf:
             case Match::SecondHalf:
-                return QIcon(":/bullet-green").pixmap(15,15);
+                return QIcon(":/football").pixmap(20,20);
                 break;
             case Match::HalfTime:
-                return QIcon(":/bullet-yellow").pixmap(15,15);
+                return QIcon(":/bullet-yellow").pixmap(20,20);
                 break;
             case Match::Finished:
-                return QIcon(":/bullet-red").pixmap(15,15);
+                return QIcon(":/bullet-red").pixmap(20,20);
                 break;
             default:
                 return QVariant(QVariant::Invalid);
@@ -134,7 +134,7 @@ QVariant MatchDayModel::data(const QModelIndex& index, int role) const
             s.setWidth(120);
             break;
         case AwayScore:
-            s.setWidth(4);
+            s.setWidth(25);
             break;
         case HomeIcon:
             s.setWidth(29);
@@ -143,7 +143,7 @@ QVariant MatchDayModel::data(const QModelIndex& index, int role) const
             s.setWidth(120);
             break;
         case HomeScore:
-            s.setWidth(4);
+            s.setWidth(25);
             break;
         case Seperator:
             s.setWidth(5);
@@ -168,12 +168,20 @@ QVariant MatchDayModel::data(const QModelIndex& index, int role) const
         }
         break;
 
+    case Qt::ForegroundRole:
+        if ((index.column() == HomeScore &&
+             match->lastHomeGoal().secsTo((QDateTime::currentDateTime())) < 300) ||
+            (index.column() == AwayScore &&
+             match->lastAwayGoal().secsTo((QDateTime::currentDateTime())) < 300)) {
+            return QColor(255, 0, 51);
+        }
+        break;
+
     case Qt::FontRole:
         if ((index.column() == HomeScore ||
-            index.column() == AwayScore) &&
-            (match->lastEvent().secsTo((QDateTime::currentDateTime())) < 300)) {
+             index.column() == AwayScore)) {
             f.setBold(true);
-            f.setPixelSize(16);
+            f.setPixelSize(20);
         } else {
             f.setBold(false);
             f.setPixelSize(14);