mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Code cleanup
This commit is contained in:
parent
241ecb36f2
commit
5b83f1b86b
@ -14,4 +14,8 @@
|
|||||||
#define ENABLE_HIDPI
|
#define ENABLE_HIDPI
|
||||||
#endif // QT >= 5.6
|
#endif // QT >= 5.6
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
||||||
|
#define ENABLE_GEOJSON
|
||||||
|
#endif // QT >= 5.0
|
||||||
|
|
||||||
#endif /* CONFIG_H */
|
#endif /* CONFIG_H */
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QLineF>
|
#include <QLineF>
|
||||||
|
#include "common/config.h"
|
||||||
#include "gpxparser.h"
|
#include "gpxparser.h"
|
||||||
#include "tcxparser.h"
|
#include "tcxparser.h"
|
||||||
#include "csvparser.h"
|
#include "csvparser.h"
|
||||||
@ -12,9 +13,9 @@
|
|||||||
#include "oziparsers.h"
|
#include "oziparsers.h"
|
||||||
#include "locparser.h"
|
#include "locparser.h"
|
||||||
#include "slfparser.h"
|
#include "slfparser.h"
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
#ifdef ENABLE_GEOJSON
|
||||||
#include "geojsonparser.h"
|
#include "geojsonparser.h"
|
||||||
#endif // QT 5
|
#endif // ENABLE_GEOJSON
|
||||||
#include "exifparser.h"
|
#include "exifparser.h"
|
||||||
#include "dem.h"
|
#include "dem.h"
|
||||||
#include "data.h"
|
#include "data.h"
|
||||||
@ -32,9 +33,9 @@ static WPTParser wpt;
|
|||||||
static RTEParser rte;
|
static RTEParser rte;
|
||||||
static LOCParser loc;
|
static LOCParser loc;
|
||||||
static SLFParser slf;
|
static SLFParser slf;
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
#ifdef ENABLE_GEOJSON
|
||||||
static GeoJSONParser geojson;
|
static GeoJSONParser geojson;
|
||||||
#endif // QT 5
|
#endif // ENABLE_GEOJSON
|
||||||
static EXIFParser exif;
|
static EXIFParser exif;
|
||||||
|
|
||||||
static QHash<QString, Parser*> parsers()
|
static QHash<QString, Parser*> parsers()
|
||||||
@ -53,10 +54,10 @@ static QHash<QString, Parser*> parsers()
|
|||||||
hash.insert("rte", &rte);
|
hash.insert("rte", &rte);
|
||||||
hash.insert("loc", &loc);
|
hash.insert("loc", &loc);
|
||||||
hash.insert("slf", &slf);
|
hash.insert("slf", &slf);
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
#ifdef ENABLE_GEOJSON
|
||||||
hash.insert("json", &geojson);
|
hash.insert("json", &geojson);
|
||||||
hash.insert("geojson", &geojson);
|
hash.insert("geojson", &geojson);
|
||||||
#endif // QT 5
|
#endif // ENABLE_GEOJSON
|
||||||
hash.insert("jpeg", &exif);
|
hash.insert("jpeg", &exif);
|
||||||
hash.insert("jpg", &exif);
|
hash.insert("jpg", &exif);
|
||||||
|
|
||||||
@ -147,9 +148,9 @@ QString Data::formats()
|
|||||||
qApp->translate("Data", "Supported files") + " (" + supported + ");;"
|
qApp->translate("Data", "Supported files") + " (" + supported + ");;"
|
||||||
+ qApp->translate("Data", "CSV files") + " (*.csv);;"
|
+ qApp->translate("Data", "CSV files") + " (*.csv);;"
|
||||||
+ qApp->translate("Data", "FIT files") + " (*.fit);;"
|
+ qApp->translate("Data", "FIT files") + " (*.fit);;"
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
#ifdef ENABLE_GEOJSON
|
||||||
+ qApp->translate("Data", "GeoJSON files") + " (*.geojson *.json);;"
|
+ qApp->translate("Data", "GeoJSON files") + " (*.geojson *.json);;"
|
||||||
#endif // QT5
|
#endif // ENABLE_GEOJSON
|
||||||
+ qApp->translate("Data", "GPX files") + " (*.gpx);;"
|
+ qApp->translate("Data", "GPX files") + " (*.gpx);;"
|
||||||
+ qApp->translate("Data", "IGC files") + " (*.igc);;"
|
+ qApp->translate("Data", "IGC files") + " (*.igc);;"
|
||||||
+ qApp->translate("Data", "JPEG images") + " (*.jpg *.jpeg);;"
|
+ qApp->translate("Data", "JPEG images") + " (*.jpg *.jpeg);;"
|
||||||
|
Loading…
Reference in New Issue
Block a user