[Lemon-commits] ladanyi: r3392 - glemon/branches/akos

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 19 02:13:00 CET 2007


Author: ladanyi
Date: Mon Nov 19 02:12:58 2007
New Revision: 3392

Modified:
   glemon/branches/akos/algobox.cc
   glemon/branches/akos/algobox.h
   glemon/branches/akos/eps_win.cc
   glemon/branches/akos/eps_win.h
   glemon/branches/akos/map_win.cc
   glemon/branches/akos/map_win.h
   glemon/branches/akos/mapselector.cc
   glemon/branches/akos/mapselector.h
   glemon/branches/akos/mapstorage.cc
   glemon/branches/akos/mapstorage.h
   glemon/branches/akos/nbtab.cc
   glemon/branches/akos/nbtab.h

Log:
Propagate both map name and type via the signals.

Modified: glemon/branches/akos/algobox.cc
==============================================================================
--- glemon/branches/akos/algobox.cc	(original)
+++ glemon/branches/akos/algobox.cc	Mon Nov 19 02:12:58 2007
@@ -108,19 +108,19 @@
   signal_maplist_updated.emit();
 }
 
-void AlgoBox::nodemaplist_changed(std::string newmap)
+void AlgoBox::nodemaplist_changed(std::string newmap, MapValue::Type type)
 {
   for(int i=0;i<(int)nodemapcbts.size();i++)
     {
-      (nodemapcbts[i])->append_text(newmap);
+      (nodemapcbts[i])->append_text(newmap, type);
     }
 }
 
-void AlgoBox::edgemaplist_changed(std::string newmap)
+void AlgoBox::edgemaplist_changed(std::string newmap, MapValue::Type type)
 {
   for(int i=0;i<(int)edgemapcbts.size();i++)
     {
-      (edgemapcbts[i])->append_text(newmap);
+      (edgemapcbts[i])->append_text(newmap, type);
     }
 }
 

Modified: glemon/branches/akos/algobox.h
==============================================================================
--- glemon/branches/akos/algobox.h	(original)
+++ glemon/branches/akos/algobox.h	Mon Nov 19 02:12:58 2007
@@ -25,6 +25,7 @@
 #include <all_include.h>
 #include <libgnomecanvasmm.h>
 #include <libgnomecanvasmm/polygon.h>
+#include "map_value.h"
 
 ///Ancestor class of algorithm graphical interface classes.
 
@@ -138,14 +139,14 @@
   ///If new map was added to \ref MapStorage of currently selected \ref NoteBookTab
   ///a signal is emitted by it. This signal is connected to this function, so \ref MapSelector s
   ///in \ref nodemapcbts can be notified, and those can registrate the new map. (\ref MapSelector::append_text)
-  void nodemaplist_changed(std::string);
+  void nodemaplist_changed(std::string, MapValue::Type);
 
   ///Interface, through which \ref AlgoBox can be notified about edgemap addition.
 
   ///If new map was added to \ref MapStorage of currently selected \ref NoteBookTab
   ///a signal is emitted by it. This signal is connected to this function, so \ref MapSelector s
   ///in \ref edgemapcbts can be notified, and those can registrate the new map. (\ref MapSelector::append_text)
-  void edgemaplist_changed(std::string);
+  void edgemaplist_changed(std::string, MapValue::Type);
 
   ///Aid function to provide data for a given entry.
 

Modified: glemon/branches/akos/eps_win.cc
==============================================================================
--- glemon/branches/akos/eps_win.cc	(original)
+++ glemon/branches/akos/eps_win.cc	Mon Nov 19 02:12:58 2007
@@ -104,7 +104,7 @@
   signal_new_map.emit(false);
 }
 
-void EpsWin::registerNewNodeMap(std::string newmapname)
+void EpsWin::registerNewNodeMap(std::string newmapname, MapValue::Type type)
 {
-    mapselector->append_text((Glib::ustring)newmapname);
+    mapselector->append_text((Glib::ustring)newmapname, type);
 }

Modified: glemon/branches/akos/eps_win.h
==============================================================================
--- glemon/branches/akos/eps_win.h	(original)
+++ glemon/branches/akos/eps_win.h	Mon Nov 19 02:12:58 2007
@@ -24,6 +24,7 @@
 #include <all_include.h>
 #include <libgnomecanvasmm.h>
 #include <libgnomecanvasmm/polygon.h>
+#include "map_value.h"
 
 ///Graph visualization setup window.
 
@@ -102,7 +103,7 @@
 
   ///\param new_name
   ///name of new map
