# HG changeset patch # User hegyi # Date 1160747590 0 # Node ID aaa517c9dc235e633ca8c4d3c84009f2279904ee # Parent aef1fbfd9d602d3cc70b8d216b5aeaa4ae7eb2be Dijkstra in GUI. diff -r aef1fbfd9d60 -r aaa517c9dc23 Makefile.am --- a/Makefile.am Thu Oct 12 12:18:20 2006 +0000 +++ b/Makefile.am Fri Oct 13 13:53:10 2006 +0000 @@ -44,7 +44,9 @@ i18n.h \ gettext.h \ design_win.h \ - design_win.cc + design_win.cc \ + dijkstrabox.h \ + dijkstrabox.cc glemon_CXXFLAGS = $(GTK_CFLAGS) $(LEMON_CFLAGS) glemon_LDFLAGS = $(GTK_LIBS) $(LEMON_LIBS) diff -r aef1fbfd9d60 -r aaa517c9dc23 algobox.cc --- a/algobox.cc Thu Oct 12 12:18:20 2006 +0000 +++ b/algobox.cc Fri Oct 13 13:53:10 2006 +0000 @@ -81,6 +81,7 @@ (edgemapcbts[i])->update_list(eml); //update_cbt(eml, *(edgemapcbts[i])); } + signal_maplist_updated.emit(); } void AlgoBox::nodemaplist_changed(std::string newmap) diff -r aef1fbfd9d60 -r aaa517c9dc23 algobox.h --- a/algobox.h Thu Oct 12 12:18:20 2006 +0000 +++ b/algobox.h Fri Oct 13 13:53:10 2006 +0000 @@ -45,6 +45,10 @@ ///In that case will be this signal emitted. sigc::signal signal_newmapwin_need; + ///Signal emitted when maplists are updated after tab change + sigc::signal signal_maplist_updated; + + protected: ///Holder of tabnames. Gtk::ComboBoxText tabcbt; @@ -97,6 +101,8 @@ ///Emitted if user wants to create a new map for inpuit or output. sigc::signal signal_newmapwin_needed(){return signal_newmapwin_need;}; + sigc::signal signal_upon_maplist_updated(){return signal_maplist_updated;}; + ///Emits signal that requires list of maps for the recently selected \ref NoteBookTab. void emit_tab_change(); diff -r aef1fbfd9d60 -r aaa517c9dc23 algowin.cc --- a/algowin.cc Thu Oct 12 12:18:20 2006 +0000 +++ b/algowin.cc Fri Oct 13 13:53:10 2006 +0000 @@ -1,5 +1,6 @@ #include #include +#include sigc::signal AlgoWin::signal_closing() { @@ -39,6 +40,10 @@ ab=new KruskalBox(tabnames); set_title("Kruskal Algorithm"); break; + case 2: + ab=new DijkstraBox(tabnames); + set_title("Dijkstra Algorithm"); + break; default: break; } diff -r aef1fbfd9d60 -r aaa517c9dc23 main_win.cc --- a/main_win.cc Thu Oct 12 12:18:20 2006 +0000 +++ b/main_win.cc Fri Oct 13 13:53:10 2006 +0000 @@ -107,6 +107,8 @@ sigc::bind( sigc::mem_fun ( *this, &MainWin::createAlgoWin ), 0) ); ag->add( Gtk::Action::create("AlgoKruskal", _("_Kruskal")), sigc::bind( sigc::mem_fun ( *this, &MainWin::createAlgoWin ), 1) ); + ag->add( Gtk::Action::create("AlgoDijkstra", _("_Dijkstra")), + sigc::bind( sigc::mem_fun ( *this, &MainWin::createAlgoWin ), 2) ); Gtk::RadioAction::Group tool_group; ag->add( Gtk::RadioAction::create(tool_group, "MoveItem", Gtk::StockID("gd-move"), _("Move")), @@ -159,6 +161,7 @@ " " " " " " + " " " " " " " "