QTfrontend/ui/widget/mapContainer.cpp
changeset 8619 253750e192e7
parent 8475 f605bc59c603
child 8695 63936a70c177
equal deleted inserted replaced
8618:7e71dba4e7f3 8619:253750e192e7
   460         intSetIconlessTheme(theme);
   460         intSetIconlessTheme(theme);
   461 }
   461 }
   462 
   462 
   463 void HWMapContainer::setRandomMap()
   463 void HWMapContainer::setRandomMap()
   464 {
   464 {
       
   465     if (!m_master) return;
       
   466     
   465     setRandomSeed();
   467     setRandomSeed();
   466     switch(m_mapInfo.type)
   468     switch(m_mapInfo.type)
   467     {
   469     {
   468         case MapModel::GeneratedMap:
   470         case MapModel::GeneratedMap:
   469         case MapModel::GeneratedMaze:
   471         case MapModel::GeneratedMaze:
   489 void HWMapContainer::setRandomTheme()
   491 void HWMapContainer::setRandomTheme()
   490 {
   492 {
   491     if(!m_themeModel->rowCount()) return;
   493     if(!m_themeModel->rowCount()) return;
   492     quint32 themeNum = rand() % m_themeModel->rowCount();
   494     quint32 themeNum = rand() % m_themeModel->rowCount();
   493     updateTheme(m_themeModel->index(themeNum));
   495     updateTheme(m_themeModel->index(themeNum));
   494     qDebug() << "RANDOM THEME:" << themeNum;
   496     emit themeChanged(m_theme);
   495 }
   497 }
   496 
   498 
   497 void HWMapContainer::intSetTemplateFilter(int filter)
   499 void HWMapContainer::intSetTemplateFilter(int filter)
   498 {
   500 {
   499     generationStyles->setCurrentRow(filter);
   501     generationStyles->setCurrentRow(filter);