graph_displayer_canvas.cc
changeset 157 7e6ad28aeb9e
parent 156 c5cdf6690cdf
child 160 14a76109b561
     1.1 --- a/graph_displayer_canvas.cc	Thu Sep 28 14:32:40 2006 +0000
     1.2 +++ b/graph_displayer_canvas.cc	Mon Oct 02 18:52:00 2006 +0000
     1.3 @@ -5,7 +5,7 @@
     1.4    nodesmap(mainw.mapstorage.graph), edgesmap(mainw.mapstorage.graph), edgetextmap(mainw.mapstorage.graph),
     1.5    nodetextmap(mainw.mapstorage.graph), displayed_graph(*(root()), 0, 0),
     1.6    isbutton(0), active_item(NULL), target_item(NULL), nodemap_to_edit(""),
     1.7 -  edgemap_to_edit(""), autoscale(true), zoomtrack(false), radius_min(10), radius_max(40), radius_unit(1), mytab(mainw)
     1.8 +  edgemap_to_edit(""), autoscale(true), zoomtrack(false), radius_size(20), edge_width(10), mytab(mainw)
     1.9  {
    1.10    //base event handler is move tool
    1.11    actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::moveEventHandler), false);
    1.12 @@ -227,12 +227,11 @@
    1.13    }
    1.14  }
    1.15  
    1.16 -void GraphDisplayerCanvas::setNodeView(bool autoscale_p, bool zoomtrack_p, double min_p, double max_p, double unit_p)
    1.17 +void GraphDisplayerCanvas::setView(bool autoscale_p, bool zoomtrack_p, double width_p, double radius_p)
    1.18  {
    1.19    autoscale=autoscale_p;
    1.20 -  radius_min=min_p;
    1.21 -  radius_max=max_p;
    1.22 -  radius_unit=unit_p;
    1.23 +  edge_width=width_p;
    1.24 +  radius_size=radius_p;
    1.25  
    1.26    if((!zoomtrack) && zoomtrack_p)
    1.27      {
    1.28 @@ -242,13 +241,13 @@
    1.29    zoomtrack=zoomtrack_p;
    1.30  
    1.31    propertyChange(false, N_RADIUS);
    1.32 +  propertyChange(true, E_WIDTH);
    1.33  }
    1.34  
    1.35 -void GraphDisplayerCanvas::getNodeView(bool & autoscale_p, bool & zoomtrack_p, double& min_p, double& max_p, double& unit_p)
    1.36 +void GraphDisplayerCanvas::getView(bool & autoscale_p, bool & zoomtrack_p, double& width_p, double& radius_p)
    1.37  {
    1.38    autoscale_p=autoscale;
    1.39    zoomtrack_p=zoomtrack;
    1.40 -  min_p=radius_min;
    1.41 -  max_p=radius_max;
    1.42 -  unit_p=radius_unit;
    1.43 +  width_p=edge_width;
    1.44 +  radius_p=radius_size;
    1.45  }