QTfrontend/mapContainer.cpp
changeset 325 17c860483407
parent 320 1ee7f087195a
child 329 4c3aad46baa5
equal deleted inserted replaced
324:f4c109c82a0c 325:17c860483407
    92   if (mapCfgFile.open(QFile::ReadOnly)) {
    92   if (mapCfgFile.open(QFile::ReadOnly)) {
    93     QTextStream input(&mapCfgFile);
    93     QTextStream input(&mapCfgFile);
    94     input >> theme;
    94     input >> theme;
    95     mapCfgFile.close();
    95     mapCfgFile.close();
    96   }
    96   }
       
    97   emit mapChanged(chooseMap->currentText());
    97 }
    98 }
    98 
    99 
    99 void HWMapContainer::changeImage()
   100 void HWMapContainer::changeImage()
   100 {
   101 {
   101   pMap = new HWMap();
   102   pMap = new HWMap();
   102   connect(pMap, SIGNAL(ImageReceived(const QImage)), this, SLOT(setImage(const QImage)));
   103   connect(pMap, SIGNAL(ImageReceived(const QImage)), this, SLOT(setImage(const QImage)));
       
   104   emit seedChanged(m_seed);
   103   pMap->getImage(m_seed.toStdString());
   105   pMap->getImage(m_seed.toStdString());
   104   theme = (Themes->size() > 0) ? Themes->at(rand() % Themes->size()) : "steel";
   106   theme = (Themes->size() > 0) ? Themes->at(rand() % Themes->size()) : "steel";
       
   107   emit themeChanged(theme);
   105 }
   108 }
   106 
   109 
   107 QString HWMapContainer::getCurrentSeed() const
   110 QString HWMapContainer::getCurrentSeed() const
   108 {
   111 {
   109   return m_seed;
   112   return m_seed;