main_win.cc
branchgui
changeset 113 7c2e71835de7
parent 107 b1be10a9a2b6
child 114 0ace7edbb06f
equal deleted inserted replaced
33:90964805a90f 34:b6b944588ae2
   407     }
   407     }
   408 }
   408 }
   409 
   409 
   410 void MainWin::createAlgoWin(int algoid)
   410 void MainWin::createAlgoWin(int algoid)
   411 {
   411 {
   412   AlgoWin * aw=new AlgoWin(algoid, tabnames, tabs[0]->mapstorage.getNodeMapList(),tabs[0]->mapstorage.getEdgeMapList());
   412   AlgoWin * aw=new AlgoWin(algoid, tabnames);
   413   aw->signal_closing().connect(sigc::mem_fun(*this, &MainWin::deRegisterAlgoWin));
   413   aw->signal_closing().connect(sigc::mem_fun(*this, &MainWin::deRegisterAlgoWin));
   414   aw->signal_maplist_needed().connect(sigc::mem_fun(*this, &MainWin::updateAlgoWinMaps));
   414   aw->signal_maplist_needed().connect(sigc::mem_fun(*this, &MainWin::updateAlgoWinMaps));
   415   aws.insert(aw);
   415   aws.insert(aw);
   416   aw->show();
   416   aw->show();
   417 }
   417 }
   418 
   418 
       
   419 void MainWin::updateAlgoWinTabs()
       
   420 {
       
   421   std::set< AlgoWin* >::iterator awsi=aws.begin();
       
   422   for(;awsi!=aws.end();awsi++)
       
   423     {
       
   424       (*awsi)->update_tablist(tabnames);
       
   425     }
       
   426 }
       
   427 
   419 void MainWin::updateAlgoWinMaps(AlgoWin * awp, std::string tabname)
   428 void MainWin::updateAlgoWinMaps(AlgoWin * awp, std::string tabname)
   420 {
   429 {
   421   int i=0;
   430   int i=0;
   422   for(;(i<(int)tabnames.size())&&(tabnames[i]!=tabname);i++)
   431   for(;(i<(int)tabnames.size())&&(tabnames[i]!=tabname);i++)
   423     {
   432     {
   424     }
   433     }
   425   awp->update_maplist(tabs[i]->mapstorage.getNodeMapList(),tabs[i]->mapstorage.getEdgeMapList());
   434   //awp->update_maplist(tabs[i]->mapstorage.getNodeMapList(),tabs[i]->mapstorage.getEdgeMapList());
       
   435   awp->update_maplist(&(tabs[i]->mapstorage));
   426 }
   436 }
   427 
   437 
   428 void MainWin::deRegisterAlgoWin(AlgoWin * awp)
   438 void MainWin::deRegisterAlgoWin(AlgoWin * awp)
   429 {
   439 {
   430   aws.erase(awp);
   440   aws.erase(awp);
   431 }
       
   432 
       
   433 void MainWin::updateAlgoWinTabs()
       
   434 {
       
   435   std::set< AlgoWin* >::iterator awsi=aws.begin();
       
   436   for(;awsi!=aws.end();awsi++)
       
   437     {
       
   438       (*awsi)->update_tablist(tabnames);
       
   439     }
       
   440 }
   441 }
   441 
   442 
   442 void MainWin::changeEditorialTool(int tool)
   443 void MainWin::changeEditorialTool(int tool)
   443 {
   444 {
   444   active_tool=tool;
   445   active_tool=tool;