graph_displayer_canvas-edge.cc
changeset 194 6b2b718420eb
parent 179 1f436ea3ef4f
child 201 879e47e5b731
     1.1 --- a/graph_displayer_canvas-edge.cc	Wed Feb 28 15:19:20 2007 +0000
     1.2 +++ b/graph_displayer_canvas-edge.cc	Wed Feb 28 18:20:28 2007 +0000
     1.3 @@ -16,7 +16,9 @@
     1.4   *
     1.5   */
     1.6  
     1.7 -#include "graph_displayer_canvas.h"
     1.8 +#include <graph_displayer_canvas.h>
     1.9 +#include <mapstorage.h>
    1.10 +#include <nbtab.h>
    1.11  #include <cmath>
    1.12  
    1.13  const int minimum_edge_width=0;
    1.14 @@ -27,11 +29,11 @@
    1.15  
    1.16    min=edge_property_defaults[E_WIDTH];
    1.17    max=edge_property_defaults[E_WIDTH];
    1.18 -  Graph::EdgeMap<double> actual_map((mytab.mapstorage).graph,edge_property_defaults[E_WIDTH]);
    1.19 +  Graph::EdgeMap<double> actual_map((mytab.mapstorage)->graph,edge_property_defaults[E_WIDTH]);
    1.20    
    1.21    if(edge==INVALID)
    1.22      {
    1.23 -      for (EdgeIt i((mytab.mapstorage).graph); i!=INVALID; ++i)
    1.24 +      for (EdgeIt i((mytab.mapstorage)->graph); i!=INVALID; ++i)
    1.25  	{
    1.26  	  double v=fabs(actual_map[i]);
    1.27  	  int w;
    1.28 @@ -68,13 +70,13 @@
    1.29    Graph::EdgeMap<double> * actual_map;
    1.30    double min, max;
    1.31  
    1.32 -  min=(mytab.mapstorage).minOfEdgeMap(mapname);
    1.33 -  max=(mytab.mapstorage).maxOfEdgeMap(mapname);
    1.34 -  actual_map=((mytab.mapstorage).edgemap_storage)[mapname];
    1.35 +  min=(mytab.mapstorage)->minOfEdgeMap(mapname);
    1.36 +  max=(mytab.mapstorage)->maxOfEdgeMap(mapname);
    1.37 +  actual_map=((mytab.mapstorage)->edgemap_storage)[mapname];
    1.38  
    1.39    if(edge==INVALID)
    1.40      {
    1.41 -      for (EdgeIt i((mytab.mapstorage).graph); i!=INVALID; ++i)
    1.42 +      for (EdgeIt i((mytab.mapstorage)->graph); i!=INVALID; ++i)
    1.43  	{
    1.44  	  double v=(*actual_map)[i];
    1.45  	  int w;
    1.46 @@ -131,16 +133,16 @@
    1.47    //the minimum of the nodemap to the range of
    1.48    //green in RGB
    1.49    Graph::EdgeMap<double> * actual_map;
    1.50 -  actual_map=((mytab.mapstorage).edgemap_storage)[mapname];
    1.51 +  actual_map=((mytab.mapstorage)->edgemap_storage)[mapname];
    1.52  
    1.53    double max, min;
    1.54  
    1.55 -  max=(mytab.mapstorage).maxOfEdgeMap(mapname);
    1.56 -  min=(mytab.mapstorage).minOfEdgeMap(mapname);
    1.57 +  max=(mytab.mapstorage)->maxOfEdgeMap(mapname);
    1.58 +  min=(mytab.mapstorage)->minOfEdgeMap(mapname);
    1.59  
    1.60    if(edge==INVALID)
    1.61      {
    1.62 -      for (EdgeIt i((mytab.mapstorage).graph); i!=INVALID; ++i)
    1.63 +      for (EdgeIt i((mytab.mapstorage)->graph); i!=INVALID; ++i)
    1.64  	{
    1.65  	  double w=(*actual_map)[i];
    1.66  
    1.67 @@ -182,7 +184,7 @@
    1.68    //function maps the range of the maximum and
    1.69    //the minimum of the nodemap to the range of
    1.70    //green in RGB
    1.71 -  Graph::EdgeMap<double> actual_map((mytab.mapstorage).graph,edge_property_defaults[E_COLOR]);
    1.72 +  Graph::EdgeMap<double> actual_map((mytab.mapstorage)->graph,edge_property_defaults[E_COLOR]);
    1.73  
    1.74    double max, min;
    1.75  
    1.76 @@ -191,7 +193,7 @@
    1.77  
    1.78    if(edge==INVALID)
    1.79      {
    1.80 -      for (EdgeIt i((mytab.mapstorage).graph); i!=INVALID; ++i)
    1.81 +      for (EdgeIt i((mytab.mapstorage)->graph); i!=INVALID; ++i)
    1.82  	{
    1.83  	  double w=actual_map[i];
    1.84  
    1.85 @@ -236,10 +238,10 @@
    1.86    
    1.87    if(edge==INVALID)
    1.88      {
    1.89 -      for (EdgeIt i((mytab.mapstorage).graph); i!=INVALID; ++i)
    1.90 +      for (EdgeIt i((mytab.mapstorage)->graph); i!=INVALID; ++i)
    1.91  	{
    1.92  	  edgemap_to_edit=mapname;
    1.93 -	  double number=(*((mytab.mapstorage).edgemap_storage)[mapname])[i];
    1.94 +	  double number=(*((mytab.mapstorage)->edgemap_storage)[mapname])[i];
    1.95  	  
    1.96  	  std::ostringstream ostr;
    1.97  	  ostr << number;
    1.98 @@ -250,7 +252,7 @@
    1.99      }
   1.100    else
   1.101      {
   1.102 -	  double number=(*((mytab.mapstorage).edgemap_storage)[mapname])[edge];
   1.103 +	  double number=(*((mytab.mapstorage)->edgemap_storage)[mapname])[edge];
   1.104  
   1.105  	  std::ostringstream ostr;
   1.106  	  ostr << number;
   1.107 @@ -271,7 +273,7 @@
   1.108    
   1.109    if(edge==INVALID)
   1.110      {
   1.111 -      for (EdgeIt i((mytab.mapstorage).graph); i!=INVALID; ++i)
   1.112 +      for (EdgeIt i((mytab.mapstorage)->graph); i!=INVALID; ++i)
   1.113  	{
   1.114  	  edgemap_to_edit="";
   1.115  	  edgetextmap[i]->property_text().set_value("");