mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 03:35:53 +01:00
Compare commits
5 Commits
d412390c75
...
87c5a255c8
Author | SHA1 | Date | |
---|---|---|---|
87c5a255c8 | |||
|
ce826966cf | ||
|
a56a558f37 | ||
e3d603e8d7 | |||
344e665bed |
@ -486,17 +486,17 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="370"/>
|
<location filename="../src/GUI/gui.cpp" line="370"/>
|
||||||
<source>All</source>
|
<source>All</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Tot</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="374"/>
|
<location filename="../src/GUI/gui.cpp" line="374"/>
|
||||||
<source>Raster only</source>
|
<source>Raster only</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Només ràster</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="378"/>
|
<location filename="../src/GUI/gui.cpp" line="378"/>
|
||||||
<source>Vector only</source>
|
<source>Vector only</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Només vector</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="385"/>
|
<location filename="../src/GUI/gui.cpp" line="385"/>
|
||||||
@ -733,7 +733,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="695"/>
|
<location filename="../src/GUI/gui.cpp" line="695"/>
|
||||||
<source>Layers</source>
|
<source>Layers</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Capes</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="704"/>
|
<location filename="../src/GUI/gui.cpp" line="704"/>
|
||||||
|
@ -486,17 +486,17 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="370"/>
|
<location filename="../src/GUI/gui.cpp" line="370"/>
|
||||||
<source>All</source>
|
<source>All</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Все</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="374"/>
|
<location filename="../src/GUI/gui.cpp" line="374"/>
|
||||||
<source>Raster only</source>
|
<source>Raster only</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Лише растр</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="378"/>
|
<location filename="../src/GUI/gui.cpp" line="378"/>
|
||||||
<source>Vector only</source>
|
<source>Vector only</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Лише вектор</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="385"/>
|
<location filename="../src/GUI/gui.cpp" line="385"/>
|
||||||
@ -723,7 +723,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="695"/>
|
<location filename="../src/GUI/gui.cpp" line="695"/>
|
||||||
<source>Layers</source>
|
<source>Layers</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Шари</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="704"/>
|
<location filename="../src/GUI/gui.cpp" line="704"/>
|
||||||
@ -1894,12 +1894,12 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="388"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="388"/>
|
||||||
<source>Detect pauses</source>
|
<source>Detect pauses</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Визначити паузи</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="537"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="537"/>
|
||||||
<source>Detection:</source>
|
<source>Detection:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Визначення:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="656"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="656"/>
|
||||||
|
@ -114,11 +114,8 @@ const QFont *RasterTile::poiFont(Style::FontSize size, int zoom,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RasterTile::ll2xy(QList<MapData::Poly> &polys, bool polygons) const
|
void RasterTile::ll2xy(QList<MapData::Poly> &polys) const
|
||||||
{
|
{
|
||||||
if (!_vectors && !polygons)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (int i = 0; i < polys.size(); i++) {
|
for (int i = 0; i < polys.size(); i++) {
|
||||||
MapData::Poly &poly = polys[i];
|
MapData::Poly &poly = polys[i];
|
||||||
for (int j = 0; j < poly.points.size(); j++) {
|
for (int j = 0; j < poly.points.size(); j++) {
|
||||||
@ -130,9 +127,6 @@ void RasterTile::ll2xy(QList<MapData::Poly> &polys, bool polygons) const
|
|||||||
|
|
||||||
void RasterTile::ll2xy(QList<MapData::Point> &points) const
|
void RasterTile::ll2xy(QList<MapData::Point> &points) const
|
||||||
{
|
{
|
||||||
if (!_vectors)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (int i = 0; i < points.size(); i++) {
|
for (int i = 0; i < points.size(); i++) {
|
||||||
QPointF p(ll2xy(points.at(i).coordinates));
|
QPointF p(ll2xy(points.at(i).coordinates));
|
||||||
points[i].coordinates = Coordinates(p.x(), p.y());
|
points[i].coordinates = Coordinates(p.x(), p.y());
|
||||||
@ -198,9 +192,6 @@ void RasterTile::drawPolygons(QPainter *painter,
|
|||||||
void RasterTile::drawLines(QPainter *painter,
|
void RasterTile::drawLines(QPainter *painter,
|
||||||
const QList<MapData::Poly> &lines) const
|
const QList<MapData::Poly> &lines) const
|
||||||
{
|
{
|
||||||
if (!_vectors)
|
|
||||||
return;
|
|
||||||
|
|
||||||
painter->setBrush(Qt::NoBrush);
|
painter->setBrush(Qt::NoBrush);
|
||||||
|
|
||||||
for (int i = 0; i < lines.size(); i++) {
|
for (int i = 0; i < lines.size(); i++) {
|
||||||
@ -290,9 +281,6 @@ void RasterTile::processPolygons(const QList<MapData::Poly> &polygons,
|
|||||||
void RasterTile::processLines(QList<MapData::Poly> &lines,
|
void RasterTile::processLines(QList<MapData::Poly> &lines,
|
||||||
QList<TextItem*> &textItems, const QImage (&arrows)[2])
|
QList<TextItem*> &textItems, const QImage (&arrows)[2])
|
||||||
{
|
{
|
||||||
if (!_vectors)
|
|
||||||
return;
|
|
||||||
|
|
||||||
std::stable_sort(lines.begin(), lines.end());
|
std::stable_sort(lines.begin(), lines.end());
|
||||||
|
|
||||||
if (_zoom >= 22)
|
if (_zoom >= 22)
|
||||||
@ -411,9 +399,6 @@ void RasterTile::processShields(const QList<MapData::Poly> &lines,
|
|||||||
void RasterTile::processPoints(QList<MapData::Point> &points,
|
void RasterTile::processPoints(QList<MapData::Point> &points,
|
||||||
QList<TextItem*> &textItems)
|
QList<TextItem*> &textItems)
|
||||||
{
|
{
|
||||||
if (!_vectors)
|
|
||||||
return;
|
|
||||||
|
|
||||||
std::sort(points.begin(), points.end());
|
std::sort(points.begin(), points.end());
|
||||||
|
|
||||||
for (int i = 0; i < points.size(); i++) {
|
for (int i = 0; i < points.size(); i++) {
|
||||||
@ -462,8 +447,9 @@ void RasterTile::fetchData(QList<MapData::Poly> &polygons,
|
|||||||
RectD polyRectD(_transform.img2proj(polyRect.topLeft()),
|
RectD polyRectD(_transform.img2proj(polyRect.topLeft()),
|
||||||
_transform.img2proj(polyRect.bottomRight()));
|
_transform.img2proj(polyRect.bottomRight()));
|
||||||
_data->polys(polyRectD.toRectC(_proj, 20), _zoom,
|
_data->polys(polyRectD.toRectC(_proj, 20), _zoom,
|
||||||
&polygons, &lines);
|
&polygons, _vectors ? &lines : 0);
|
||||||
|
|
||||||
|
if (_vectors) {
|
||||||
QRectF pointRect(QPointF(ttl.x() - TEXT_EXTENT, ttl.y() - TEXT_EXTENT),
|
QRectF pointRect(QPointF(ttl.x() - TEXT_EXTENT, ttl.y() - TEXT_EXTENT),
|
||||||
QPointF(ttl.x() + _rect.width() + TEXT_EXTENT, ttl.y() + _rect.height()
|
QPointF(ttl.x() + _rect.width() + TEXT_EXTENT, ttl.y() + _rect.height()
|
||||||
+ TEXT_EXTENT));
|
+ TEXT_EXTENT));
|
||||||
@ -471,6 +457,7 @@ void RasterTile::fetchData(QList<MapData::Poly> &polygons,
|
|||||||
_transform.img2proj(pointRect.bottomRight()));
|
_transform.img2proj(pointRect.bottomRight()));
|
||||||
_data->points(pointRectD.toRectC(_proj, 20), _zoom, &points);
|
_data->points(pointRectD.toRectC(_proj, 20), _zoom, &points);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MatrixD RasterTile::elevation(int extend) const
|
MatrixD RasterTile::elevation(int extend) const
|
||||||
{
|
{
|
||||||
@ -540,8 +527,8 @@ void RasterTile::render()
|
|||||||
arrows[WATER] = HIDPI_IMG(":/map", "water-arrow", _ratio);
|
arrows[WATER] = HIDPI_IMG(":/map", "water-arrow", _ratio);
|
||||||
|
|
||||||
fetchData(polygons, lines, points);
|
fetchData(polygons, lines, points);
|
||||||
ll2xy(polygons, true);
|
ll2xy(polygons);
|
||||||
ll2xy(lines, false);
|
ll2xy(lines);
|
||||||
ll2xy(points);
|
ll2xy(points);
|
||||||
|
|
||||||
processPoints(points, textItems);
|
processPoints(points, textItems);
|
||||||
|
@ -54,7 +54,7 @@ private:
|
|||||||
{return _transform.proj2img(_proj.ll2xy(c));}
|
{return _transform.proj2img(_proj.ll2xy(c));}
|
||||||
Coordinates xy2ll(const QPointF &p) const
|
Coordinates xy2ll(const QPointF &p) const
|
||||||
{return _proj.xy2ll(_transform.img2proj(p));}
|
{return _proj.xy2ll(_transform.img2proj(p));}
|
||||||
void ll2xy(QList<MapData::Poly> &polys, bool polygons) const;
|
void ll2xy(QList<MapData::Poly> &polys) const;
|
||||||
void ll2xy(QList<MapData::Point> &points) const;
|
void ll2xy(QList<MapData::Point> &points) const;
|
||||||
|
|
||||||
void drawPolygons(QPainter *painter, const QList<MapData::Poly> &polygons) const;
|
void drawPolygons(QPainter *painter, const QList<MapData::Poly> &polygons) const;
|
||||||
|
@ -709,6 +709,7 @@ void Style::defaultPointStyle(qreal ratio)
|
|||||||
_points[0x10214] = Point(QImage(":/marine/beacon.png"), QPoint(0, -8));
|
_points[0x10214] = Point(QImage(":/marine/beacon.png"), QPoint(0, -8));
|
||||||
_points[0x10215] = Point(QImage(":/marine/beacon.png"), QPoint(0, -8));
|
_points[0x10215] = Point(QImage(":/marine/beacon.png"), QPoint(0, -8));
|
||||||
_points[0x10216] = Point(QImage(":/marine/mooring-buoy.png"), QPoint(0, -5));
|
_points[0x10216] = Point(QImage(":/marine/mooring-buoy.png"), QPoint(0, -5));
|
||||||
|
_points[0x10304] = Point(QImage(":/marine/building.png"));
|
||||||
_points[0x10305] = Point(QImage(":/marine/chimney.png"), QPoint(0, -11));
|
_points[0x10305] = Point(QImage(":/marine/chimney.png"), QPoint(0, -11));
|
||||||
_points[0x10306] = Point(QImage(":/marine/church.png"));
|
_points[0x10306] = Point(QImage(":/marine/church.png"));
|
||||||
_points[0x10307] = Point(QImage(":/marine/silo.png"));
|
_points[0x10307] = Point(QImage(":/marine/silo.png"));
|
||||||
|
@ -183,11 +183,13 @@ void VectorTile::polys(const RectC &rect, const Zoom &zoom,
|
|||||||
}
|
}
|
||||||
|
|
||||||
copyPolys(rect, &polys->polygons, polygons);
|
copyPolys(rect, &polys->polygons, polygons);
|
||||||
|
if (lines)
|
||||||
copyPolys(rect, &polys->lines, lines);
|
copyPolys(rect, &polys->lines, lines);
|
||||||
|
|
||||||
cache->insert(subdiv, polys);
|
cache->insert(subdiv, polys);
|
||||||
} else {
|
} else {
|
||||||
copyPolys(rect, &polys->polygons, polygons);
|
copyPolys(rect, &polys->polygons, polygons);
|
||||||
|
if (lines)
|
||||||
copyPolys(rect, &polys->lines, lines);
|
copyPolys(rect, &polys->lines, lines);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user