1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-04-21 04:39:10 +02:00

Compare commits

...

6 Commits

Author SHA1 Message Date
3b6e6c03a7 Fix the module name 2023-02-01 22:57:41 +01:00
a1a6fade92 Update the CI configurations to fetch the Qt serialport module 2023-02-01 22:54:59 +01:00
c001235e91 Code cleanup 2023-02-01 22:49:03 +01:00
c01b9da10c Version++
As we require the serialport Qt plugin now, increase the major number.
2023-02-01 22:41:57 +01:00
e4d42453a0 Require the serialport Qt module
The serialport module is a dependency of the nmea positioning plugin. Without
being explicitly specified, the Qt deploy tools skip the nmea positioning plugin
when creating the application package.
2023-02-01 22:36:41 +01:00
d6d316676c Properly use the default positioning plugin as the default option 2023-02-01 22:26:36 +01:00
10 changed files with 53 additions and 16 deletions

View File

@ -1,4 +1,4 @@
version: 11.12.{build} version: 12.0.{build}
configuration: configuration:
- Release - Release

View File

@ -37,7 +37,7 @@ jobs:
version: '6.4.0' version: '6.4.0'
target: 'android' target: 'android'
arch: 'android_armv7' arch: 'android_armv7'
modules: qtpositioning qt5compat modules: qtpositioning qt5compat qtserialport
- name: Install Android OpenSSL - name: Install Android OpenSSL
run: git clone https://github.com/KDAB/android_openssl.git run: git clone https://github.com/KDAB/android_openssl.git
- name: Create localization - name: Create localization

View File

@ -15,7 +15,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install qtbase5-dev qtbase5-private-dev qtbase5-dev-tools qt5-qmake qttools5-dev-tools libqt5opengl5-dev qtpositioning5-dev libqt5svg5-dev sudo apt-get install qtbase5-dev qtbase5-private-dev qtbase5-dev-tools qt5-qmake qttools5-dev-tools libqt5opengl5-dev qtpositioning5-dev libqt5svg5-dev libqt5serialport5-dev
- name: Create localization - name: Create localization
run: lrelease gpxsee.pro run: lrelease gpxsee.pro
- name: Configure build - name: Configure build

View File

