Documenatation of MapWin. gui
authorhegyi
Thu, 12 Jan 2006 15:24:24 +0000
branchgui
changeset 123a3781bff1032
parent 122 96bfa82264c3
child 124 b8d778d4d100
Documenatation of MapWin.
map_win.cc
map_win.h
mapselector.h
     1.1 --- a/map_win.cc	Thu Jan 12 14:36:08 2006 +0000
     1.2 +++ b/map_win.cc	Thu Jan 12 15:24:24 2006 +0000
     1.3 @@ -62,10 +62,6 @@
     1.4  
     1.5  }
     1.6  
     1.7 -MapWin::~MapWin()
     1.8 -{
     1.9 -}
    1.10 -
    1.11  void MapWin::nodeMapChanged(std::string mapname, int prop)
    1.12  {
    1.13    mytab.propertyChange(false, prop, mapname);
     2.1 --- a/map_win.h	Thu Jan 12 14:36:08 2006 +0000
     2.2 +++ b/map_win.h	Thu Jan 12 15:24:24 2006 +0000
     2.3 @@ -11,45 +11,107 @@
     2.4  #include <libgnomecanvasmm.h>
     2.5  #include <libgnomecanvasmm/polygon.h>
     2.6  
     2.7 +///Graph visualization setup window.
     2.8 +
     2.9  ///This class is responsible for creating a window,
    2.10  ///on which the visualization attributes can be
    2.11  ///assigned to maps.
    2.12  class MapWin : public Gtk::Window
    2.13  {
    2.14  protected:
    2.15 +  ///\ref NoteBookTab to that the \ref MapWin belongs to.
    2.16    NoteBookTab & mytab;
    2.17  
    2.18 +  ///Designing element
    2.19    Gtk::Table * table;
    2.20    
    2.21 -  MapSelector ** e_combo_array, ** n_combo_array;
    2.22 +  ///\ref MapSelectors for each property
    2.23  
    2.24 +  ///Each property has an own \ref MapSelector through which
    2.25 +  ///the map to visualize by the property van be set.
    2.26 +  MapSelector ** e_combo_array;
    2.27 +
    2.28 +  ///\ref MapSelectors for each property
    2.29 +
    2.30 +  ///Each property has an own \ref MapSelector through which
    2.31 +  ///the map to visualize by the property van be set.
    2.32 +  MapSelector ** n_combo_array;
    2.33 +
    2.34 +  ///Information holder
    2.35    Gtk::Label * label;
    2.36  
    2.37 +  ///Container in which elements are organized.
    2.38    Gtk::VBox vbox;
    2.39  
    2.40  public:
    2.41 -  ///Constructor of MapWin creates the widgets shown in MapWin.
    2.42 -  MapWin(const std::string& title, std::vector<std::string>, std::vector<std::string>, NoteBookTab & mw);
    2.43 +  ///Constructor
    2.44  
    2.45 -  ~MapWin();
    2.46 +  ///It creates the widgets shown in \ref MapWin and
    2.47 +  ///binds the needed signal to the correct place.
    2.48 +  ///\param title title of window
    2.49 +  ///\param eml edgemap list
    2.50 +  ///\param nml nodemap list
    2.51 +  ///\param mw the owner \ref NoteBookTab (\ref mytab)
    2.52 +  MapWin(const std::string& title, std::vector<std::string> eml, std::vector<std::string> nml, NoteBookTab & mw);
    2.53  
    2.54 +  ///Deregistrates \ref MapWin in its \ref NoteBookTab (\ref mytab)
    2.55    virtual bool on_delete_event(GdkEventAny *);
    2.56  
    2.57 -  void nodeMapChanged(std::string, int);
    2.58 +  ///Handles changement in nodemap selection
    2.59  
    2.60 -  void edgeMapChanged(std::string, int);
    2.61 +  ///If \ref MapSelector emits a signal that indicates
    2.62 +  ///changement in nodemap selection this function will
    2.63 +  ///be called. It calls the appropriate handler function,
    2.64 +  ///\ref NoteBookTab::propertyChange with parameters describing the changement.
    2.65 +  ///\param mapname the recently selected map
    2.66 +  ///\param prop the changed property
    2.67 +  void nodeMapChanged(std::string mapname, int prop);
    2.68  
    2.69 -  void newMapWinNeeded(bool);
    2.70 +  ///Handles changement in edgemap selection
    2.71  
    2.72 -  ///This function inserts name of the new edgemap in the list in the combo box
    2.73 -  void registerNewEdgeMap(std::string);
    2.74 +  ///If \ref MapSelector emits a signal that indicates
    2.75 +  ///changement in edgemap selection this function will
    2.76 +  ///be called. It calls the appropriate handler function,
    2.77 +  ///\ref NoteBookTab::propertyChange with parameters describing the changement.
    2.78 +  ///\param mapname the recently selected map
    2.79 +  ///\param prop the changed property
    2.80 +  void edgeMapChanged(std::string mapname, int prop);
    2.81  
    2.82 -  ///This function inserts name of the new nodemap in the list in the combo box
    2.83 -  void registerNewNodeMap(std::string);
    2.84 +  ///Indicates to the owner \ref NoteBookTab that a \ref NewMapWin should be opened.
    2.85  
    2.86 +  ///This function is bound to the
    2.87 +  ///signal emitted by the \ref MapSelector in case of
    2.88 +  ///the user wants to create a new map. It only pass the
    2.89 +  ///information further to the tab owning this \ref MapWin that is needed to open the
    2.90 +  ///\ref NewMapWin. (\ref NoteBookTab::popupNewMapWin)
    2.91 +  ///\param itisedge should the new map will be an edgemap? (or nodemap)
    2.92 +  void newMapWinNeeded(bool itisedge);
    2.93 +
    2.94 +  ///This function inserts name of the new edgemap in the name list in \ref MapSelector s
    2.95 +
    2.96 +  ///\param new_name
    2.97 +  ///name of new map
    2.98 +  void registerNewEdgeMap(std::string new_name);
    2.99 +
   2.100 +  ///This function inserts name of the new nodemap in the name list in \ref MapSelector s
   2.101 +
   2.102 +  ///\param new_name
   2.103 +  ///name of new map
   2.104 +  void registerNewNodeMap(std::string new_name);
   2.105 +
   2.106 +  ///Close window if Esc key pressed.
   2.107    virtual bool closeIfEscapeIsPressed(GdkEventKey*);
   2.108  
   2.109 -  void update(std::vector<std::string>, std::vector<std::string>);
   2.110 +  ///Updates list of maps in all \ref MapSelector
   2.111 +
   2.112 +  ///This function is called by \ref NoteBookTab, when the file
   2.113 +  ///showed in it has changed, therefore the contained maps
   2.114 +  ///have changed as well. \ref NoteBookTab knows, whether it
   2.115 +  ///has to call this function or not from the \ref NoteBookTab::mapwinexists
   2.116 +  ///variable.
   2.117 +  ///\param eml edge map list
   2.118 +  ///\param nml node map list
   2.119 +  void update(std::vector<std::string> eml, std::vector<std::string> nml);
   2.120  };
   2.121  
   2.122  #endif //MAP_WIN_H
     3.1 --- a/mapselector.h	Thu Jan 12 14:36:08 2006 +0000
     3.2 +++ b/mapselector.h	Thu Jan 12 15:24:24 2006 +0000
     3.3 @@ -93,10 +93,10 @@
     3.4    ///\param def do we need 'Default' option. See \ref def.
     3.5    MapSelector(std::vector<std::string> optionlist, std::string act, std::string purpose, bool itisedge, bool def=true);
     3.6  
     3.7 -  ///Signal emitted if the user has changed the selection.
     3.8 +  ///Returns signal emitted if the user has changed the selection. (\ref signal_cbt)
     3.9    sigc::signal<void, std::string> signal_cbt_ch();
    3.10  
    3.11 -  ///Signal emitted if the user has pressed New button (\ref newbut)
    3.12 +  ///Returns signal emitted if the user has pressed New button (\ref newbut) (\ref signal_newmapwin)
    3.13    sigc::signal<void, bool> signal_newmapwin_needed();
    3.14  
    3.15    ///Maintain \ref cbt.