--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/igc.cc Sun Jan 22 16:31:20 2012 +0100
@@ -0,0 +1,22 @@
+#include "igc.h"
+
+void IGC::read(QTextStream &in)
+{
+ while (!in.atEnd()) {
+ char c;
+ in >> c;
+ switch (c) {
+ case 'A': theAuthor = in.readLine(); break;
+ case 'H': {
+ QString line = in.readLine();
+ QString key = line.section(':', 0, 0);
+ QString value = line.section(':', 1, 1).simplified();
+ qDebug() << key << "--" << value;
+ if (key == "FPLTPILOT") thePilot = value;
+ if (key == "FGTYGLIDERTYPE") theGlider = value;
+ }
+ break;
+ case 'B': points << in.readLine(); break;
+ }
+ }
+}