1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-07 18:53:02 +02:00

Compare commits

...

4 Commits

Author SHA1 Message Date
226162eca1 Remove the restriction on the reload action on DEM/map dir load
"Reload" will now behave like "close" when only the mapdir/DEMs are loaded,
but when the DEMs and some other data is opened, reload will help the user to
get rid of the DEMs and leave the other data.
2025-05-06 20:39:18 +02:00
8323694f64 Colored spar buoys 2025-05-06 20:27:44 +02:00
42f785d14b Use the propper image for rescue station (0x1070a) points 2025-05-06 20:16:05 +02:00
87e259a7a1 Unify the area styles with ENC maps 2025-05-06 20:13:49 +02:00
28 changed files with 36 additions and 18 deletions

View File

@ -204,6 +204,32 @@
<file alias="beacon-black-green.png">icons/map/marine/beacon-black-green.png</file> <file alias="beacon-black-green.png">icons/map/marine/beacon-black-green.png</file>
<file alias="beacon-black-yellow.png">icons/map/marine/beacon-black-yellow.png</file> <file alias="beacon-black-yellow.png">icons/map/marine/beacon-black-yellow.png</file>
<file alias="beacon-black-yellow-black.png">icons/map/marine/beacon-black-yellow-black.png</file> <file alias="beacon-black-yellow-black.png">icons/map/marine/beacon-black-yellow-black.png</file>
<file alias="spar-buoy.png">icons/map/marine/spar-buoy.png</file>
<file alias="spar-buoy-red.png">icons/map/marine/spar-buoy-red.png</file>
<file alias="spar-buoy-green.png">icons/map/marine/spar-buoy-green.png</file>
<file alias="spar-buoy-yellow.png">icons/map/marine/spar-buoy-yellow.png</file>
<file alias="spar-buoy-white.png">icons/map/marine/spar-buoy-white.png</file>
<file alias="spar-buoy-black-yellow.png">icons/map/marine/spar-buoy-black-yellow.png</file>
<file alias="spar-buoy-white-red.png">icons/map/marine/spar-buoy-white-red.png</file>
<file alias="spar-buoy-black-red.png">icons/map/marine/spar-buoy-black-red.png</file>
<file alias="spar-buoy-white-green.png">icons/map/marine/spar-buoy-white-green.png</file>
<file alias="spar-buoy-red-yellow.png">icons/map/marine/spar-buoy-red-yellow.png</file>
<file alias="spar-buoy-red-green.png">icons/map/marine/spar-buoy-red-green.png</file>
<file alias="spar-buoy-black-yellow-black.png">icons/map/marine/spar-buoy-black-yellow-black.png</file>
<file alias="spar-buoy-yellow-black.png">icons/map/marine/spar-buoy-yellow-black.png</file>
<file alias="spar-buoy-yellow-black-yellow.png">icons/map/marine/spar-buoy-yellow-black-yellow.png</file>
<file alias="spar-buoy-red-white.png">icons/map/marine/spar-buoy-red-white.png</file>
<file alias="spar-buoy-green-red-green.png">icons/map/marine/spar-buoy-green-red-green.png</file>
<file alias="spar-buoy-red-green-red.png">icons/map/marine/spar-buoy-red-green-red.png</file>
<file alias="spar-buoy-black-red-black.png">icons/map/marine/spar-buoy-black-red-black.png</file>
<file alias="spar-buoy-yellow-red-yellow.png">icons/map/marine/spar-buoy-yellow-red-yellow.png</file>
<file alias="spar-buoy-green-red.png">icons/map/marine/spar-buoy-green-red.png</file>
<file alias="spar-buoy-black-white.png">icons/map/marine/spar-buoy-black-white.png</file>
<file alias="spar-buoy-white-yellow.png">icons/map/marine/spar-buoy-white-yellow.png</file>
<file alias="spar-buoy-yellow-white.png">icons/map/marine/spar-buoy-yellow-white.png</file>
<file alias="spar-buoy-green-white.png">icons/map/marine/spar-buoy-green-white.png</file>
<file alias="mooring-buoy.png">icons/map/marine/mooring-buoy.png</file>
<file alias="platform.png">icons/map/marine/platform.png</file>
<file alias="rock-exposed.png">icons/map/marine/rock-exposed.png</file> <file alias="rock-exposed.png">icons/map/marine/rock-exposed.png</file>
<file alias="rock-dangerous.png">icons/map/marine/rock-dangerous.png</file> <file alias="rock-dangerous.png">icons/map/marine/rock-dangerous.png</file>
<file alias="wreck.png">icons/map/marine/wreck.png</file> <file alias="wreck.png">icons/map/marine/wreck.png</file>
@ -223,11 +249,8 @@
<file alias="yacht-harbor.png">icons/map/marine/yacht-harbor.png</file> <file alias="yacht-harbor.png">icons/map/marine/yacht-harbor.png</file>
<file alias="fishing-harbor.png">icons/map/marine/fishing-harbor.png</file> <file alias="fishing-harbor.png">icons/map/marine/fishing-harbor.png</file>
<file alias="pile.png">icons/map/marine/pile.png</file> <file alias="pile.png">icons/map/marine/pile.png</file>
<file alias="spar-buoy.png">icons/map/marine/spar-buoy.png</file>
<file alias="mooring-buoy.png">icons/map/marine/mooring-buoy.png</file>
<file alias="tower.png">icons/map/marine/tower.png</file> <file alias="tower.png">icons/map/marine/tower.png</file>
<file alias="chimney.png">icons/map/marine/chimney.png</file> <file alias="chimney.png">icons/map/marine/chimney.png</file>
<file alias="platform.png">icons/map/marine/platform.png</file>
<file alias="ferry-line.png">icons/map/marine/ferry-line.png</file> <file alias="ferry-line.png">icons/map/marine/ferry-line.png</file>
<file alias="dw-route-line.png">icons/map/marine/dw-route-line.png</file> <file alias="dw-route-line.png">icons/map/marine/dw-route-line.png</file>
<file alias="fence-line.png">icons/map/marine/fence-line.png</file> <file alias="fence-line.png">icons/map/marine/fence-line.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 243 B

