QTfrontend/mapContainer.cpp
changeset 3865 0b1c426b035f
parent 3195 c6f58cff5ffc
child 3869 d3d39bbb05f2
equal deleted inserted replaced
3864:cbd37f91d9a2 3865:0b1c426b035f
    59     connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomSeed()));
    59     connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomSeed()));
    60     connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomTheme()));
    60     connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomTheme()));
    61 
    61 
    62     chooseMap = new QComboBox(this);
    62     chooseMap = new QComboBox(this);
    63     chooseMap->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
    63     chooseMap->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
    64     chooseMap->addItem(QComboBox::tr("generated map..."));
    64     chooseMap->addItem(QIcon(":/res/mapRandom.png"), QComboBox::tr("generated map..."));
    65     chooseMap->addItem(QComboBox::tr("generated maze..."));
    65     chooseMap->addItem(QIcon(":/res/mapMaze.png"), QComboBox::tr("generated maze..."));
    66     chooseMap->insertSeparator(chooseMap->count()); // separator between generators and missions
    66     chooseMap->insertSeparator(chooseMap->count()); // separator between generators and missions
    67 
    67 
    68     int missionindex = chooseMap->count();
    68     int missionindex = chooseMap->count();
    69     for (int i = 0; i < mapList->size(); ++i) {
    69     for (int i = 0; i < mapList->size(); ++i) {
    70         QString map = (*mapList)[i];
    70         QString map = (*mapList)[i];
    90                 mapInfo.push_back(limit);
    90                 mapInfo.push_back(limit);
    91             else
    91             else
    92                 mapInfo.push_back(18);
    92                 mapInfo.push_back(18);
    93             mapInfo.push_back(mapLuaFile.exists());
    93             mapInfo.push_back(mapLuaFile.exists());
    94             if(mapLuaFile.exists())
    94             if(mapLuaFile.exists())
    95                 chooseMap->insertItem(missionindex++, QComboBox::tr("Mission") + ": " + map, mapInfo);
    95                 chooseMap->insertItem(missionindex++, QIcon(":/res/mapMission.png"), QComboBox::tr("Mission") + ": " + map, mapInfo);
    96             else
    96             else
    97                 chooseMap->addItem(map, mapInfo);
    97                 chooseMap->addItem(QIcon(":/res/mapCustom.png"), map, mapInfo);
    98             mapCfgFile.close();
    98             mapCfgFile.close();
    99         }
    99         }
   100     }
   100     }
   101     chooseMap->insertSeparator(missionindex); // separator between missions and maps
   101     chooseMap->insertSeparator(missionindex); // separator between missions and maps
   102 
   102