Code cleanup
[GPXSee.git] / src / config.h
blob3f078f44a00e6e75a9a2d4ef0af4c8baaaea509c
1 #ifndef CONFIG_H
2 #define CONFIG_H
4 #include <QtGlobal>
5 #include <QDir>
6 #include <QApplication>
7 #include <QString>
9 #define APP_NAME "GPXSee"
10 #define APP_HOMEPAGE "http://www.gpxsee.org"
12 #define FONT_FAMILY "Arial"
13 #define FONT_SIZE 12 // px
15 #define MAP_DIR QString("maps")
16 #define POI_DIR QString("POI")
17 #define CSV_DIR QString("csv")
18 #define ELLIPSOID_FILE QString("ellipsoids.csv")
19 #define GCS_FILE QString("gcs.csv")
20 #define PCS_FILE QString("pcs.csv")
22 #if defined(Q_OS_WIN32)
23 #define USER_DIR QDir::homePath() + QString("/GPXSee")
24 #define GLOBAL_DIR QApplication::applicationDirPath()
25 #elif defined(Q_OS_MAC)
26 #define USER_DIR QDir::homePath() + QString("/.gpxsee")
27 #define GLOBAL_DIR QApplication::applicationDirPath() \
28 + QString("/../Resources")
29 #else
30 #define USER_DIR QDir::homePath() + QString("/.gpxsee")
31 #define GLOBAL_DIR QString("/usr/share/gpxsee")
32 #endif
34 #define USER_CSV_DIR USER_DIR + QString("/") + CSV_DIR
35 #define USER_ELLIPSOID_FILE USER_CSV_DIR + QString("/") + ELLIPSOID_FILE
36 #define USER_GCS_FILE USER_CSV_DIR + QString("/") + GCS_FILE
37 #define USER_PCS_FILE USER_CSV_DIR + QString("/") + PCS_FILE
38 #define USER_MAP_DIR USER_DIR + QString("/") + MAP_DIR
39 #define USER_POI_DIR USER_DIR + QString("/") + POI_DIR
40 #define GLOBAL_CSV_DIR GLOBAL_DIR + QString("/") + CSV_DIR
41 #define GLOBAL_ELLIPSOID_FILE GLOBAL_CSV_DIR + QString("/") + ELLIPSOID_FILE
42 #define GLOBAL_GCS_FILE GLOBAL_CSV_DIR + QString("/") + GCS_FILE
43 #define GLOBAL_PCS_FILE GLOBAL_CSV_DIR + QString("/") + PCS_FILE
44 #define GLOBAL_MAP_DIR GLOBAL_DIR + QString("/") + MAP_DIR
45 #define GLOBAL_POI_DIR GLOBAL_DIR + QString("/") + POI_DIR
46 #define TILES_DIR USER_DIR + QString("/tiles")
47 #define TRANSLATIONS_DIR GLOBAL_DIR + QString("/translations")
50 #if QT_VERSION >= QT_VERSION_CHECK(5, 10, 1)
51 #define ENABLE_HTTP2
52 #endif // QT >= 5.10.1
54 #if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
55 #define ENABLE_HIDPI
56 #endif // QT >= 5.6
58 #endif /* CONFIG_H */