COIN-OR::LEMON - Graph Library

Changeset 108:bf355fd6563e in glemon-0.x for main_win.cc


Ignore:
Timestamp:
01/05/06 13:30:09 (18 years ago)
Author:
Hegyi Péter
Branch:
gui
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk/gui@2453
Message:

Several changes. \n If new map is added to mapstorage it emits signal with the name of the new map. This was important, because from now on not only tha mapwin should be updated. \n Furthermore algobox gets a pointer to mapstorage instead of only the mapnames from it. This is important because without it it would be complicated to pass all of the required maps to algobox.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main_win.cc

    r107 r108  
    410410void MainWin::createAlgoWin(int algoid)
    411411{
    412   AlgoWin * aw=new AlgoWin(algoid, tabnames, tabs[0]->mapstorage.getNodeMapList(),tabs[0]->mapstorage.getEdgeMapList());
     412  AlgoWin * aw=new AlgoWin(algoid, tabnames);
    413413  aw->signal_closing().connect(sigc::mem_fun(*this, &MainWin::deRegisterAlgoWin));
    414414  aw->signal_maplist_needed().connect(sigc::mem_fun(*this, &MainWin::updateAlgoWinMaps));
     
    417417}
    418418
     419void 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
    419428void MainWin::updateAlgoWinMaps(AlgoWin * awp, std::string tabname)
    420429{
     
    423432    {
    424433    }
    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));
    426436}
    427437
     
    429439{
    430440  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     }
    440441}
    441442
Note: See TracChangeset for help on using the changeset viewer.