mapstorage.h
changeset 196 c220f9de6545
parent 194 6b2b718420eb
child 198 d6cc0579b94b
equal deleted inserted replaced
20:d6945fa72dc8 21:00f0a6c9ca85
    20 #define MAPSTORAGE_H
    20 #define MAPSTORAGE_H
    21 
    21 
    22 #include <all_include.h>
    22 #include <all_include.h>
    23 #include <xymap.h>
    23 #include <xymap.h>
    24 #include <libgnomecanvasmm.h>
    24 #include <libgnomecanvasmm.h>
    25 
       
    26 class NoteBookTab;
       
    27 
    25 
    28 ///class MapStorage handles NodeMaps and EdgeMaps.
    26 ///class MapStorage handles NodeMaps and EdgeMaps.
    29 
    27 
    30 ///Class MapStorage is responsible for storing
    28 ///Class MapStorage is responsible for storing
    31 ///NodeMaps and EdgeMaps that can be shown later
    29 ///NodeMaps and EdgeMaps that can be shown later
    40 {
    38 {
    41 private:
    39 private:
    42   std::string background_file_name;
    40   std::string background_file_name;
    43   bool background_set;
    41   bool background_set;
    44   double background_scaling;
    42   double background_scaling;
    45   NoteBookTab& mytab;
       
    46 public:
    43 public:
    47   void setBackground(const std::string& file_name);
    44   void setBackground(const std::string& file_name);
    48   const std::string& getBackgroundFilename();
    45   const std::string& getBackgroundFilename();
    49   bool isBackgroundSet();
    46   bool isBackgroundSet();
    50   double getBackgroundScaling();
    47   double getBackgroundScaling();
   113   sigc::signal<void, bool, int, std::string> signal_map_win;
   110   sigc::signal<void, bool, int, std::string> signal_map_win;
   114 
   111 
   115   /// Signal emitted, when entry in \ref DesignWin should be changed.
   112   /// Signal emitted, when entry in \ref DesignWin should be changed.
   116   sigc::signal<void, double, double, int> signal_design_win;
   113   sigc::signal<void, double, double, int> signal_design_win;
   117 
   114 
       
   115   ///Signal emitted when background should be set by \ref NoteBookTab
       
   116   sigc::signal<void> signal_background;
       
   117 
   118   ///Iteration number during graph design
   118   ///Iteration number during graph design
   119   int iterations;
   119   int iterations;
   120 
   120 
   121   ///Attraction factor during graph design
   121   ///Attraction factor during graph design
   122   double attraction;
   122   double attraction;
   127 public:
   127 public:
   128   ///Constructor of MapStorage.
   128   ///Constructor of MapStorage.
   129 
   129 
   130   ///Its all activity is initializing default values
   130   ///Its all activity is initializing default values
   131   ///for different visualization attributes.
   131   ///for different visualization attributes.
   132   MapStorage(NoteBookTab& tab);
   132   MapStorage();
   133 
   133 
   134   ///Destructor of MapStorage
   134   ///Destructor of MapStorage
   135 
   135 
   136   ///Maps stored here are created with new. Destructor
   136   ///Maps stored here are created with new. Destructor
   137   ///deletes them to free up the reserved memory.
   137   ///deletes them to free up the reserved memory.
   182   sigc::signal<void, bool, int, std::string> signal_map_win_ch(){return signal_map_win;};
   182   sigc::signal<void, bool, int, std::string> signal_map_win_ch(){return signal_map_win;};
   183 
   183 
   184   ///returns \ref signal_design_win to be able to connect functions to it
   184   ///returns \ref signal_design_win to be able to connect functions to it
   185   sigc::signal<void, double, double, int> signal_design_win_ch(){return signal_design_win;};
   185   sigc::signal<void, double, double, int> signal_design_win_ch(){return signal_design_win;};
   186 
   186 
       
   187   ///returns \ref signal_background to be able to connect functions to it
       
   188   sigc::signal<void> signal_background_ch(){return signal_background;};
       
   189 
       
   190 
   187   ///Adds given map to storage.
   191   ///Adds given map to storage.
   188 
   192 
   189   ///A name and the map itself has to be provided.
   193   ///A name and the map itself has to be provided.
   190   ///\param mapname is the name of map
   194   ///\param mapname is the name of map
   191   ///\param nodemap is the pointer of the given nodemap
   195   ///\param nodemap is the pointer of the given nodemap