QTfrontend/ui/widget/gamecfgwidget.cpp
changeset 10480 43c6b9cfb569
parent 10472 8d04cebedb16
child 10481 caf7a8f20b0b
equal deleted inserted replaced
10479:31afb7cdff69 10480:43c6b9cfb569
   161 
   161 
   162     connect(pMapContainer, SIGNAL(seedChanged(const QString &)), this, SLOT(seedChanged(const QString &)));
   162     connect(pMapContainer, SIGNAL(seedChanged(const QString &)), this, SLOT(seedChanged(const QString &)));
   163     connect(pMapContainer, SIGNAL(mapChanged(const QString &)), this, SLOT(mapChanged(const QString &)));
   163     connect(pMapContainer, SIGNAL(mapChanged(const QString &)), this, SLOT(mapChanged(const QString &)));
   164     connect(pMapContainer, SIGNAL(mapgenChanged(MapGenerator)), this, SLOT(mapgenChanged(MapGenerator)));
   164     connect(pMapContainer, SIGNAL(mapgenChanged(MapGenerator)), this, SLOT(mapgenChanged(MapGenerator)));
   165     connect(pMapContainer, SIGNAL(mazeSizeChanged(int)), this, SLOT(maze_sizeChanged(int)));
   165     connect(pMapContainer, SIGNAL(mazeSizeChanged(int)), this, SLOT(maze_sizeChanged(int)));
       
   166     connect(pMapContainer, SIGNAL(mapFeatureSizeChanged(int)), this, SLOT(slMapFeatureSizeChanged(int)));
   166     connect(pMapContainer, SIGNAL(themeChanged(const QString &)), this, SLOT(themeChanged(const QString &)));
   167     connect(pMapContainer, SIGNAL(themeChanged(const QString &)), this, SLOT(themeChanged(const QString &)));
   167     connect(pMapContainer, SIGNAL(newTemplateFilter(int)), this, SLOT(templateFilterChanged(int)));
   168     connect(pMapContainer, SIGNAL(newTemplateFilter(int)), this, SLOT(templateFilterChanged(int)));
   168     connect(pMapContainer, SIGNAL(drawMapRequested()), this, SIGNAL(goToDrawMap()));
   169     connect(pMapContainer, SIGNAL(drawMapRequested()), this, SIGNAL(goToDrawMap()));
   169     connect(pMapContainer, SIGNAL(drawnMapChanged(const QByteArray &)), this, SLOT(onDrawnMapChanged(const QByteArray &)));
   170     connect(pMapContainer, SIGNAL(drawnMapChanged(const QByteArray &)), this, SLOT(onDrawnMapChanged(const QByteArray &)));
   170 
   171 
   401     schemeChanged(GameSchemes->currentIndex());
   402     schemeChanged(GameSchemes->currentIndex());
   402     scriptChanged(Scripts->currentIndex());
   403     scriptChanged(Scripts->currentIndex());
   403 
   404 
   404     mapgenChanged(pMapContainer->get_mapgen());
   405     mapgenChanged(pMapContainer->get_mapgen());
   405     maze_sizeChanged(pMapContainer->getMazeSize());
   406     maze_sizeChanged(pMapContainer->getMazeSize());
       
   407     slMapFeatureSizeChanged(pMapContainer->getFeatureSize());
   406 
   408 
   407     if(pMapContainer->get_mapgen() == 2)
   409     if(pMapContainer->get_mapgen() == 2)
   408         onDrawnMapChanged(pMapContainer->getDrawnMapData());
   410         onDrawnMapChanged(pMapContainer->getDrawnMapData());
   409 
   411 
   410     // map must be the last
   412     // map must be the last
   439             return;
   441             return;
   440         }
   442         }
   441         if (param == "MAPGEN")
   443         if (param == "MAPGEN")
   442         {
   444         {
   443             pMapContainer->setMapgen((MapGenerator)value.toUInt());
   445             pMapContainer->setMapgen((MapGenerator)value.toUInt());
       
   446             return;
       
   447         }
       
   448         if (param == "FEATURE_SIZE")
       
   449         {
       
   450             pMapContainer->setFeatureSize(value.toUInt());
   444             return;
   451             return;
   445         }
   452         }
   446         if (param == "MAZE_SIZE")
   453         if (param == "MAZE_SIZE")
   447         {
   454         {
   448             pMapContainer->setMazeSize(value.toUInt());
   455             pMapContainer->setMazeSize(value.toUInt());
   479             pMapContainer->setAllMapParameters(
   486             pMapContainer->setAllMapParameters(
   480                 slValue[0],
   487                 slValue[0],
   481                 (MapGenerator)slValue[1].toUInt(),
   488                 (MapGenerator)slValue[1].toUInt(),
   482                 slValue[2].toUInt(),
   489                 slValue[2].toUInt(),
   483                 seed,
   490                 seed,
   484                 slValue[4].toUInt()
   491                 slValue[4].toUInt(),
       
   492                 slValue[5].toUInt()
   485             );
   493             );
   486             return;
   494             return;
   487         }
   495         }
   488     }
   496     }
   489 
   497 
   670 void GameCFGWidget::maze_sizeChanged(int s)
   678 void GameCFGWidget::maze_sizeChanged(int s)
   671 {
   679 {
   672     emit paramChanged("MAZE_SIZE", QStringList(QString::number(s)));
   680     emit paramChanged("MAZE_SIZE", QStringList(QString::number(s)));
   673 }
   681 }
   674 
   682 
       
   683 void GameCFGWidget::slMapFeatureSizeChanged(int s)
       
   684 {
       
   685     emit paramChanged("FEATURE_SIZE", QStringList(QString::number(s)));
       
   686 }
       
   687 
   675 void GameCFGWidget::resendSchemeData()
   688 void GameCFGWidget::resendSchemeData()
   676 {
   689 {
   677     schemeChanged(GameSchemes->currentIndex());
   690     schemeChanged(GameSchemes->currentIndex());
   678 }
   691 }
   679 
   692