Compare commits
137 Commits
Author | SHA1 | Date | |
---|---|---|---|
681c83d017 | |||
dbd8750524 | |||
d9489935df | |||
f5d2ccfdb9 | |||
1afd59902b | |||
a253147760 | |||
667a1c350d | |||
d7a9464e37 | |||
d1be147f64 | |||
98708f11ac | |||
c5605eeab1 | |||
f29ac69594 | |||
49101cba6c | |||
c1f746b32a | |||
704be7baf9 | |||
3c6ec704ab | |||
bf6b6fb100 | |||
56a2618f29 | |||
785bf94a01 | |||
3747ae6afc | |||
1f5a051bee | |||
268c42ab03 | |||
8a8595d98e | |||
37c971a720 | |||
f0d71d667b | |||
f652457f19 | |||
1acf603076 | |||
86f5da9355 | |||
3587d29cb6 | |||
beb93bcd1f | |||
dd911a95b0 | |||
1fc644e1d6 | |||
dc628c9554 | |||
ec3eccd580 | |||
a3d22dcd2a | |||
c13d7ae51d | |||
e4085cc25a | |||
8a13355740 | |||
8f799e1bcf | |||
5cd0a3a8b0 | |||
283197612b | |||
2d0ac129ce | |||
499869119a | |||
fdcc431a4e | |||
38a4a4c32b | |||
6efd8e7fd1 | |||
5b3c448582 | |||
054ae32689 | |||
0594774570 | |||
e11d6d280d | |||
897de9920e | |||
82923a4529 | |||
4daa9fd55c | |||
3270625172 | |||
d70c4fefd5 | |||
c364121288 | |||
62eb5a09ae | |||
d0438b3ee8 | |||
5b83f1b86b | |||
241ecb36f2 | |||
f5b9f6e392 | |||
d04775d58e | |||
68644aa25d | |||
acbf72a983 | |||
010b983667 | |||
e6cd7f8bfa | |||
a9cc586103 | |||
bbd933295c | |||
0d77165d3f | |||
b0636d1cdb | |||
0a24a8e466 | |||
3176a42aa5 | |||
2575ecf1d8 | |||
8a990d1b94 | |||
9fd4b4d22e | |||
03d83716f8 | |||
093df0162f | |||
3e4c5bebf9 | |||
7c7ba06bf7 | |||
f9a5821374 | |||
23614aa157 | |||
7ca4426757 | |||
02969c19d9 | |||
cb9606e057 | |||
1137df94a6 | |||
ef011cad67 | |||
0dd8b6210b | |||
87a6b903c6 | |||
51c88e7c7c | |||
225c123f08 | |||
541e658741 | |||
deb09dfe7c | |||
cdfd968592 | |||
f443f7b8c4 | |||
bf845a4a65 | |||
6be0df331d | |||
0adf409624 | |||
9bcae2e3bc | |||
78d07cc166 | |||
04058e54a7 | |||
3220a707d4 | |||
d8ad020678 | |||
1f0a4264aa | |||
b13590450d | |||
f2695cd5e2 | |||
f57c2d57d3 | |||
c5cdf81f14 | |||
c5fef58b2e | |||
e63a2e1fde | |||
b58adc5486 | |||
46d6fbe5de | |||
ab1eb2f18a | |||
6f70bcae12 | |||
ee81e2f15e | |||
2fdd340f8a | |||
bba95b1bf4 | |||
b5578d89b0 | |||
493d588ca9 | |||
172b2b1b14 | |||
060f940b75 | |||
e2ad2e9d98 | |||
408ac22994 | |||
0e404e993e | |||
efca589f01 | |||
d307ef4b98 | |||
ce57350a55 | |||
90dcda217e | |||
3c3fb43993 | |||
d2f10aca7c | |||
78654aa1cf | |||
fb34f5c7db | |||
c1a1c3425b | |||
6b14a7f948 | |||
a0697a6ce7 | |||
3ca5616a3c | |||
0ddcf42da9 | |||
0e5b7299c4 |
@ -1,4 +1,4 @@
|
||||
version: 7.3.{build}
|
||||
version: 7.7.{build}
|
||||
configuration: Release
|
||||
platform: Any CPU
|
||||
environment:
|
||||
|
@ -1,7 +1,6 @@
|
||||
Only localization contributions are accepted at the moment, code pull requests will be rejected.
|
||||
|
||||
The rationale is, that I want leave the possibility to distribute GPXsee builds in the OS X/Windows
|
||||
stores under a non-GPL licence open. In the future, code pull requests under a QT-like contribution
|
||||
agreement [1] will be possible.
|
||||
|
||||
[1] https://d21tv0wm5mksdn.cloudfront.net/wp-content/uploads/2015/03/Qt-ContributionLicenseAgreement_v1_2_FINAL.pdf
|
||||
stores under a non-GPL licence open. In the future, code pull requests under a
|
||||
[QT-like contribution agreement](https://d21tv0wm5mksdn.cloudfront.net/wp-content/uploads/2015/03/Qt-ContributionLicenseAgreement_v1_2_FINAL.pdf)
|
||||
may become possible.
|
||||
|
@ -2,9 +2,9 @@
|
||||
GPXSee is a Qt-based GPS log file viewer and analyzer that supports all common GPS log file formats.
|
||||
|
||||
## Features
|
||||
* Opens GPX, TCX, FIT, KML, IGC, NMEA, SLF, LOC, GeoJSON, OziExplorer (PLT, RTE, WPT) and Garmin CSV files.
|
||||
* Opens GPX, TCX, FIT, KML, IGC, NMEA, SLF, LOC, GeoJSON, OziExplorer (PLT, RTE, WPT), Garmin CSV and geotagged JPEG files.
|
||||
* User-definable online maps (OpenStreetMap/Google tiles, WMTS, WMS, TMS).
|
||||
* Offline maps (MBTiles, OziExplorer maps, TrekBuddy maps/atlases, Garmin JNX maps, GeoTIFF images).
|
||||
* Offline maps (MBTiles, OziExplorer maps, TrekBuddy maps/atlases, Garmin IMG & JNX maps, TwoNav RMaps, GeoTIFF images).
|
||||
* Elevation, speed, heart rate, cadence, power, temperature and gear ratio/shifts graphs.
|
||||
* Support for DEM files (SRTM HGT).
|
||||
* Support for multiple tracks in one view.
|
||||
@ -19,7 +19,7 @@ GPXSee is a Qt-based GPS log file viewer and analyzer that supports all common G
|
||||
## Build
|
||||
Build requirements:
|
||||
* Qt 4.8 or QT 5.x (Qt >= 5.10.1 recommended for all features)
|
||||
* C++03 compiler (tested: msvc2015, gcc >= 4.8, clang/Apple LLVM version 8.1.0)
|
||||
* C++03 or newer compiler (tested: msvc2015, gcc >= 4.8, clang/Apple LLVM version 8.1.0)
|
||||
|
||||
Build steps:
|
||||
```shell
|
||||
@ -36,7 +36,7 @@ make # nmake on windows
|
||||
[Changelog](https://build.opensuse.org/package/view_file/home:tumic:GPXSee/gpxsee/gpxsee.changes)
|
||||
|
||||
## Homepage
|
||||
http://www.gpxsee.org
|
||||
[https://www.gpxsee.org](https://www.gpxsee.org)
|
||||
|
||||
## Maps
|
||||
[GPXSee maps repository](https://github.com/tumic0/GPXSee-maps)
|
||||
|
45
gpxsee.pro
@ -3,7 +3,7 @@ unix:!macx {
|
||||
} else {
|
||||
TARGET = GPXSee
|
||||
}
|
||||
VERSION = 7.3
|
||||
VERSION = 7.7
|
||||
|
||||
QT += core \
|
||||
gui \
|
||||
@ -29,6 +29,7 @@ HEADERS += src/common/config.h \
|
||||
src/common/kv.h \
|
||||
src/common/greatcircle.h \
|
||||
src/common/programpaths.h \
|
||||
src/common/tifffile.h \
|
||||
src/GUI/app.h \
|
||||
src/GUI/icons.h \
|
||||
src/GUI/gui.h \
|
||||
@ -83,6 +84,9 @@ HEADERS += src/common/config.h \
|
||||
src/GUI/mapview.h \
|
||||
src/GUI/font.h \
|
||||
src/GUI/areaitem.h \
|
||||
src/map/IMG/bitmapline.h \
|
||||
src/map/IMG/textpathitem.h \
|
||||
src/map/IMG/textpointitem.h \
|
||||
src/map/projection.h \
|
||||
src/map/ellipsoid.h \
|
||||
src/map/datum.h \
|
||||
@ -108,7 +112,6 @@ HEADERS += src/common/config.h \
|
||||
src/map/pcs.h \
|
||||
src/map/transform.h \
|
||||
src/map/mapfile.h \
|
||||
src/map/tifffile.h \
|
||||
src/map/gcs.h \
|
||||
src/map/angularunits.h \
|
||||
src/map/primemeridian.h \
|
||||
@ -158,7 +161,24 @@ HEADERS += src/common/config.h \
|
||||
src/data/polygon.h \
|
||||
src/data/area.h \
|
||||
src/map/obliquestereographic.h \
|
||||
src/GUI/coordinatesitem.h
|
||||
src/GUI/coordinatesitem.h \
|
||||
src/map/rmap.h \
|
||||
src/map/calibrationpoint.h \
|
||||
src/map/color.h \
|
||||
src/data/exifparser.h \
|
||||
src/data/imageinfo.h \
|
||||
src/map/imgmap.h \
|
||||
src/map/IMG/img.h \
|
||||
src/map/IMG/subfile.h \
|
||||
src/map/IMG/trefile.h \
|
||||
src/map/IMG/rgnfile.h \
|
||||
src/map/IMG/lblfile.h \
|
||||
src/map/IMG/vectortile.h \
|
||||
src/map/IMG/subdiv.h \
|
||||
src/map/IMG/units.h \
|
||||
src/map/IMG/style.h \
|
||||
src/map/IMG/netfile.h \
|
||||
src/GUI/limitedcombobox.h
|
||||
SOURCES += src/main.cpp \
|
||||
src/common/coordinates.cpp \
|
||||
src/common/rectc.cpp \
|
||||
@ -166,6 +186,7 @@ SOURCES += src/main.cpp \
|
||||
src/common/util.cpp \
|
||||
src/common/greatcircle.cpp \
|
||||
src/common/programpaths.cpp \
|
||||
src/common/tifffile.cpp \
|
||||
src/GUI/app.cpp \
|
||||
src/GUI/gui.cpp \
|
||||
src/GUI/axisitem.cpp \
|
||||
@ -209,6 +230,9 @@ SOURCES += src/main.cpp \
|
||||
src/GUI/gearratiographitem.cpp \
|
||||
src/GUI/mapview.cpp \
|
||||
src/GUI/areaitem.cpp \
|
||||
src/map/IMG/bitmapline.cpp \
|
||||
src/map/IMG/textpathitem.cpp \
|
||||
src/map/IMG/textpointitem.cpp \
|
||||
src/map/maplist.cpp \
|
||||
src/map/onlinemap.cpp \
|
||||
src/map/downloader.cpp \
|
||||
@ -230,7 +254,6 @@ SOURCES += src/main.cpp \
|
||||
src/map/pcs.cpp \
|
||||
src/map/transform.cpp \
|
||||
src/map/mapfile.cpp \
|
||||
src/map/tifffile.cpp \
|
||||
src/map/projection.cpp \
|
||||
src/map/gcs.cpp \
|
||||
src/map/angularunits.cpp \
|
||||
@ -273,7 +296,18 @@ SOURCES += src/main.cpp \
|
||||
src/data/dem.cpp \
|
||||
src/data/polygon.cpp \
|
||||
src/map/obliquestereographic.cpp \
|
||||
src/GUI/coordinatesitem.cpp
|
||||
src/GUI/coordinatesitem.cpp \
|
||||
src/map/rmap.cpp \
|
||||
src/data/exifparser.cpp \
|
||||
src/map/imgmap.cpp \
|
||||
src/map/IMG/img.cpp \
|
||||
src/map/IMG/subfile.cpp \
|
||||
src/map/IMG/trefile.cpp \
|
||||
src/map/IMG/rgnfile.cpp \
|
||||
src/map/IMG/lblfile.cpp \
|
||||
src/map/IMG/vectortile.cpp \
|
||||
src/map/IMG/style.cpp \
|
||||
src/map/IMG/netfile.cpp
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
HEADERS += src/data/geojsonparser.h
|
||||
@ -355,6 +389,7 @@ win32 {
|
||||
|
||||
unix:!macx {
|
||||
isEmpty(PREFIX):PREFIX = /usr/local
|
||||
DEFINES += PREFIX=\\\"$$PREFIX\\\"
|
||||
|
||||
maps.files = pkg/maps/*
|
||||
maps.path = $$PREFIX/share/gpxsee/maps
|
||||
|
84
gpxsee.qrc
@ -1,46 +1,46 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>icons/dialog-close.png</file>
|
||||
<file>icons/dialog-close@2x.png</file>
|
||||
<file>icons/document-open.png</file>
|
||||
<file>icons/document-open@2x.png</file>
|
||||
<file>icons/document-print.png</file>
|
||||
<file>icons/document-print@2x.png</file>
|
||||
<file>icons/document-export.png</file>
|
||||
<file>icons/document-export@2x.png</file>
|
||||
<file>icons/flag.png</file>
|
||||
<file>icons/flag@2x.png</file>
|
||||
<file>icons/gpxsee.png</file>
|
||||
<file>icons/gpxsee@2x.png</file>
|
||||
<file>icons/application-exit.png</file>
|
||||
<file>icons/application-exit@2x.png</file>
|
||||
<file>icons/applications-internet.png</file>
|
||||
<file>icons/applications-internet@2x.png</file>
|
||||
<file>icons/view-refresh.png</file>
|
||||
<file>icons/view-refresh@2x.png</file>
|
||||
<file>icons/arrow-left.png</file>
|
||||
<file>icons/arrow-left@2x.png</file>
|
||||
<file>icons/arrow-right.png</file>
|
||||
<file>icons/arrow-right@2x.png</file>
|
||||
<file>icons/arrow-left-double.png</file>
|
||||
<file>icons/arrow-left-double@2x.png</file>
|
||||
<file>icons/arrow-right-double.png</file>
|
||||
<file>icons/arrow-right-double@2x.png</file>
|
||||
<file>icons/view-fullscreen.png</file>
|
||||
<file>icons/view-fullscreen@2x.png</file>
|
||||
<file>icons/office-chart-line.png</file>
|
||||
<file>icons/office-chart-line@2x.png</file>
|
||||
<file>icons/format-stroke-color.png</file>
|
||||
<file>icons/format-stroke-color@2x.png</file>
|
||||
<file>icons/flag_32.png</file>
|
||||
<file>icons/flag_32@2x.png</file>
|
||||
<file>icons/preferences-system.png</file>
|
||||
<file>icons/preferences-system@2x.png</file>
|
||||
<file>icons/document-print_32.png</file>
|
||||
<file>icons/document-print_32@2x.png</file>
|
||||
<file>icons/view-filter.png</file>
|
||||
<file>icons/view-filter@2x.png</file>
|
||||
<file>icons/applications-internet_32.png</file>
|
||||
<file>icons/applications-internet_32@2x.png</file>
|
||||
<file alias="gpxsee.png">icons/gpxsee.png</file>
|
||||
<file alias="gpxsee@2x.png">icons/gpxsee@2x.png</file>
|
||||
<file alias="dialog-close.png">icons/GUI/dialog-close.png</file>
|
||||
<file alias="dialog-close@2x.png">icons/GUI/dialog-close@2x.png</file>
|
||||
<file alias="document-open.png">icons/GUI/document-open.png</file>
|
||||
<file alias="document-open@2x.png">icons/GUI/document-open@2x.png</file>
|
||||
<file alias="document-print.png">icons/GUI/document-print.png</file>
|
||||
<file alias="document-print@2x.png">icons/GUI/document-print@2x.png</file>
|
||||
<file alias="document-export.png">icons/GUI/document-export.png</file>
|
||||
<file alias="document-export@2x.png">icons/GUI/document-export@2x.png</file>
|
||||
<file alias="flag.png">icons/GUI/flag.png</file>
|
||||
<file alias="flag@2x.png">icons/GUI/flag@2x.png</file>
|
||||
<file alias="application-exit.png">icons/GUI/application-exit.png</file>
|
||||
<file alias="application-exit@2x.png">icons/GUI/application-exit@2x.png</file>
|
||||
<file alias="applications-internet.png">icons/GUI/applications-internet.png</file>
|
||||
<file alias="applications-internet@2x.png">icons/GUI/applications-internet@2x.png</file>
|
||||
<file alias="view-refresh.png">icons/GUI/view-refresh.png</file>
|
||||
<file alias="view-refresh@2x.png">icons/GUI/view-refresh@2x.png</file>
|
||||
<file alias="arrow-left.png">icons/GUI/arrow-left.png</file>
|
||||
<file alias="arrow-left@2x.png">icons/GUI/arrow-left@2x.png</file>
|
||||
<file alias="arrow-right.png">icons/GUI/arrow-right.png</file>
|
||||
<file alias="arrow-right@2x.png">icons/GUI/arrow-right@2x.png</file>
|
||||
<file alias="arrow-left-double.png">icons/GUI/arrow-left-double.png</file>
|
||||
<file alias="arrow-left-double@2x.png">icons/GUI/arrow-left-double@2x.png</file>
|
||||
<file alias="arrow-right-double.png">icons/GUI/arrow-right-double.png</file>
|
||||
<file alias="arrow-right-double@2x.png">icons/GUI/arrow-right-double@2x.png</file>
|
||||
<file alias="view-fullscreen.png">icons/GUI/view-fullscreen.png</file>
|
||||
<file alias="view-fullscreen@2x.png">icons/GUI/view-fullscreen@2x.png</file>
|
||||
<file alias="office-chart-line.png">icons/GUI/office-chart-line.png</file>
|
||||
<file alias="office-chart-line@2x.png">icons/GUI/office-chart-line@2x.png</file>
|
||||
<file alias="format-stroke-color.png">icons/GUI/format-stroke-color.png</file>
|
||||
<file alias="format-stroke-color@2x.png">icons/GUI/format-stroke-color@2x.png</file>
|
||||
<file alias="flag_32.png">icons/GUI/flag_32.png</file>
|
||||
<file alias="flag_32@2x.png">icons/GUI/flag_32@2x.png</file>
|
||||
<file alias="preferences-system.png">icons/GUI/preferences-system.png</file>
|
||||
<file alias="preferences-system@2x.png">icons/GUI/preferences-system@2x.png</file>
|
||||
<file alias="document-print_32.png">icons/GUI/document-print_32.png</file>
|
||||
<file alias="document-print_32@2x.png">icons/GUI/document-print_32@2x.png</file>
|
||||
<file alias="view-filter.png">icons/GUI/view-filter.png</file>
|
||||
<file alias="view-filter@2x.png">icons/GUI/view-filter@2x.png</file>
|
||||
<file alias="applications-internet_32.png">icons/GUI/applications-internet_32.png</file>
|
||||
<file alias="applications-internet_32@2x.png">icons/GUI/applications-internet_32@2x.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 926 B After Width: | Height: | Size: 926 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 707 B After Width: | Height: | Size: 707 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 924 B After Width: | Height: | Size: 924 B |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 682 B After Width: | Height: | Size: 682 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 865 B After Width: | Height: | Size: 865 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 880 B After Width: | Height: | Size: 880 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
169
icons/GUI/licence.txt
Normal file
@ -0,0 +1,169 @@
|
||||
The GUI icons are Oxygen icons from the KDE project (http://www.kde.org)
|
||||
licensed under LGPLv3.
|
||||
|
||||
-----
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
Before Width: | Height: | Size: 728 B After Width: | Height: | Size: 728 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 885 B After Width: | Height: | Size: 885 B |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 381 B After Width: | Height: | Size: 381 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
@ -7,15 +7,17 @@
|
||||
<name>GPXSee</name>
|
||||
<summary>GPS log file viewer and analyzer</summary>
|
||||
<description>
|
||||
<p>GPXSee is a GPS log file viewer and analyzer that supports GPX, TCX,
|
||||
KML, FIT, IGC, NMEA, SLF, LOC, GeoJSON and OziExplorer files.</p>
|
||||
<p>GPXSee is a GPS log file viewer and analyzer that supports all common
|
||||
GPS log file formats.</p>
|
||||
|
||||
<p>Features:</p>
|
||||
<ul>
|
||||
<li>Opens GPX, TCX, FIT, KML, IGC, NMEA, SLF, LOC, OziExplorer (PLT,
|
||||
WPT, RTE), GeoJSON, Garmin CSV and geotagged JPEG files.</li>
|
||||
<li>User-definable online maps (OpenStreetMap/Google tiles, WMTS,
|
||||
WMS, TMS).</li>
|
||||
<li>Offline maps (MBTiles, OziExplorer maps, TrekBuddy maps/atlases,
|
||||
GeoTIFF images).</li>
|
||||
TwoNav RMaps, Garmin IMG & JNX, GeoTIFF images).</li>
|
||||
<li>Elevation, speed, heart rate, cadence, power and temperature
|
||||
graphs.</li>
|
||||
<li>Support for multiple tracks in one view.</li>
|
||||
@ -23,8 +25,6 @@
|
||||
<li>Print/export to PDF.</li>
|
||||
<li>Full-screen mode.</li>
|
||||
<li>HiDPI/Retina displays & maps support.</li>
|
||||
<li>Opens GPX, TCX, FIT, KML, IGC, NMEA, SLF, LOC, OziExplorer (PLT,
|
||||
WPT, RTE), GeoJSON and Garmin CSV files.</li>
|
||||
</ul>
|
||||
</description>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
; The name of the installer
|
||||
Name "GPXSee"
|
||||
; Program version
|
||||
!define VERSION "7.3"
|
||||
!define VERSION "7.7"
|
||||
|
||||
; The file to write
|
||||
OutFile "GPXSee-${VERSION}.exe"
|
||||
|
@ -7,7 +7,7 @@
|
||||
; The name of the installer
|
||||
Name "GPXSee"
|
||||
; Program version
|
||||
!define VERSION "7.3"
|
||||
!define VERSION "7.7"
|
||||
|
||||
; The file to write
|
||||
OutFile "GPXSee-${VERSION}_x64.exe"
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map xmlns="http://www.gpxsee.org/map/1.0">
|
||||
<map xmlns="http://www.gpxsee.org/map/1.3">
|
||||
<name>4UMaps</name>
|
||||
<url>https://4umaps.com/$z/$x/$y.png</url>
|
||||
<copyright>Map data: © OpenStreetMap contributors (ODbL) | Rendering: © 4UMaps.eu</copyright>
|
||||
<zoom min="2" max="15"/>
|
||||
<bounds bottom="-65"/>
|
||||
<copyright>Map data: © OpenStreetMap contributors (ODbL) | Rendering: © 4UMaps.eu</copyright>
|
||||
</map>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map xmlns="http://www.gpxsee.org/map/1.0" type="WMTS">
|
||||
<map xmlns="http://www.gpxsee.org/map/1.3" type="WMTS">
|
||||
<name>Antarctica</name>
|
||||
<url type="REST">https://gis.ngdc.noaa.gov/arcgis/rest/services/antarctic/antarctic_basemap/MapServer/WMTS/1.0.0/WMTSCapabilities.xml</url>
|
||||
<copyright>NOAA National Centers for Environmental Information (NCEI); International Bathymetric Chart of the Southern Ocean (IBCSO); General Bathymetric Chart of the Oceans (GEBCO); Natural Earth</copyright>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map xmlns="http://www.gpxsee.org/map/1.0">
|
||||
<map xmlns="http://www.gpxsee.org/map/1.3">
|
||||
<name>Open Street Map</name>
|
||||
<url>http://tile.openstreetmap.org/$z/$x/$y.png</url>
|
||||
<copyright>Map data: © OpenStreetMap contributors (ODbL) | Rendering: © OpenStreetMap (CC-BY-SA)</copyright>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map xmlns="http://www.gpxsee.org/map/1.0">
|
||||
<map xmlns="http://www.gpxsee.org/map/1.3">
|
||||
<name>Open Topo Map</name>
|
||||
<url>https://a.tile.opentopomap.org/$z/$x/$y.png</url>
|
||||
<copyright>Map data: © OpenStreetMap contributors (ODbL), SRTM | Rendering: © OpenTopoMap (CC-BY-SA)</copyright>
|
||||
<zoom max="17"/>
|
||||
<copyright>Map data: © OpenStreetMap contributors (ODbL), SRTM | Rendering: © OpenTopoMap (CC-BY-SA)</copyright>
|
||||
</map>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map xmlns="http://www.gpxsee.org/map/1.0">
|
||||
<map xmlns="http://www.gpxsee.org/map/1.3">
|
||||
<name>USGS Imagery</name>
|
||||
<url>https://basemap.nationalmap.gov/ArcGIS/rest/services/USGSImageryOnly/MapServer/tile/$z/$y/$x</url>
|
||||
<copyright>Map services and data available from U.S. Geological Survey, National Geospatial Program.</copyright>
|
||||
<zoom min="2" max="15"/>
|
||||
<bounds bottom="0" top="74"/>
|
||||
<copyright>Map services and data available from U.S. Geological Survey, National Geospatial Program.</copyright>
|
||||
</map>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map xmlns="http://www.gpxsee.org/map/1.0">
|
||||
<map xmlns="http://www.gpxsee.org/map/1.3">
|
||||
<name>USGS Topo</name>
|
||||
<url>https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer/tile/$z/$y/$x</url>
|
||||
<copyright>Map services and data available from U.S. Geological Survey, National Geospatial Program.</copyright>
|
||||
<zoom min="2" max="15"/>
|
||||
<copyright>Map services and data available from U.S. Geological Survey, National Geospatial Program.</copyright>
|
||||
</map>
|
||||
|
@ -51,7 +51,7 @@ App::App(int &argc, char **argv) : QApplication(argc, argv)
|
||||
"QThreadStorage: Thread X exited after QThreadStorage Y destroyed" */
|
||||
Downloader::setNetworkManager(new QNetworkAccessManager(this));
|
||||
DEM::setDir(ProgramPaths::demDir());
|
||||
OPENGL_SET_SAMPLES(4);
|
||||
OPENGL_SET_FORMAT(4, 8);
|
||||
|
||||
loadDatums();
|
||||
loadPCSs();
|
||||
|
@ -63,11 +63,11 @@ QList<GraphItem*> CadenceGraph::loadData(const Data &data)
|
||||
qreal CadenceGraph::avg() const
|
||||
{
|
||||
qreal sum = 0, w = 0;
|
||||
QList<QPointF>::const_iterator it;
|
||||
|
||||
for (it = _avg.begin(); it != _avg.end(); it++) {
|
||||
sum += it->y() * it->x();
|
||||
w += it->x();
|
||||
for (int i = 0; i < _avg.size(); i++) {
|
||||
const QPointF &p = _avg.at(i);
|
||||
sum += p.y() * p.x();
|
||||
w += p.x();
|
||||
}
|
||||
|
||||
return (sum / w);
|
||||
@ -77,7 +77,7 @@ void CadenceGraph::clear()
|
||||
{
|
||||
_avg.clear();
|
||||
|
||||
GraphView::clear();
|
||||
GraphTab::clear();
|
||||
}
|
||||
|
||||
void CadenceGraph::showTracks(bool show)
|
||||
|
@ -21,7 +21,7 @@ private:
|
||||
qreal max() const {return bounds().bottom();}
|
||||
void setInfo();
|
||||
|
||||
QList<QPointF> _avg;
|
||||
QVector<QPointF> _avg;
|
||||
|
||||
bool _showTracks;
|
||||
};
|
||||
|
@ -11,6 +11,10 @@ CoordinatesItem::CoordinatesItem(QGraphicsItem *parent) : QGraphicsItem(parent)
|
||||
_font.setPixelSize(FONT_SIZE);
|
||||
_font.setFamily(FONT_FAMILY);
|
||||
|
||||
_digitalZoom = 0;
|
||||
|
||||
setAcceptHoverEvents(true);
|
||||
|
||||
updateBoundingRect();
|
||||
}
|
||||
|
||||
@ -48,6 +52,12 @@ void CoordinatesItem::setFormat(const CoordinatesFormat &format)
|
||||
updateBoundingRect();
|
||||
}
|
||||
|
||||
void CoordinatesItem::setDigitalZoom(qreal zoom)
|
||||
{
|
||||
_digitalZoom = zoom;
|
||||
setScale(pow(2, -_digitalZoom));
|
||||
}
|
||||
|
||||
void CoordinatesItem::updateBoundingRect()
|
||||
{
|
||||
QFontMetrics fm(_font);
|
||||
|
@ -17,6 +17,7 @@ public:
|
||||
|
||||
void setCoordinates(const Coordinates &c);
|
||||
void setFormat(const CoordinatesFormat &format);
|
||||
void setDigitalZoom(qreal zoom);
|
||||
|
||||
private:
|
||||
void updateBoundingRect();
|
||||
@ -25,6 +26,7 @@ private:
|
||||
CoordinatesFormat _format;
|
||||
QRectF _boundingRect;
|
||||
QFont _font;
|
||||
qreal _digitalZoom;
|
||||
};
|
||||
|
||||
#endif // COORDINATESITEM_H
|
||||
|
@ -120,7 +120,7 @@ void ElevationGraph::clear()
|
||||
_routeMin = NAN;
|
||||
_routeMax = NAN;
|
||||
|
||||
GraphView::clear();
|
||||
GraphTab::clear();
|
||||
}
|
||||
|
||||
void ElevationGraph::setYUnits(Units units)
|
||||
|
@ -86,7 +86,7 @@ void GearRatioGraph::clear()
|
||||
{
|
||||
_map.clear();
|
||||
|
||||
GraphView::clear();
|
||||
GraphTab::clear();
|
||||
}
|
||||
|
||||
void GearRatioGraph::showTracks(bool show)
|
||||
|
@ -103,7 +103,6 @@ GUI::GUI()
|
||||
readSettings();
|
||||
|
||||
updateGraphTabs();
|
||||
updateMapView();
|
||||
updateStatusBarInfo();
|
||||
}
|
||||
|
||||
@ -725,6 +724,8 @@ void GUI::paths()
|
||||
+ QDir::cleanPath(ProgramPaths::csvDir(true)) + "</code></td></tr><tr><td>"
|
||||
+ tr("DEM directory:") + "</td><td><code>"
|
||||
+ QDir::cleanPath(ProgramPaths::demDir(true)) + "</code></td></tr><tr><td>"
|
||||
+ tr("Styles directory:") + "</td><td><code>"
|
||||
+ QDir::cleanPath(ProgramPaths::styleDir(true)) + "</code></td></tr><tr><td>"
|
||||
+ tr("Tile cache directory:") + "</td><td><code>"
|
||||
+ QDir::cleanPath(ProgramPaths::tilesDir()) + "</code></td></tr></table>"
|
||||
);
|
||||
@ -805,7 +806,7 @@ bool GUI::loadFile(const QString &fileName)
|
||||
|
||||
for (int i = 0; i < _tabs.count(); i++)
|
||||
graphs.append(_tabs.at(i)->loadData(data));
|
||||
if (updateGraphTabs() | updateMapView())
|
||||
if (updateGraphTabs())
|
||||
_splitter->refresh();
|
||||
paths = _mapView->loadData(data);
|
||||
|
||||
@ -828,7 +829,6 @@ bool GUI::loadFile(const QString &fileName)
|
||||
updateStatusBarInfo();
|
||||
updateWindowTitle();
|
||||
updateGraphTabs();
|
||||
updateMapView();
|
||||
|
||||
QString error = tr("Error loading data file:") + "\n\n"
|
||||
+ fileName + "\n\n" + data.errorString();
|
||||
@ -930,6 +930,7 @@ void GUI::openOptions()
|
||||
SET_VIEW_OPTION(pathAntiAliasing, useAntiAliasing);
|
||||
SET_VIEW_OPTION(useOpenGL, useOpenGL);
|
||||
SET_VIEW_OPTION(sliderColor, setMarkerColor);
|
||||
SET_VIEW_OPTION(projection, setProjection);
|
||||
|
||||
SET_TAB_OPTION(palette, setPalette);
|
||||
SET_TAB_OPTION(graphWidth, setGraphWidth);
|
||||
@ -974,8 +975,6 @@ void GUI::openOptions()
|
||||
reloadFile();
|
||||
|
||||
_options = options;
|
||||
|
||||
updateMapView();
|
||||
}
|
||||
|
||||
void GUI::printFile()
|
||||
@ -1230,7 +1229,6 @@ void GUI::closeAll()
|
||||
updateStatusBarInfo();
|
||||
updateWindowTitle();
|
||||
updateGraphTabs();
|
||||
updateMapView();
|
||||
}
|
||||
|
||||
void GUI::showGraphs(bool show)
|
||||
@ -1473,19 +1471,6 @@ bool GUI::updateGraphTabs()
|
||||
return (hidden != _graphTabWidget->isHidden());
|
||||
}
|
||||
|
||||
bool GUI::updateMapView()
|
||||
{
|
||||
bool hidden = _mapView->isHidden();
|
||||
|
||||
if (_options.alwaysShowMap)
|
||||
_mapView->setHidden(false);
|
||||
else
|
||||
_mapView->setHidden(!(_trackCount + _routeCount + _waypointCount
|
||||
+ _areaCount));
|
||||
|
||||
return (hidden != _mapView->isHidden());
|
||||
}
|
||||
|
||||
void GUI::setTimeType(TimeType type)
|
||||
{
|
||||
for (int i = 0; i <_tabs.count(); i++)
|
||||
@ -1847,8 +1832,8 @@ void GUI::writeSettings()
|
||||
_options.separateGraphPage);
|
||||
if (_options.sliderColor != SLIDER_COLOR_DEFAULT)
|
||||
settings.setValue(SLIDER_COLOR_SETTING, _options.sliderColor);
|
||||
if (_options.alwaysShowMap != ALWAYS_SHOW_MAP_DEFAULT)
|
||||
settings.setValue(ALWAYS_SHOW_MAP_SETTING, _options.alwaysShowMap);
|
||||
if (_options.projection != PROJECTION_DEFAULT)
|
||||
settings.setValue(PROJECTION_SETTING, _options.projection);
|
||||
#ifdef ENABLE_HIDPI
|
||||
if (_options.hidpiMap != HIDPI_MAP_DEFAULT)
|
||||
settings.setValue(HIDPI_MAP_SETTING, _options.hidpiMap);
|
||||
@ -2110,8 +2095,8 @@ void GUI::readSettings()
|
||||
SEPARATE_GRAPH_PAGE_DEFAULT).toBool();
|
||||
_options.sliderColor = settings.value(SLIDER_COLOR_SETTING,
|
||||
SLIDER_COLOR_DEFAULT).value<QColor>();
|
||||
_options.alwaysShowMap = settings.value(ALWAYS_SHOW_MAP_SETTING,
|
||||
ALWAYS_SHOW_MAP_DEFAULT).toBool();
|
||||
_options.projection = settings.value(PROJECTION_SETTING, PROJECTION_DEFAULT)
|
||||
.toInt();
|
||||
#ifdef ENABLE_HIDPI
|
||||
_options.hidpiMap = settings.value(HIDPI_MAP_SETTING, HIDPI_MAP_SETTING)
|
||||
.toBool();
|
||||
@ -2139,6 +2124,7 @@ void GUI::readSettings()
|
||||
_mapView->setDevicePixelRatio(devicePixelRatioF(),
|
||||
_options.hidpiMap ? devicePixelRatioF() : 1.0);
|
||||
#endif // ENABLE_HIDPI
|
||||
_mapView->setProjection(_options.projection);
|
||||
|
||||
for (int i = 0; i < _tabs.count(); i++) {
|
||||
_tabs.at(i)->setPalette(_options.palette);
|
||||
|
@ -116,7 +116,6 @@ private:
|
||||
void updateWindowTitle();
|
||||
void updateNavigationActions();
|
||||
bool updateGraphTabs();
|
||||
bool updateMapView();
|
||||
|
||||
TimeType timeType() const;
|
||||
Units units() const;
|
||||
|
@ -63,11 +63,11 @@ QList<GraphItem*> HeartRateGraph::loadData(const Data &data)
|
||||
qreal HeartRateGraph::avg() const
|
||||
{
|
||||
qreal sum = 0, w = 0;
|
||||
QList<QPointF>::const_iterator it;
|
||||
|
||||
for (it = _avg.begin(); it != _avg.end(); it++) {
|
||||
sum += it->y() * it->x();
|
||||
w += it->x();
|
||||
for (int i = 0; i < _avg.size(); i++) {
|
||||
const QPointF &p = _avg.at(i);
|
||||
sum += p.y() * p.x();
|
||||
w += p.x();
|
||||
}
|
||||
|
||||
return (sum / w);
|
||||
@ -77,7 +77,7 @@ void HeartRateGraph::clear()
|
||||
{
|
||||
_avg.clear();
|
||||
|
||||
GraphView::clear();
|
||||
GraphTab::clear();
|
||||
}
|
||||
|
||||
void HeartRateGraph::showTracks(bool show)
|
||||
|
@ -20,7 +20,7 @@ private:
|
||||
qreal max() const {return bounds().bottom();}
|
||||
void setInfo();
|
||||
|
||||
QList<QPointF> _avg;
|
||||
QVector<QPointF> _avg;
|
||||
|
||||
bool _showTracks;
|
||||
};
|
||||
|
@ -1,30 +1,30 @@
|
||||
#ifndef ICONS_H
|
||||
#define ICONS_H
|
||||
|
||||
#define APP_ICON ":/icons/gpxsee.png"
|
||||
#define APP_ICON ":/gpxsee.png"
|
||||
|
||||
// Toolbar/menu icons
|
||||
#define OPEN_FILE_ICON ":/icons/document-open.png"
|
||||
#define EXPORT_FILE_ICON ":/icons/document-export.png"
|
||||
#define PRINT_FILE_ICON ":/icons/document-print.png"
|
||||
#define CLOSE_FILE_ICON ":/icons/dialog-close.png"
|
||||
#define SHOW_POI_ICON ":/icons/flag.png"
|
||||
#define SHOW_MAP_ICON ":/icons/applications-internet.png"
|
||||
#define SHOW_GRAPHS_ICON ":/icons/office-chart-line.png"
|
||||
#define QUIT_ICON ":/icons/application-exit.png"
|
||||
#define RELOAD_FILE_ICON ":/icons/view-refresh.png"
|
||||
#define NEXT_FILE_ICON ":/icons/arrow-right.png"
|
||||
#define PREV_FILE_ICON ":/icons/arrow-left.png"
|
||||
#define LAST_FILE_ICON ":/icons/arrow-right-double.png"
|
||||
#define FIRST_FILE_ICON ":/icons/arrow-left-double.png"
|
||||
#define FULLSCREEN_ICON ":/icons/view-fullscreen.png"
|
||||
#define OPEN_FILE_ICON ":/document-open.png"
|
||||
#define EXPORT_FILE_ICON ":/document-export.png"
|
||||
#define PRINT_FILE_ICON ":/document-print.png"
|
||||
#define CLOSE_FILE_ICON ":/dialog-close.png"
|
||||
#define SHOW_POI_ICON ":/flag.png"
|
||||
#define SHOW_MAP_ICON ":/applications-internet.png"
|
||||
#define SHOW_GRAPHS_ICON ":/office-chart-line.png"
|
||||
#define QUIT_ICON ":/application-exit.png"
|
||||
#define RELOAD_FILE_ICON ":/view-refresh.png"
|
||||
#define NEXT_FILE_ICON ":/arrow-right.png"
|
||||
#define PREV_FILE_ICON ":/arrow-left.png"
|
||||
#define LAST_FILE_ICON ":/arrow-right-double.png"
|
||||
#define FIRST_FILE_ICON ":/arrow-left-double.png"
|
||||
#define FULLSCREEN_ICON ":/view-fullscreen.png"
|
||||
|
||||
// Options dialog icons
|
||||
#define APPEARANCE_ICON ":/icons/format-stroke-color.png"
|
||||
#define POI_ICON ":/icons/flag_32.png"
|
||||
#define SYSTEM_ICON ":/icons/preferences-system.png"
|
||||
#define PRINT_EXPORT_ICON ":/icons/document-print_32.png"
|
||||
#define DATA_ICON ":/icons/view-filter.png"
|
||||
#define MAPS_ICON ":/icons/applications-internet_32.png"
|
||||
#define APPEARANCE_ICON ":/format-stroke-color.png"
|
||||
#define POI_ICON ":/flag_32.png"
|
||||
#define SYSTEM_ICON ":/preferences-system.png"
|
||||
#define PRINT_EXPORT_ICON ":/document-print_32.png"
|
||||
#define DATA_ICON ":/view-filter.png"
|
||||
#define MAPS_ICON ":/applications-internet_32.png"
|
||||
|
||||
#endif /* ICONS_H */
|
||||
|
39
src/GUI/limitedcombobox.h
Normal file
@ -0,0 +1,39 @@
|
||||
#ifndef LIMITEDCOMBOBOX_H
|
||||
#define LIMITEDCOMBOBOX_H
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QEvent>
|
||||
|
||||
class LimitedComboBox : public QComboBox
|
||||
{
|
||||
public:
|
||||
LimitedComboBox(int limit, QWidget *parent = 0)
|
||||
: QComboBox(parent), _limit(limit)
|
||||
{
|
||||
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
|
||||
setStyleSheet("combobox-popup: 0;");
|
||||
}
|
||||
|
||||
QSize sizeHint() const
|
||||
{
|
||||
return QSize(qMin(_limit, QComboBox::sizeHint().width()),
|
||||
QComboBox::sizeHint().height());
|
||||
}
|
||||
QSize minimumSizeHint() const
|
||||
{
|
||||
return QSize(qMin(_limit, QComboBox::minimumSizeHint().width()),
|
||||
QComboBox::minimumSizeHint().height());
|
||||
}
|
||||
|
||||
bool event(QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::Polish)
|
||||
view()->setMinimumWidth(QComboBox::sizeHint().width());
|
||||
return QComboBox::event(e);
|
||||
}
|
||||
|
||||
private:
|
||||
int _limit;
|
||||
};
|
||||
|
||||
#endif // LIMITEDCOMBOBOX_H
|
@ -7,6 +7,7 @@
|
||||
#include "data/poi.h"
|
||||
#include "data/data.h"
|
||||
#include "map/map.h"
|
||||
#include "map/pcs.h"
|
||||
#include "opengl.h"
|
||||
#include "trackitem.h"
|
||||
#include "routeitem.h"
|
||||
@ -39,7 +40,6 @@ MapView::MapView(Map *map, POI *poi, QWidget *parent)
|
||||
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
setRenderHint(QPainter::Antialiasing, true);
|
||||
setAcceptDrops(false);
|
||||
setMouseTracking(true);
|
||||
|
||||
_mapScale = new ScaleItem();
|
||||
_mapScale->setZValue(2.0);
|
||||
@ -49,8 +49,10 @@ MapView::MapView(Map *map, POI *poi, QWidget *parent)
|
||||
_coordinates->setVisible(false);
|
||||
_scene->addItem(_coordinates);
|
||||
|
||||
_projection = PCS::pcs(3857);
|
||||
_map = map;
|
||||
_map->load();
|
||||
_map->setProjection(_projection);
|
||||
connect(_map, SIGNAL(loaded()), this, SLOT(reloadMap()));
|
||||
|
||||
_poi = poi;
|
||||
@ -313,6 +315,7 @@ void MapView::setMap(Map *map)
|
||||
|
||||
_map = map;
|
||||
_map->load();
|
||||
_map->setProjection(_projection);
|
||||
#ifdef ENABLE_HIDPI
|
||||
_map->setDevicePixelRatio(_deviceRatio, _mapRatio);
|
||||
#endif // ENABLE_HIDPI
|
||||
@ -476,6 +479,7 @@ void MapView::digitalZoom(int zoom)
|
||||
it.value()->setDigitalZoom(_digitalZoom);
|
||||
|
||||
_mapScale->setDigitalZoom(_digitalZoom);
|
||||
_coordinates->setDigitalZoom(_digitalZoom);
|
||||
}
|
||||
|
||||
void MapView::zoom(int zoom, const QPoint &pos)
|
||||
@ -751,6 +755,7 @@ void MapView::showPOILabels(bool show)
|
||||
void MapView::showCoordinates(bool show)
|
||||
{
|
||||
_coordinates->setVisible(show);
|
||||
setMouseTracking(show);
|
||||
}
|
||||
|
||||
void MapView::setPOIOverlap(bool overlap)
|
||||
@ -1011,3 +1016,17 @@ void MapView::setDevicePixelRatio(qreal deviceRatio, qreal mapRatio)
|
||||
Q_UNUSED(mapRatio);
|
||||
#endif // ENABLE_HIDPI
|
||||
}
|
||||
|
||||
void MapView::setProjection(int id)
|
||||
{
|
||||
Projection projection(PCS::pcs(id));
|
||||
if (!projection.isValid())
|
||||
return;
|
||||
|
||||
_projection = projection;
|
||||
|
||||
Coordinates center = _map->xy2ll(mapToScene(viewport()->rect().center()));
|
||||
_map->setProjection(_projection);
|
||||
rescale();
|
||||
centerOn(_map->ll2xy(center));
|
||||
}
|
||||
|
@ -8,11 +8,13 @@
|
||||
#include "common/rectc.h"
|
||||
#include "common/config.h"
|
||||
#include "data/waypoint.h"
|
||||
#include "data/polygon.h"
|
||||
#include "map/projection.h"
|
||||
#include "searchpointer.h"
|
||||
#include "units.h"
|
||||
#include "format.h"
|
||||
#include "palette.h"
|
||||
#include "data/polygon.h"
|
||||
|
||||
|
||||
class Data;
|
||||
class POI;
|
||||
@ -80,6 +82,7 @@ public slots:
|
||||
void clearMapCache();
|
||||
void setCoordinatesFormat(CoordinatesFormat format);
|
||||
void setDevicePixelRatio(qreal deviceRatio, qreal mapRatio);
|
||||
void setProjection(int id);
|
||||
|
||||
private slots:
|
||||
void updatePOI();
|
||||
@ -132,6 +135,7 @@ private:
|
||||
Units _units;
|
||||
CoordinatesFormat _coordinatesFormat;
|
||||
qreal _mapOpacity;
|
||||
Projection _projection;
|
||||
|
||||
bool _showMap, _showTracks, _showRoutes, _showAreas, _showWaypoints,
|
||||
_showWaypointLabels, _showPOI, _showPOILabels, _showRouteWaypoints,
|
||||
|
@ -14,13 +14,15 @@
|
||||
#endif
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0)
|
||||
#define OPENGL_SET_SAMPLES(samples) \
|
||||
#define OPENGL_SET_FORMAT(samples, stencilBuffer) \
|
||||
{QGLFormat fmt; \
|
||||
fmt.setStencilBufferSize(stencilBuffer); \
|
||||
fmt.setSamples(samples); \
|
||||
QGLFormat::setDefaultFormat(fmt);}
|
||||
#else
|
||||
#define OPENGL_SET_SAMPLES(samples) \
|
||||
#define OPENGL_SET_FORMAT(samples, stencilBuffer) \
|
||||
{QSurfaceFormat fmt; \
|
||||
fmt.setSamples(samples);\
|
||||
fmt.setStencilBufferSize(stencilBuffer); \
|
||||
fmt.setSamples(samples); \
|
||||
QSurfaceFormat::setDefaultFormat(fmt);}
|
||||
#endif
|
||||
|
@ -12,11 +12,14 @@
|
||||
#include <QRadioButton>
|
||||
#include <QLabel>
|
||||
#include <QSysInfo>
|
||||
#include <QInputDialog>
|
||||
#include "map/pcs.h"
|
||||
#include "icons.h"
|
||||
#include "colorbox.h"
|
||||
#include "stylecombobox.h"
|
||||
#include "oddspinbox.h"
|
||||
#include "percentslider.h"
|
||||
#include "limitedcombobox.h"
|
||||
#include "optionsdialog.h"
|
||||
|
||||
|
||||
@ -36,10 +39,15 @@ static QFrame *line()
|
||||
|
||||
QWidget *OptionsDialog::createMapPage()
|
||||
{
|
||||
_alwaysShowMap = new QCheckBox(tr("Always show the map"));
|
||||
_alwaysShowMap->setChecked(_options->alwaysShowMap);
|
||||
_alwaysShowMap->setToolTip("<p>" +
|
||||
tr("Show the map even when no files are loaded.") + "</p>");
|
||||
_projection = new LimitedComboBox(200);
|
||||
QList<PCS::Info> projections(PCS::pcsList());
|
||||
qSort(projections);
|
||||
for (int i = 0; i < projections.size(); i++) {
|
||||
QString text = QString::number(projections.at(i).id()) + " - "
|
||||
+ projections.at(i).name();
|
||||
_projection->addItem(text, QVariant(projections.at(i).id()));
|
||||
}
|
||||
_projection->setCurrentIndex(_projection->findData(_options->projection));
|
||||
|
||||
#ifdef ENABLE_HIDPI
|
||||
_hidpi = new QRadioButton(tr("High-resolution"));
|
||||
@ -60,14 +68,14 @@ QWidget *OptionsDialog::createMapPage()
|
||||
llo->setFont(f);
|
||||
#endif // ENABLE_HIDPI
|
||||
|
||||
QFormLayout *showMapLayout = new QFormLayout();
|
||||
showMapLayout->addWidget(_alwaysShowMap);
|
||||
QFormLayout *vectorLayout = new QFormLayout();
|
||||
vectorLayout->addRow(tr("Projection:"), _projection);
|
||||
|
||||
QWidget *mapTab = new QWidget();
|
||||
QVBoxLayout *mapTabLayout = new QVBoxLayout();
|
||||
mapTabLayout->addLayout(showMapLayout);
|
||||
mapTabLayout->addStretch();
|
||||
mapTab->setLayout(mapTabLayout);
|
||||
QWidget *vectorMapsTab = new QWidget();
|
||||
QVBoxLayout *vectorMapsTabLayout = new QVBoxLayout();
|
||||
vectorMapsTabLayout->addLayout(vectorLayout);
|
||||
vectorMapsTabLayout->addStretch();
|
||||
vectorMapsTab->setLayout(vectorMapsTabLayout);
|
||||
|
||||
#ifdef ENABLE_HIDPI
|
||||
QVBoxLayout *hidpiTabLayout = new QVBoxLayout();
|
||||
@ -83,7 +91,7 @@ QWidget *OptionsDialog::createMapPage()
|
||||
#endif // ENABLE_HIDPI
|
||||
|
||||
QTabWidget *mapPage = new QTabWidget();
|
||||
mapPage->addTab(mapTab, tr("General"));
|
||||
mapPage->addTab(vectorMapsTab, tr("Vector maps"));
|
||||
#ifdef ENABLE_HIDPI
|
||||
mapPage->addTab(hidpiTab, tr("HiDPI display mode"));
|
||||
#endif // ENABLE_HIDPI
|
||||
@ -261,6 +269,7 @@ QWidget *OptionsDialog::createAppearancePage()
|
||||
_backgroundColor = new ColorBox();
|
||||
_backgroundColor->setColor(_options->backgroundColor);
|
||||
_backgroundColor->enableAlphaChannel(false);
|
||||
|
||||
QFormLayout *mapLayout = new QFormLayout();
|
||||
mapLayout->addRow(tr("Background color:"), _backgroundColor);
|
||||
mapLayout->addRow(tr("Map opacity:"), _mapOpacity);
|
||||
@ -656,7 +665,8 @@ void OptionsDialog::accept()
|
||||
_options->sliderColor = _sliderColor->color();
|
||||
_options->graphAntiAliasing = _graphAA->isChecked();
|
||||
|
||||
_options->alwaysShowMap = _alwaysShowMap->isChecked();
|
||||
_options->projection = _projection->itemData(_projection->currentIndex())
|
||||
.toInt();
|
||||
#ifdef ENABLE_HIDPI
|
||||
_options->hidpiMap = _hidpi->isChecked();
|
||||
#endif // ENABLE_HIDPI
|
||||
|
@ -15,6 +15,7 @@ class QComboBox;
|
||||
class QCheckBox;
|
||||
class QRadioButton;
|
||||
class PercentSlider;
|
||||
class LimitedComboBox;
|
||||
|
||||
struct Options {
|
||||
// Appearance
|
||||
@ -37,7 +38,7 @@ struct Options {
|
||||
int mapOpacity;
|
||||
QColor backgroundColor;
|
||||
// Map
|
||||
bool alwaysShowMap;
|
||||
int projection;
|
||||
#ifdef ENABLE_HIDPI
|
||||
bool hidpiMap;
|
||||
#endif // ENABLE_HIDPI
|
||||
@ -79,11 +80,14 @@ class OptionsDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public slots:
|
||||
void accept();
|
||||
|
||||
public:
|
||||
OptionsDialog(Options *options, QWidget *parent = 0);
|
||||
|
||||
public slots:
|
||||
void accept();
|
||||
//private slots:
|
||||
// void projectionChanged(int index);
|
||||
|
||||
private:
|
||||
QWidget *createMapPage();
|
||||
@ -116,7 +120,7 @@ private:
|
||||
ColorBox *_sliderColor;
|
||||
QCheckBox *_graphAA;
|
||||
// Map
|
||||
QCheckBox *_alwaysShowMap;
|
||||
LimitedComboBox *_projection;
|
||||
#ifdef ENABLE_HIDPI
|
||||
QRadioButton *_hidpi;
|
||||
QRadioButton *_lodpi;
|
||||
|
@ -63,11 +63,11 @@ QList<GraphItem*> PowerGraph::loadData(const Data &data)
|
||||
qreal PowerGraph::avg() const
|
||||
{
|
||||
qreal sum = 0, w = 0;
|
||||
QList<QPointF>::const_iterator it;
|
||||
|
||||
for (it = _avg.begin(); it != _avg.end(); it++) {
|
||||
sum += it->y() * it->x();
|
||||
w += it->x();
|
||||
for (int i = 0; i < _avg.size(); i++) {
|
||||
const QPointF &p = _avg.at(i);
|
||||
sum += p.y() * p.x();
|
||||
w += p.x();
|
||||
}
|
||||
|
||||
return (sum / w);
|
||||
@ -77,7 +77,7 @@ void PowerGraph::clear()
|
||||
{
|
||||
_avg.clear();
|
||||
|
||||
GraphView::clear();
|
||||
GraphTab::clear();
|
||||
}
|
||||
|
||||
void PowerGraph::showTracks(bool show)
|
||||
|
@ -20,7 +20,7 @@ private:
|
||||
qreal max() const {return bounds().bottom();}
|
||||
void setInfo();
|
||||
|
||||
QList<QPointF> _avg;
|
||||
QVector<QPointF> _avg;
|
||||
|
||||
bool _showTracks;
|
||||
};
|
||||
|
@ -171,8 +171,8 @@
|
||||
#define SEPARATE_GRAPH_PAGE_DEFAULT false
|
||||
#define SLIDER_COLOR_SETTING "sliderColor"
|
||||
#define SLIDER_COLOR_DEFAULT QColor(Qt::red)
|
||||
#define ALWAYS_SHOW_MAP_SETTING "alwaysShowMap"
|
||||
#define ALWAYS_SHOW_MAP_DEFAULT true
|
||||
#define PROJECTION_SETTING "projection"
|
||||
#define PROJECTION_DEFAULT 3857
|
||||
#define HIDPI_MAP_SETTING "HiDPIMap"
|
||||
#define HIDPI_MAP_DEFAULT true
|
||||
|
||||
|
@ -74,12 +74,12 @@ QList<GraphItem*> SpeedGraph::loadData(const Data &data)
|
||||
qreal SpeedGraph::avg() const
|
||||
{
|
||||
qreal sum = 0, w = 0;
|
||||
QList<QPointF>::const_iterator it;
|
||||
const QList<QPointF> &list = (_timeType == Moving) ? _mavg : _avg;
|
||||
const QVector<QPointF> &vector = (_timeType == Moving) ? _mavg : _avg;
|
||||
|
||||
for (it = list.begin(); it != list.end(); it++) {
|
||||
sum += it->y() * it->x();
|
||||
w += it->x();
|
||||
for (int i = 0; i < vector.size(); i++) {
|
||||
const QPointF &p = vector.at(i);
|
||||
sum += p.y() * p.x();
|
||||
w += p.x();
|
||||
}
|
||||
|
||||
return (sum / w);
|
||||
@ -90,7 +90,7 @@ void SpeedGraph::clear()
|
||||
_avg.clear();
|
||||
_mavg.clear();
|
||||
|
||||
GraphView::clear();
|
||||
GraphTab::clear();
|
||||
}
|
||||
|
||||
void SpeedGraph::setYUnits()
|
||||
|
@ -24,8 +24,8 @@ private:
|
||||
void setYUnits();
|
||||
void setInfo();
|
||||
|
||||
QList<QPointF> _avg;
|
||||
QList<QPointF> _mavg;
|
||||
QVector<QPointF> _avg;
|
||||
QVector<QPointF> _mavg;
|
||||
|
||||
Units _units;
|
||||
TimeType _timeType;
|
||||
|
@ -66,11 +66,11 @@ QList<GraphItem*> TemperatureGraph::loadData(const Data &data)
|
||||
qreal TemperatureGraph::avg() const
|
||||
{
|
||||
qreal sum = 0, w = 0;
|
||||
QList<QPointF>::const_iterator it;
|
||||
|
||||
for (it = _avg.begin(); it != _avg.end(); it++) {
|
||||
sum += it->y() * it->x();
|
||||
w += it->x();
|
||||
for (int i = 0; i < _avg.size(); i++) {
|
||||
const QPointF &p = _avg.at(i);
|
||||
sum += p.y() * p.x();
|
||||
w += p.x();
|
||||
}
|
||||
|
||||
return (sum / w);
|
||||
@ -80,7 +80,7 @@ void TemperatureGraph::clear()
|
||||
{
|
||||
_avg.clear();
|
||||
|
||||
GraphView::clear();
|
||||
GraphTab::clear();
|
||||
}
|
||||
|
||||
void TemperatureGraph::setYUnits(Units units)
|
||||
|
@ -23,7 +23,7 @@ private:
|
||||
void setYUnits(Units units);
|
||||
void setInfo();
|
||||
|
||||
QList<QPointF> _avg;
|
||||
QVector<QPointF> _avg;
|
||||
|
||||
bool _showTracks;
|
||||
};
|
||||
|
@ -1,22 +1,43 @@
|
||||
#include <QImageReader>
|
||||
#include "tooltip.h"
|
||||
|
||||
|
||||
#define THUMBNAIL_MAX_SIZE 240
|
||||
|
||||
void ToolTip::insert(const QString &key, const QString &value)
|
||||
{
|
||||
_list.append(KV(key, value));
|
||||
}
|
||||
|
||||
QString ToolTip::toString()
|
||||
QString ToolTip::toString() const
|
||||
{
|
||||
if (_list.isEmpty())
|
||||
return QString();
|
||||
QString html;
|
||||
|
||||
QString ret = "<table>";
|
||||
if (_img.isValid()) {
|
||||
int width, height;
|
||||
if (_img.size().width() > _img.size().height()) {
|
||||
width = qMin(_img.size().width(), THUMBNAIL_MAX_SIZE);
|
||||
qreal ratio = _img.size().width() / (qreal)_img.size().height();
|
||||
height = (int)(width / ratio);
|
||||
} else {
|
||||
height = qMin(_img.size().height(), THUMBNAIL_MAX_SIZE);
|
||||
qreal ratio = _img.size().height() / (qreal)_img.size().width();
|
||||
width = (int)(height / ratio);
|
||||
}
|
||||
|
||||
for (int i = 0; i < _list.count(); i++)
|
||||
ret += "<tr><td align=\"right\"><b>" + _list.at(i).key()
|
||||
+ ": </b></td><td>" + _list.at(i).value() + "</td></tr>";
|
||||
html += "<div align=\"center\">";
|
||||
html += QString("<img src=\"file:%0\" width=\"%1\" height=\"%2\"/>")
|
||||
.arg(_img.path(), QString::number(width), QString::number(height));
|
||||
html += "</div>";
|
||||
}
|
||||
|
||||
ret += "</table>";
|
||||
if (!_list.isEmpty()) {
|
||||
html += "<table>";
|
||||
for (int i = 0; i < _list.count(); i++)
|
||||
html += "<tr><td align=\"right\"><b>" + _list.at(i).key()
|
||||
+ ": </b></td><td>" + _list.at(i).value() + "</td></tr>";
|
||||
html += "</table>";
|
||||
}
|
||||
|
||||
return ret;
|
||||
return html;
|
||||
}
|
||||
|
@ -4,15 +4,18 @@
|
||||
#include <QString>
|
||||
#include <QList>
|
||||
#include "common/kv.h"
|
||||
#include "data/imageinfo.h"
|
||||
|
||||
class ToolTip
|
||||
{
|
||||
public:
|
||||
void insert(const QString &key, const QString &value);
|
||||
QString toString();
|
||||
void setImage(const ImageInfo &image) {_img = image;}
|
||||
QString toString() const;
|
||||
|
||||
private:
|
||||
QList<KV> _list;
|
||||
ImageInfo _img;
|
||||
};
|
||||
|
||||
#endif // TOOLTIP_H
|
||||
|
@ -18,15 +18,16 @@ QString WaypointItem::toolTip(Units units, CoordinatesFormat format)
|
||||
tt.insert(qApp->translate("WaypointItem", "Name"), _waypoint.name());
|
||||
tt.insert(qApp->translate("WaypointItem", "Coordinates"),
|
||||
Format::coordinates(_waypoint.coordinates(), format));
|
||||
if (!std::isnan(_waypoint.elevation()))
|
||||
if (_waypoint.hasElevation())
|
||||
tt.insert(qApp->translate("WaypointItem", "Elevation"),
|
||||
Format::elevation(_waypoint.elevation(), units));
|
||||
if (!_waypoint.timestamp().isNull())
|
||||
if (_waypoint.timestamp().isValid())
|
||||
tt.insert(qApp->translate("WaypointItem", "Date"),
|
||||
_waypoint.timestamp().toString(Qt::SystemLocaleShortDate));
|
||||
if (!_waypoint.description().isNull())
|
||||
if (!_waypoint.description().isEmpty())
|
||||
tt.insert(qApp->translate("WaypointItem", "Description"),
|
||||
_waypoint.description());
|
||||
tt.setImage(_waypoint.image());
|
||||
|
||||
return tt.toString();
|
||||
}
|
||||
|
@ -14,4 +14,8 @@
|
||||
#define ENABLE_HIDPI
|
||||
#endif // QT >= 5.6
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
||||
#define ENABLE_GEOJSON
|
||||
#endif // QT >= 5.0
|
||||
|
||||
#endif /* CONFIG_H */
|
||||
|
@ -9,9 +9,11 @@
|
||||
#define DEM_DIR "DEM"
|
||||
#define TILES_DIR "tiles"
|
||||
#define TRANSLATIONS_DIR "translations"
|
||||
#define STYLE_DIR "style"
|
||||
#define ELLIPSOID_FILE "ellipsoids.csv"
|
||||
#define GCS_FILE "gcs.csv"
|
||||
#define PCS_FILE "pcs.csv"
|
||||
#define TYP_FILE "style.typ"
|
||||
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0)
|
||||
@ -31,7 +33,7 @@
|
||||
#else
|
||||
#define USER_DIR QDir::homePath() + QString("/.local/share/") \
|
||||
+ qApp->applicationName()
|
||||
#define GLOBAL_DIR QString("/usr/share/") + qApp->applicationName()
|
||||
#define GLOBAL_DIR QString(PREFIX "/share/") + qApp->applicationName()
|
||||
#endif
|
||||
|
||||
static QString dir(const QString &dirName, bool writable = false)
|
||||
@ -79,6 +81,11 @@ QString ProgramPaths::demDir(bool writable)
|
||||
return dir(DEM_DIR, writable);
|
||||
}
|
||||
|
||||
QString ProgramPaths::styleDir(bool writable)
|
||||
{
|
||||
return dir(STYLE_DIR, writable);
|
||||
}
|
||||
|
||||
QString ProgramPaths::tilesDir()
|
||||
{
|
||||
#if defined(Q_OS_WIN32)
|
||||
@ -113,6 +120,11 @@ QString ProgramPaths::pcsFile()
|
||||
return file(dir(CSV_DIR), PCS_FILE);
|
||||
}
|
||||
|
||||
QString ProgramPaths::typFile()
|
||||
{
|
||||
return file(dir(STYLE_DIR), TYP_FILE);
|
||||
}
|
||||
|
||||
#else // QT_VERSION < 5
|
||||
|
||||
#include <QStandardPaths>
|
||||
@ -157,6 +169,16 @@ QString ProgramPaths::demDir(bool writable)
|
||||
DEM_DIR, QStandardPaths::LocateDirectory);
|
||||
}
|
||||
|
||||
QString ProgramPaths::styleDir(bool writable)
|
||||
{
|
||||
if (writable)
|
||||
return QDir(QStandardPaths::writableLocation(
|
||||
QStandardPaths::AppDataLocation)).filePath(STYLE_DIR);
|
||||
else
|
||||
return QStandardPaths::locate(QStandardPaths::AppDataLocation,
|
||||
STYLE_DIR, QStandardPaths::LocateDirectory);
|
||||
}
|
||||
|
||||
QString ProgramPaths::tilesDir()
|
||||
{
|
||||
return QDir(QStandardPaths::writableLocation(
|
||||
@ -187,4 +209,10 @@ QString ProgramPaths::pcsFile()
|
||||
CSV_DIR "/" PCS_FILE, QStandardPaths::LocateFile);
|
||||
}
|
||||
|
||||
QString ProgramPaths::typFile()
|
||||
{
|
||||
return QStandardPaths::locate(QStandardPaths::AppDataLocation,
|
||||
STYLE_DIR "/" TYP_FILE, QStandardPaths::LocateFile);
|
||||
}
|
||||
|
||||
#endif // QT_VERSION < 5
|
||||
|
@ -9,11 +9,13 @@ namespace ProgramPaths
|
||||
QString poiDir(bool writable = false);
|
||||
QString csvDir(bool writable = false);
|
||||
QString demDir(bool writable = false);
|
||||
QString styleDir(bool writable = false);
|
||||
QString tilesDir();
|
||||
QString translationsDir();
|
||||
QString ellipsoidsFile();
|
||||
QString gcsFile();
|
||||
QString pcsFile();
|
||||
QString typFile();
|
||||
}
|
||||
|
||||
#endif // PROGRAMPATHS_H
|
||||
|
@ -20,10 +20,10 @@ RectC::RectC(const Coordinates ¢er, double radius)
|
||||
double deltaLon = asin(sin(radDist) / cos(radlat));
|
||||
minLon = radLon - deltaLon;
|
||||
if (minLon < MIN_LON)
|
||||
minLon += M_2_PI;
|
||||
minLon += 2 * M_PI;
|
||||
maxLon = radLon + deltaLon;
|
||||
if (maxLon > MAX_LON)
|
||||
maxLon -= M_2_PI;
|
||||
maxLon -= 2 * M_PI;
|
||||
} else {
|
||||
// a pole is within the distance
|
||||
minLat = qMax(minLat, MIN_LAT);
|
||||
|
@ -28,6 +28,11 @@ public:
|
||||
double left() const {return _tl.lon();}
|
||||
double right() const {return _br.lon();}
|
||||
|
||||
void setLeft(double val) {_tl.rlon() = val;}
|
||||
void setRight(double val) {_br.rlon() = val;}
|
||||
void setTop(double val) {_tl.rlat() = val;}
|
||||
void setBottom(double val) {_br.rlat() = val;}
|
||||
|
||||
RectC operator|(const RectC &r) const;
|
||||
RectC &operator|=(const RectC &r) {*this = *this | r; return *this;}
|
||||
RectC operator&(const RectC &r) const;
|
||||
@ -35,6 +40,13 @@ public:
|
||||
|
||||
RectC united(const Coordinates &c) const;
|
||||
|
||||
bool intersects(const RectC &r) const
|
||||
{return (right() >= r.left() && bottom() <= r.top() && left() <= r.right()
|
||||
&& top() >= r.bottom());}
|
||||
bool contains(const Coordinates&c) const
|
||||
{return (c.lon() >= left() && c.lon() <= right() && c.lat() <= top()
|
||||
&& c.lat() >= bottom());}
|
||||
|
||||
private:
|
||||
Coordinates _tl, _br;
|
||||
};
|
||||
|