1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-02-19 09:00:49 +01:00

Merge branch 'master' into android-latest

This commit is contained in:
Martin Tůma 2025-02-13 23:48:32 +01:00
commit bded204816
32 changed files with 138 additions and 58 deletions

View File

@ -1,4 +1,4 @@
version: 13.35.{build} version: 13.36.{build}
configuration: configuration:
- Release - Release

View File

@ -3,7 +3,7 @@ unix:!macx:!android {
} else { } else {
TARGET = GPXSee TARGET = GPXSee
} }
VERSION = 13.35 VERSION = 13.36
QT += core \ QT += core \

View File

@ -214,6 +214,8 @@
<file alias="24h-anchorage.png">icons/map/marine/24h-anchorage.png</file> <file alias="24h-anchorage.png">icons/map/marine/24h-anchorage.png</file>
<file alias="dw-anchorage.png">icons/map/marine/dw-anchorage.png</file> <file alias="dw-anchorage.png">icons/map/marine/dw-anchorage.png</file>
<file alias="tanker-anchorage.png">icons/map/marine/tanker-anchorage.png</file> <file alias="tanker-anchorage.png">icons/map/marine/tanker-anchorage.png</file>
<file alias="nature-reserve-line.png">icons/map/marine/nature-reserve-line.png</file>
<file alias="sanctuary-line.png">icons/map/marine/sanctuary-line.png</file>
</qresource> </qresource>
<!-- Patterns (Mapsforge) --> <!-- Patterns (Mapsforge) -->

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 B

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 275 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 266 B

View File

@ -486,17 +486,17 @@
<message> <message>
<location filename="../src/GUI/gui.cpp" line="370"/> <location filename="../src/GUI/gui.cpp" line="370"/>
<source>All</source> <source>All</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/GUI/gui.cpp" line="374"/> <location filename="../src/GUI/gui.cpp" line="374"/>
<source>Raster only</source> <source>Raster only</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/GUI/gui.cpp" line="378"/> <location filename="../src/GUI/gui.cpp" line="378"/>
<source>Vector only</source> <source>Vector only</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/GUI/gui.cpp" line="385"/> <location filename="../src/GUI/gui.cpp" line="385"/>
@ -733,7 +733,7 @@
<message> <message>
<location filename="../src/GUI/gui.cpp" line="695"/> <location filename="../src/GUI/gui.cpp" line="695"/>
<source>Layers</source> <source>Layers</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/GUI/gui.cpp" line="704"/> <location filename="../src/GUI/gui.cpp" line="704"/>
@ -1692,7 +1692,7 @@
<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 type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/GUI/optionsdialog.cpp" line="391"/> <location filename="../src/GUI/optionsdialog.cpp" line="391"/>
@ -1796,7 +1796,7 @@
<message> <message>
<location filename="../src/GUI/optionsdialog.cpp" line="537"/> <location filename="../src/GUI/optionsdialog.cpp" line="537"/>
<source>Detection:</source> <source>Detection:</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/GUI/optionsdialog.cpp" line="538"/> <location filename="../src/GUI/optionsdialog.cpp" line="538"/>
@ -1821,7 +1821,7 @@
<message> <message>
<location filename="../src/GUI/optionsdialog.cpp" line="552"/> <location filename="../src/GUI/optionsdialog.cpp" line="552"/>
<source>Pause detection</source> <source>Pause detection</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/GUI/optionsdialog.cpp" line="564"/> <location filename="../src/GUI/optionsdialog.cpp" line="564"/>
@ -1870,7 +1870,7 @@
<location filename="../src/GUI/optionsdialog.cpp" line="314"/> <location filename="../src/GUI/optionsdialog.cpp" line="314"/>
<location filename="../src/GUI/optionsdialog.cpp" line="655"/> <location filename="../src/GUI/optionsdialog.cpp" line="655"/>
<source>Opacity:</source> <source>Opacity:</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/GUI/optionsdialog.cpp" line="657"/> <location filename="../src/GUI/optionsdialog.cpp" line="657"/>
@ -1922,7 +1922,7 @@
<message> <message>
<location filename="../src/GUI/optionsdialog.cpp" line="656"/> <location filename="../src/GUI/optionsdialog.cpp" line="656"/>
<source>Lightening:</source> <source>Lightening:</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/GUI/optionsdialog.cpp" line="713"/> <location filename="../src/GUI/optionsdialog.cpp" line="713"/>

