# HG changeset patch # User hegyi # Date 1137079464 0 # Node ID a3781bff1032d7466af44fca23fc3412be7d2b8e # Parent 96bfa82264c3fe60e03018459b5dcbd10ed350bf Documenatation of MapWin. diff -r 96bfa82264c3 -r a3781bff1032 map_win.cc --- a/map_win.cc Thu Jan 12 14:36:08 2006 +0000 +++ b/map_win.cc Thu Jan 12 15:24:24 2006 +0000 @@ -62,10 +62,6 @@ } -MapWin::~MapWin() -{ -} - void MapWin::nodeMapChanged(std::string mapname, int prop) { mytab.propertyChange(false, prop, mapname); diff -r 96bfa82264c3 -r a3781bff1032 map_win.h --- a/map_win.h Thu Jan 12 14:36:08 2006 +0000 +++ b/map_win.h Thu Jan 12 15:24:24 2006 +0000 @@ -11,45 +11,107 @@ #include #include +///Graph visualization setup window. + ///This class is responsible for creating a window, ///on which the visualization attributes can be ///assigned to maps. class MapWin : public Gtk::Window { protected: + ///\ref NoteBookTab to that the \ref MapWin belongs to. NoteBookTab & mytab; + ///Designing element Gtk::Table * table; - MapSelector ** e_combo_array, ** n_combo_array; + ///\ref MapSelectors for each property + ///Each property has an own \ref MapSelector through which + ///the map to visualize by the property van be set. + MapSelector ** e_combo_array; + + ///\ref MapSelectors for each property + + ///Each property has an own \ref MapSelector through which + ///the map to visualize by the property van be set. + MapSelector ** n_combo_array; + + ///Information holder Gtk::Label * label; + ///Container in which elements are organized. Gtk::VBox vbox; public: - ///Constructor of MapWin creates the widgets shown in MapWin. - MapWin(const std::string& title, std::vector, std::vector, NoteBookTab & mw); + ///Constructor - ~MapWin(); + ///It creates the widgets shown in \ref MapWin and + ///binds the needed signal to the correct place. + ///\param title title of window + ///\param eml edgemap list + ///\param nml nodemap list + ///\param mw the owner \ref NoteBookTab (\ref mytab) + MapWin(const std::string& title, std::vector eml, std::vector nml, NoteBookTab & mw); + ///Deregistrates \ref MapWin in its \ref NoteBookTab (\ref mytab) virtual bool on_delete_event(GdkEventAny *); - void nodeMapChanged(std::string, int); + ///Handles changement in nodemap selection - void edgeMapChanged(std::string, int); + ///If \ref MapSelector emits a signal that indicates + ///changement in nodemap selection this function will + ///be called. It calls the appropriate handler function, + ///\ref NoteBookTab::propertyChange with parameters describing the changement. + ///\param mapname the recently selected map + ///\param prop the changed property + void nodeMapChanged(std::string mapname, int prop); - void newMapWinNeeded(bool); + ///Handles changement in edgemap selection - ///This function inserts name of the new edgemap in the list in the combo box - void registerNewEdgeMap(std::string); + ///If \ref MapSelector emits a signal that indicates + ///changement in edgemap selection this function will + ///be called. It calls the appropriate handler function, + ///\ref NoteBookTab::propertyChange with parameters describing the changement. + ///\param mapname the recently selected map + ///\param prop the changed property + void edgeMapChanged(std::string mapname, int prop); - ///This function inserts name of the new nodemap in the list in the combo box - void registerNewNodeMap(std::string); + ///Indicates to the owner \ref NoteBookTab that a \ref NewMapWin should be opened. + ///This function is bound to the + ///signal emitted by the \ref MapSelector in case of + ///the user wants to create a new map. It only pass the + ///information further to the tab owning this \ref MapWin that is needed to open the + ///\ref NewMapWin. (\ref NoteBookTab::popupNewMapWin) + ///\param itisedge should the new map will be an edgemap? (or nodemap) + void newMapWinNeeded(bool itisedge); + + ///This function inserts name of the new edgemap in the name list in \ref MapSelector s + + ///\param new_name + ///name of new map + void registerNewEdgeMap(std::string new_name); + + ///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); + + ///Close window if Esc key pressed. virtual bool closeIfEscapeIsPressed(GdkEventKey*); - void update(std::vector, std::vector); + ///Updates list of maps in all \ref MapSelector + + ///This function is called by \ref NoteBookTab, when the file + ///showed in it has changed, therefore the contained maps + ///have changed as well. \ref NoteBookTab knows, whether it + ///has to call this function or not from the \ref NoteBookTab::mapwinexists + ///variable. + ///\param eml edge map list + ///\param nml node map list + void update(std::vector eml, std::vector nml); }; #endif //MAP_WIN_H diff -r 96bfa82264c3 -r a3781bff1032 mapselector.h --- a/mapselector.h Thu Jan 12 14:36:08 2006 +0000 +++ b/mapselector.h Thu Jan 12 15:24:24 2006 +0000 @@ -93,10 +93,10 @@ ///\param def do we need 'Default' option. See \ref def. MapSelector(std::vector optionlist, std::string act, std::string purpose, bool itisedge, bool def=true); - ///Signal emitted if the user has changed the selection. + ///Returns signal emitted if the user has changed the selection. (\ref signal_cbt) sigc::signal signal_cbt_ch(); - ///Signal emitted if the user has pressed New button (\ref newbut) + ///Returns signal emitted if the user has pressed New button (\ref newbut) (\ref signal_newmapwin) sigc::signal signal_newmapwin_needed(); ///Maintain \ref cbt.