mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-06-27 11:39:16 +02:00
Use a new/better location for the CRS data
This commit is contained in:
@ -904,8 +904,8 @@ void GUI::paths()
|
||||
+ QDir::cleanPath(ProgramPaths::mapDir(true)) + "<br><br><b>"
|
||||
+ tr("POI directory:") + "</b><br>"
|
||||
+ QDir::cleanPath(ProgramPaths::poiDir(true)) + "<br><br><b>"
|
||||
+ tr("GCS/PCS directory:") + "</b><br>"
|
||||
+ QDir::cleanPath(ProgramPaths::csvDir(true)) + "<br><br><b>"
|
||||
+ tr("CRS directory:") + "</b><br>"
|
||||
+ QDir::cleanPath(ProgramPaths::crsDir(true)) + "<br><br><b>"
|
||||
+ tr("DEM directory:") + "</b><br>"
|
||||
+ QDir::cleanPath(ProgramPaths::demDir(true)) + "<br><br><b>"
|
||||
+ tr("Styles directory:") + "</b><br>"
|
||||
@ -922,8 +922,8 @@ void GUI::paths()
|
||||
+ QDir::cleanPath(ProgramPaths::mapDir(true)) + "</code></td></tr><tr><td>"
|
||||
+ tr("POI directory:") + "</td><td><code>"
|
||||
+ QDir::cleanPath(ProgramPaths::poiDir(true)) + "</code></td></tr><tr><td>"
|
||||
+ tr("GCS/PCS directory:") + "</td><td><code>"
|
||||
+ QDir::cleanPath(ProgramPaths::csvDir(true)) + "</code></td></tr><tr><td>"
|
||||
+ tr("CRS directory:") + "</td><td><code>"
|
||||
+ QDir::cleanPath(ProgramPaths::crsDir(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>"
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#define MAP_DIR "maps"
|
||||
#define POI_DIR "POI"
|
||||
#define CSV_DIR "csv"
|
||||
#define CRS_DIR "CRS"
|
||||
#define DEM_DIR "DEM"
|
||||
#define TILES_DIR "tiles"
|
||||
#define TRANSLATIONS_DIR "translations"
|
||||
@ -63,17 +63,17 @@ QString ProgramPaths::poiDir(bool writable)
|
||||
QStandardPaths::LocateDirectory);
|
||||
}
|
||||
|
||||
QString ProgramPaths::csvDir(bool writable)
|
||||
QString ProgramPaths::crsDir(bool writable)
|
||||
{
|
||||
if (writable)
|
||||
return QDir(QStandardPaths::writableLocation(DATA_LOCATION))
|
||||
.filePath(CSV_DIR);
|
||||
.filePath(CRS_DIR);
|
||||
else
|
||||
#ifdef Q_OS_ANDROID
|
||||
return assetsPath(QStandardPaths::locate(DATA_LOCATION, CSV_DIR,
|
||||
QStandardPaths::LocateDirectory), CSV_DIR);
|
||||
#else // Q_OS_ANDROID
|
||||
return QStandardPaths::locate(DATA_LOCATION, CSV_DIR,
|
||||
return QStandardPaths::locate(DATA_LOCATION, CRS_DIR,
|
||||
QStandardPaths::LocateDirectory);
|
||||
#endif // Q_OS_ANDROID
|
||||
}
|
||||
@ -132,22 +132,22 @@ QString ProgramPaths::translationsDir()
|
||||
|
||||
QString ProgramPaths::ellipsoidsFile()
|
||||
{
|
||||
return QDir(csvDir()).filePath(ELLIPSOIDS_FILE);
|
||||
return QDir(crsDir()).filePath(ELLIPSOIDS_FILE);
|
||||
}
|
||||
|
||||
QString ProgramPaths::gcsFile()
|
||||
{
|
||||
return QDir(csvDir()).filePath(GCS_FILE);
|
||||
return QDir(crsDir()).filePath(GCS_FILE);
|
||||
}
|
||||
|
||||
QString ProgramPaths::projectionsFile()
|
||||
{
|
||||
return QDir(csvDir()).filePath(PROJECTIONS_FILE);
|
||||
return QDir(crsDir()).filePath(PROJECTIONS_FILE);
|
||||
}
|
||||
|
||||
QString ProgramPaths::pcsFile()
|
||||
{
|
||||
return QDir(csvDir()).filePath(PCS_FILE);
|
||||
return QDir(crsDir()).filePath(PCS_FILE);
|
||||
}
|
||||
|
||||
QString ProgramPaths::typFile()
|
||||
|
@ -7,7 +7,7 @@ namespace ProgramPaths
|
||||
{
|
||||
QString mapDir(bool writable = false);
|
||||
QString poiDir(bool writable = false);
|
||||
QString csvDir(bool writable = false);
|
||||
QString crsDir(bool writable = false);
|
||||
QString demDir(bool writable = false);
|
||||
QString styleDir(bool writable = false);
|
||||
QString symbolsDir(bool writable = false);
|
||||
|
Reference in New Issue
Block a user