1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Compare commits

..

10 Commits

Author SHA1 Message Date
Hosted Weblate
36f8f94f15
Merge branch 'origin/master' into Weblate. 2024-09-05 07:53:22 +02:00
c27f3918ed Use the time with seconds also for track dates 2024-09-05 07:52:48 +02:00
Hosted Weblate
4165a30b3d
Merge branch 'origin/master' into Weblate. 2024-09-05 07:41:36 +02:00
70ad35c0fc Use propper two-digit minutes and seconds 2024-09-05 07:41:06 +02:00
Hosted Weblate
4d19c68b2e
Merge branch 'origin/master' into Weblate. 2024-09-05 05:34:52 +00:00
b53da040b5 Always show the seconds in times 2024-09-05 07:34:27 +02:00
96044fd8da Do not show the session end as (a single) lap 2024-09-05 07:33:05 +02:00
Hosted Weblate
62a1d08ce6
Merge branch 'origin/master' into Weblate. 2024-09-04 23:05:59 +00:00
Åke Engelbrektson
06461547e6
Translated using Weblate (Swedish)
Currently translated at 100.0% (482 of 482 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/sv/
2024-09-04 23:05:58 +00:00
bittin1ddc447d824349b2
d7a882b284
Translated using Weblate (Swedish)
Currently translated at 100.0% (482 of 482 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/sv/
2024-09-04 09:37:48 +02:00
6 changed files with 30 additions and 13 deletions

View File

@ -1887,12 +1887,12 @@
<message>
<location filename="../src/GUI/optionsdialog.cpp" line="388"/>
<source>Detect pauses</source>
<translation type="unfinished"></translation>
<translation>Identifiera pauser</translation>
</message>
<message>
<location filename="../src/GUI/optionsdialog.cpp" line="539"/>
<source>Detection:</source>
<translation type="unfinished"></translation>
<translation>Identifiering:</translation>
</message>
<message>
<location filename="../src/GUI/optionsdialog.cpp" line="658"/>

View File

@ -26,7 +26,7 @@ void MarkerInfoItem::setDate(const QDateTime &date)
QLocale l;
_s1 = l.toString(date.date(), QLocale::ShortFormat);
_s2 = l.toString(date.time(), QLocale::ShortFormat);
_s2 = date.time().toString("h:mm:ss");
updateBoundingRect();
}

View File

@ -23,9 +23,11 @@ ToolTip TrackItem::info() const
tt.insert(tr("Total time"), Format::timeSpan(_time));
if (_movingTime > 0)
tt.insert(tr("Moving time"), Format::timeSpan(_movingTime));
if (!_date.isNull())
tt.insert(tr("Date"), l.toString(_date.toTimeZone(_timeZone),
QLocale::ShortFormat));
if (!_date.isNull()) {
QDateTime date(_date.toTimeZone(_timeZone));
tt.insert(tr("Date"), l.toString(date.date(), QLocale::ShortFormat)
+ " " + date.time().toString("h:mm:ss"));
}
if (!_links.isEmpty()) {
QString links;
for (int i = 0; i < _links.size(); i++) {

View File

@ -32,10 +32,12 @@ ToolTip WaypointItem::info() const
val += " (" + Format::elevation(elevations.second, _units) + ")";
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"),
l.toString(_waypoint.timestamp().toTimeZone(_timeZone),
QLocale::ShortFormat));
l.toString(date.date(), QLocale::ShortFormat) + " "
+ date.time().toString("h:mm:ss"));
}
if (!_waypoint.description().isEmpty())
tt.insert(qApp->translate("WaypointItem", "Description"),
_waypoint.description());

View File

@ -238,6 +238,7 @@ bool FITParser::parseData(CTX &ctx, const MessageDefinition *def)
bool valid;
Event event;
Waypoint waypoint;
int trigger = -1;
if (!def->fields.size() && !def->devFields.size()) {
_errorString = "Undefined data message";
@ -359,8 +360,8 @@ bool FITParser::parseData(CTX &ctx, const MessageDefinition *def)
case 7:
waypoint.setDescription(Format::timeSpan(val.toUInt() / 1000));
break;
case 254:
waypoint.setName("#" + QString::number(val.toUInt()));
case 24:
trigger = val.toInt();
break;
}
}
@ -384,7 +385,7 @@ bool FITParser::parseData(CTX &ctx, const MessageDefinition *def)
ctx.segment.append(ctx.trackpoint);
ctx.trackpoint = Trackpoint();
}
} else if (def->globalId == COURSEPOINT || def->globalId == LAP) {
} else if (def->globalId == COURSEPOINT) {
if (waypoint.coordinates().isValid())
ctx.waypoints.append(waypoint);
} else if (def->globalId == LOCATION) {
@ -393,6 +394,17 @@ bool FITParser::parseData(CTX &ctx, const MessageDefinition *def)
+ 631065600, Qt::UTC));
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;

View File

@ -52,7 +52,7 @@ private:
struct CTX {
CTX(QFile *file, QVector<Waypoint> &waypoints)
: file(file), waypoints(waypoints), len(0), endian(0), timestamp(0),
ratio(NAN) {}
ratio(NAN), laps(0) {}
QFile *file;
QVector<Waypoint> &waypoints;
@ -63,6 +63,7 @@ private:
qreal ratio;
Trackpoint trackpoint;
SegmentData segment;
unsigned laps;
};
bool readData(QFile *file, char *data, size_t size);