Pretension to switch to draw map page
authorunc0rr
Sun, 12 Dec 2010 21:47:55 +0300
changeset 4511 df827e70ae63
parent 4510 ce9b8206e681
child 4512 c6aff8ceada0
Pretension to switch to draw map page
QTfrontend/gamecfgwidget.cpp
QTfrontend/gamecfgwidget.h
QTfrontend/hwform.cpp
QTfrontend/mapContainer.cpp
QTfrontend/mapContainer.h
--- a/QTfrontend/gamecfgwidget.cpp	Sun Dec 12 05:23:37 2010 +0100
+++ b/QTfrontend/gamecfgwidget.cpp	Sun Dec 12 21:47:55 2010 +0300
@@ -95,6 +95,7 @@
     connect(pMapContainer, SIGNAL(maze_sizeChanged(int)), this, SLOT(maze_sizeChanged(int)));
     connect(pMapContainer, SIGNAL(themeChanged(const QString &)), this, SLOT(themeChanged(const QString &)));
     connect(pMapContainer, SIGNAL(newTemplateFilter(int)), this, SLOT(templateFilterChanged(int)));
+    connect(pMapContainer, SIGNAL(drawMapRequested()), this, SIGNAL(goToDrawMap()));
 }
 
 void GameCFGWidget::jumpToSchemes()
--- a/QTfrontend/gamecfgwidget.h	Sun Dec 12 05:23:37 2010 +0100
+++ b/QTfrontend/gamecfgwidget.h	Sun Dec 12 21:47:55 2010 +0300
@@ -55,6 +55,7 @@
     void paramChanged(const QString & param, const QStringList & value);
     void goToSchemes(int);
     void goToWeapons(int);
+    void goToDrawMap();
 
 private slots:
     void ammoChanged(int index);
--- a/QTfrontend/hwform.cpp	Sun Dec 12 05:23:37 2010 +0100
+++ b/QTfrontend/hwform.cpp	Sun Dec 12 21:47:55 2010 +0300
@@ -141,6 +141,9 @@
     connect(ui.pageMultiplayer, SIGNAL(SetupClicked()), this, SLOT(IntermediateSetup()));
     connect(ui.pageMultiplayer->gameCFG, SIGNAL(goToSchemes(int)), this, SLOT(GoToScheme(int)));
     connect(ui.pageMultiplayer->gameCFG, SIGNAL(goToWeapons(int)), this, SLOT(GoToSelectWeaponSet(int)));
+    connect(ui.pageMultiplayer->gameCFG, SIGNAL(goToDrawMap()), pageSwitchMapper, SLOT(map()));
+    pageSwitchMapper->setMapping(ui.pageMultiplayer->gameCFG, ID_PAGE_DRAWMAP);
+    
 
     connect(ui.pagePlayDemo->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
     connect(ui.pagePlayDemo->BtnPlayDemo, SIGNAL(clicked()), this, SLOT(PlayDemo()));
@@ -180,6 +183,8 @@
     connect(ui.pageNetGame, SIGNAL(SetupClicked()), this, SLOT(IntermediateSetup()));
     connect(ui.pageNetGame->pGameCFG, SIGNAL(goToSchemes(int)), this, SLOT(GoToScheme(int)));
     connect(ui.pageNetGame->pGameCFG, SIGNAL(goToWeapons(int)), this, SLOT(GoToSelectWeaponSet(int)));
+    connect(ui.pageNetGame->pGameCFG, SIGNAL(goToDrawMap()), pageSwitchMapper, SLOT(map()));
+    pageSwitchMapper->setMapping(ui.pageNetGame->pGameCFG, ID_PAGE_DRAWMAP);
 
     connect(ui.pageRoomsList->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
     connect(ui.pageRoomsList->BtnAdmin, SIGNAL(clicked()), this, SLOT(GoToAdmin()));
@@ -224,6 +229,7 @@
     connect(ui.pageNetType->BtnLAN, SIGNAL(clicked()), this, SLOT(GoToNet()));
     connect(ui.pageNetType->BtnOfficialServer, SIGNAL(clicked()), this, SLOT(NetConnectOfficialServer()));
 
+    connect(ui.pageDrawMap->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
 
 
     ammoSchemeModel = new AmmoSchemeModel(this, cfgdir->absolutePath() + "/schemes.ini");
--- a/QTfrontend/mapContainer.cpp	Sun Dec 12 05:23:37 2010 +0100
+++ b/QTfrontend/mapContainer.cpp	Sun Dec 12 21:47:55 2010 +0300
@@ -432,8 +432,10 @@
     {
     case MAPGEN_REGULAR:
     case MAPGEN_MAZE:
+        setRandomTheme();
+        break;
     case MAPGEN_DRAWN:
-        setRandomTheme();
+        emit drawMapRequested();
         break;
     default:
         if(chooseMap->currentIndex() < numMissions + 4)
--- a/QTfrontend/mapContainer.h	Sun Dec 12 05:23:37 2010 +0100
+++ b/QTfrontend/mapContainer.h	Sun Dec 12 21:47:55 2010 +0300
@@ -67,6 +67,7 @@
   void newTemplateFilter(int filter);
   void mapgenChanged(MapGenerator m);
   void maze_sizeChanged(int s);
+  void drawMapRequested();
 
  private slots:
   void setImage(const QImage newImage);