COIN-OR::LEMON - Graph Library

Changeset 1616:78704393218d in lemon-0.x


Ignore:
Timestamp:
08/07/05 20:06:41 (14 years ago)
Author:
Akos Ladanyi
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2123
Message:

open file from command line

Location:
gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • gui/graph-displayer.cc

    r1606 r1616  
    4444
    4545  MainWin mainwin("Displayed Graph");
     46
     47  if ((argc == 2) && (Glib::file_test(argv[1], Glib::FILE_TEST_IS_REGULAR)))
     48  {
     49    mainwin.readFile(argv[1]);
     50  }
     51 
    4652  app.run(mainwin);
    4753
  • gui/main_win.cc

    r1615 r1616  
    134134}
    135135
     136void MainWin::readFile(const std::string &file)
     137{
     138  mapstorage.readFromFile(file);
     139  mapstorage.file_name = file;
     140  mapstorage.modified = false;
     141  gd_canvas.drawGraph();
     142  mapwin.update();
     143}
     144
    136145void MainWin::newFile()
    137146{
  • gui/main_win.h

    r1607 r1616  
    2222
    2323  MapStorage mapstorage;
     24
     25  void readFile(const std::string &);
    2426
    2527protected:
Note: See TracChangeset for help on using the changeset viewer.