From e0e9fa660a011162d8c57b6ebb83718cf6bf7124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 18 Dec 2024 17:45:25 +0100 Subject: [PATCH] BERTHS polygons + NAVLNE restyling --- src/map/ENC/mapdata.cpp | 3 ++- src/map/ENC/style.cpp | 22 ++++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index 2e41d2a8..25f7673e 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -304,7 +304,8 @@ MapData::Poly::Poly(uint type, const Polygon &path, const QString &label, _label = QString::fromUtf8("\xE2\x86\x95") + UNIT_SPACE + QString::number(clr) + UNIT_SPACE + hUnits(HUNI); } - } else if (type>>16 == LNDARE || type>>16 == SEAARE) + } else if (type>>16 == LNDARE || type>>16 == SEAARE || type>>16 == BERTHS + || type>>16 == I_BERTHS) _label = label; } diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index 82f36f34..0fc49436 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -113,8 +113,9 @@ void Style::polygonStyle() _polygons[TYPE(CBLARE)] = Polygon(QImage(":/marine/cable-area-line.png")); _polygons[TYPE(PIPARE)] = Polygon(QImage(":/marine/pipeline-area-line.png")); _polygons[SUBTYPE(MARKUL, 3)] = Polygon(QImage(":/marine/fishing-farm-line.png")); - _polygons[SUBTYPE(I_BERTHS, 6)] = Polygon(Qt::NoBrush, - QPen(QColor(0xeb, 0x49, 0xeb), 1, Qt::DashLine)); + _polygons[TYPE(BERTHS)] = Polygon(Qt::NoBrush, QPen(QColor(0xeb, 0x49, 0xeb), + 1, Qt::DashLine)); + _polygons[TYPE(I_BERTHS)] = _polygons[TYPE(BERTHS)]; _polygons[TYPE(CONZNE)] = Polygon(Qt::NoBrush, QPen(QColor(0xeb, 0x49, 0xeb), 1, Qt::DashDotLine)); @@ -129,13 +130,14 @@ void Style::polygonStyle() << TYPE(I_TERMNL) << TYPE(SLCONS) << TYPE(I_SLCONS) << TYPE(PONTON) << TYPE(I_PONTON) << TYPE(HULKES) << TYPE(I_HULKES) << TYPE(FLODOC) << TYPE(I_FLODOC) << TYPE(DRYDOC) << TYPE(DAMCON) << TYPE(PYLONS) - << TYPE(MORFAC) << TYPE(GATCON) << TYPE(I_GATCON) << SUBTYPE(I_BERTHS, 6) - << TYPE(DMPGRD) << TYPE(TSEZNE) << TYPE(OBSTRN) << TYPE(UWTROC) - << TYPE(DWRTPT) << SUBTYPE(ACHARE, 1) << SUBTYPE(I_ACHARE, 1) - << SUBTYPE(RESARE, 9) << SUBTYPE(RESARE, 2) << SUBTYPE(I_RESARE, 2) - << SUBTYPE(RESARE, 17) << SUBTYPE(I_RESARE, 17) << SUBTYPE(RESARE, 12) - << SUBTYPE(I_RESARE, 12) << SUBTYPE(RESARE, 1) << TYPE(CBLARE) - << TYPE(PIPARE) << TYPE(PRCARE) << SUBTYPE(MARKUL, 3) << TYPE(CONZNE); + << TYPE(MORFAC) << TYPE(GATCON) << TYPE(I_GATCON) << TYPE(BERTHS) + << TYPE(I_BERTHS) << TYPE(DMPGRD) << TYPE(TSEZNE) << TYPE(OBSTRN) + << TYPE(UWTROC) << TYPE(DWRTPT) << SUBTYPE(ACHARE, 1) + << SUBTYPE(I_ACHARE, 1) << SUBTYPE(RESARE, 9) << SUBTYPE(RESARE, 2) + << SUBTYPE(I_RESARE, 2) << SUBTYPE(RESARE, 17) << SUBTYPE(I_RESARE, 17) + << SUBTYPE(RESARE, 12) << SUBTYPE(I_RESARE, 12) << SUBTYPE(RESARE, 1) + << TYPE(CBLARE) << TYPE(PIPARE) << TYPE(PRCARE) << SUBTYPE(MARKUL, 3) + << TYPE(CONZNE); } void Style::lineStyle(qreal ratio) @@ -152,7 +154,7 @@ void Style::lineStyle(qreal ratio) _lines[TYPE(CBLSUB)].setTextFontSize(Small); _lines[TYPE(PIPSOL)] = Line(QImage(":/marine/pipeline.png")); _lines[TYPE(PIPSOL)].setTextFontSize(Small); - _lines[TYPE(NAVLNE)] = Line(QPen(QColor(0xeb, 0x49, 0xeb), 1, Qt::DashLine)); + _lines[TYPE(NAVLNE)] = Line(QPen(QColor(0, 0, 0), 1, Qt::DashLine)); _lines[TYPE(COALNE)] = Line(QPen(QColor(0, 0, 0), 1, Qt::SolidLine)); _lines[TYPE(SLCONS)] = Line(QPen(QColor(0, 0, 0), 2, Qt::SolidLine)); _lines[TYPE(I_SLCONS)] = Line(QPen(QColor(0, 0, 0), 2, Qt::SolidLine));