-  void registerNewNodeMap(std::string new_name);
+  void registerNewNodeMap(std::string new_name, MapValue::Type type);
 };
 
 #endif //EPS_WIN_H

Modified: glemon/branches/akos/map_win.cc
==============================================================================
--- glemon/branches/akos/map_win.cc	(original)
+++ glemon/branches/akos/map_win.cc	Mon Nov 19 02:12:58 2007
@@ -161,21 +161,21 @@
   mytab.active_maps_needed();
 }
 
-void MapWin::registerNewEdgeMap(std::string newmapname)
+void MapWin::registerNewEdgeMap(std::string newmapname, MapValue::Type type)
 {
   for(int i=0;i<EDGE_PROPERTY_NUM;i++)
   {
     //filling in combo box with choices
-    e_combo_array[i]->append_text((Glib::ustring)newmapname);
+    e_combo_array[i]->append_text((Glib::ustring)newmapname, type);
   }
 }
 
-void MapWin::registerNewNodeMap(std::string newmapname)
+void MapWin::registerNewNodeMap(std::string newmapname, MapValue::Type type)
 {
   for(int i=0;i<NODE_PROPERTY_NUM;i++)
   {
     //filling in combo box with choices
-    n_combo_array[i]->append_text((Glib::ustring)newmapname);
+    n_combo_array[i]->append_text((Glib::ustring)newmapname, type);
   }
 }
 

Modified: glemon/branches/akos/map_win.h
==============================================================================
--- glemon/branches/akos/map_win.h	(original)
+++ glemon/branches/akos/map_win.h	Mon Nov 19 02:12:58 2007
@@ -25,6 +25,7 @@
 #include <all_include.h>
 #include <libgnomecanvasmm.h>
 #include <libgnomecanvasmm/polygon.h>
+#include "map_value.h"
 
 ///Graph visualization setup window.
 
@@ -109,13 +110,13 @@
 
   ///\param new_name
   ///name of new map
-  void registerNewEdgeMap(std::string new_name);
+  void registerNewEdgeMap(std::string new_name, MapValue::Type type);
 
   ///This function inserts name of the new nodemap in the name list in \ref MapSelector s
 
   ///\param new_name
   ///name of new map
-  void registerNewNodeMap(std::string new_name);
+  void registerNewNodeMap(std::string new_name, MapValue::Type type);
 
   ///Close window if Esc key pressed.
   virtual bool closeIfEscapeIsPressed(GdkEventKey*);

Modified: glemon/branches/akos/mapselector.cc
==============================================================================
--- glemon/branches/akos/mapselector.cc	(original)
+++ glemon/branches/akos/mapselector.cc	Mon Nov 19 02:12:58 2007
@@ -163,16 +163,19 @@
     }
 }
 
-void MapSelector::append_text(Glib::ustring text)
+void MapSelector::append_text(Glib::ustring text, MapValue::Type type)
 {
-  cbt.append_text(text);
-  cbt_content.push_back(text);
+  if (type & map_type)
+  {
+    cbt.append_text(text);
+    cbt_content.push_back(text);
 
-  if(set_new_map)
+    if(set_new_map)
     {
       set_active_text(text);
       set_new_map=false;
     }
+  }
 }
 
 sigc::signal<void, std::string> MapSelector::signal_cbt_ch()

Modified: glemon/branches/akos/mapselector.h
==============================================================================
--- glemon/branches/akos/mapselector.h	(original)
+++ glemon/branches/akos/mapselector.h	Mon Nov 19 02:12:58 2007
@@ -22,6 +22,7 @@
 #include <all_include.h>
 #include <libgnomecanvasmm.h>
 #include <libgnomecanvasmm/polygon.h>
+#include "map_value.h"
 
 ///A widget by which node and edgemaps can be selected, deselected and created.
 
@@ -172,6 +173,6 @@
   ///from that the option to append is coming. In this case
   ///this function  will set \ref cbt to the new option.
   ///\param new_option new option to append
-  void append_text(Glib::ustring new_option);
+  void append_text(Glib::ustring new_option, MapValue::Type);
 };
 #endif //MAPSELECTOR_H

Modified: glemon/branches/akos/mapstorage.cc
==============================================================================
--- glemon/branches/akos/mapstorage.cc	(original)
+++ glemon/branches/akos/mapstorage.cc	Mon Nov 19 02:12:58 2007
@@ -101,7 +101,7 @@
 
   nodemaps[name]->default_value = def_val;
 
