graph_displayer_canvas.cc
changeset 154 65c1b103443d
parent 151 72f1c33f89d4
child 156 c5cdf6690cdf
equal deleted inserted replaced
41:560b4a73f6f3 42:20be21dc329a
     3 
     3 
     4 GraphDisplayerCanvas::GraphDisplayerCanvas(NoteBookTab & mainw) :
     4 GraphDisplayerCanvas::GraphDisplayerCanvas(NoteBookTab & mainw) :
     5   nodesmap(mainw.mapstorage.graph), edgesmap(mainw.mapstorage.graph), edgetextmap(mainw.mapstorage.graph),
     5   nodesmap(mainw.mapstorage.graph), edgesmap(mainw.mapstorage.graph), edgetextmap(mainw.mapstorage.graph),
     6   nodetextmap(mainw.mapstorage.graph), displayed_graph(*(root()), 0, 0),
     6   nodetextmap(mainw.mapstorage.graph), displayed_graph(*(root()), 0, 0),
     7   isbutton(0), active_item(NULL), target_item(NULL), nodemap_to_edit(""),
     7   isbutton(0), active_item(NULL), target_item(NULL), nodemap_to_edit(""),
     8   edgemap_to_edit(""), mytab(mainw)
     8   edgemap_to_edit(""), autoscale(true), radius_min(10), radius_max(40), radius_unit(1), mytab(mainw)
     9 {
     9 {
    10   //base event handler is move tool
    10   //base event handler is move tool
    11   actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::moveEventHandler), false);
    11   actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::moveEventHandler), false);
    12   actual_tool=MOVE;
    12   actual_tool=MOVE;
    13 
    13 
   224   {
   224   {
   225     delete edgesmap[e];
   225     delete edgesmap[e];
   226     delete edgetextmap[e];
   226     delete edgetextmap[e];
   227   }
   227   }
   228 }
   228 }
       
   229 
       
   230 void GraphDisplayerCanvas::setNodeView(bool autoscale_p, double min_p, double max_p, double unit_p)
       
   231 {
       
   232   autoscale=autoscale_p;
       
   233   radius_min=min_p;
       
   234   radius_max=max_p;
       
   235   radius_unit=unit_p;
       
   236   propertyChange(false, N_RADIUS);
       
   237 }
       
   238 
       
   239 void GraphDisplayerCanvas::getNodeView(bool & autoscale_p, double& min_p, double& max_p, double& unit_p)
       
   240 {
       
   241   autoscale_p=autoscale;
       
   242   min_p=radius_min;
       
   243   max_p=radius_max;
       
   244   unit_p=radius_unit;
       
   245 }