After

Width:  |  Height:  |  Size: 319 B

View File

@ -1075,7 +1075,6 @@ bool GUI::openFile(const QString &fileName, bool tryUnknown, int &showError)
if (url.scheme() == "geo") { if (url.scheme() == "geo") {
if (loadURL(url, showError)) { if (loadURL(url, showError)) {
_fileActionGroup->setEnabled(true); _fileActionGroup->setEnabled(true);
_reloadFileAction->setEnabled(false);
return true; return true;
} else if (showError) } else if (showError)
return false; return false;
@ -1098,8 +1097,6 @@ bool GUI::openFile(const QString &fileName, bool tryUnknown, int &showError)
_browser->setCurrent(path); _browser->setCurrent(path);
#endif // Q_OS_ANDROID #endif // Q_OS_ANDROID
_fileActionGroup->setEnabled(true); _fileActionGroup->setEnabled(true);
// Explicitly enable the reload action as it may be disabled by loadMapDir()
_reloadFileAction->setEnabled(true);
_navigationActionGroup->setEnabled(true); _navigationActionGroup->setEnabled(true);
updateNavigationActions(); updateNavigationActions();
@ -2025,7 +2022,6 @@ void GUI::loadMapDir()
_mapDir = fi.absolutePath(); _mapDir = fi.absolutePath();
_fileActionGroup->setEnabled(true); _fileActionGroup->setEnabled(true);
_reloadFileAction->setEnabled(false);
} }
void GUI::clearMapCache() void GUI::clearMapCache()
@ -2087,11 +2083,8 @@ void GUI::showDEMTiles()
QMessageBox::information(this, APP_NAME, tr("No local DEM tiles found.")); QMessageBox::information(this, APP_NAME, tr("No local DEM tiles found."));
} else { } else {
_mapView->loadDEMs(tiles); _mapView->loadDEMs(tiles);
_areaCount += tiles.size(); _areaCount += tiles.size();
_fileActionGroup->setEnabled(true); _fileActionGroup->setEnabled(true);
_reloadFileAction->setEnabled(false);
} }
} }

View File

