diff --git a/gpxsee.qrc b/gpxsee.qrc index d08f044b..c5a53a67 100644 --- a/gpxsee.qrc +++ b/gpxsee.qrc @@ -177,6 +177,7 @@ icons/map/marine/fence-line.png icons/map/marine/crane.png icons/map/marine/distance-mark.png + icons/map/marine/distance-mark-land.png icons/map/marine/conveyor-line.png icons/map/marine/pipeline-overhead.png icons/map/marine/coast-guard.png @@ -189,6 +190,7 @@ icons/map/marine/entry-prohibited-line.png icons/map/marine/cable-area-line.png icons/map/marine/pipeline-area-line.png + icons/map/marine/windmotor.png diff --git a/icons/map/marine/beacon.png b/icons/map/marine/beacon.png index c0e2e145..cb5ceef4 100644 Binary files a/icons/map/marine/beacon.png and b/icons/map/marine/beacon.png differ diff --git a/icons/map/marine/distance-mark-land.png b/icons/map/marine/distance-mark-land.png new file mode 100644 index 00000000..c35661ec Binary files /dev/null and b/icons/map/marine/distance-mark-land.png differ diff --git a/icons/map/marine/windmotor.png b/icons/map/marine/windmotor.png new file mode 100644 index 00000000..80894fa8 Binary files /dev/null and b/icons/map/marine/windmotor.png differ diff --git a/src/map/ENC/rastertile.cpp b/src/map/ENC/rastertile.cpp index 240cfe9d..c5e9d1cb 100644 --- a/src/map/ENC/rastertile.cpp +++ b/src/map/ENC/rastertile.cpp @@ -208,6 +208,26 @@ void RasterTile::processPoints(QList &textItems) std::sort(_points.begin(), _points.end(), pointLess); + for (int i = 0; i < _polygons.size(); i++) { + const MapData::Poly *poly = _polygons.at(i); + uint type = poly->type()>>16; + + if (!(type == HRBFAC || type == I_TRNBSN)) + continue; + const Style::Point &style = s.point(poly->type()); + const QImage *img = style.img().isNull() ? 0 : &style.img(); + if (!img) + continue; + + TextPointItem *item = new TextPointItem( + ll2xy(centroid(poly->path().first())).toPoint(), + 0, 0, img, 0, 0, 0, 0); + if (item->isValid() && !item->collides(textItems)) + textItems.append(item); + else + delete item; + } + for (int i = 0; i < _points.size(); i++) { const MapData::Point *point = _points.at(i); const Style::Point &style = s.point(point->type()); @@ -229,25 +249,6 @@ void RasterTile::processPoints(QList &textItems) else delete item; } - - for (int i = 0; i < _polygons.size(); i++) { - const MapData::Poly *poly = _polygons.at(i); - - if (poly->type()>>16 == HRBFAC) { - const Style::Point &style = s.point(poly->type()); - const QImage *img = style.img().isNull() ? 0 : &style.img(); - if (!img) - continue; - - TextPointItem *item = new TextPointItem( - ll2xy(centroid(poly->path().first())).toPoint(), 0, 0, - &style.img(), 0, 0, 0, 0); - if (item->isValid() && !item->collides(textItems)) - textItems.append(item); - else - delete item; - } - } } void RasterTile::processLines(QList &textItems) diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index a24fa10e..a8dbe949 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -94,7 +94,7 @@ void Style::defaultPolygonStyle() Qt::Dense7Pattern)); _polygons[TYPE(I_LOKBSN)] = Polygon(QBrush(QColor("#333333"), Qt::Dense7Pattern)); - _polygons[TYPE(TUNNEL)] = Polygon(Qt::NoBrush, QPen(QColor("#a3a3a3"), 1, + _polygons[TYPE(TUNNEL)] = Polygon(Qt::NoBrush, QPen(QColor("#a58140"), 1.5, Qt::DashLine)); _polygons[TYPE(CBLARE)] = Polygon(QImage(":/marine/cable-area-line.png")); _polygons[TYPE(PIPARE)] = Polygon(QImage(":/marine/pipeline-area-line.png")); @@ -190,6 +190,7 @@ void Style::defaultPointStyle() _points[SUBTYPE(LNDMRK, 9)] = Point(QImage(":/marine/monument.png")); _points[SUBTYPE(LNDMRK, 20)] = Point(QImage(":/marine/church.png")); _points[SUBTYPE(LNDMRK, 17)] = Point(QImage(":/marine/tower.png")); + _points[SUBTYPE(LNDMRK, 19)] = Point(QImage(":/marine/windmotor.png")); _points[TYPE(LNDELV)] = Point(QImage(":/marine/triangulation-point.png")); _points[TYPE(OBSTRN)] = Point(QImage(":/marine/obstruction.png"), Small); _points[SUBTYPE(WRECKS, 1)] = Point(QImage(":/marine/wreck.png"), Small); @@ -224,6 +225,10 @@ void Style::defaultPointStyle() _points[SUBTYPE(I_DISMAR, 1)] = Point(QImage(":/marine/distance-mark.png")); _points[SUBTYPE(I_DISMAR, 1)].setTextColor(QColor("#ffffff")); _points[SUBTYPE(I_DISMAR, 1)].setTextFontSize(Small); + _points[SUBTYPE(I_DISMAR, 2)] = Point(QImage(":/marine/distance-mark-land.png")); + _points[SUBTYPE(I_DISMAR, 2)].setTextFontSize(Small); + _points[SUBTYPE(I_DISMAR, 3)] = Point(QImage(":/marine/distance-mark-land.png")); + _points[SUBTYPE(I_DISMAR, 3)].setTextFontSize(Small); _points[TYPE(CGUSTA)] = Point(QImage(":/marine/coast-guard.png")); _points[TYPE(RDOSTA)] = Point(QImage(":/marine/radio.png")); _points[TYPE(RADSTA)] = Point(QImage(":/marine/radar.png"));