@ -3,7 +3,7 @@ unix:!macx:!android {
} else { } else {
TARGET = GPXSee TARGET = GPXSee
} }
VERSION = 11.12 VERSION = 12.0
QT += core \ QT += core \
gui \ gui \
@ -14,7 +14,8 @@ QT += core \
widgets \ widgets \
printsupport \ printsupport \
positioning \ positioning \
svg svg \
serialport
greaterThan(QT_MAJOR_VERSION, 5) { greaterThan(QT_MAJOR_VERSION, 5) {
QT += openglwidgets \ QT += openglwidgets \
core5compat core5compat
@ -263,6 +264,7 @@ SOURCES += src/main.cpp \
src/GUI/motioninfoitem.cpp \ src/GUI/motioninfoitem.cpp \
src/GUI/navigationwidget.cpp \ src/GUI/navigationwidget.cpp \
src/GUI/pluginparameters.cpp \ src/GUI/pluginparameters.cpp \
src/GUI/settings.cpp \
src/common/coordinates.cpp \ src/common/coordinates.cpp \
src/common/rectc.cpp \ src/common/rectc.cpp \
src/common/range.cpp \ src/common/range.cpp \

View File

@ -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 "11.12" !define VERSION "12.0"
; The file to write ; The file to write
OutFile "GPXSee-${VERSION}_x64.exe" OutFile "GPXSee-${VERSION}_x64.exe"

View File

@ -2641,8 +2641,8 @@ void GUI::writeSettings()
settings.setValue(DEM_USERNAME_SETTING, _options.demUsername); settings.setValue(DEM_USERNAME_SETTING, _options.demUsername);
if (_options.demPassword != DEM_PASSWORD_DEFAULT) if (_options.demPassword != DEM_PASSWORD_DEFAULT)
settings.setValue(DEM_PASSWORD_SETTING, _options.demPassword); settings.setValue(DEM_PASSWORD_SETTING, _options.demPassword);
// the plugins order is random so always store the value if (_options.plugin != POSITION_PLUGIN_DEFAULT)
settings.setValue(POSITION_PLUGIN_SETTING, _options.plugin); settings.setValue(POSITION_PLUGIN_SETTING, _options.plugin);
index = 0; index = 0;
for (QMap<QString, QVariantMap>::const_iterator it for (QMap<QString, QVariantMap>::const_iterator it
= _options.pluginParams.constBegin(); = _options.pluginParams.constBegin();

View File

@ -2,6 +2,7 @@
#define MARKERINFOITEM_H #define MARKERINFOITEM_H
#include <QGraphicsItem> #include <QGraphicsItem>
#include <QFont>
#include "format.h" #include "format.h"
class Coordinates; class Coordinates;

21
src/GUI/settings.cpp Normal file
View File

@ -0,0 +1,21 @@
#include <QGeoPositionInfoSource>
#include "settings.h"
static QString defaultPlugin()
{
QString source;
QGeoPositionInfoSource *ps = QGeoPositionInfoSource::createDefaultSource(0);
if (ps) {
source = ps->sourceName();
delete ps;
}
return source;
}
const QString &Settings::positionPlugin()
{
static QString plugin(defaultPlugin());
return plugin;
}

View File

@ -1,14 +1,21 @@
#ifndef SETTINGS_H #ifndef SETTINGS_H
#define SETTINGS_H #define SETTINGS_H
#include <QtGlobal> #include <QLocale>
#include <QDir>
#include <QPageLayout>
#include <QPageSize>
#include "common/config.h" #include "common/config.h"
#include "common/util.h"
#include "data/graph.h"
#include "format.h"
#include "units.h"
#include "timetype.h"
#include "markerinfoitem.h"
#define IMPERIAL_UNITS() \ #define IMPERIAL_UNITS() \
(QLocale::system().measurementSystem() == QLocale::ImperialSystem) (QLocale::system().measurementSystem() == QLocale::ImperialSystem)
#define POSITION_PLUGIN() \
(QGeoPositionInfoSource::availableSources().isEmpty() \
? "" : QGeoPositionInfoSource::availableSources().first())
#define CURRENT_PATH(filename) \ #define CURRENT_PATH(filename) \
QDir::current().filePath(filename) QDir::current().filePath(filename)
@ -214,7 +221,7 @@
#define DEM_PASSWORD_SETTING "demPassword" #define DEM_PASSWORD_SETTING "demPassword"
#define DEM_PASSWORD_DEFAULT "" #define DEM_PASSWORD_DEFAULT ""
#define POSITION_PLUGIN_SETTING "positionPlugin" #define POSITION_PLUGIN_SETTING "positionPlugin"
#define POSITION_PLUGIN_DEFAULT POSITION_PLUGIN() #define POSITION_PLUGIN_DEFAULT Settings::positionPlugin()
#define POSITION_PLUGIN_PARAMS_PREFIX "pluginParameters" #define POSITION_PLUGIN_PARAMS_PREFIX "pluginParameters"
#define POSITION_PLUGIN_PARAMS_PLUGIN "plugin" #define POSITION_PLUGIN_PARAMS_PLUGIN "plugin"
#define POSITION_PLUGIN_PARAMS_PARAM "parameters" #define POSITION_PLUGIN_PARAMS_PARAM "parameters"
@ -255,10 +262,15 @@
#define HIDPI_MAP_SETTING "HiDPIMap" #define HIDPI_MAP_SETTING "HiDPIMap"
#define HIDPI_MAP_DEFAULT true #define HIDPI_MAP_DEFAULT true
#define DATA_PATH_SETTING "dataPath" #define DATA_PATH_SETTING "dataPath"
#define DATA_PATH_DEFAULT QString() #define DATA_PATH_DEFAULT ""
#define MAPS_PATH_SETTING "mapsPath" #define MAPS_PATH_SETTING "mapsPath"
#define MAPS_PATH_DEFAULT QString() #define MAPS_PATH_DEFAULT ""
#define POI_PATH_SETTING "poiPath" #define POI_PATH_SETTING "poiPath"
#define POI_PATH_DEFAULT QString() #define POI_PATH_DEFAULT ""
namespace Settings
{
const QString &positionPlugin();
}
#endif // SETTINGS_H #endif // SETTINGS_H

View File

@ -3,6 +3,7 @@
#include <QList> #include <QList>
#include <QVector> #include <QVector>
#include <QColor>
#include <QDebug> #include <QDebug>
#include <cmath> #include <cmath>