# HG changeset patch # User ladanyi # Date 1145401173 0 # Node ID 9535436aaa9f8ed0fc872440de583484396b9d07 # Parent 35e0355c6d9bc01881da953237fedd9533ca6308 id->label diff -r 35e0355c6d9b -r 9535436aaa9f gui/graph_displayer_canvas-event.cc --- a/gui/graph_displayer_canvas-event.cc Tue Apr 18 13:25:41 2006 +0000 +++ b/gui/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 35e0355c6d9b -r 9535436aaa9f gui/gui_reader.cc --- a/gui/gui_reader.cc Tue Apr 18 13:25:41 2006 +0000 +++ b/gui/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 35e0355c6d9b -r 9535436aaa9f gui/gui_writer.cc --- a/gui/gui_writer.cc Tue Apr 18 13:25:41 2006 +0000 +++ b/gui/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 35e0355c6d9b -r 9535436aaa9f gui/mapstorage.cc --- a/gui/mapstorage.cc Tue Apr 18 13:25:41 2006 +0000 +++ b/gui/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();