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

Method ReadFromFile

graph_view.cpp:280–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280void MyGraphicsView::ReadFromFile(QTextStream &ts){
281 ts.readLine();
282 int v = ts.readLine().toInt();
283 for(int i = 0; i < v; i++){
284 double x, y, r;
285 ts >> x >> y >> r;
286 ts.readLine();
287 MyGraphicsVexItem *vex = addVex(QPointF(x, y), r);
288 vex->setText(ts.readLine());
289 }
290 int l = ts.readLine().toInt();
291 for(int i = 0; i < l; i++){
292 int s, e;
293 ts >> s >> e;
294 addLine(vexes[s], vexes[e]);
295 }
296}
297
298void MyGraphicsView::setHover(bool in){
299 if(in)

Callers 1

MyCanvasMethod · 0.80

Calls 1

setTextMethod · 0.45

Tested by

no test coverage detected