equal
deleted
inserted
replaced
50 } |
50 } |
51 } |
51 } |
52 |
52 |
53 int MapStorage::addNodeMap(const std::string & name, Graph::NodeMap<double> *nodemap, double default_value) |
53 int MapStorage::addNodeMap(const std::string & name, Graph::NodeMap<double> *nodemap, double default_value) |
54 { |
54 { |
55 std::cout << default_value << std::endl; |
|
56 if( nodemap_storage.find(name) == nodemap_storage.end() ) |
55 if( nodemap_storage.find(name) == nodemap_storage.end() ) |
57 { |
56 { |
58 nodemap_storage[name]=nodemap; |
57 nodemap_storage[name]=nodemap; |
59 // set the maps default value |
58 // set the maps default value |
60 nodemap_default[name] = default_value; |
59 nodemap_default[name] = default_value; |
76 { |
75 { |
77 active_nodemaps[prop]=mapname; |
76 active_nodemaps[prop]=mapname; |
78 } |
77 } |
79 signal_prop.emit(itisedge, prop); |
78 signal_prop.emit(itisedge, prop); |
80 } |
79 } |
|
80 |
|
81 void MapStorage::broadcastActiveMaps() |
|
82 { |
|
83 for(int i=0;i<NODE_PROPERTY_NUM;i++) |
|
84 { |
|
85 signal_map_win.emit(false, i, active_nodemaps[i]); |
|
86 } |
|
87 |
|
88 for(int i=0;i<EDGE_PROPERTY_NUM;i++) |
|
89 { |
|
90 signal_map_win.emit(true, i, active_edgemaps[i]); |
|
91 } |
|
92 } |
|
93 |
81 |
94 |
82 std::string MapStorage::getActiveEdgeMap(int prop) |
95 std::string MapStorage::getActiveEdgeMap(int prop) |
83 { |
96 { |
84 return active_edgemaps[prop]; |
97 return active_edgemaps[prop]; |
85 } |
98 } |
438 edgemap_default.erase(it); |
451 edgemap_default.erase(it); |
439 } |
452 } |
440 graph.clear(); |
453 graph.clear(); |
441 file_name = ""; |
454 file_name = ""; |
442 modified = false; |
455 modified = false; |
|
456 |
|
457 arrow_pos_read_ok = false; |
|
458 |
|
459 for(int i=0;i<NODE_PROPERTY_NUM;i++) |
|
460 { |
|
461 changeActiveMap(false, i, ""); |
|
462 signal_map_win.emit(false, i, ""); |
|
463 } |
|
464 |
|
465 for(int i=0;i<EDGE_PROPERTY_NUM;i++) |
|
466 { |
|
467 changeActiveMap(true, i, ""); |
|
468 signal_map_win.emit(true, i, ""); |
|
469 } |
443 } |
470 } |
444 |
471 |
445 void MapStorage::ArrowPosReadOK() |
472 void MapStorage::ArrowPosReadOK() |
446 { |
473 { |
447 arrow_pos_read_ok = true; |
474 arrow_pos_read_ok = true; |