@ -350,6 +350,8 @@ void Style::defaultPolygonStyle()
_polygons[0x10306] = Polygon(QBrush(QColor(0xc0, 0xe0, 0xff))); _polygons[0x10306] = Polygon(QBrush(QColor(0xc0, 0xe0, 0xff)));
_polygons[0x10307] = Polygon(QBrush(QColor(0xff, 0xff, 0xff))); _polygons[0x10307] = Polygon(QBrush(QColor(0xff, 0xff, 0xff)));
_polygons[0x10308] = Polygon(QBrush(QColor(0xff, 0xff, 0xff))); _polygons[0x10308] = Polygon(QBrush(QColor(0xff, 0xff, 0xff)));
_polygons[0x10407] = Polygon(QBrush(QColor(0xa3, 0xa3, 0xa3),
Qt::Dense3Pattern));
_polygons[0x10409] = Polygon(QBrush(QColor(0xff, 0x40, 0x40), _polygons[0x10409] = Polygon(QBrush(QColor(0xff, 0x40, 0x40),
Qt::FDiagPattern)); Qt::FDiagPattern));
_polygons[0x10503] = Polygon(QBrush(QColor(0xff, 0x40, 0x40), _polygons[0x10503] = Polygon(QBrush(QColor(0xff, 0x40, 0x40),
@ -381,8 +383,8 @@ void Style::defaultPolygonStyle()
<< TYPE(0x0a) << 0x10907 << TYPE(0x0b) << 0x10908 << TYPE(0x0c) << 0x10909 << TYPE(0x0a) << 0x10907 << TYPE(0x0b) << 0x10908 << TYPE(0x0c) << 0x10909
<< TYPE(0x26) << TYPE(0x0d) << 0x1090a << TYPE(0x0e) << 0x1090b << TYPE(0x0f) << TYPE(0x26) << TYPE(0x0d) << 0x1090a << TYPE(0x0e) << 0x1090b << TYPE(0x0f)
<< TYPE(0x10) << TYPE(0x11) << TYPE(0x12) << TYPE(0x19) << 0x1090d << TYPE(0x10) << TYPE(0x11) << TYPE(0x12) << TYPE(0x19) << 0x1090d
<< TYPE(0x13) << 0x10900 << 0x10613 << 0x10409 << 0x10503 << 0x10504 << TYPE(0x13) << 0x10900 << 0x10613 << 0x10407 << 0x10409 << 0x10503
<< 0x1060a; << 0x10504 << 0x1060a;
} }
void Style::defaultLineStyle(qreal ratio) void Style::defaultLineStyle(qreal ratio)
@ -495,13 +497,14 @@ void Style::defaultLineStyle(qreal ratio)
_lines[0x10404] = Line(QImage(":/marine/fishing-farm-line.png")); _lines[0x10404] = Line(QImage(":/marine/fishing-farm-line.png"));
_lines[0x10405] = Line(QImage(":/marine/pipeline-area-line.png")); _lines[0x10405] = Line(QImage(":/marine/pipeline-area-line.png"));
_lines[0x10406] = Line(QImage(":/marine/cable-area-line.png")); _lines[0x10406] = Line(QImage(":/marine/cable-area-line.png"));
_lines[0x10407] = Line(QPen(QColor(0xa3, 0xa3, 0xa3), 1, Qt::DashLine));
_lines[0x10409] = Line(QPen(QColor(0, 0, 0), 1, Qt::DotLine)); _lines[0x10409] = Line(QPen(QColor(0, 0, 0), 1, Qt::DotLine));
_lines[0x10501] = Line(QImage(":/marine/noanchor-line.png")); _lines[0x10501] = Line(QImage(":/marine/noanchor-line.png"));
_lines[0x10503] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); _lines[0x10503] = Line(QImage(":/marine/entry-prohibited-line.png"));
_lines[0x10504] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); _lines[0x10504] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
_lines[0x10505] = Line(QImage(":/marine/safety-zone-line.png")); _lines[0x10505] = Line(QImage(":/marine/safety-zone-line.png"));
_lines[0x10506] = Line(QImage(":/marine/nature-reserve-line.png")); _lines[0x10506] = Line(QImage(":/marine/nature-reserve-line.png"));
_lines[0x10507] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); _lines[0x10507] = Line(QImage(":/marine/safety-zone-line.png"));
_lines[0x10601] = Line(QPen(QColor(0, 0, 0), 1, Qt::SolidLine)); _lines[0x10601] = Line(QPen(QColor(0, 0, 0), 1, Qt::SolidLine));
_lines[0x10603] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 2, Qt::DashDotLine)); _lines[0x10603] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 2, Qt::DashDotLine));
_lines[0x10606] = Line(QImage(":/marine/anchor-line.png")); _lines[0x10606] = Line(QImage(":/marine/anchor-line.png"));
@ -770,7 +773,7 @@ void Style::defaultPointStyle(qreal ratio)
COLORSET(0x10204, "buoy", 6, -6); COLORSET(0x10204, "buoy", 6, -6);
COLORSET(0x10205, "buoy", 6, -6); COLORSET(0x10205, "buoy", 6, -6);
COLORSET(0x10206, "beacon", 0, -8); COLORSET(0x10206, "beacon", 0, -8);
_points[0x10207] = Point(QImage(":/marine/spar-buoy.png"), QPoint(2, -9)); COLORSET(0x10207, "spar-buoy", 2, -8);
COLORSET(0x10208, "buoy", 6, -6); COLORSET(0x10208, "buoy", 6, -6);
COLORSET(0x10209, "buoy", 6, -6); COLORSET(0x10209, "buoy", 6, -6);
COLORSET(0x1020a, "buoy", 6, -6); COLORSET(0x1020a, "buoy", 6, -6);
@ -809,7 +812,7 @@ void Style::defaultPointStyle(qreal ratio)
_points[0x10703] = Point(QImage(":/marine/yacht-harbor.png")); _points[0x10703] = Point(QImage(":/marine/yacht-harbor.png"));
_points[0x10704] = Point(QImage(":/marine/pile.png")); _points[0x10704] = Point(QImage(":/marine/pile.png"));
_points[0x10705] = Point(QImage(":/marine/anchoring-prohibited.png")); _points[0x10705] = Point(QImage(":/marine/anchoring-prohibited.png"));
_points[0x1070a] = Point(QImage(":/marine/coast-guard.png")); _points[0x1070a] = Point(QImage(":/marine/rescue-station.png"));
_points[0x1070b] = Point(QImage(":/marine/fishing-harbor.png")); _points[0x1070b] = Point(QImage(":/marine/fishing-harbor.png"));
} }

View File

@ -157,8 +157,7 @@ public:
static bool isMarina(quint32 type) static bool isMarina(quint32 type)
{return type == 0x10703;} {return type == 0x10703;}
static bool hasColorset(quint32 type) static bool hasColorset(quint32 type)
{return (isBuoy(type) {return (isBuoy(type) && !(type == 0x1020d || type == 0x10216));}
&& !(type == 0x10207 || type == 0x1020d || type == 0x10216));}
static QColor color(Light::Color c); static QColor color(Light::Color c);