-  signal_node_map.emit(name);
+  signal_node_map.emit(name, type);
 }
 
 void MapStorage::createEdgeMap(const std::string& name, MapValue::Type type,
@@ -123,7 +123,7 @@
 
   edgemaps[name]->default_value = def_val;
 
-  signal_edge_map.emit(name);
+  signal_edge_map.emit(name, type);
 }
 
 void MapStorage::changeActiveMap(bool itisedge, int prop, std::string mapname)

Modified: glemon/branches/akos/mapstorage.h
==============================================================================
--- glemon/branches/akos/mapstorage.h	(original)
+++ glemon/branches/akos/mapstorage.h	Mon Nov 19 02:12:58 2007
@@ -321,13 +321,13 @@
 
   /// std::string is the
   ///name of the new map
-  sigc::signal<void, std::string> signal_node_map;
+  sigc::signal<void, std::string, MapValue::Type> signal_node_map;
 
   /// Signal emitted in the case of edgemap addition
 
   /// std::string is the
   ///name of the new map
-  sigc::signal<void, std::string> signal_edge_map;
+  sigc::signal<void, std::string, MapValue::Type> signal_edge_map;
 
   /// Signal emitted, when entry in \ref MapWin should be changed.
   sigc::signal<void, bool, int, std::string> signal_map_win;
@@ -396,10 +396,10 @@
   sigc::signal<void, bool, int> signal_prop_ch();
 
   ///returns \ref signal_node_map to be able to connect functions to it
-  sigc::signal<void, std::string> signal_node_map_ch(){return signal_node_map;};
+  sigc::signal<void, std::string, MapValue::Type> signal_node_map_ch(){return signal_node_map;};
 
   ///returns \ref signal_edge_map to be able to connect functions to it
-  sigc::signal<void, std::string> signal_edge_map_ch(){return signal_edge_map;};
+  sigc::signal<void, std::string, MapValue::Type> signal_edge_map_ch(){return signal_edge_map;};
 
   ///returns \ref signal_map_win to be able to connect functions to it
   sigc::signal<void, bool, int, std::string> signal_map_win_ch(){return signal_map_win;};

Modified: glemon/branches/akos/nbtab.cc
==============================================================================
--- glemon/branches/akos/nbtab.cc	(original)
+++ glemon/branches/akos/nbtab.cc	Mon Nov 19 02:12:58 2007
@@ -226,23 +226,23 @@
   return mapstorage->getActiveNodeMap(prop);
 }
 
-void NoteBookTab::registerNewEdgeMap(std::string mapname)
+void NoteBookTab::registerNewEdgeMap(std::string mapname, MapValue::Type type)
 {
   if(mapwinexists)
     {
-      mapwin->registerNewEdgeMap(mapname);
+      mapwin->registerNewEdgeMap(mapname, type);
     }
 }
 
-void NoteBookTab::registerNewNodeMap(std::string mapname)
+void NoteBookTab::registerNewNodeMap(std::string mapname, MapValue::Type type)
 {
   if(mapwinexists)
     {
-      mapwin->registerNewNodeMap(mapname);
+      mapwin->registerNewNodeMap(mapname, type);
     }
   if(epswinexists)
     {
-      epswin->registerNewNodeMap(mapname);
+      epswin->registerNewNodeMap(mapname, type);
     }
 }
 

Modified: glemon/branches/akos/nbtab.h
==============================================================================
--- glemon/branches/akos/nbtab.h	(original)
+++ glemon/branches/akos/nbtab.h	Mon Nov 19 02:12:58 2007
@@ -27,6 +27,7 @@
 
 #include <libgnomecanvasmm.h>
 #include <libgnomecanvasmm/polygon.h>
+#include "map_value.h"
 
 ///One tab in the Notebook that is placed in the main window (\ref MainWin).
 
@@ -172,7 +173,7 @@
   ///a function with the same name and same parameterin \ref MapWin.
   ///This call-forwarder function is needed, because \ref Mapstorage does not know \ref MapWin
   ///\param mapname name of new map
-  void registerNewEdgeMap(std::string mapname);
+  void registerNewEdgeMap(std::string mapname, MapValue::Type type);
 
   ///Registers recently created nodemap in \ref MapWin.
 
@@ -181,7 +182,7 @@
   ///a function with the same name and same parameter in \ref MapWin.
   ///This call-forwarder function is needed, because \ref Mapstorage does not know \ref MapWin
   ///\param mapname name of new map
-  void registerNewNodeMap(std::string mapname);
+  void registerNewNodeMap(std::string mapname, MapValue::Type type);
 
   ///Pops up and registrates the \ref MapWin of \ref NoteBookTab.
   



More information about the Lemon-commits mailing list