QTfrontend/mapContainer.cpp
changeset 1365 2ffe20744a4a
parent 1348 0eb0b3a955b8
child 1366 eba12c22f8ca
equal deleted inserted replaced
1364:64c4922a6960 1365:2ffe20744a4a
    56 
    56 
    57   chooseMap = new QComboBox(this);
    57   chooseMap = new QComboBox(this);
    58   chooseMap->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
    58   chooseMap->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
    59   chooseMap->addItem(QComboBox::tr("generated map..."));
    59   chooseMap->addItem(QComboBox::tr("generated map..."));
    60   chooseMap->addItems(*mapList);
    60   chooseMap->addItems(*mapList);
    61   connect(chooseMap, SIGNAL(activated(int)), this, SLOT(mapChanged(int)));
    61   connect(chooseMap, SIGNAL(currentIndexChanged(int)), this, SLOT(mapChanged(int)));
    62   mainLayout.addWidget(chooseMap, 1, 1);
    62   mainLayout.addWidget(chooseMap, 1, 1);
    63 
    63 
    64   QLabel * lblMap = new QLabel(tr("Map"), this);
    64   QLabel * lblMap = new QLabel(tr("Map"), this);
    65   mainLayout.addWidget(lblMap, 1, 0);
    65   mainLayout.addWidget(lblMap, 1, 0);
    66 
    66 
   198 	int id = chooseMap->findText(map);
   198 	int id = chooseMap->findText(map);
   199 	if(id > 0) {
   199 	if(id > 0) {
   200 		chooseMap->setCurrentIndex(id);
   200 		chooseMap->setCurrentIndex(id);
   201 		loadMap(id);
   201 		loadMap(id);
   202 		if (pMap)
   202 		if (pMap)
       
   203 		{
   203 			disconnect(pMap, 0, this, SLOT(setImage(const QImage)));
   204 			disconnect(pMap, 0, this, SLOT(setImage(const QImage)));
       
   205 			pMap = 0;
       
   206 		}
   204 	}
   207 	}
   205 }
   208 }
   206 
   209 
   207 void HWMapContainer::setTheme(const QString & theme)
   210 void HWMapContainer::setTheme(const QString & theme)
   208 {
   211 {