1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-09 11:33:03 +02:00

Compare commits

..

No commits in common. "4615709b99d2fe993f9d3bbaf1f86f802d6f8eb0" and "e351eb6370bb1a6e60bf940d4399464664fd3dc0" have entirely different histories.

4 changed files with 8 additions and 30 deletions

View File

@ -712,7 +712,7 @@
<location filename="../src/GUI/gui.cpp" line="907"/>
<location filename="../src/GUI/gui.cpp" line="925"/>
<source>CRS directory:</source>
<translation>CRS-katalog:</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/GUI/gui.cpp" line="913"/>

View File

@ -958,7 +958,7 @@
<location filename="../src/GUI/gui.cpp" line="907"/>
<location filename="../src/GUI/gui.cpp" line="925"/>
<source>CRS directory:</source>
<translation>Dossier CRS:</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/GUI/gui.cpp" line="915"/>
@ -1427,12 +1427,12 @@
<message>
<location filename="../src/GUI/optionsdialog.cpp" line="70"/>
<source>Select the proper coordinate reference system (CRS) of maps without a CRS definition (JNX, KMZ and World file maps).</source>
<translation type="unfinished">Sélectionnez le système de référence de coordonnée (CRS) approprié pour les cartes sans définition de CRS (JNX, KMZ et World file maps).</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/GUI/optionsdialog.cpp" line="73"/>
<source>Select the desired projection of vector maps (IMG, Mapsforge and ENC maps). The projection must be valid for the whole map area.</source>
<translation>Sélectionnez la projection désirée de la carte vectorielle (IMG, Mapsforge et carte ENC). La projection doit être valide pour la totalité de la zone de la carte.</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/GUI/optionsdialog.cpp" line="77"/>
@ -1912,7 +1912,7 @@
<message>
<location filename="../src/GUI/optionsdialog.cpp" line="758"/>
<source>DEM cache size:</source>
<translation>Taille du cache DEM :</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/GUI/optionsdialog.cpp" line="778"/>

View File

@ -154,13 +154,6 @@ void Style::area(QXmlStreamReader &reader, const QString &dir, qreal ratio,
return;
}
}
if (attr.hasAttribute("scale")) {
QString scale(attr.value("scale").toString());
if (scale == "all")
ri._scale = PathRender::Scale::All;
else if (scale == "none")
ri._scale = PathRender::Scale::None;
}
if (attr.hasAttribute("src"))
file = resourcePath(attr.value("src").toString(), dir);
if (attr.hasAttribute("symbol-height")) {
@ -233,13 +226,6 @@ void Style::line(QXmlStreamReader &reader, const Rule &rule)
else if (join == "bevel")
ri._strokeJoin = Qt::BevelJoin;
}
if (attr.hasAttribute("scale")) {
QString scale(attr.value("scale").toString());
if (scale == "all")
ri._scale = PathRender::Scale::All;
else if (scale == "none")
ri._scale = PathRender::Scale::None;
}
if (attr.hasAttribute("curve")) {
QString curve(attr.value("curve").toString());
if (curve == "cubic")
@ -670,18 +656,14 @@ QList<const Style::Symbol*> Style::areaSymbols(int zoom) const
QPen Style::PathRender::pen(int zoom) const
{
if (_strokeColor.isValid()) {
qreal width = (_scale > None && zoom >= 12)
qreal width = (zoom >= 12)
? pow(1.5, zoom - 12) * _strokeWidth : _strokeWidth;
QPen p(QBrush(_strokeColor), width, Qt::SolidLine, _strokeCap,
_strokeJoin);
if (!_strokeDasharray.isEmpty()) {
QVector<qreal>pattern(_strokeDasharray);
for (int i = 0; i < _strokeDasharray.size(); i++) {
if (_scale > Stroke && zoom >= 12)
pattern[i] = (pow(1.5, zoom - 12) * pattern[i]);
// QPainter pattern is specified in units of the pens width!
for (int i = 0; i < _strokeDasharray.size(); i++)
pattern[i] /= width;
}
p.setDashPattern(pattern);
}
return p;

View File

@ -136,8 +136,7 @@ public:
public:
PathRender(const Rule &rule, int zOrder) : Render(rule),
_zOrder(zOrder), _strokeWidth(0), _strokeCap(Qt::RoundCap),
_strokeJoin(Qt::RoundJoin), _area(false), _curve(false),
_scale(Stroke) {}
_strokeJoin(Qt::RoundJoin), _area(false), _curve(false) {}
int zOrder() const {return _zOrder;}
QPen pen(int zoom) const;
@ -148,8 +147,6 @@ public:
private:
friend class Style;
enum Scale {None, Stroke, All};
int _zOrder;
QColor _strokeColor;
qreal _strokeWidth;
@ -158,7 +155,6 @@ public:
Qt::PenJoinStyle _strokeJoin;
QBrush _brush;
bool _area, _curve;
Scale _scale;
};
class CircleRender : public Render