mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-03-14 02:57:45 +01:00
Code cleanup
This commit is contained in:
parent
8ea84c5c86
commit
64b29f8aac
@ -266,9 +266,8 @@ void RasterTile::processPoints(const QList<Data::Point> &points,
|
|||||||
QList<TextItem*> &textItems, QList<TextItem*> &lights,
|
QList<TextItem*> &textItems, QList<TextItem*> &lights,
|
||||||
QList<SectorLight> §orLights, bool overZoom) const
|
QList<SectorLight> §orLights, bool overZoom) const
|
||||||
{
|
{
|
||||||
LightMap lightsMap;
|
QMap<Coordinates, Style::Color> lightsMap;
|
||||||
SignalSet signalsSet;
|
QSet<Coordinates> signalsSet, sectorLightsSet;
|
||||||
QSet<Coordinates> slMap;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Lights & Signals */
|
/* Lights & Signals */
|
||||||
@ -285,7 +284,7 @@ void RasterTile::processPoints(const QList<Data::Point> &points,
|
|||||||
sectorLights.append(SectorLight(point.pos(), color,
|
sectorLights.append(SectorLight(point.pos(), color,
|
||||||
attr.value(LITVIS).toUInt(), range,
|
attr.value(LITVIS).toUInt(), range,
|
||||||
attr.value(SECTR1).toDouble(), attr.value(SECTR2).toDouble()));
|
attr.value(SECTR1).toDouble(), attr.value(SECTR2).toDouble()));
|
||||||
slMap.insert(point.pos());
|
sectorLightsSet.insert(point.pos());
|
||||||
} else
|
} else
|
||||||
lightsMap.insert(point.pos(), color);
|
lightsMap.insert(point.pos(), color);
|
||||||
} else if (point.type()>>16 == FOGSIG)
|
} else if (point.type()>>16 == FOGSIG)
|
||||||
@ -316,7 +315,7 @@ void RasterTile::processPoints(const QList<Data::Point> &points,
|
|||||||
|
|
||||||
TextPointItem *item = new TextPointItem(pos + offset, label, fnt, img,
|
TextPointItem *item = new TextPointItem(pos + offset, label, fnt, img,
|
||||||
color, hColor, 0, 2, rotate);
|
color, hColor, 0, 2, rotate);
|
||||||
if (item->isValid() && (slMap.contains(point.pos())
|
if (item->isValid() && (sectorLightsSet.contains(point.pos())
|
||||||
|| (point.polygon() && img) || !item->collides(textItems))) {
|
|| (point.polygon() && img) || !item->collides(textItems))) {
|
||||||
textItems.append(item);
|
textItems.append(item);
|
||||||
if (lightsMap.contains(point.pos()))
|
if (lightsMap.contains(point.pos()))
|
||||||
|
@ -61,9 +61,6 @@ private:
|
|||||||
{return lines.isEmpty() && polygons.isEmpty() && points.isEmpty();}
|
{return lines.isEmpty() && polygons.isEmpty() && points.isEmpty();}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef QMap<Coordinates, Style::Color> LightMap;
|
|
||||||
typedef QSet<Coordinates> SignalSet;
|
|
||||||
|
|
||||||
QPointF ll2xy(const Coordinates &c) const
|
QPointF ll2xy(const Coordinates &c) const
|
||||||
{return _transform.proj2img(_proj.ll2xy(c));}
|
{return _transform.proj2img(_proj.ll2xy(c));}
|
||||||
QPainterPath painterPath(const Polygon &polygon) const;
|
QPainterPath painterPath(const Polygon &polygon) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user