MCPcopy Create free account
hub / github.com/Linloir/GraphBuilder / SaveToFile

Method SaveToFile

graph_view.cpp:264–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262}
263
264void MyGraphicsView::SaveToFile(QTextStream &ts){
265 //vexes
266 ts << vexes.size() << "\n";
267 for(int i = 0; i < vexes.size(); i++){
268 ts << vexes[i]->getData() << "\n";
269 }
270 //lines
271 ts << lines.size() << "\n";
272 for(int i = 0; i < lines.size(); i++){
273 ts << getIdOf(lines[i]->stVex()) << " " << getIdOf(lines[i]->edVex()) << "\n";
274 }
275 for(int i = 0; i < lines.size(); i++){
276 ts << lines[i]->weightText().toInt() << " ";
277 }
278}
279
280void MyGraphicsView::ReadFromFile(QTextStream &ts){
281 ts.readLine();

Callers

nothing calls this directly

Calls 4

getDataMethod · 0.80
stVexMethod · 0.80
edVexMethod · 0.80
weightTextMethod · 0.80

Tested by

no test coverage detected