equal
deleted
inserted
replaced
|
1 #include "igc.h" |
|
2 |
|
3 void IGC::read(QTextStream &in) |
|
4 { |
|
5 while (!in.atEnd()) { |
|
6 char c; |
|
7 in >> c; |
|
8 switch (c) { |
|
9 case 'A': theAuthor = in.readLine(); break; |
|
10 case 'H': { |
|
11 QString line = in.readLine(); |
|
12 QString key = line.section(':', 0, 0); |
|
13 QString value = line.section(':', 1, 1).simplified(); |
|
14 qDebug() << key << "--" << value; |
|
15 if (key == "FPLTPILOT") thePilot = value; |
|
16 if (key == "FGTYGLIDERTYPE") theGlider = value; |
|
17 } |
|
18 break; |
|
19 case 'B': points << in.readLine(); break; |
|
20 } |
|
21 } |
|
22 } |