mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Compare commits
No commits in common. "36f8f94f157cd423af137070fe95f06ca90963be" and "0b6daad28fa6dad3b298ed7d802820be9c772c14" have entirely different histories.
36f8f94f15
...
0b6daad28f
@ -1887,12 +1887,12 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="388"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="388"/>
|
||||||
<source>Detect pauses</source>
|
<source>Detect pauses</source>
|
||||||
<translation>Identifiera pauser</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="539"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="539"/>
|
||||||
<source>Detection:</source>
|
<source>Detection:</source>
|
||||||
<translation>Identifiering:</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="658"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="658"/>
|
||||||
|
@ -26,7 +26,7 @@ void MarkerInfoItem::setDate(const QDateTime &date)
|
|||||||
|
|
||||||
QLocale l;
|
QLocale l;
|
||||||
_s1 = l.toString(date.date(), QLocale::ShortFormat);
|
_s1 = l.toString(date.date(), QLocale::ShortFormat);
|
||||||
_s2 = date.time().toString("h:mm:ss");
|
_s2 = l.toString(date.time(), QLocale::ShortFormat);
|
||||||
|
|
||||||
updateBoundingRect();
|
updateBoundingRect();
|
||||||
}
|
}
|
||||||
|
@ -23,11 +23,9 @@ ToolTip TrackItem::info() const
|
|||||||
tt.insert(tr("Total time"), Format::timeSpan(_time));
|
tt.insert(tr("Total time"), Format::timeSpan(_time));
|
||||||
if (_movingTime > 0)
|
if (_movingTime > 0)
|
||||||
tt.insert(tr("Moving time"), Format::timeSpan(_movingTime));
|
tt.insert(tr("Moving time"), Format::timeSpan(_movingTime));
|
||||||
if (!_date.isNull()) {
|
if (!_date.isNull())
|
||||||
QDateTime date(_date.toTimeZone(_timeZone));
|
tt.insert(tr("Date"), l.toString(_date.toTimeZone(_timeZone),
|
||||||
tt.insert(tr("Date"), l.toString(date.date(), QLocale::ShortFormat)
|
QLocale::ShortFormat));
|
||||||
+ " " + date.time().toString("h:mm:ss"));
|
|
||||||
}
|
|
||||||
if (!_links.isEmpty()) {
|
if (!_links.isEmpty()) {
|
||||||
QString links;
|
QString links;
|
||||||
for (int i = 0; i < _links.size(); i++) {
|
for (int i = 0; i < _links.size(); i++) {
|
||||||
|
@ -32,12 +32,10 @@ ToolTip WaypointItem::info() const
|
|||||||
val += " (" + Format::elevation(elevations.second, _units) + ")";
|
val += " (" + Format::elevation(elevations.second, _units) + ")";
|
||||||
tt.insert(qApp->translate("WaypointItem", "Elevation"), val);
|
tt.insert(qApp->translate("WaypointItem", "Elevation"), val);
|
||||||
}
|
}
|
||||||
if (_waypoint.timestamp().isValid()) {
|
if (_waypoint.timestamp().isValid())
|
||||||
QDateTime date(_waypoint.timestamp().toTimeZone(_timeZone));
|
|
||||||
tt.insert(qApp->translate("WaypointItem", "Date"),
|
tt.insert(qApp->translate("WaypointItem", "Date"),
|
||||||
l.toString(date.date(), QLocale::ShortFormat) + " "
|
l.toString(_waypoint.timestamp().toTimeZone(_timeZone),
|
||||||
+ date.time().toString("h:mm:ss"));
|
QLocale::ShortFormat));
|
||||||
}
|
|
||||||
if (!_waypoint.description().isEmpty())
|
if (!_waypoint.description().isEmpty())
|
||||||
tt.insert(qApp->translate("WaypointItem", "Description"),
|
tt.insert(qApp->translate("WaypointItem", "Description"),
|
||||||
_waypoint.description());
|
_waypoint.description());
|
||||||
|
@ -238,7 +238,6 @@ bool FITParser::parseData(CTX &ctx, const MessageDefinition *def)
|
|||||||
bool valid;
|
bool valid;
|
||||||
Event event;
|
Event event;
|
||||||
Waypoint waypoint;
|
Waypoint waypoint;
|
||||||
int trigger = -1;
|
|
||||||
|
|
||||||
if (!def->fields.size() && !def->devFields.size()) {
|
if (!def->fields.size() && !def->devFields.size()) {
|
||||||
_errorString = "Undefined data message";
|
_errorString = "Undefined data message";
|
||||||
@ -360,8 +359,8 @@ bool FITParser::parseData(CTX &ctx, const MessageDefinition *def)
|
|||||||
case 7:
|
case 7:
|
||||||
waypoint.setDescription(Format::timeSpan(val.toUInt() / 1000));
|
waypoint.setDescription(Format::timeSpan(val.toUInt() / 1000));
|
||||||
break;
|
break;
|
||||||
case 24:
|
case 254:
|
||||||
trigger = val.toInt();
|
waypoint.setName("#" + QString::number(val.toUInt()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -385,7 +384,7 @@ bool FITParser::parseData(CTX &ctx, const MessageDefinition *def)
|
|||||||
ctx.segment.append(ctx.trackpoint);
|
ctx.segment.append(ctx.trackpoint);
|
||||||
ctx.trackpoint = Trackpoint();
|
ctx.trackpoint = Trackpoint();
|
||||||
}
|
}
|
||||||
} else if (def->globalId == COURSEPOINT) {
|
} else if (def->globalId == COURSEPOINT || def->globalId == LAP) {
|
||||||
if (waypoint.coordinates().isValid())
|
if (waypoint.coordinates().isValid())
|
||||||
ctx.waypoints.append(waypoint);
|
ctx.waypoints.append(waypoint);
|
||||||
} else if (def->globalId == LOCATION) {
|
} else if (def->globalId == LOCATION) {
|
||||||
@ -394,17 +393,6 @@ bool FITParser::parseData(CTX &ctx, const MessageDefinition *def)
|
|||||||
+ 631065600, Qt::UTC));
|
+ 631065600, Qt::UTC));
|
||||||
ctx.waypoints.append(waypoint);
|
ctx.waypoints.append(waypoint);
|
||||||
}
|
}
|
||||||
} else if (def->globalId == LAP && trigger >= 0) {
|
|
||||||
if (waypoint.coordinates().isValid()) {
|
|
||||||
if (trigger == 7)
|
|
||||||
waypoint.setName("Finish");
|
|
||||||
else
|
|
||||||
waypoint.setName("Lap " + QString::number(++ctx.laps));
|
|
||||||
waypoint.setTimestamp(QDateTime::fromSecsSinceEpoch(ctx.timestamp
|
|
||||||
+ 631065600, Qt::UTC));
|
|
||||||
if (trigger != 7 || ctx.laps > 1)
|
|
||||||
ctx.waypoints.append(waypoint);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -52,7 +52,7 @@ private:
|
|||||||
struct CTX {
|
struct CTX {
|
||||||
CTX(QFile *file, QVector<Waypoint> &waypoints)
|
CTX(QFile *file, QVector<Waypoint> &waypoints)
|
||||||
: file(file), waypoints(waypoints), len(0), endian(0), timestamp(0),
|
: file(file), waypoints(waypoints), len(0), endian(0), timestamp(0),
|
||||||
ratio(NAN), laps(0) {}
|
ratio(NAN) {}
|
||||||
|
|
||||||
QFile *file;
|
QFile *file;
|
||||||
QVector<Waypoint> &waypoints;
|
QVector<Waypoint> &waypoints;
|
||||||
@ -63,7 +63,6 @@ private:
|
|||||||
qreal ratio;
|
qreal ratio;
|
||||||
Trackpoint trackpoint;
|
Trackpoint trackpoint;
|
||||||
SegmentData segment;
|
SegmentData segment;
|
||||||
unsigned laps;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
bool readData(QFile *file, char *data, size_t size);
|
bool readData(QFile *file, char *data, size_t size);
|
||||||
|
Loading…
Reference in New Issue
Block a user