mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-06-27 03:29:16 +02:00
Added support for waypoint icons
This commit is contained in:
23
src/common/color.h
Normal file
23
src/common/color.h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef COLOR_H
|
||||
#define COLOR_H
|
||||
|
||||
#include <QColor>
|
||||
|
||||
namespace Color
|
||||
{
|
||||
inline QRgb bgr2rgb(quint32 bgr)
|
||||
{
|
||||
quint32 b = (bgr & 0x000000FF);
|
||||
quint32 g = (bgr & 0x0000FF00) >> 8;
|
||||
quint32 r = (bgr & 0x00FF0000) >> 16;
|
||||
|
||||
return (0xFF000000 | r << 16 | g << 8 | b);
|
||||
}
|
||||
|
||||
inline QRgb rgb(quint32 r, quint32 g, quint32 b)
|
||||
{
|
||||
return (0xFF000000 | r << 16 | g << 8 | b);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // COLOR_H
|
@ -11,6 +11,8 @@
|
||||
#define TILES_DIR "tiles"
|
||||
#define TRANSLATIONS_DIR "translations"
|
||||
#define STYLE_DIR "style"
|
||||
#define SYMBOLS_DIR "symbols"
|
||||
|
||||
#define ELLIPSOID_FILE "ellipsoids.csv"
|
||||
#define GCS_FILE "gcs.csv"
|
||||
#define PCS_FILE "pcs.csv"
|
||||
@ -68,6 +70,16 @@ QString ProgramPaths::styleDir(bool writable)
|
||||
STYLE_DIR, QStandardPaths::LocateDirectory);
|
||||
}
|
||||
|
||||
QString ProgramPaths::symbolsDir(bool writable)
|
||||
{
|
||||
if (writable)
|
||||
return QDir(QStandardPaths::writableLocation(
|
||||
QStandardPaths::AppDataLocation)).filePath(SYMBOLS_DIR);
|
||||
else
|
||||
return QStandardPaths::locate(QStandardPaths::AppDataLocation,
|
||||
SYMBOLS_DIR, QStandardPaths::LocateDirectory);
|
||||
}
|
||||
|
||||
QString ProgramPaths::tilesDir()
|
||||
{
|
||||
return QDir(QStandardPaths::writableLocation(
|
||||
|
@ -10,6 +10,7 @@ namespace ProgramPaths
|
||||
QString csvDir(bool writable = false);
|
||||
QString demDir(bool writable = false);
|
||||
QString styleDir(bool writable = false);
|
||||
QString symbolsDir(bool writable = false);
|
||||
QString tilesDir();
|
||||
QString translationsDir();
|
||||
QString ellipsoidsFile();
|
||||
|
Reference in New Issue
Block a user