mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 03:35:53 +01:00
Added fog signals rendering
This commit is contained in:
parent
416bd3472f
commit
f057ebdbb7
@ -195,6 +195,8 @@
|
||||
<file alias="overfalls.png">icons/map/marine/overfalls.png</file>
|
||||
<file alias="boarding-place.png">icons/map/marine/boarding-place.png</file>
|
||||
<file alias="light.png">icons/map/marine/light.png</file>
|
||||
<file alias="building.png">icons/map/marine/building.png</file>
|
||||
<file alias="fog-signal.png">icons/map/marine/fog-signal.png</file>
|
||||
</qresource>
|
||||
|
||||
<!-- Mapsforge rendertheme -->
|
||||
|
BIN
icons/map/marine/building.png
Normal file
BIN
icons/map/marine/building.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 108 B |
BIN
icons/map/marine/fog-signal.png
Normal file
BIN
icons/map/marine/fog-signal.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 225 B |
@ -20,6 +20,7 @@ static QMap<uint,uint> orderMapInit()
|
||||
QMap<uint,uint> map;
|
||||
|
||||
map.insert(TYPE(LIGHTS), 0);
|
||||
map.insert(TYPE(FOGSIG), 0);
|
||||
|
||||
map.insert(TYPE(CGUSTA), 1);
|
||||
map.insert(SUBTYPE(BUAARE, 1), 2);
|
||||
|
@ -39,6 +39,7 @@
|
||||
#define FNCLNE 52
|
||||
#define FERYRT 53
|
||||
#define FLODOC 57
|
||||
#define FOGSIG 58
|
||||
#define GATCON 61
|
||||
#define HRBFAC 64
|
||||
#define HULKES 65
|
||||
|
@ -57,6 +57,12 @@ static const QImage *light()
|
||||
return &img;
|
||||
}
|
||||
|
||||
static const QImage *signal()
|
||||
{
|
||||
static QImage img(":/marine/fog-signal.png");
|
||||
return &img;
|
||||
}
|
||||
|
||||
static const Style& style()
|
||||
{
|
||||
static Style s;
|
||||
@ -277,16 +283,18 @@ void RasterTile::processPoints(QList<TextItem*> &textItems,
|
||||
QList<TextItem*> &lights, QList<QImage*> &images)
|
||||
{
|
||||
const Style &s = style();
|
||||
PointMap lightsMap;
|
||||
PointMap lightsMap, signalsMap;
|
||||
int i;
|
||||
|
||||
std::sort(_points.begin(), _points.end(), pointLess);
|
||||
|
||||
/* Lights */
|
||||
/* Lights & Signals */
|
||||
for (i = 0; i < _points.size(); i++) {
|
||||
const MapData::Point *point = _points.at(i);
|
||||
if (point->type()>>16 == LIGHTS)
|
||||
lightsMap.insert(point->pos(), point);
|
||||
else if (point->type()>>16 == FOGSIG)
|
||||
signalsMap.insert(point->pos(), point);
|
||||
else
|
||||
break;
|
||||
}
|
||||
@ -315,10 +323,10 @@ void RasterTile::processPoints(QList<TextItem*> &textItems,
|
||||
textItems.append(item);
|
||||
if (rimg)
|
||||
images.append(rimg);
|
||||
const PointMap::const_iterator it = lightsMap.find(point->pos());
|
||||
if (it != lightsMap.constEnd())
|
||||
lights.append(new TextPointItem(pos, 0, 0, light(), 0, 0, 0,
|
||||
ICON_PADDING));
|
||||
if (lightsMap.contains(point->pos()))
|
||||
lights.append(new TextPointItem(pos, 0, 0, light(), 0, 0, 0, 0));
|
||||
if (signalsMap.contains(point->pos()))
|
||||
lights.append(new TextPointItem(pos, 0, 0, signal(), 0, 0, 0, 0));
|
||||
} else {
|
||||
delete item;
|
||||
delete rimg;
|
||||
|
@ -183,7 +183,6 @@ void Style::pointStyle()
|
||||
_points[SUBTYPE(BUAARE, 0)].setTextFontSize(Small);
|
||||
_points[TYPE(SOUNDG)].setTextFontSize(Small);
|
||||
_points[TYPE(SOUNDG)].setHaloColor(QColor());
|
||||
_points[TYPE(LIGHTS)] = Point(QImage(":/marine/light-major.png"), Small);
|
||||
_points[TYPE(BOYCAR)] = Point(QImage(":/marine/buoy.png"), Small);
|
||||
_points[TYPE(BOYINB)] = Point(QImage(":/marine/buoy.png"), Small);
|
||||
_points[TYPE(BOYISD)] = Point(QImage(":/marine/buoy.png"), Small);
|
||||
@ -270,6 +269,7 @@ void Style::pointStyle()
|
||||
_points[SUBTYPE(SMCFAC, 20)] = Point(QImage(":/POI/telephone-11.png"));
|
||||
_points[SUBTYPE(SMCFAC, 22)] = Point(QImage(":/POI/parking-11.png"));
|
||||
_points[SUBTYPE(SMCFAC, 25)] = Point(QImage(":/POI/campsite-11.png"));
|
||||
_points[TYPE(BUISGL)] = Point(QImage(":/marine/building.png"));
|
||||
_points[SUBTYPE(BUISGL, 2)] = Point(QImage(":/POI/harbor-11.png"));
|
||||
_points[SUBTYPE(BUISGL, 5)] = Point(QImage(":/POI/hospital-11.png"));
|
||||
_points[SUBTYPE(BUISGL, 6)] = Point(QImage(":/POI/post-11.png"));
|
||||
@ -280,6 +280,7 @@ void Style::pointStyle()
|
||||
_points[SUBTYPE(BUISGL, 20)] = Point(QImage(":/POI/religious-christian-11.png"));
|
||||
_points[SUBTYPE(BUISGL, 22)] = Point(QImage(":/POI/religious-jewish-11.png"));
|
||||
_points[SUBTYPE(BUISGL, 26)] = Point(QImage(":/POI/religious-muslim-11.png"));
|
||||
_points[SUBTYPE(BUISGL, 33)] = Point(QImage(":/marine/pylon.png"));
|
||||
_points[SUBTYPE(BUISGL, 42)] = Point(QImage(":/POI/bus-11.png"));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user