QTfrontend/hwform.cpp
changeset 11948 6da9bb4b3449
parent 11865 047be82b6f67
child 11950 3792a9f9fa9c
--- a/QTfrontend/hwform.cpp	Sat Nov 19 23:04:44 2016 +0100
+++ b/QTfrontend/hwform.cpp	Tue May 03 22:26:39 2016 +0200
@@ -1855,9 +1855,18 @@
                               );
 
     unsigned int n = entries.count();
+
+    QIcon finishedIcon;
+    finishedIcon.addFile(":/res/missionFinished.png", QSize(), QIcon::Normal, QIcon::On);
+    finishedIcon.addFile(":/res/missionFinishedSelected.png", QSize(), QIcon::Selected, QIcon::On);
     for(unsigned int i = 0; i < n; i++)
     {
-        ui.pageCampaign->CBCampaign->addItem(QString(entries[i]).replace(QString("_"),QString(" ")), QString(entries[i]).replace(QString("_"),QString(" ")));
+        QString campaignNameUnderscores= QString(entries[i]).replace(QString(" "),QString("_"));
+        QString campaignNameSpaces = QString(entries[i]).replace(QString("_"),QString(" "));
+        QString tName = team.name();
+        ui.pageCampaign->CBCampaign->addItem(campaignNameSpaces, campaignNameSpaces);
+        if(isCampWon(campaignNameUnderscores, tName))
+            ui.pageCampaign->CBCampaign->setItemIcon(i, finishedIcon);
     }
 }