mapstorage.h
changeset 186 013afe9ee040
parent 177 40f3006fba2e
child 191 af2ed974ab68
equal deleted inserted replaced
17:b97b5bdfe05c 18:a7c50f920876
    22 class Mapstorage;
    22 class Mapstorage;
    23 
    23 
    24 #include "all_include.h"
    24 #include "all_include.h"
    25 #include "xymap.h"
    25 #include "xymap.h"
    26 #include <libgnomecanvasmm.h>
    26 #include <libgnomecanvasmm.h>
       
    27 
       
    28 class NoteBookTab;
    27 
    29 
    28 ///class MapStorage handles NodeMaps and EdgeMaps.
    30 ///class MapStorage handles NodeMaps and EdgeMaps.
    29 
    31 
    30 ///Class MapStorage is responsible for storing
    32 ///Class MapStorage is responsible for storing
    31 ///NodeMaps and EdgeMaps that can be shown later
    33 ///NodeMaps and EdgeMaps that can be shown later
    36 ///the moment it works only with double type maps
    38 ///the moment it works only with double type maps
    37 ///
    39 ///
    38 ///\todo too many things are public!!
    40 ///\todo too many things are public!!
    39 class MapStorage
    41 class MapStorage
    40 {
    42 {
       
    43 private:
       
    44   std::string background_file_name;
       
    45   bool background_set;
       
    46   double background_scaling;
       
    47   NoteBookTab& mytab;
    41 public:
    48 public:
    42   enum value {DOUBLE, STRING};
    49   void setBackground(const std::string& file_name);
    43   enum type {NORMAL, GUI};
    50   const std::string& getBackgroundFilename();
    44 
    51   bool isBackgroundSet();
       
    52   double getBackgroundScaling();
       
    53   void setBackgroundScaling(double scaling);
    45   ///The graph for which the datas are stored.
    54   ///The graph for which the datas are stored.
    46   Graph graph;
    55   Graph graph;
    47   /// the coordinates of the nodes
    56   /// the coordinates of the nodes
    48   XYMap<Graph::NodeMap<double> > coords;
    57   XYMap<Graph::NodeMap<double> > coords;
    49   /// the coordinates of the arrows on the edges
    58   /// the coordinates of the arrows on the edges
   120 public:
   129 public:
   121   ///Constructor of MapStorage.
   130   ///Constructor of MapStorage.
   122 
   131 
   123   ///Its all activity is initializing default values
   132   ///Its all activity is initializing default values
   124   ///for different visualization attributes.
   133   ///for different visualization attributes.
   125   MapStorage();
   134   MapStorage(NoteBookTab& tab);
   126 
   135 
   127   ///Destructor of MapStorage
   136   ///Destructor of MapStorage
   128 
   137 
   129   ///Maps stored here are created with new. Destructor
   138   ///Maps stored here are created with new. Destructor
   130   ///deletes them to free up the reserved memory.
   139   ///deletes them to free up the reserved memory.