249,9 → 249,10 |
*/ |
bool gmn_import::startElement( const QString&, const QString&, |
const QString& qName, |
const QXmlAttributes&) |
const QXmlAttributes& att) |
{ |
int i = CON_FIRST; |
int index; |
|
while (i <= CON_LAST) |
{ |
271,7 → 272,21 |
|
run.track_index = 0; |
run.first_lap_index = 0; |
run.sport_type = 0; // Running |
// Find sport type, if there is one |
if ((index = att.index(QString("Sport"))) != -1) |
{ |
if (att.value(index).toAscii().toLower() == QString("Running").toLower()) |
run.sport_type = D1000_running; |
else if (att.value(index).toAscii().toLower() == QString("Biking").toLower()) |
run.sport_type = D1000_biking; |
else if (att.value(index).toAscii().toLower() == QString("Other").toLower()) |
run.sport_type = D1000_other; |
else |
run.sport_type = D1000_other; |
} |
else |
run.sport_type = D1000_other; // Other |
|
tk = i; |
} |
|