Dijkstra in GUI.
authorhegyi
Fri, 13 Oct 2006 13:53:10 +0000
changeset 162aaa517c9dc23
parent 161 aef1fbfd9d60
child 163 443bc769b344
Dijkstra in GUI.
Makefile.am
algobox.cc
algobox.h
algowin.cc
main_win.cc
     1.1 --- a/Makefile.am	Thu Oct 12 12:18:20 2006 +0000
     1.2 +++ b/Makefile.am	Fri Oct 13 13:53:10 2006 +0000
     1.3 @@ -44,7 +44,9 @@
     1.4  	i18n.h \
     1.5  	gettext.h \
     1.6  	design_win.h \
     1.7 -	design_win.cc
     1.8 +	design_win.cc \
     1.9 +	dijkstrabox.h \
    1.10 +	dijkstrabox.cc
    1.11  
    1.12  glemon_CXXFLAGS = $(GTK_CFLAGS) $(LEMON_CFLAGS)
    1.13  glemon_LDFLAGS = $(GTK_LIBS) $(LEMON_LIBS)
     2.1 --- a/algobox.cc	Thu Oct 12 12:18:20 2006 +0000
     2.2 +++ b/algobox.cc	Fri Oct 13 13:53:10 2006 +0000
     2.3 @@ -81,6 +81,7 @@
     2.4        (edgemapcbts[i])->update_list(eml);
     2.5        //update_cbt(eml, *(edgemapcbts[i]));
     2.6      }
     2.7 +  signal_maplist_updated.emit();
     2.8  }
     2.9  
    2.10  void AlgoBox::nodemaplist_changed(std::string newmap)
     3.1 --- a/algobox.h	Thu Oct 12 12:18:20 2006 +0000
     3.2 +++ b/algobox.h	Fri Oct 13 13:53:10 2006 +0000
     3.3 @@ -45,6 +45,10 @@
     3.4    ///In that case will be this signal emitted.
     3.5    sigc::signal<void, std::string, bool> signal_newmapwin_need;
     3.6  
     3.7 +  ///Signal emitted when maplists are updated after tab change
     3.8 +  sigc::signal<void> signal_maplist_updated;
     3.9 +
    3.10 +
    3.11  protected:
    3.12    ///Holder of tabnames.
    3.13    Gtk::ComboBoxText tabcbt;
    3.14 @@ -97,6 +101,8 @@
    3.15    ///Emitted if user wants to create a new map for inpuit or output.
    3.16    sigc::signal<void, std::string, bool> signal_newmapwin_needed(){return signal_newmapwin_need;};
    3.17  
    3.18 +  sigc::signal<void> signal_upon_maplist_updated(){return signal_maplist_updated;};
    3.19 +
    3.20    ///Emits signal that requires list of maps for the recently selected \ref NoteBookTab.
    3.21    void emit_tab_change();
    3.22  
     4.1 --- a/algowin.cc	Thu Oct 12 12:18:20 2006 +0000
     4.2 +++ b/algowin.cc	Fri Oct 13 13:53:10 2006 +0000
     4.3 @@ -1,5 +1,6 @@
     4.4  #include <algowin.h>
     4.5  #include <kruskalbox.h>
     4.6 +#include <dijkstrabox.h>
     4.7  
     4.8  sigc::signal<void, AlgoWin *> AlgoWin::signal_closing()
     4.9  {
    4.10 @@ -39,6 +40,10 @@
    4.11        ab=new KruskalBox(tabnames);
    4.12        set_title("Kruskal Algorithm");
    4.13        break;
    4.14 +    case 2:
    4.15 +      ab=new DijkstraBox(tabnames);
    4.16 +      set_title("Dijkstra Algorithm");
    4.17 +      break;
    4.18      default:
    4.19        break;
    4.20      }
     5.1 --- a/main_win.cc	Thu Oct 12 12:18:20 2006 +0000
     5.2 +++ b/main_win.cc	Fri Oct 13 13:53:10 2006 +0000
     5.3 @@ -107,6 +107,8 @@
     5.4  	   sigc::bind( sigc::mem_fun ( *this, &MainWin::createAlgoWin ), 0) );
     5.5    ag->add( Gtk::Action::create("AlgoKruskal", _("_Kruskal")),
     5.6  	   sigc::bind( sigc::mem_fun ( *this, &MainWin::createAlgoWin ), 1) );
     5.7 +  ag->add( Gtk::Action::create("AlgoDijkstra", _("_Dijkstra")),
     5.8 +	   sigc::bind( sigc::mem_fun ( *this, &MainWin::createAlgoWin ), 2) );
     5.9  
    5.10    Gtk::RadioAction::Group tool_group;
    5.11    ag->add( Gtk::RadioAction::create(tool_group, "MoveItem", Gtk::StockID("gd-move"), _("Move")),
    5.12 @@ -159,6 +161,7 @@
    5.13        "    <menu action='AlgoMenu'>"
    5.14        "      <menuitem action='AlgoGeneral'/>"
    5.15        "      <menuitem action='AlgoKruskal'/>"
    5.16 +      "      <menuitem action='AlgoDijkstra'/>"
    5.17        "    </menu>"
    5.18        "  </menubar>"
    5.19        "  <toolbar name='ToolBar'>"