COIN-OR::LEMON - Graph Library

Changeset 196:c220f9de6545 in glemon-0.x for nbtab.cc


Ignore:
Timestamp:
03/01/07 14:33:46 (13 years ago)
Author:
Hegyi Péter
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/glemon/trunk@3207
Message:

EpsWin? and DesignWin? does not need to know NoteBookTab?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nbtab.cc

    r195 r196  
    5454      mapwin->update(mapstorage->getEdgeMapList(), mapstorage->getNodeMapList());
    5555    }
    56   signal_title.emit(Glib::filename_display_basename(file));
     56  title_changed(Glib::filename_display_basename(file));
    5757}
    5858
     
    8383      mapwin->update(mapstorage->getEdgeMapList(), mapstorage->getNodeMapList());
    8484    }
    85   signal_title.emit("unsaved file");
     85  title_changed("unsaved file");
    8686}
    8787
     
    123123          mapwin->update(mapstorage->getEdgeMapList(), mapstorage->getNodeMapList());
    124124        }
    125       signal_title.emit(Glib::filename_display_basename(filename));
     125      title_changed(Glib::filename_display_basename(filename));
    126126    }
    127127  }
     
    137137    mapstorage->writeToFile(mapstorage->file_name);
    138138    mapstorage->modified = false;
    139     signal_title.emit(Glib::filename_display_basename(mapstorage->file_name));
     139    title_changed(Glib::filename_display_basename(mapstorage->file_name));
    140140  }
    141141}
     
    152152    mapstorage->writeToFile(filename);
    153153    mapstorage->modified = false;
    154     signal_title.emit(Glib::filename_display_basename(filename));
     154    title_changed(Glib::filename_display_basename(filename));
    155155  }
    156156}
     
    182182      mapwin->update(mapstorage->getEdgeMapList(), mapstorage->getNodeMapList());
    183183    }
    184   signal_title.emit("unsaved file");
     184  title_changed("unsaved file");
    185185}
    186186
     
    241241  if(!epswinexists)
    242242    {
    243       epswin=new EpsWin("Export to EPS - "+name, *this);
     243      epswin=new EpsWin("Export to EPS - "+name);
    244244      epswin->show();
    245245      epswinexists=true;
     246      epswin->signal_eps_details_ch().connect(sigc::mem_fun(*this, &NoteBookTab::exportGraphToEPS));
     247      epswin->signal_eps_close_ch().connect(sigc::mem_fun(*this, &NoteBookTab::closeEpsWin));
    246248    }
    247249}
     
    255257      int iterations;
    256258      mapstorage->get_design_data(attraction, propulsation, iterations);
    257       designwin=new DesignWin("Design Setup - "+name, attraction, propulsation, iterations, *this);
     259      designwin=new DesignWin("Design Setup - "+name, attraction, propulsation, iterations);
    258260
    259261      designwin->signal_attraction().connect(sigc::mem_fun(mapstorage, &MapStorage::set_attraction));
     
    323325  mapstorage->exportGraphToEPS(options, filename);
    324326}
     327
     328void NoteBookTab::title_changed(std::string newtitle)
     329{
     330  signal_title.emit(newtitle);
     331  if(epswinexists)
     332    {
     333      epswin->set_title(newtitle);
     334    }
     335  if(designwinexists)
     336    {
     337      designwin->set_title(newtitle);
     338    }
     339}
Note: See TracChangeset for help on using the changeset viewer.