mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-07-17 12:24:24 +02:00
Compare commits
19 Commits
13.26
...
22c7ea7de6
Author | SHA1 | Date | |
---|---|---|---|
22c7ea7de6 | |||
78f2e1f47d | |||
364867101f | |||
28a7e94986 | |||
3474b8db96 | |||
c28f12e0bb | |||
749282085e | |||
3b276882e0 | |||
9ec5ea45d8 | |||
7b516ca5e4 | |||
5d86852299 | |||
068ac5e91d | |||
7b6640761a | |||
da95287a8d | |||
7e200d1cce | |||
ffaf4250ac | |||
39ad9cb7ad | |||
219e4c3762 | |||
09858f603d |
@ -1,4 +1,4 @@
|
||||
version: 13.26.{build}
|
||||
version: 13.27.{build}
|
||||
|
||||
configuration:
|
||||
- Release
|
||||
@ -13,7 +13,7 @@ environment:
|
||||
OPENSSLDIR: C:\OpenSSL-v111-Win64\bin
|
||||
NSISDEF: /DOPENSSL /DANGLE
|
||||
- QTDIR: C:\Qt\6.7\msvc2019_64
|
||||
OPENSSLDIR: C:\OpenSSL-v32-Win64\bin
|
||||
OPENSSLDIR: C:\OpenSSL-v33-Win64\bin
|
||||
NSISDEF: /DQT6 /DOPENSSL
|
||||
|
||||
install:
|
||||
|
6
.github/workflows/android.yml
vendored
6
.github/workflows/android.yml
vendored
@ -26,14 +26,12 @@ jobs:
|
||||
- name: Setup NDK path
|
||||
run: echo "ANDROID_NDK_ROOT=${ANDROID_HOME}/ndk/23.1.7779620/" >> $GITHUB_ENV
|
||||
- name: Install Qt (Desktop)
|
||||
uses: jurplel/install-qt-action@v3
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
aqtversion: '==3.1.*'
|
||||
version: '6.4.0'
|
||||
- name: Install Qt (Android)
|
||||
uses: jurplel/install-qt-action@v3
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
aqtversion: '==3.1.*'
|
||||
version: '6.4.0'
|
||||
target: 'android'
|
||||
arch: 'android_arm64_v8a'
|
||||
|
6
.github/workflows/osx.yml
vendored
6
.github/workflows/osx.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v3
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
version: '5.15.2'
|
||||
- name: Create localization
|
||||
@ -37,9 +37,9 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v3
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
version: '6.7.1'
|
||||
version: '6.7.2'
|
||||
modules: qtpositioning qtserialport qtimageformats
|
||||
- name: Create localization
|
||||
run: lrelease gpxsee.pro
|
||||
|
@ -3,7 +3,7 @@ unix:!macx:!android {
|
||||
} else {
|
||||
TARGET = GPXSee
|
||||
}
|
||||
VERSION = 13.26
|
||||
VERSION = 13.27
|
||||
|
||||
|
||||
QT += core \
|
||||
|
@ -30,12 +30,12 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/cadencegraph.cpp" line="28"/>
|
||||
<source>Avg</source>
|
||||
<translation>promedio</translation>
|
||||
<translation>Med.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/cadencegraph.cpp" line="30"/>
|
||||
<source>Max</source>
|
||||
<translation>máx.</translation>
|
||||
<translation>Máx.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/cadencegraph.cpp" line="33"/>
|
||||
|
@ -374,32 +374,32 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="221"/>
|
||||
<source>Open...</source>
|
||||
<translation>Megnyitás...</translation>
|
||||
<translation>Megnyitás…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="228"/>
|
||||
<source>Open directory...</source>
|
||||
<translation>Könyvtár megnyitása...</translation>
|
||||
<translation>Könyvtár megnyitása…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="233"/>
|
||||
<source>Print...</source>
|
||||
<translation>Nyomtatás...</translation>
|
||||
<translation>Nyomtatás…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="239"/>
|
||||
<source>Export to PDF...</source>
|
||||
<translation>Exportálás PDF-be...</translation>
|
||||
<translation>Exportálás PDF-be…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="246"/>
|
||||
<source>Export to PNG...</source>
|
||||
<translation>Exportálás PNG-be...</translation>
|
||||
<translation>Exportálás PNG-be…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="253"/>
|
||||
<source>Close</source>
|
||||
<translation>Fájl bezárása</translation>
|
||||
<translation>Bezárás</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="260"/>
|
||||
@ -409,7 +409,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="266"/>
|
||||
<source>Statistics...</source>
|
||||
<translation>Statisztika...</translation>
|
||||
<translation>Statisztika…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="276"/>
|
||||
@ -419,7 +419,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="288"/>
|
||||
<source>Load POI file...</source>
|
||||
<translation>POI fájl betöltése...</translation>
|
||||
<translation>POI fájl betöltése…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="292"/>
|
||||
@ -459,12 +459,12 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="339"/>
|
||||
<source>Load map...</source>
|
||||
<translation>Térkép betöltése...</translation>
|
||||
<translation>Térkép betöltése…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="344"/>
|
||||
<source>Load map directory...</source>
|
||||
<translation>Térképmappa megadása...</translation>
|
||||
<translation>Térképmappa megadása…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="347"/>
|
||||
@ -683,7 +683,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="604"/>
|
||||
<source>Options...</source>
|
||||
<translation>Beállítások...</translation>
|
||||
<translation>Beállítások…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="611"/>
|
||||
|
@ -486,17 +486,17 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="370"/>
|
||||
<source>All</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>모두</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="374"/>
|
||||
<source>Raster only</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>래스터만</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="378"/>
|
||||
<source>Vector only</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>벡터만</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="385"/>
|
||||
@ -733,7 +733,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="695"/>
|
||||
<source>Layers</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>레이어</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="704"/>
|
||||
@ -1692,7 +1692,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="388"/>
|
||||
<source>Detect pauses</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>일시 중지 감지</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="391"/>
|
||||
@ -1796,7 +1796,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="537"/>
|
||||
<source>Detection:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>감지:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="538"/>
|
||||
|
@ -486,17 +486,17 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="370"/>
|
||||
<source>All</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Alle</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="374"/>
|
||||
<source>Raster only</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Kun raster</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="378"/>
|
||||
<source>Vector only</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Kun vektor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="385"/>
|
||||
@ -723,7 +723,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="695"/>
|
||||
<source>Layers</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Lag</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="704"/>
|
||||
|
@ -504,17 +504,17 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="370"/>
|
||||
<source>All</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Alla</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="374"/>
|
||||
<source>Raster only</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Endast raster</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="378"/>
|
||||
<source>Vector only</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Endast vektor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="385"/>
|
||||
@ -711,7 +711,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="695"/>
|
||||
<source>Layers</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Lager</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="721"/>
|
||||
|
@ -37,7 +37,7 @@ Unicode true
|
||||
; The name of the installer
|
||||
Name "GPXSee"
|
||||
; Program version
|
||||
!define VERSION "13.26"
|
||||
!define VERSION "13.27"
|
||||
|
||||
; The file to write
|
||||
OutFile "GPXSee-${VERSION}_x64.exe"
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include <QDataStream>
|
||||
#include <QTimeZone>
|
||||
#include "common/tifffile.h"
|
||||
#include "common/util.h"
|
||||
#include "exifparser.h"
|
||||
@ -213,7 +214,7 @@ bool EXIFParser::parseTIFF(QFile *file, QVector<Waypoint> &waypoints)
|
||||
GPSIFD.value(GPSAltitudeRef)));
|
||||
wp.setTimestamp(QDateTime(QDate::fromString(text(tiff,
|
||||
GPSIFD.value(GPSDateStamp)), "yyyy:MM:dd"), time(tiff,
|
||||
GPSIFD.value(GPSTimeStamp)), Qt::UTC));
|
||||
GPSIFD.value(GPSTimeStamp)), QTimeZone::utc()));
|
||||
wp.setDescription(text(tiff, IFD0.value(ImageDescription)).trimmed());
|
||||
|
||||
waypoints.append(wp);
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include <QtEndian>
|
||||
#include <QTimeZone>
|
||||
#include "GUI/format.h"
|
||||
#include "fitparser.h"
|
||||
|
||||
@ -307,7 +308,7 @@ bool FITParser::parseData(CTX &ctx, const MessageDefinition *def)
|
||||
switch (field->id) {
|
||||
case 1:
|
||||
waypoint.setTimestamp(QDateTime::fromSecsSinceEpoch(
|
||||
val.toUInt() + 631065600, Qt::UTC));
|
||||
val.toUInt() + 631065600, QTimeZone::utc()));
|
||||
break;
|
||||
case 2:
|
||||
waypoint.rcoordinates().setLat(
|
||||
@ -380,7 +381,7 @@ bool FITParser::parseData(CTX &ctx, const MessageDefinition *def)
|
||||
} else if (def->globalId == RECORD) {
|
||||
if (ctx.trackpoint.coordinates().isValid()) {
|
||||
ctx.trackpoint.setTimestamp(QDateTime::fromSecsSinceEpoch(
|
||||
ctx.timestamp + 631065600, Qt::UTC));
|
||||
ctx.timestamp + 631065600, QTimeZone::utc()));
|
||||
ctx.trackpoint.setRatio(ctx.ratio);
|
||||
ctx.segment.append(ctx.trackpoint);
|
||||
ctx.trackpoint = Trackpoint();
|
||||
@ -391,7 +392,7 @@ bool FITParser::parseData(CTX &ctx, const MessageDefinition *def)
|
||||
} else if (def->globalId == LOCATION) {
|
||||
if (waypoint.coordinates().isValid()) {
|
||||
waypoint.setTimestamp(QDateTime::fromSecsSinceEpoch(ctx.timestamp
|
||||
+ 631065600, Qt::UTC));
|
||||
+ 631065600, QTimeZone::utc()));
|
||||
ctx.waypoints.append(waypoint);
|
||||
}
|
||||
} else if (def->globalId == LAP && trigger >= 0) {
|
||||
@ -401,7 +402,7 @@ bool FITParser::parseData(CTX &ctx, const MessageDefinition *def)
|
||||
else
|
||||
waypoint.setName("Lap " + QString::number(++ctx.laps));
|
||||
waypoint.setTimestamp(QDateTime::fromSecsSinceEpoch(ctx.timestamp
|
||||
+ 631065600, Qt::UTC));
|
||||
+ 631065600, QTimeZone::utc()));
|
||||
if (trigger != 7 || ctx.laps > 1)
|
||||
ctx.waypoints.append(waypoint);
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include <cstring>
|
||||
#include <QTimeZone>
|
||||
#include "common/util.h"
|
||||
#include "igcparser.h"
|
||||
|
||||
@ -160,7 +161,7 @@ bool IGCParser::readBRecord(CTX &ctx, const char *line, int len,
|
||||
ctx.time = time;
|
||||
|
||||
Trackpoint t(Coordinates(lon, lat));
|
||||
t.setTimestamp(QDateTime(ctx.date, ctx.time, Qt::UTC));
|
||||
t.setTimestamp(QDateTime(ctx.date, ctx.time, QTimeZone::utc()));
|
||||
t.setElevation(ele);
|
||||
segment.append(t);
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include <cstring>
|
||||
#include <QTimeZone>
|
||||
#include "common/util.h"
|
||||
#include "nmeaparser.h"
|
||||
|
||||
@ -282,7 +283,8 @@ bool NMEAParser::readRMC(CTX &ctx, const char *line, int len,
|
||||
|
||||
if (!date.isNull()) {
|
||||
if (ctx.date.isNull() && !ctx.time.isNull() && !segment.isEmpty())
|
||||
segment.last().setTimestamp(QDateTime(date, ctx.time, Qt::UTC));
|
||||
segment.last().setTimestamp(QDateTime(date, ctx.time,
|
||||
QTimeZone::utc()));
|
||||
ctx.date = date;
|
||||
}
|
||||
|
||||
@ -290,7 +292,7 @@ bool NMEAParser::readRMC(CTX &ctx, const char *line, int len,
|
||||
if (valid && !ctx.GGA && c.isValid()) {
|
||||
Trackpoint t(c);
|
||||
if (!ctx.date.isNull() && !time.isNull())
|
||||
t.setTimestamp(QDateTime(ctx.date, time, Qt::UTC));
|
||||
t.setTimestamp(QDateTime(ctx.date, time, QTimeZone::utc()));
|
||||
segment.append(t);
|
||||
}
|
||||
|
||||
@ -363,7 +365,7 @@ bool NMEAParser::readGGA(CTX &ctx, const char *line, int len,
|
||||
if (c.isValid()) {
|
||||
Trackpoint t(c);
|
||||
if (!(ctx.time.isNull() || ctx.date.isNull()))
|
||||
t.setTimestamp(QDateTime(ctx.date, ctx.time, Qt::UTC));
|
||||
t.setTimestamp(QDateTime(ctx.date, ctx.time, QTimeZone::utc()));
|
||||
if (!std::isnan(ele))
|
||||
t.setElevation(ele - gh);
|
||||
segment.append(t);
|
||||
|
@ -46,7 +46,7 @@ bool OMDParser::readHeaderFile(const QString &omdPath, Header &hdr)
|
||||
quint8 avgHr = buffer[12];
|
||||
quint8 maxHr = buffer[13];
|
||||
|
||||
QDateTime date(QDate(Y + 2000, M, D), QTime(h, m), Qt::UTC);
|
||||
QDateTime date(QDate(Y + 2000, M, D), QTime(h, m), QTimeZone::utc());
|
||||
if (!date.isValid()) {
|
||||
qWarning("%s: invalid date", qPrintable(path));
|
||||
return false;
|
||||
@ -80,7 +80,7 @@ bool OMDParser::readF1(const char *chunk, const Header &hdr, Sequence &seq,
|
||||
return false;
|
||||
}
|
||||
t.setTimestamp(QDateTime(hdr.date.date(),
|
||||
hdr.date.time().addSecs(sec), Qt::UTC));
|
||||
hdr.date.time().addSecs(sec), QTimeZone::utc()));
|
||||
if (hdr.elevation)
|
||||
t.setElevation(alt);
|
||||
|
||||
@ -200,7 +200,7 @@ bool GHPParser::readHeaderFile(const QString &ghpPath, Header &hdr)
|
||||
quint8 avgHr = buffer[61];
|
||||
quint8 maxHr = buffer[60];
|
||||
|
||||
QDateTime date(QDate(Y + 2000, M, D), QTime(h, m, s), Qt::UTC);
|
||||
QDateTime date(QDate(Y + 2000, M, D), QTime(h, m, s), QTimeZone::utc());
|
||||
if (!date.isValid()) {
|
||||
qWarning("%s: invalid date", qPrintable(path));
|
||||
return false;
|
||||
@ -230,7 +230,7 @@ bool GHPParser::readF0(const char *chunk, const Header &hdr, int &time,
|
||||
return false;
|
||||
}
|
||||
t.setTimestamp(QDateTime(hdr.date.date(),
|
||||
hdr.date.time().addMSecs(time * 100), Qt::UTC));
|
||||
hdr.date.time().addMSecs(time * 100), QTimeZone::utc()));
|
||||
t.setSpeed(speed / 360.0);
|
||||
t.setElevation(alt);
|
||||
if (hdr.hr)
|
||||
|
@ -1,6 +1,7 @@
|
||||
#ifndef ONMOVEPARSERS_H
|
||||
#define ONMOVEPARSERS_H
|
||||
|
||||
#include <QTimeZone>
|
||||
#include "parser.h"
|
||||
|
||||
class OMDParser : public Parser
|
||||
@ -14,8 +15,8 @@ public:
|
||||
private:
|
||||
struct Header
|
||||
{
|
||||
Header() : date(QDateTime(QDate(1970, 1, 1), QTime(0, 0), Qt::UTC)),
|
||||
elevation(true), hr(true) {}
|
||||
Header() : date(QDateTime(QDate(1970, 1, 1), QTime(0, 0),
|
||||
QTimeZone::utc())), elevation(true), hr(true) {}
|
||||
|
||||
QDateTime date;
|
||||
bool elevation;
|
||||
@ -50,8 +51,8 @@ public:
|
||||
private:
|
||||
struct Header
|
||||
{
|
||||
Header() : date(QDateTime(QDate(1970, 1, 1), QTime(0, 0), Qt::UTC)),
|
||||
hr(true) {}
|
||||
Header() : date(QDateTime(QDate(1970, 1, 1), QTime(0, 0),
|
||||
QTimeZone::utc())), hr(true) {}
|
||||
|
||||
QDateTime date;
|
||||
bool hr;
|
||||
|
@ -22,7 +22,7 @@ static qint16 limit(const DEMTile *tile, quint16 factor)
|
||||
|
||||
void DEMFile::clear()
|
||||
{
|
||||
_levels.clear();
|
||||
_levels = QVector<Level>();
|
||||
}
|
||||
|
||||
bool DEMFile::load(Handle &hdl)
|
||||
|
@ -25,7 +25,7 @@ private:
|
||||
{
|
||||
if (!_file->readVUInt32SW(_hdl, 4, _value))
|
||||
return false;
|
||||
_shift = (quint8)-8;
|
||||
_shift = -8;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ private:
|
||||
_value <<= bits;
|
||||
_shift += bits;
|
||||
|
||||
while (-1 < (qint8)_shift) {
|
||||
while (_shift >= 0) {
|
||||
if (!_file->readByte(_hdl, &data))
|
||||
return false;
|
||||
|
||||
@ -53,7 +53,7 @@ private:
|
||||
const SubFile *_file;
|
||||
SubFile::Handle &_hdl;
|
||||
quint32 _value;
|
||||
quint8 _shift;
|
||||
qint8 _shift;
|
||||
};
|
||||
|
||||
bool readLine(BitStream &bs);
|
||||
|
@ -161,6 +161,34 @@ static QImage railroad(qreal ratio)
|
||||
return img;
|
||||
}
|
||||
|
||||
static QImage fence(qreal ratio)
|
||||
{
|
||||
QImage img(8 * ratio, 3 * ratio, QImage::Format_ARGB32_Premultiplied);
|
||||
img.setDevicePixelRatio(ratio);
|
||||
img.fill(Qt::transparent);
|
||||
QPainter p(&img);
|
||||
p.setPen(QPen(Qt::gray, 1));
|
||||
p.drawLine(0, 0, 0, 2);
|
||||
p.drawLine(0, 1, 7, 1);
|
||||
|
||||
return img;
|
||||
}
|
||||
|
||||
static QImage pipeline(qreal ratio)
|
||||
{
|
||||
QImage img(10 * ratio, 4 * ratio, QImage::Format_ARGB32_Premultiplied);
|
||||
img.setDevicePixelRatio(ratio);
|
||||
img.fill(Qt::transparent);
|
||||
QPainter p(&img);
|
||||
p.setPen(QPen(Qt::darkGray, 1));
|
||||
p.drawLine(0, 0, 0, 3);
|
||||
p.drawLine(1, 0, 1, 3);
|
||||
p.drawLine(0, 1, 9, 1);
|
||||
p.drawLine(0, 2, 9, 2);
|
||||
|
||||
return img;
|
||||
}
|
||||
|
||||
void Style::defaultPolygonStyle()
|
||||
{
|
||||
_polygons[TYPE(0x01)] = Polygon(QBrush(QColor(0xdf, 0xd3, 0xb5)));
|
||||
@ -359,8 +387,11 @@ void Style::defaultLineStyle(qreal ratio)
|
||||
_lines[TYPE(0x0c)] = Line(QPen(QColor(0xff, 0xff, 0xff), 3, Qt::SolidLine),
|
||||
QPen(QColor(0xd5, 0xcd, 0xc0), 5, Qt::SolidLine, Qt::RoundCap,
|
||||
Qt::RoundJoin));
|
||||
_lines[TYPE(0x11)] = Line(QPen(QColor(0xff, 0xff, 0xff), 2, Qt::SolidLine));
|
||||
_lines[TYPE(0x14)] = Line(railroad(ratio));
|
||||
_lines[TYPE(0x16)] = Line(QPen(QColor(0xab, 0xa0, 0x83), 1, Qt::DotLine));
|
||||
_lines[TYPE(0x17)] = Line(fence(ratio));
|
||||
_lines[TYPE(0x17)].setTextFontSize(None);
|
||||
_lines[TYPE(0x18)] = Line(QPen(QColor(0x9f, 0xc4, 0xe1), 2, Qt::SolidLine));
|
||||
_lines[TYPE(0x18)].setTextColor(QColor(0x9f, 0xc4, 0xe1));
|
||||
//_lines[TYPE(0x1a)] = Line(QPen(QColor(0x76, 0x97, 0xb7), 1, Qt::DashLine));
|
||||
@ -389,24 +420,32 @@ void Style::defaultLineStyle(qreal ratio)
|
||||
_lines[TYPE(0x27)] = Line(QPen(QColor(0xff, 0xff, 0xff), 4, Qt::SolidLine),
|
||||
QPen(QColor(0xd5, 0xcd, 0xc0), 5, Qt::SolidLine, Qt::RoundCap,
|
||||
Qt::RoundJoin));
|
||||
//_lines[TYPE(0x28)] = Line(QPen(QColor(0x5a, 0x5a, 0x5a"), 1, Qt::SolidLine));
|
||||
_lines[TYPE(0x28)] = Line(pipeline(ratio));
|
||||
_lines[TYPE(0x29)] = Line(QPen(QColor(0x5a, 0x5a, 0x5a), 1, Qt::SolidLine));
|
||||
_lines[TYPE(0x29)].setTextFontSize(None);
|
||||
_lines[TYPE(0x30)] = Line(QPen(QColor(0xe4, 0xef, 0xcf), 3, Qt::SolidLine),
|
||||
QPen(QColor(0xc9, 0xd3, 0xa5), 5, Qt::SolidLine, Qt::RoundCap,
|
||||
Qt::RoundJoin));
|
||||
|
||||
// NT types
|
||||
_lines[0x10c00] = _lines[TYPE(0x14)];
|
||||
_lines[0x10a00] = _lines[TYPE(0x18)];
|
||||
_lines[0x10b04] = _lines[TYPE(0x1e)];
|
||||
_lines[0x10a01] = _lines[TYPE(0x1f)];
|
||||
_lines[0x10801] = _lines[TYPE(0x02)];
|
||||
_lines[0x10802] = _lines[TYPE(0x03)];
|
||||
_lines[0x10803] = _lines[TYPE(0x04)];
|
||||
_lines[0x10804] = _lines[TYPE(0x05)];
|
||||
_lines[0x10900] = _lines[TYPE(0x20)];
|
||||
_lines[0x10901] = _lines[TYPE(0x21)];
|
||||
_lines[0x10902] = _lines[TYPE(0x22)];
|
||||
_lines[0x10903] = _lines[TYPE(0x23)];
|
||||
_lines[0x10904] = _lines[TYPE(0x24)];
|
||||
_lines[0x10905] = _lines[TYPE(0x25)];
|
||||
_lines[0x10a00] = _lines[TYPE(0x18)];
|
||||
_lines[0x10a01] = _lines[TYPE(0x1f)];
|
||||
_lines[0x10a02] = _lines[TYPE(0x26)];
|
||||
_lines[0x10b02] = _lines[TYPE(0x1c)];
|
||||
_lines[0x10b04] = _lines[TYPE(0x1e)];
|
||||
_lines[0x10c00] = _lines[TYPE(0x14)];
|
||||
_lines[0x10c02] = _lines[TYPE(0x27)];
|
||||
//_lines[0x10c03] = _lines[TYPE(0x28)];
|
||||
_lines[0x10c03] = _lines[TYPE(0x28)];
|
||||
_lines[0x10c04] = _lines[TYPE(0x29)];
|
||||
|
||||
// Marine stuff
|
||||
@ -416,6 +455,7 @@ void Style::defaultLineStyle(qreal ratio)
|
||||
_lines[0x10108] = Line(QPen(QColor(0, 0, 0), 1, Qt::SolidLine));
|
||||
_lines[0x10301] = Line(QPen(QColor(0x0e, 0x10, 0x87), 1, Qt::SolidLine));
|
||||
_lines[0x10307] = Line(QPen(QColor(0x05, 0x62, 0x0e), 1, Qt::SolidLine));
|
||||
_lines[0x10309] = Line(QPen(QColor(0x0e, 0x10, 0x87), 1, Qt::SolidLine));
|
||||
_lines[0x10401] = Line(QImage(":/marine/cable.png"));
|
||||
_lines[0x10402] = Line(QImage(":/marine/pipeline.png"));
|
||||
_lines[0x10404] = Line(QImage(":/marine/fishing-farm-line.png"));
|
||||
|
@ -336,8 +336,8 @@ void Atlas::unload()
|
||||
for (int i = 0; i < _maps.count(); i++)
|
||||
_maps.at(i)->unload();
|
||||
|
||||
_zooms.clear();
|
||||
_bounds.clear();
|
||||
_zooms = QVector<Zoom>();
|
||||
_bounds = QVector<Bounds>();
|
||||
}
|
||||
|
||||
Map *Atlas::createTAR(const QString &path, const Projection &proj, bool *isDir)
|
||||
|
@ -125,7 +125,7 @@ void JNXMap::clearTiles()
|
||||
{
|
||||
for (int i = 0; i < _zooms.size(); i++) {
|
||||
Zoom *z = _zooms[i];
|
||||
z->tiles.clear();
|
||||
z->tiles = QVector<Tile>();
|
||||
z->tree.RemoveAll();
|
||||
}
|
||||
}
|
||||
|
@ -445,7 +445,7 @@ void KMZMap::load(const Projection &in, const Projection &out,
|
||||
|
||||
void KMZMap::unload()
|
||||
{
|
||||
_bounds.clear();
|
||||
_bounds = QVector<Bounds>();
|
||||
|
||||
delete _zip;
|
||||
_zip = 0;
|
||||
|
@ -478,7 +478,7 @@ void MapData::clearTiles()
|
||||
}
|
||||
|
||||
qDeleteAll(_tiles);
|
||||
_tiles.clear();
|
||||
_tiles = QList<TileTree*>();
|
||||
}
|
||||
|
||||
bool MapData::pathCb(VectorTile *tile, void *context)
|
||||
|
@ -763,13 +763,13 @@ void Style::load(const MapData &data, qreal ratio)
|
||||
|
||||
void Style::clear()
|
||||
{
|
||||
_paths.clear();
|
||||
_circles.clear();
|
||||
_pathLabels.clear();
|
||||
_pointLabels.clear();
|
||||
_areaLabels.clear();
|
||||
_symbols.clear();
|
||||
_lineSymbols.clear();
|
||||
_paths = QList<PathRender>();
|
||||
_circles = QList<CircleRender>();
|
||||
_pathLabels = QList<TextRender>();
|
||||
_pointLabels = QList<TextRender>();
|
||||
_areaLabels = QList<TextRender>();
|
||||
_symbols = QList<Symbol>();
|
||||
_lineSymbols = QList<Symbol>();
|
||||
}
|
||||
|
||||
QList<const Style::PathRender *> Style::paths(int zoom, bool closed,
|
||||
|
@ -87,6 +87,10 @@ static Projection parseProjection(const QString &str, const GCS &gcs)
|
||||
return Projection(PCS(gcs, Conversion(9809, Conversion::Setup(
|
||||
52.15616055555555, 5.38763888888889, 0.9999079, 155000, 463000,
|
||||
NAN, NAN), 9001)));
|
||||
case 125: // Israeli New grid
|
||||
return Projection(PCS(gcs, Conversion(9807, Conversion::Setup(
|
||||
31.7343936111111, 35.2045169444444, 1.0000067, 219529.584,
|
||||
626907.39, NAN, NAN), 9001)));
|
||||
case 184: // Swedish Grid
|
||||
return Projection(PCS(gcs, Conversion(9807, Conversion::Setup(0,
|
||||
15.808278, 1, 1500000, 0, NAN, NAN), 9001)));
|
||||
|
Reference in New Issue
Block a user