View File

@ -49,7 +49,7 @@ Unicode true
; The name of the installer ; The name of the installer
Name "GPXSee" Name "GPXSee"
; Program version ; Program version
!define VERSION "13.35" !define VERSION "13.36"
; The file to write ; The file to write
OutFile "GPXSee-${VERSION}_x64.exe" OutFile "GPXSee-${VERSION}_x64.exe"

View File

@ -178,14 +178,24 @@ static bool polygonPointCb(const MapData::Poly *polygon, void *context)
if (baseType == TSSLPT || baseType == RCTLPT || baseType == I_TRNBSN if (baseType == TSSLPT || baseType == RCTLPT || baseType == I_TRNBSN
|| baseType == BRIDGE || baseType == I_BRIDGE || baseType == BUAARE || baseType == BRIDGE || baseType == I_BRIDGE || baseType == BUAARE
|| baseType == RESARE || baseType == I_RESARE || baseType == LNDARE || baseType == LNDARE || baseType == LNDRGN
|| baseType == LNDRGN || type == SUBTYPE(ACHARE, 2) || type == SUBTYPE(I_ACHARE, 2)
|| type == SUBTYPE(ACHARE, 2) || type == SUBTYPE(ACHARE, 3) || type == SUBTYPE(ACHARE, 3) || type == SUBTYPE(I_ACHARE, 3)
|| type == SUBTYPE(ACHARE, 9) || type == SUBTYPE(I_ACHARE, 2) || type == SUBTYPE(ACHARE, 9) || type == SUBTYPE(I_ACHARE, 9)
|| type == SUBTYPE(I_ACHARE, 3) || type == SUBTYPE(I_ACHARE, 9) || type == SUBTYPE(I_BERTHS, 6)
|| type == SUBTYPE(I_BERTHS, 6)) || type == SUBTYPE(RESARE, 1) || type == SUBTYPE(I_RESARE, 1)
|| type == SUBTYPE(RESARE, 2) || type == SUBTYPE(I_RESARE, 2)
|| type == SUBTYPE(RESARE, 4) || type == SUBTYPE(I_RESARE, 4)
|| type == SUBTYPE(RESARE, 5) || type == SUBTYPE(I_RESARE, 5)
|| type == SUBTYPE(RESARE, 6) || type == SUBTYPE(I_RESARE, 6)
|| type == SUBTYPE(RESARE, 7) || type == SUBTYPE(I_RESARE, 7)
|| type == SUBTYPE(RESARE, 9) || type == SUBTYPE(I_RESARE, 9)
|| type == SUBTYPE(RESARE, 12) || type == SUBTYPE(I_RESARE, 12)
|| type == SUBTYPE(RESARE, 17) || type == SUBTYPE(I_RESARE, 17)
|| type == SUBTYPE(RESARE, 22) || type == SUBTYPE(I_RESARE, 22)
|| type == SUBTYPE(RESARE, 23) || type == SUBTYPE(I_RESARE, 23))
points->append(MapData::Point(baseType, polygon->bounds().center(), points->append(MapData::Point(baseType, polygon->bounds().center(),
polygon->attributes(), polygon->HUNI())); polygon->attributes(), polygon->HUNI(), true));
return true; return true;
} }
@ -285,14 +295,32 @@ static QString weed(uint type)
} }
} }
static uint restrictionCategory(uint type, const MapData::Attributes &attr)
{
uint catrea = attr.value(CATREA).toUInt();
if (!catrea) {
uint restrn = attr.value(
(type == RESARE) ? RESTRN : I_RESTRN).toUInt();
if (restrn == 1)
return 2;
else if (restrn == 7)
return 17;
else
return 0;
} else
return catrea;
}
MapData::Point::Point(uint type, const Coordinates &c, const QString &label) MapData::Point::Point(uint type, const Coordinates &c, const QString &label)
: _type(SUBTYPE(type, 0)), _pos(c), _label(label) : _type(SUBTYPE(type, 0)), _pos(c), _label(label), _polygon(false)
{ {
_id = ((quint64)order(_type))<<32 | (uint)qHash(c); _id = ((quint64)order(_type))<<32 | (uint)qHash(c);
} }
MapData::Point::Point(uint type, const Coordinates &c, const Attributes &attr, MapData::Point::Point(uint type, const Coordinates &c, const Attributes &attr,
uint HUNI) : _pos(c), _attr(attr) uint HUNI, bool polygon) : _pos(c), _attr(attr), _polygon(polygon)
{ {
uint subtype = 0; uint subtype = 0;
@ -328,10 +356,18 @@ MapData::Point::Point(uint type, const Coordinates &c, const Attributes &attr,
subtype = CATLIT; subtype = CATLIT;
else if (type == I_DISMAR) else if (type == I_DISMAR)
subtype = CATDIS; subtype = CATDIS;
else if (type == I_BERTHS)
subtype = I_CATBRT;
else if (type == ACHARE)
subtype = CATACH;
else if (type == I_ACHARE)
subtype = I_CATACH;
QList<QByteArray> list(_attr.value(subtype).split(',')); QList<QByteArray> list(_attr.value(subtype).split(','));
std::sort(list.begin(), list.end()); std::sort(list.begin(), list.end());
_type = SUBTYPE(type, list.first().toUInt()); _type = (type == RESARE || type == I_RESARE)
? SUBTYPE(type, restrictionCategory(type, _attr))
: SUBTYPE(type, list.first().toUInt());
_id = ((quint64)order(_type))<<32 | (uint)qHash(c); _id = ((quint64)order(_type))<<32 | (uint)qHash(c);
_label = QString::fromLatin1(_attr.value(OBJNAM)); _label = QString::fromLatin1(_attr.value(OBJNAM));
@ -377,9 +413,7 @@ MapData::Poly::Poly(uint type, const Polygon &path, const Attributes &attr,
{ {
uint subtype = 0; uint subtype = 0;
if (type == RESARE || type == I_RESARE) if (type == ACHARE)
subtype = CATREA;
else if (type == ACHARE)
subtype = CATACH; subtype = CATACH;
else if (type == I_ACHARE) else if (type == I_ACHARE)
subtype = I_CATACH; subtype = I_CATACH;
@ -389,17 +423,19 @@ MapData::Poly::Poly(uint type, const Polygon &path, const Attributes &attr,
subtype = CATMFA; subtype = CATMFA;
else if (type == I_BERTHS) else if (type == I_BERTHS)
subtype = I_CATBRT; subtype = I_CATBRT;
else if (type == RESARE || type == I_RESARE) {
uint restr = _attr.value((type == RESARE) ? RESTRN : I_RESTRN).toUInt(); switch (type) {
if (restr == 1) case DEPARE:
subtype = 2; _type = SUBTYPE(type, depthLevel(_attr.value(DRVAL1).toDouble()));
else if (restr == 7) break;
subtype = 17; case RESARE:
case I_RESARE:
_type = SUBTYPE(type, restrictionCategory(type, attr));
break;
default:
_type = SUBTYPE(type, _attr.value(subtype).toUInt());
} }
_type = (type == DEPARE)
? SUBTYPE(DEPARE, depthLevel(_attr.value(DRVAL1).toDouble()))
: SUBTYPE(type, _attr.value(subtype).toUInt());
} }
MapData::Line::Line(uint type, const QVector<Coordinates> &path, MapData::Line::Line(uint type, const QVector<Coordinates> &path,

View File

@ -49,13 +49,15 @@ public:
class Point { class Point {
public: public:
Point(uint type, const Coordinates &c, const Attributes &attr, uint HUNI); Point(uint type, const Coordinates &c, const Attributes &attr,
uint HUNI, bool polygon = false);
Point(uint type, const Coordinates &s, const QString &label); Point(uint type, const Coordinates &s, const QString &label);
const Coordinates &pos() const {return _pos;} const Coordinates &pos() const {return _pos;}
uint type() const {return _type;} uint type() const {return _type;}
const QString &label() const {return _label;} const QString &label() const {return _label;}
const Attributes &attributes() const {return _attr;} const Attributes &attributes() const {return _attr;}
bool polygon() const {return _polygon;}
bool operator<(const Point &other) const bool operator<(const Point &other) const
{return _id < other._id;} {return _id < other._id;}
@ -66,6 +68,7 @@ public:
QString _label; QString _label;
quint64 _id; quint64 _id;
Attributes _attr; Attributes _attr;
bool _polygon;
}; };
MapData(const QString &path); MapData(const QString &path);

View File

@ -277,7 +277,7 @@ void RasterTile::processPoints(QList<MapData::Point> &points,
double range = attr.value(VALNMR).toDouble(); double range = attr.value(VALNMR).toDouble();
if (attr.contains(SECTR1) if (attr.contains(SECTR1)
|| (range >= 6 && !(point.type() & 0xFFFF))) { || (range > 6 && !(point.type() & 0xFFFF))) {
sectorLights.append(SectorLight(point.pos(), color, sectorLights.append(SectorLight(point.pos(), color,
attr.value(LITVIS).toUInt(), range, attr.value(LITVIS).toUInt(), range,
attr.value(SECTR1).toDouble(), attr.value(SECTR2).toDouble())); attr.value(SECTR1).toDouble(), attr.value(SECTR2).toDouble()));
@ -313,7 +313,7 @@ void RasterTile::processPoints(QList<MapData::Point> &points,
TextPointItem *item = new TextPointItem(pos + offset, label, fnt, img, TextPointItem *item = new TextPointItem(pos + offset, label, fnt, img,
color, hColor, 0, 2, rotate); color, hColor, 0, 2, rotate);
if (item->isValid() && (slMap.contains(point.pos()) if (item->isValid() && (slMap.contains(point.pos())
|| !item->collides(textItems))) { || (point.polygon() && img) || !item->collides(textItems))) {
textItems.append(item); textItems.append(item);
if (lightsMap.contains(point.pos())) if (lightsMap.contains(point.pos()))
lights.append(new TextPointItem(pos + _style->lightOffset(), lights.append(new TextPointItem(pos + _style->lightOffset(),

View File

@ -70,17 +70,26 @@ void Style::polygonStyle()
_polygons[TYPE(DRGARE)] = Polygon(QBrush(QColor(0xa0, 0xa0, 0xff), _polygons[TYPE(DRGARE)] = Polygon(QBrush(QColor(0xa0, 0xa0, 0xff),
Qt::Dense4Pattern)); Qt::Dense4Pattern));
_polygons[TYPE(UNSARE)] = Polygon(QBrush(QColor(0x99, 0x99, 0x99))); _polygons[TYPE(UNSARE)] = Polygon(QBrush(QColor(0x99, 0x99, 0x99)));
_polygons[SUBTYPE(RESARE, 1)] = Polygon(QImage(":/marine/safety-zone-line.png"));
_polygons[SUBTYPE(RESARE, 2)] = Polygon(QImage(":/marine/noanchor-line.png"));
_polygons[SUBTYPE(RESARE, 4)] = Polygon(QImage(":/marine/nature-reserve-line.png"));
_polygons[SUBTYPE(RESARE, 5)] = Polygon(QImage(":/marine/sanctuary-line.png"));
_polygons[SUBTYPE(RESARE, 6)] = Polygon(QImage(":/marine/sanctuary-line.png"));
_polygons[SUBTYPE(RESARE, 7)] = Polygon(QImage(":/marine/sanctuary-line.png"));
_polygons[SUBTYPE(RESARE, 9)] = Polygon(QBrush(QColor(0xff, 0x00, 0x00), _polygons[SUBTYPE(RESARE, 9)] = Polygon(QBrush(QColor(0xff, 0x00, 0x00),
Qt::BDiagPattern)); Qt::BDiagPattern));
_polygons[SUBTYPE(RESARE, 2)] = Polygon(QImage(":/marine/noanchor-line.png"));
_polygons[SUBTYPE(I_RESARE, 2)] = Polygon(QImage(":/marine/noanchor-line.png"));
_polygons[SUBTYPE(RESARE, 17)] = Polygon(
QImage(":/marine/entry-prohibited-line.png"));
_polygons[SUBTYPE(I_RESARE, 17)] = Polygon(
QImage(":/marine/entry-prohibited-line.png"));
_polygons[SUBTYPE(RESARE, 12)] = Polygon(QImage(":/marine/safety-zone-line.png")); _polygons[SUBTYPE(RESARE, 12)] = Polygon(QImage(":/marine/safety-zone-line.png"));
_polygons[SUBTYPE(I_RESARE, 12)] = Polygon(QImage(":/marine/safety-zone-line.png")); _polygons[SUBTYPE(RESARE, 17)] = Polygon(QImage(":/marine/entry-prohibited-line.png"));
_polygons[SUBTYPE(RESARE, 1)] = Polygon(QImage(":/marine/safety-zone-line.png")); _polygons[SUBTYPE(RESARE, 22)] = Polygon(QImage(":/marine/sanctuary-line.png"));
_polygons[SUBTYPE(RESARE, 23)] = Polygon(QImage(":/marine/nature-reserve-line.png"));
_polygons[SUBTYPE(I_RESARE, 1)] = _polygons[SUBTYPE(RESARE, 1)];
_polygons[SUBTYPE(I_RESARE, 2)] = _polygons[SUBTYPE(RESARE, 2)];
_polygons[SUBTYPE(I_RESARE, 4)] = _polygons[SUBTYPE(RESARE, 4)];
_polygons[SUBTYPE(I_RESARE, 9)] = _polygons[SUBTYPE(RESARE, 9)];
_polygons[SUBTYPE(I_RESARE, 12)] = _polygons[SUBTYPE(RESARE, 12)];
_polygons[SUBTYPE(I_RESARE, 17)] = _polygons[SUBTYPE(RESARE, 17)];
_polygons[SUBTYPE(I_RESARE, 22)] = _polygons[SUBTYPE(RESARE, 22)];
_polygons[SUBTYPE(I_RESARE, 23)] = _polygons[SUBTYPE(RESARE, 23)];
_polygons[SUBTYPE(ACHARE, 1)] = Polygon(QImage(":/marine/anchor-line.png")); _polygons[SUBTYPE(ACHARE, 1)] = Polygon(QImage(":/marine/anchor-line.png"));
_polygons[SUBTYPE(ACHARE, 2)] = _polygons[SUBTYPE(ACHARE, 1)]; _polygons[SUBTYPE(ACHARE, 2)] = _polygons[SUBTYPE(ACHARE, 1)];
_polygons[SUBTYPE(ACHARE, 3)] = _polygons[SUBTYPE(ACHARE, 1)]; _polygons[SUBTYPE(ACHARE, 3)] = _polygons[SUBTYPE(ACHARE, 1)];
@ -162,9 +171,14 @@ void Style::polygonStyle()
<< SUBTYPE(I_ACHARE, 2) << SUBTYPE(I_ACHARE, 3) << SUBTYPE(I_ACHARE, 4) << SUBTYPE(I_ACHARE, 2) << SUBTYPE(I_ACHARE, 3) << SUBTYPE(I_ACHARE, 4)
<< SUBTYPE(I_ACHARE, 5) << SUBTYPE(I_ACHARE, 6) << SUBTYPE(I_ACHARE, 7) << SUBTYPE(I_ACHARE, 5) << SUBTYPE(I_ACHARE, 6) << SUBTYPE(I_ACHARE, 7)
<< SUBTYPE(I_ACHARE, 8) << SUBTYPE(I_ACHARE, 9) << SUBTYPE(I_ACHARE, 10) << SUBTYPE(I_ACHARE, 8) << SUBTYPE(I_ACHARE, 9) << SUBTYPE(I_ACHARE, 10)
<< SUBTYPE(I_ACHARE, 11) << SUBTYPE(I_ACHARE, 12) << SUBTYPE(RESARE, 9) << SUBTYPE(I_ACHARE, 11) << SUBTYPE(I_ACHARE, 12) << SUBTYPE(RESARE, 1)
<< SUBTYPE(RESARE, 2) << SUBTYPE(I_RESARE, 2) << SUBTYPE(RESARE, 17) << SUBTYPE(I_RESARE, 1) << SUBTYPE(RESARE, 2) << SUBTYPE(I_RESARE, 2)
<< SUBTYPE(I_RESARE, 17) << SUBTYPE(RESARE, 12) << SUBTYPE(I_RESARE, 12) << SUBTYPE(RESARE, 4) << SUBTYPE(I_RESARE, 4) << SUBTYPE(RESARE, 5)
<< SUBTYPE(I_RESARE, 5) << SUBTYPE(RESARE, 6) << SUBTYPE(I_RESARE, 6)
<< SUBTYPE(RESARE, 7) << SUBTYPE(I_RESARE, 7) << SUBTYPE(RESARE, 9)
<< SUBTYPE(I_RESARE, 9) << SUBTYPE(RESARE, 12) << SUBTYPE(I_RESARE, 12)
<< SUBTYPE(RESARE, 17) << SUBTYPE(I_RESARE, 17) << SUBTYPE(RESARE, 22)
<< SUBTYPE(I_RESARE, 22) << SUBTYPE(RESARE, 23) << SUBTYPE(I_RESARE, 23)
<< SUBTYPE(RESARE, 1) << TYPE(CBLARE) << TYPE(PIPARE) << TYPE(PRCARE) << SUBTYPE(RESARE, 1) << TYPE(CBLARE) << TYPE(PIPARE) << TYPE(PRCARE)
<< TYPE(I_TRNBSN) << SUBTYPE(MARKUL, 3) << TYPE(CONZNE); << TYPE(I_TRNBSN) << SUBTYPE(MARKUL, 3) << TYPE(CONZNE);
} }
@ -382,6 +396,8 @@ void Style::pointStyle(qreal ratio)
_points[SUBTYPE(I_BERTHS, 6)] = Point(QImage(":/marine/fleeting-area.png"), _points[SUBTYPE(I_BERTHS, 6)] = Point(QImage(":/marine/fleeting-area.png"),
Small); Small);
_points[SUBTYPE(I_BERTHS, 6)].setTextColor(QColor(0xeb, 0x49, 0xeb));
_points[SUBTYPE(I_BERTHS, 6)].setHaloColor(QColor());
_points[SUBTYPE(ACHARE, 2)] = Point(QImage(":/marine/dw-anchorage.png"), _points[SUBTYPE(ACHARE, 2)] = Point(QImage(":/marine/dw-anchorage.png"),
Small); Small);
_points[SUBTYPE(ACHARE, 3)] = Point(QImage(":/marine/tanker-anchorage.png"), _points[SUBTYPE(ACHARE, 3)] = Point(QImage(":/marine/tanker-anchorage.png"),
@ -391,6 +407,30 @@ void Style::pointStyle(qreal ratio)
_points[SUBTYPE(I_ACHARE, 2)] = _points[SUBTYPE(ACHARE, 2)]; _points[SUBTYPE(I_ACHARE, 2)] = _points[SUBTYPE(ACHARE, 2)];
_points[SUBTYPE(I_ACHARE, 3)] = _points[SUBTYPE(ACHARE, 3)]; _points[SUBTYPE(I_ACHARE, 3)] = _points[SUBTYPE(ACHARE, 3)];
_points[SUBTYPE(I_ACHARE, 9)] = _points[SUBTYPE(ACHARE, 9)]; _points[SUBTYPE(I_ACHARE, 9)] = _points[SUBTYPE(ACHARE, 9)];
_points[SUBTYPE(RESARE, 1)].setTextColor(QColor(0xeb, 0x49, 0xeb));
_points[SUBTYPE(RESARE, 1)].setHaloColor(QColor());
_points[SUBTYPE(RESARE, 2)] = _points[SUBTYPE(RESARE, 1)];
_points[SUBTYPE(RESARE, 4)].setTextColor(QColor(0x30, 0xa0, 0x1b));
_points[SUBTYPE(RESARE, 4)].setHaloColor(QColor());
_points[SUBTYPE(RESARE, 5)] = _points[SUBTYPE(RESARE, 4)];
_points[SUBTYPE(RESARE, 6)] = _points[SUBTYPE(RESARE, 4)];
_points[SUBTYPE(RESARE, 7)] = _points[SUBTYPE(RESARE, 4)];
_points[SUBTYPE(RESARE, 9)] = _points[SUBTYPE(RESARE, 1)];
_points[SUBTYPE(RESARE, 12)] = _points[SUBTYPE(RESARE, 1)];
_points[SUBTYPE(RESARE, 17)] = _points[SUBTYPE(RESARE, 1)];
_points[SUBTYPE(RESARE, 22)] = _points[SUBTYPE(RESARE, 4)];
_points[SUBTYPE(RESARE, 23)] = _points[SUBTYPE(RESARE, 4)];
_points[SUBTYPE(I_RESARE, 1)] = _points[SUBTYPE(RESARE, 1)];
_points[SUBTYPE(I_RESARE, 2)] = _points[SUBTYPE(RESARE, 2)];
_points[SUBTYPE(I_RESARE, 4)] = _points[SUBTYPE(RESARE, 4)];
_points[SUBTYPE(I_RESARE, 5)] = _points[SUBTYPE(RESARE, 5)];
_points[SUBTYPE(I_RESARE, 6)] = _points[SUBTYPE(RESARE, 6)];
_points[SUBTYPE(I_RESARE, 7)] = _points[SUBTYPE(RESARE, 7)];
_points[SUBTYPE(I_RESARE, 9)] = _points[SUBTYPE(RESARE, 9)];
_points[SUBTYPE(I_RESARE, 12)] = _points[SUBTYPE(RESARE, 12)];
_points[SUBTYPE(I_RESARE, 17)] = _points[SUBTYPE(RESARE, 17)];
_points[SUBTYPE(I_RESARE, 22)] = _points[SUBTYPE(RESARE, 22)];
_points[SUBTYPE(I_RESARE, 23)] = _points[SUBTYPE(RESARE, 23)];
_points[SUBTYPE(SMCFAC, 7)] = Point(svg2img(":/POI/restaurant-11.svg", _points[SUBTYPE(SMCFAC, 7)] = Point(svg2img(":/POI/restaurant-11.svg",
ratio), Small); ratio), Small);

View File

@ -23,7 +23,8 @@ public:
}; };
Lights() : color(None), range(0) {} Lights() : color(None), range(0) {}
bool isSectorLight() const {return ((color && range) || !sectors.isEmpty());} bool isSectorLight() const
{return ((color && range > 6) || !sectors.isEmpty());}
Color color; Color color;
quint32 range; quint32 range;

View File

@ -256,7 +256,7 @@ void RasterTile::drawSectorLights(QPainter *painter,
QRect rect(lightRect(pos, start.range ? start.range : 6)); QRect rect(lightRect(pos, start.range ? start.range : 6));
painter->setPen(QPen(Qt::black, 6, Qt::SolidLine, painter->setPen(QPen(Qt::black, 6, Qt::SolidLine,
Qt::FlatCap)); Qt::FlatCap));
painter->drawArc(rect, a1 * 16, as * 16); painter->drawArc(rect, a1 * 16, as * 16);
painter->setPen(QPen(Style::color(start.color), 4, painter->setPen(QPen(Style::color(start.color), 4,
@ -274,15 +274,13 @@ void RasterTile::drawSectorLights(QPainter *painter,
} }
} }
} else { } else {
if (p->lights.color && p->lights.range) { QRect rect(lightRect(pos, p->lights.range));
QRect rect(lightRect(pos, p->lights.range));
painter->setPen(QPen(Qt::black, 6, Qt::SolidLine, Qt::FlatCap)); painter->setPen(QPen(Qt::black, 6, Qt::SolidLine, Qt::FlatCap));
painter->drawArc(rect, 0, 360 * 16); painter->drawArc(rect, 0, 360 * 16);
painter->setPen(QPen(Style::color(p->lights.color), 4, painter->setPen(QPen(Style::color(p->lights.color), 4,
Qt::SolidLine, Qt::FlatCap)); Qt::SolidLine, Qt::FlatCap));
painter->drawArc(rect, 0, 360 * 16); painter->drawArc(rect, 0, 360 * 16);
}
} }
} }
} }