# HG changeset patch # User ladanyi # Date 1145401173 0 # Node ID 82e19031c3192cd0fb8acdf2e6ca7e859f9024aa # Parent b289ba51506f67112b88b2effa18916371e76e33 id->label diff -r b289ba51506f -r 82e19031c319 graph_displayer_canvas-event.cc --- a/graph_displayer_canvas-event.cc Fri Apr 14 18:31:16 2006 +0000 +++ b/graph_displayer_canvas-event.cc Tue Apr 18 22:59:33 2006 +0000 @@ -331,7 +331,7 @@ } } // increment the id map's default value - (mytab.mapstorage).nodemap_default["id"] += 1.0; + (mytab.mapstorage).nodemap_default["label"] += 1.0; nodesmap[active_node]=new Gnome::Canvas::Ellipse(displayed_graph, clicked_x-20, clicked_y-20, clicked_x+20, clicked_y+20); @@ -441,7 +441,7 @@ (mytab.mapstorage).edgemap_default[it->first]; } // increment the id map's default value - (mytab.mapstorage).edgemap_default["id"] += 1.0; + (mytab.mapstorage).edgemap_default["label"] += 1.0; //calculating coordinates of new edge Gnome::Canvas::Points coos; @@ -673,7 +673,7 @@ if(clicked_edge!=INVALID) { // the id map is not editable - if (edgemap_to_edit == "id") return 0; + if (edgemap_to_edit == "label") return 0; //and there is activated map if(edgetextmap[clicked_edge]->property_text().get_value()!="") @@ -761,7 +761,7 @@ if(clicked_node!=INVALID) { // the id map is not editable - if (nodemap_to_edit == "id") return 0; + if (nodemap_to_edit == "label") return 0; //and there is activated map if(nodetextmap[clicked_node]->property_text().get_value()!="") diff -r b289ba51506f -r 82e19031c319 gui_reader.cc --- a/gui_reader.cc Fri Apr 14 18:31:16 2006 +0000 +++ b/gui_reader.cc Tue Apr 18 22:59:33 2006 +0000 @@ -22,7 +22,7 @@ for (EdgeIt e(mapstorage->graph); e != INVALID; ++e) { - int edgeid = (int)(*mapstorage->edgemap_storage["id"])[e]; + int edgeid = (int)(*mapstorage->edgemap_storage["label"])[e]; mapstorage->arrow_pos.set(e, m[edgeid]); } mapstorage->ArrowPosReadOK(); diff -r b289ba51506f -r 82e19031c319 gui_writer.cc --- a/gui_writer.cc Fri Apr 14 18:31:16 2006 +0000 +++ b/gui_writer.cc Tue Apr 18 22:59:33 2006 +0000 @@ -15,7 +15,7 @@ std::map > m; for (EdgeIt e(mapstorage->graph); e != INVALID; ++e) { - int edgeid = (int)(*(mapstorage->edgemap_storage["id"]))[e]; + int edgeid = (int)(*(mapstorage->edgemap_storage["label"]))[e]; m[edgeid] = mapstorage->arrow_pos[e]; } x("arrow_pos", m); diff -r b289ba51506f -r 82e19031c319 mapstorage.cc --- a/mapstorage.cc Fri Apr 14 18:31:16 2006 +0000 +++ b/mapstorage.cc Tue Apr 18 22:59:33 2006 +0000 @@ -17,11 +17,11 @@ edgemap_storage["arrow_pos_y"] = new Graph::EdgeMap(graph); arrow_pos.setYMap(*edgemap_storage["arrow_pos_y"]); - nodemap_storage["id"] = new Graph::NodeMap(graph); - edgemap_storage["id"] = new Graph::EdgeMap(graph); + nodemap_storage["label"] = new Graph::NodeMap(graph); + edgemap_storage["label"] = new Graph::EdgeMap(graph); - nodemap_default["id"] = 1.0; - edgemap_default["id"] = 1.0; + nodemap_default["label"] = 1.0; + edgemap_default["label"] = 1.0; active_nodemaps.resize(NODE_PROPERTY_NUM); for(int i=0;i::const_iterator it = edgeMapNames.begin(); it != edgeMapNames.end(); ++it) { - if (*it == "id") + if (*it == "label") { //std::cout << "read id edgemap" << std::endl; } @@ -287,11 +287,11 @@ if (!read_edge_id) { - edgemap_storage["id"] = new Graph::EdgeMap(graph); + edgemap_storage["label"] = new Graph::EdgeMap(graph); int i = 1; for (EdgeIt e(graph); e != INVALID; ++e) { - (*edgemap_storage["id"])[e] = i++; + (*edgemap_storage["label"])[e] = i++; } } @@ -326,28 +326,28 @@ for (std::map*>::const_iterator it = nodemap_storage.begin(); it != nodemap_storage.end(); ++it) { - if ((it->first != "id") && + if ((it->first != "label") && (it->first != "coordiantes_x") && (it->first != "coordinates_y")) { nodemap_default[it->first] = 0.0; } - else if (it->first == "id") + else if (it->first == "label") { NodeIt n(graph); - double max = (*nodemap_storage["id"])[n]; + double max = (*nodemap_storage["label"])[n]; for (; n != INVALID; ++n) { - if ((*nodemap_storage["id"])[n] > max) - max = (*nodemap_storage["id"])[n]; + if ((*nodemap_storage["label"])[n] > max) + max = (*nodemap_storage["label"])[n]; } - nodemap_default["id"] = max + 1.0; + nodemap_default["label"] = max + 1.0; } } for (std::map*>::const_iterator it = edgemap_storage.begin(); it != edgemap_storage.end(); ++it) { - if (it->first != "id") + if (it->first != "label") { edgemap_default[it->first] = 0.0; } @@ -356,13 +356,13 @@ double max = std::numeric_limits::min(); for (EdgeIt e(graph); e != INVALID; ++e) { - if ((*edgemap_storage["id"])[e] > max) - max = (*edgemap_storage["id"])[e]; + if ((*edgemap_storage["label"])[e] > max) + max = (*edgemap_storage["label"])[e]; } if (max > std::numeric_limits::min()) - edgemap_default["id"] = max + 1.0; + edgemap_default["label"] = max + 1.0; else - edgemap_default["id"] = 1.0; + edgemap_default["label"] = 1.0; } } @@ -400,7 +400,7 @@ { if ((it->first != "coordinates_x") && (it->first != "coordinates_y") && - (it->first != "id")) + (it->first != "label")) { delete it->second; nodemap_storage.erase(it); @@ -409,7 +409,7 @@ for (std::map*>::iterator it = edgemap_storage.begin(); it != edgemap_storage.end(); ++it) { - if ((it->first != "id") && + if ((it->first != "label") && (it->first != "arrow_pos_x") && (it->first != "arrow_pos_y")) { @@ -420,13 +420,13 @@ for (std::map::iterator it = nodemap_default.begin(); it != nodemap_default.end(); ++it) { - if (it->first != "id") + if (it->first != "label") nodemap_default.erase(it); } for (std::map::iterator it = edgemap_default.begin(); it != edgemap_default.end(); ++it) { - if (it->first != "id") + if (it->first != "label") edgemap_default.erase(it); } graph.clear();