mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-07-27 00:44:24 +02:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
c9a46be7a8 | |||
128ce8d78c | |||
04ef7ba092 | |||
f683525fce | |||
f5d4974d57 | |||
e0e2d38ec1 | |||
80b9dcfd5e | |||
836163a8b2 | |||
9cead54213 |
@ -1,4 +1,4 @@
|
|||||||
version: 13.6.{build}
|
version: 13.7.{build}
|
||||||
|
|
||||||
configuration:
|
configuration:
|
||||||
- Release
|
- Release
|
||||||
|
2
.github/workflows/android.yml
vendored
2
.github/workflows/android.yml
vendored
@ -22,7 +22,7 @@ jobs:
|
|||||||
- name: Run sdkmanager update
|
- name: Run sdkmanager update
|
||||||
run: ${ANDROID_HOME}/tools/bin/sdkmanager --update
|
run: ${ANDROID_HOME}/tools/bin/sdkmanager --update
|
||||||
- name: Install android platform, platform-tools, build-tools and ndk
|
- name: Install android platform, platform-tools, build-tools and ndk
|
||||||
run: ${ANDROID_HOME}/tools/bin/sdkmanager --install "cmdline-tools;latest" "platform-tools" "platforms;android-31" "build-tools;31.0.0" "ndk;23.1.7779620"
|
run: ${ANDROID_HOME}/tools/bin/sdkmanager --install "cmdline-tools;latest" "platform-tools" "platforms;android-33" "build-tools;33.0.0" "ndk;23.1.7779620"
|
||||||
- name: Setup NDK path
|
- name: Setup NDK path
|
||||||
run: echo "ANDROID_NDK_ROOT=${ANDROID_HOME}/ndk/23.1.7779620/" >> $GITHUB_ENV
|
run: echo "ANDROID_NDK_ROOT=${ANDROID_HOME}/ndk/23.1.7779620/" >> $GITHUB_ENV
|
||||||
- name: Install Qt (Desktop)
|
- name: Install Qt (Desktop)
|
||||||
|
@ -3,7 +3,7 @@ unix:!macx:!android {
|
|||||||
} else {
|
} else {
|
||||||
TARGET = GPXSee
|
TARGET = GPXSee
|
||||||
}
|
}
|
||||||
VERSION = 13.6
|
VERSION = 13.7
|
||||||
|
|
||||||
|
|
||||||
QT += core \
|
QT += core \
|
||||||
@ -585,7 +585,7 @@ android {
|
|||||||
message("OpenSSL not found, building without HTTPS support!")
|
message("OpenSSL not found, building without HTTPS support!")
|
||||||
}
|
}
|
||||||
|
|
||||||
ANDROID_TARGET_SDK_VERSION = 31
|
ANDROID_TARGET_SDK_VERSION = 33
|
||||||
ANDROID_VERSION_NAME = $$VERSION
|
ANDROID_VERSION_NAME = $$VERSION
|
||||||
ANDROID_VERSION_CODE = $$versionCode($$ANDROID_VERSION_NAME)
|
ANDROID_VERSION_CODE = $$versionCode($$ANDROID_VERSION_NAME)
|
||||||
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/pkg/android
|
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/pkg/android
|
||||||
|
@ -209,6 +209,8 @@
|
|||||||
<file alias="radio-call.png">icons/map/marine/radio-call.png</file>
|
<file alias="radio-call.png">icons/map/marine/radio-call.png</file>
|
||||||
<file alias="current.png">icons/map/marine/current.png</file>
|
<file alias="current.png">icons/map/marine/current.png</file>
|
||||||
<file alias="rescue-station.png">icons/map/marine/rescue-station.png</file>
|
<file alias="rescue-station.png">icons/map/marine/rescue-station.png</file>
|
||||||
|
<file alias="windmill.png">icons/map/marine/windmill.png</file>
|
||||||
|
<file alias="flagstaff.png">icons/map/marine/flagstaff.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
|
|
||||||
<!-- Mapsforge rendertheme -->
|
<!-- Mapsforge rendertheme -->
|
||||||
|
BIN
icons/map/marine/flagstaff.png
Normal file
BIN
icons/map/marine/flagstaff.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 420 B |
BIN
icons/map/marine/windmill.png
Normal file
BIN
icons/map/marine/windmill.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 224 B |
@ -5,7 +5,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.0.2'
|
classpath 'com.android.tools.build:gradle:7.2.1'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,12 +34,14 @@ android {
|
|||||||
* Changing them manually might break the compilation!
|
* Changing them manually might break the compilation!
|
||||||
*******************************************************/
|
*******************************************************/
|
||||||
|
|
||||||
//compileSdkVersion androidCompileSdkVersion.toInteger()
|
//compileSdkVersion androidCompileSdkVersion
|
||||||
compileSdkVersion 31
|
compileSdkVersion "android-33"
|
||||||
//buildToolsVersion androidBuildToolsVersion
|
buildToolsVersion androidBuildToolsVersion
|
||||||
buildToolsVersion '31.0.0'
|
|
||||||
ndkVersion androidNdkVersion
|
ndkVersion androidNdkVersion
|
||||||
|
|
||||||
|
// Extract native libraries from the APK
|
||||||
|
packagingOptions.jniLibs.useLegacyPackaging true
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
manifest.srcFile 'AndroidManifest.xml'
|
manifest.srcFile 'AndroidManifest.xml'
|
||||||
|
@ -37,7 +37,7 @@ Unicode true
|
|||||||
; The name of the installer
|
; The name of the installer
|
||||||
Name "GPXSee"
|
Name "GPXSee"
|
||||||
; Program version
|
; Program version
|
||||||
!define VERSION "13.6"
|
!define VERSION "13.7"
|
||||||
|
|
||||||
; The file to write
|
; The file to write
|
||||||
OutFile "GPXSee-${VERSION}_x64.exe"
|
OutFile "GPXSee-${VERSION}_x64.exe"
|
||||||
@ -142,6 +142,7 @@ Section "GPXSee" SEC_APP
|
|||||||
WriteRegStr HKLM "${REGENTRY}" "Publisher" "Martin Tůma"
|
WriteRegStr HKLM "${REGENTRY}" "Publisher" "Martin Tůma"
|
||||||
WriteRegStr HKLM "${REGENTRY}" "DisplayVersion" "${VERSION}"
|
WriteRegStr HKLM "${REGENTRY}" "DisplayVersion" "${VERSION}"
|
||||||
WriteRegStr HKLM "${REGENTRY}" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
WriteRegStr HKLM "${REGENTRY}" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||||
|
WriteRegStr HKLM "${REGENTRY}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
|
||||||
WriteRegStr HKLM "${REGENTRY}" "DisplayIcon" '"$INSTDIR\gpxsee.exe"'
|
WriteRegStr HKLM "${REGENTRY}" "DisplayIcon" '"$INSTDIR\gpxsee.exe"'
|
||||||
WriteRegStr HKLM "${REGENTRY}" "InstallLocation" '"$INSTDIR"'
|
WriteRegStr HKLM "${REGENTRY}" "InstallLocation" '"$INSTDIR"'
|
||||||
WriteRegStr HKLM "${REGENTRY}" "URLInfoAbout" "https://www.gpxsee.org"
|
WriteRegStr HKLM "${REGENTRY}" "URLInfoAbout" "https://www.gpxsee.org"
|
||||||
|
@ -118,6 +118,7 @@ MapView::MapView(Map *map, POI *poi, QWidget *parent) : QGraphicsView(parent)
|
|||||||
_showPosition = false;
|
_showPosition = false;
|
||||||
_showPositionCoordinates = false;
|
_showPositionCoordinates = false;
|
||||||
_showMotionInfo = false;
|
_showMotionInfo = false;
|
||||||
|
_infoBackground = false;
|
||||||
|
|
||||||
_opengl = false;
|
_opengl = false;
|
||||||
_plot = false;
|
_plot = false;
|
||||||
@ -156,6 +157,8 @@ PathItem *MapView::addTrack(const Track &track)
|
|||||||
ti->setVisible(_showTracks);
|
ti->setVisible(_showTracks);
|
||||||
ti->setDigitalZoom(_digitalZoom);
|
ti->setDigitalZoom(_digitalZoom);
|
||||||
ti->setMarkerColor(_markerColor);
|
ti->setMarkerColor(_markerColor);
|
||||||
|
ti->setMarkerBackgroundColor(_backgroundColor);
|
||||||
|
ti->drawMarkerBackground(_infoBackground);
|
||||||
ti->showMarker(_showMarkers);
|
ti->showMarker(_showMarkers);
|
||||||
ti->showMarkerInfo(_markerInfoType);
|
ti->showMarkerInfo(_markerInfoType);
|
||||||
ti->showTicks(_showPathTicks);
|
ti->showTicks(_showPathTicks);
|
||||||
@ -186,6 +189,8 @@ PathItem *MapView::addRoute(const Route &route)
|
|||||||
ri->showWaypointIcons(_showWaypointIcons);
|
ri->showWaypointIcons(_showWaypointIcons);
|
||||||
ri->setDigitalZoom(_digitalZoom);
|
ri->setDigitalZoom(_digitalZoom);
|
||||||
ri->setMarkerColor(_markerColor);
|
ri->setMarkerColor(_markerColor);
|
||||||
|
ri->setMarkerBackgroundColor(_backgroundColor);
|
||||||
|
ri->drawMarkerBackground(_infoBackground);
|
||||||
ri->showMarker(_showMarkers);
|
ri->showMarker(_showMarkers);
|
||||||
ri->showMarkerInfo(_markerInfoType);
|
ri->showMarkerInfo(_markerInfoType);
|
||||||
ri->showTicks(_showPathTicks);
|
ri->showTicks(_showPathTicks);
|
||||||
@ -1086,6 +1091,11 @@ void MapView::setBackgroundColor(const QColor &color)
|
|||||||
_positionCoordinates->setBackgroundColor(color);
|
_positionCoordinates->setBackgroundColor(color);
|
||||||
_motionInfo->setBackgroundColor(color);
|
_motionInfo->setBackgroundColor(color);
|
||||||
|
|
||||||
|
for (int i = 0; i < _tracks.size(); i++)
|
||||||
|
_tracks.at(i)->setMarkerBackgroundColor(color);
|
||||||
|
for (int i = 0; i < _routes.size(); i++)
|
||||||
|
_routes.at(i)->setMarkerBackgroundColor(color);
|
||||||
|
|
||||||
reloadMap();
|
reloadMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1378,9 +1388,16 @@ void MapView::setInfoColor(const QColor &color)
|
|||||||
|
|
||||||
void MapView::drawInfoBackground(bool draw)
|
void MapView::drawInfoBackground(bool draw)
|
||||||
{
|
{
|
||||||
|
_infoBackground = draw;
|
||||||
|
|
||||||
_cursorCoordinates->drawBackground(draw);
|
_cursorCoordinates->drawBackground(draw);
|
||||||
_positionCoordinates->drawBackground(draw);
|
_positionCoordinates->drawBackground(draw);
|
||||||
_motionInfo->drawBackground(draw);
|
_motionInfo->drawBackground(draw);
|
||||||
|
|
||||||
|
for (int i = 0; i < _tracks.size(); i++)
|
||||||
|
_tracks.at(i)->drawMarkerBackground(draw);
|
||||||
|
for (int i = 0; i < _routes.size(); i++)
|
||||||
|
_routes.at(i)->drawMarkerBackground(draw);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MapView::setHidpi(bool hidpi)
|
void MapView::setHidpi(bool hidpi)
|
||||||
|
@ -203,6 +203,7 @@ private:
|
|||||||
int _waypointSize, _poiSize;
|
int _waypointSize, _poiSize;
|
||||||
QColor _backgroundColor, _waypointColor, _poiColor, _markerColor;
|
QColor _backgroundColor, _waypointColor, _poiColor, _markerColor;
|
||||||
qreal _areaOpacity;
|
qreal _areaOpacity;
|
||||||
|
bool _infoBackground;
|
||||||
|
|
||||||
int _digitalZoom;
|
int _digitalZoom;
|
||||||
bool _plot;
|
bool _plot;
|
||||||
|
@ -13,6 +13,8 @@ CoordinatesFormat MarkerInfoItem::_format = DecimalDegrees;
|
|||||||
MarkerInfoItem::MarkerInfoItem(QGraphicsItem *parent) : QGraphicsItem(parent)
|
MarkerInfoItem::MarkerInfoItem(QGraphicsItem *parent) : QGraphicsItem(parent)
|
||||||
{
|
{
|
||||||
_color = Qt::red;
|
_color = Qt::red;
|
||||||
|
_bgColor = Qt::white;
|
||||||
|
_drawBackground = false;
|
||||||
|
|
||||||
_font.setPixelSize(FONT_SIZE);
|
_font.setPixelSize(FONT_SIZE);
|
||||||
_font.setFamily(FONT_FAMILY);
|
_font.setFamily(FONT_FAMILY);
|
||||||
@ -62,13 +64,15 @@ void MarkerInfoItem::paint(QPainter *painter, const QStyleOptionGraphicsItem
|
|||||||
QRectF r2(OFFSET, 0, fm.boundingRect(_s2).width(), fm.height()
|
QRectF r2(OFFSET, 0, fm.boundingRect(_s2).width(), fm.height()
|
||||||
- fm.descent());
|
- fm.descent());
|
||||||
|
|
||||||
|
if (_drawBackground) {
|
||||||
painter->setPen(Qt::NoPen);
|
painter->setPen(Qt::NoPen);
|
||||||
QColor bc(painter->background().color());
|
QColor bc(_bgColor);
|
||||||
bc.setAlpha(196);
|
bc.setAlpha(196);
|
||||||
painter->setBrush(QBrush(bc));
|
painter->setBrush(QBrush(bc));
|
||||||
painter->drawRect(r2);
|
painter->drawRect(r2);
|
||||||
painter->drawRect(r1);
|
painter->drawRect(r1);
|
||||||
painter->setBrush(Qt::NoBrush);
|
painter->setBrush(Qt::NoBrush);
|
||||||
|
}
|
||||||
|
|
||||||
painter->setFont(_font);
|
painter->setFont(_font);
|
||||||
painter->setPen(_color);
|
painter->setPen(_color);
|
||||||
@ -84,3 +88,15 @@ void MarkerInfoItem::setColor(const QColor &color)
|
|||||||
_color = color;
|
_color = color;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MarkerInfoItem::setBackgroundColor(const QColor &color)
|
||||||
|
{
|
||||||
|
_bgColor = color;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarkerInfoItem::drawBackground(bool draw)
|
||||||
|
{
|
||||||
|
_drawBackground = draw;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
@ -26,6 +26,8 @@ public:
|
|||||||
void setCoordinates(const Coordinates &c);
|
void setCoordinates(const Coordinates &c);
|
||||||
|
|
||||||
void setColor(const QColor &color);
|
void setColor(const QColor &color);
|
||||||
|
void setBackgroundColor(const QColor &color);
|
||||||
|
void drawBackground(bool draw);
|
||||||
|
|
||||||
static void setCoordinatesFormat(const CoordinatesFormat &format)
|
static void setCoordinatesFormat(const CoordinatesFormat &format)
|
||||||
{_format = format;}
|
{_format = format;}
|
||||||
@ -35,8 +37,9 @@ private:
|
|||||||
|
|
||||||
QString _s1, _s2;
|
QString _s1, _s2;
|
||||||
QRectF _boundingRect;
|
QRectF _boundingRect;
|
||||||
QColor _color;
|
QColor _color, _bgColor;
|
||||||
QFont _font;
|
QFont _font;
|
||||||
|
bool _drawBackground;
|
||||||
|
|
||||||
static CoordinatesFormat _format;
|
static CoordinatesFormat _format;
|
||||||
};
|
};
|
||||||
|
@ -365,6 +365,16 @@ void PathItem::setMarkerColor(const QColor &color)
|
|||||||
_markerInfo->setColor(color);
|
_markerInfo->setColor(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PathItem::setMarkerBackgroundColor(const QColor &color)
|
||||||
|
{
|
||||||
|
_markerInfo->setBackgroundColor(color);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PathItem::drawMarkerBackground(bool draw)
|
||||||
|
{
|
||||||
|
_markerInfo->drawBackground(draw);
|
||||||
|
}
|
||||||
|
|
||||||
void PathItem::hover(bool hover)
|
void PathItem::hover(bool hover)
|
||||||
{
|
{
|
||||||
if (hover) {
|
if (hover) {
|
||||||
|
@ -41,6 +41,8 @@ public:
|
|||||||
void setPenStyle(Qt::PenStyle style);
|
void setPenStyle(Qt::PenStyle style);
|
||||||
void setDigitalZoom(int zoom);
|
void setDigitalZoom(int zoom);
|
||||||
void setMarkerColor(const QColor &color);
|
void setMarkerColor(const QColor &color);
|
||||||
|
void setMarkerBackgroundColor(const QColor &color);
|
||||||
|
void drawMarkerBackground(bool draw);
|
||||||
void showMarker(bool show);
|
void showMarker(bool show);
|
||||||
void showMarkerInfo(MarkerInfoItem::Type type);
|
void showMarkerInfo(MarkerInfoItem::Type type);
|
||||||
void showTicks(bool show);
|
void showTicks(bool show);
|
||||||
|
@ -197,11 +197,13 @@ void Style::pointStyle()
|
|||||||
_points[TYPE(BCNSAW)] = Point(QImage(":/marine/beacon.png"), Small);
|
_points[TYPE(BCNSAW)] = Point(QImage(":/marine/beacon.png"), Small);
|
||||||
_points[TYPE(BCNSPP)] = Point(QImage(":/marine/beacon.png"), Small);
|
_points[TYPE(BCNSPP)] = Point(QImage(":/marine/beacon.png"), Small);
|
||||||
_points[SUBTYPE(LNDMRK, 3)] = Point(QImage(":/marine/chimney.png"));
|
_points[SUBTYPE(LNDMRK, 3)] = Point(QImage(":/marine/chimney.png"));
|
||||||
|
_points[SUBTYPE(LNDMRK, 5)] = Point(QImage(":/marine/flagstaff.png"));
|
||||||
_points[SUBTYPE(LNDMRK, 7)] = Point(QImage(":/marine/pylon.png"));
|
_points[SUBTYPE(LNDMRK, 7)] = Point(QImage(":/marine/pylon.png"));
|
||||||
_points[SUBTYPE(LNDMRK, 9)] = Point(QImage(":/marine/monument.png"));
|
_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, 17)] = Point(QImage(":/marine/tower.png"));
|
||||||
|
_points[SUBTYPE(LNDMRK, 18)] = Point(QImage(":/marine/windmill.png"));
|
||||||
_points[SUBTYPE(LNDMRK, 19)] = Point(QImage(":/marine/windmotor.png"));
|
_points[SUBTYPE(LNDMRK, 19)] = Point(QImage(":/marine/windmotor.png"));
|
||||||
|
_points[SUBTYPE(LNDMRK, 20)] = Point(QImage(":/marine/church.png"));
|
||||||
_points[TYPE(LNDELV)] = Point(QImage(":/marine/triangulation-point.png"));
|
_points[TYPE(LNDELV)] = Point(QImage(":/marine/triangulation-point.png"));
|
||||||
_points[TYPE(OBSTRN)] = Point(QImage(":/marine/obstruction.png"), Small);
|
_points[TYPE(OBSTRN)] = Point(QImage(":/marine/obstruction.png"), Small);
|
||||||
_points[SUBTYPE(WRECKS, 0)] = Point(QImage(":/marine/wreck.png"), Small);
|
_points[SUBTYPE(WRECKS, 0)] = Point(QImage(":/marine/wreck.png"), Small);
|
||||||
|
@ -10,7 +10,7 @@ using namespace Mapsforge;
|
|||||||
#define PATHS_EXTENT 20
|
#define PATHS_EXTENT 20
|
||||||
#define SEARCH_EXTENT -0.5
|
#define SEARCH_EXTENT -0.5
|
||||||
|
|
||||||
static double limit = cos(deg2rad(170));
|
static double LIMIT = cos(deg2rad(170));
|
||||||
|
|
||||||
static qreal area(const QPainterPath &polygon)
|
static qreal area(const QPainterPath &polygon)
|
||||||
{
|
{
|
||||||
@ -78,7 +78,7 @@ static QPainterPath parallelPath(const QPainterPath &p, double dy)
|
|||||||
|
|
||||||
if (k == 0)
|
if (k == 0)
|
||||||
continue;
|
continue;
|
||||||
if (u.at(k).x() * u.at(k-1).x() + u.at(k).y() * u.at(k-1).y() < limit)
|
if (u.at(k).x() * u.at(k-1).x() + u.at(k).y() * u.at(k-1).y() < LIMIT)
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,9 +127,8 @@ void RasterTile::processPointLabels(const QList<MapData::Point> &points,
|
|||||||
if ((lbl = label(ri->key(), point.tags))) {
|
if ((lbl = label(ri->key(), point.tags))) {
|
||||||
if (si && si->id() != ri->symbolId())
|
if (si && si->id() != ri->symbolId())
|
||||||
continue;
|
continue;
|
||||||
|
if (!ti || ti->priority() < ri->priority())
|
||||||
ti = ri;
|
ti = ri;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user