QTfrontend/mapContainer.cpp
changeset 6087 6e422ea250a1
parent 5993 412ada3d2041
equal deleted inserted replaced
6086:c612f24bf162 6087:6e422ea250a1
   112             QString theme;
   112             QString theme;
   113             quint32 limit = 0;
   113             quint32 limit = 0;
   114             QString scheme;
   114             QString scheme;
   115             QString weapons;
   115             QString weapons;
   116             QList<QVariant> mapInfo;
   116             QList<QVariant> mapInfo;
       
   117             bool isMission = mapLuaFile.exists();
       
   118 
   117             QTextStream input(&mapCfgFile);
   119             QTextStream input(&mapCfgFile);
   118             input >> theme;
   120             input >> theme;
   119             input >> limit;
   121             input >> limit;
   120             input >> scheme;
   122             input >> scheme;
   121             input >> weapons;
   123             input >> weapons;
   123             mapInfo.push_back(theme);
   125             mapInfo.push_back(theme);
   124             if (limit)
   126             if (limit)
   125                 mapInfo.push_back(limit);
   127                 mapInfo.push_back(limit);
   126             else
   128             else
   127                 mapInfo.push_back(18);
   129                 mapInfo.push_back(18);
   128             mapInfo.push_back(mapLuaFile.exists());
   130 
       
   131 
       
   132             mapInfo.push_back(isMission);
       
   133 
   129             if (scheme.isEmpty())
   134             if (scheme.isEmpty())
   130                 scheme = "locked";
   135                 scheme = "locked";
   131             scheme.replace("_", " ");
   136             scheme.replace("_", " ");
       
   137 
   132             if (weapons.isEmpty())
   138             if (weapons.isEmpty())
   133                 weapons = "locked";
   139                 weapons = "locked";
   134             weapons.replace("_", " ");
   140             weapons.replace("_", " ");
       
   141 
   135             mapInfo.push_back(scheme);
   142             mapInfo.push_back(scheme);
   136             mapInfo.push_back(weapons);
   143             mapInfo.push_back(weapons);
   137             if(mapLuaFile.exists())
   144 
       
   145             if(isMission)
   138             {
   146             {
   139                 chooseMap->insertItem(missionindex++, 
   147                 chooseMap->insertItem(missionindex++, 
   140 // FIXME - need real icons. Disabling until then
   148 // FIXME - need real icons. Disabling until then
   141 //QIcon(":/res/mapMission.png"), 
   149 //QIcon(":/res/mapMission.png"), 
   142 QComboBox::tr("Mission") + ": " + map, mapInfo);
   150 QComboBox::tr("Mission") + ": " + map, mapInfo);