mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +01:00
Added support for TCX multi-sport activities
This commit is contained in:
parent
b54aeff369
commit
e76439bb6e
@ -183,7 +183,7 @@ void TCXParser::courses(QList<TrackData> &tracks, QList<Waypoint> &waypoints)
|
||||
}
|
||||
}
|
||||
|
||||
void TCXParser::activities(QList<TrackData> &tracks)
|
||||
void TCXParser::sport(QList<TrackData> &tracks)
|
||||
{
|
||||
while (_reader.readNextStartElement()) {
|
||||
if (_reader.name() == "Activity") {
|
||||
@ -194,6 +194,29 @@ void TCXParser::activities(QList<TrackData> &tracks)
|
||||
}
|
||||
}
|
||||
|
||||
void TCXParser::multiSportSession(QList<TrackData> &tracks)
|
||||
{
|
||||
while (_reader.readNextStartElement()) {
|
||||
if (_reader.name() == "FirstSport" || _reader.name() == "NextSport")
|
||||
sport(tracks);
|
||||
else
|
||||
_reader.skipCurrentElement();
|
||||
}
|
||||
}
|
||||
|
||||
void TCXParser::activities(QList<TrackData> &tracks)
|
||||
{
|
||||
while (_reader.readNextStartElement()) {
|
||||
if (_reader.name() == "Activity") {
|
||||
tracks.append(TrackData());
|
||||
activity(tracks.back());
|
||||
} else if (_reader.name() == "MultiSportSession")
|
||||
multiSportSession(tracks);
|
||||
else
|
||||
_reader.skipCurrentElement();
|
||||
}
|
||||
}
|
||||
|
||||
void TCXParser::tcx(QList<TrackData> &tracks, QList<Waypoint> &waypoints)
|
||||
{
|
||||
while (_reader.readNextStartElement()) {
|
||||
|
@ -19,6 +19,8 @@ private:
|
||||
void tcx(QList<TrackData> &tracks, QList<Waypoint> &waypoints);
|
||||
void courses(QList<TrackData> &tracks, QList<Waypoint> &waypoints);
|
||||
void activities(QList<TrackData> &tracks);
|
||||
void multiSportSession(QList<TrackData> &tracks);
|
||||
void sport(QList<TrackData> &tracks);
|
||||
void course(QList<Waypoint> &waypoints, TrackData &track);
|
||||
void activity(TrackData &track);
|
||||
void lap(TrackData &track);
|
||||
|
Loading…
Reference in New Issue
Block a user