mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-12-05 00:39:09 +01:00
Compare commits
6 Commits
e351eb6370
...
4615709b99
Author | SHA1 | Date | |
---|---|---|---|
|
4615709b99 | ||
8a72b20af8 | |||
|
f86aa8c012 | ||
|
dbf5828e65 | ||
|
37d408c953 | ||
|
61c3ed60d7 |
@ -712,7 +712,7 @@
|
|||||||
<location filename="../src/GUI/gui.cpp" line="907"/>
|
<location filename="../src/GUI/gui.cpp" line="907"/>
|
||||||
<location filename="../src/GUI/gui.cpp" line="925"/>
|
<location filename="../src/GUI/gui.cpp" line="925"/>
|
||||||
<source>CRS directory:</source>
|
<source>CRS directory:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>CRS-katalog:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="913"/>
|
<location filename="../src/GUI/gui.cpp" line="913"/>
|
||||||
|
@ -958,7 +958,7 @@
|
|||||||
<location filename="../src/GUI/gui.cpp" line="907"/>
|
<location filename="../src/GUI/gui.cpp" line="907"/>
|
||||||
<location filename="../src/GUI/gui.cpp" line="925"/>
|
<location filename="../src/GUI/gui.cpp" line="925"/>
|
||||||
<source>CRS directory:</source>
|
<source>CRS directory:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Dossier CRS :</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="915"/>
|
<location filename="../src/GUI/gui.cpp" line="915"/>
|
||||||
@ -1427,12 +1427,12 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="70"/>
|
<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>
|
<source>Select the proper coordinate reference system (CRS) of maps without a CRS definition (JNX, KMZ and World file maps).</source>
|
||||||
<translation type="unfinished"></translation>
|
<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>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="73"/>
|
<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>
|
<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 type="unfinished"></translation>
|
<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>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="77"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="77"/>
|
||||||
@ -1912,7 +1912,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="758"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="758"/>
|
||||||
<source>DEM cache size:</source>
|
<source>DEM cache size:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Taille du cache DEM :</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="778"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="778"/>
|
||||||
|
@ -154,6 +154,13 @@ void Style::area(QXmlStreamReader &reader, const QString &dir, qreal ratio,
|
|||||||
return;
|
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"))
|
if (attr.hasAttribute("src"))
|
||||||
file = resourcePath(attr.value("src").toString(), dir);
|
file = resourcePath(attr.value("src").toString(), dir);
|
||||||
if (attr.hasAttribute("symbol-height")) {
|
if (attr.hasAttribute("symbol-height")) {
|
||||||
@ -226,6 +233,13 @@ void Style::line(QXmlStreamReader &reader, const Rule &rule)
|
|||||||
else if (join == "bevel")
|
else if (join == "bevel")
|
||||||
ri._strokeJoin = Qt::BevelJoin;
|
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")) {
|
if (attr.hasAttribute("curve")) {
|
||||||
QString curve(attr.value("curve").toString());
|
QString curve(attr.value("curve").toString());
|
||||||
if (curve == "cubic")
|
if (curve == "cubic")
|
||||||
@ -656,14 +670,18 @@ QList<const Style::Symbol*> Style::areaSymbols(int zoom) const
|
|||||||
QPen Style::PathRender::pen(int zoom) const
|
QPen Style::PathRender::pen(int zoom) const
|
||||||
{
|
{
|
||||||
if (_strokeColor.isValid()) {
|
if (_strokeColor.isValid()) {
|
||||||
qreal width = (zoom >= 12)
|
qreal width = (_scale > None && zoom >= 12)
|
||||||
? pow(1.5, zoom - 12) * _strokeWidth : _strokeWidth;
|
? pow(1.5, zoom - 12) * _strokeWidth : _strokeWidth;
|
||||||
QPen p(QBrush(_strokeColor), width, Qt::SolidLine, _strokeCap,
|
QPen p(QBrush(_strokeColor), width, Qt::SolidLine, _strokeCap,
|
||||||
_strokeJoin);
|
_strokeJoin);
|
||||||
if (!_strokeDasharray.isEmpty()) {
|
if (!_strokeDasharray.isEmpty()) {
|
||||||
QVector<qreal>pattern(_strokeDasharray);
|
QVector<qreal>pattern(_strokeDasharray);
|
||||||
for (int i = 0; i < _strokeDasharray.size(); i++)
|
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!
|
||||||
pattern[i] /= width;
|
pattern[i] /= width;
|
||||||
|
}
|
||||||
p.setDashPattern(pattern);
|
p.setDashPattern(pattern);
|
||||||
}
|
}
|
||||||
return p;
|
return p;
|
||||||
|
@ -136,7 +136,8 @@ public:
|
|||||||
public:
|
public:
|
||||||
PathRender(const Rule &rule, int zOrder) : Render(rule),
|
PathRender(const Rule &rule, int zOrder) : Render(rule),
|
||||||
_zOrder(zOrder), _strokeWidth(0), _strokeCap(Qt::RoundCap),
|
_zOrder(zOrder), _strokeWidth(0), _strokeCap(Qt::RoundCap),
|
||||||
_strokeJoin(Qt::RoundJoin), _area(false), _curve(false) {}
|
_strokeJoin(Qt::RoundJoin), _area(false), _curve(false),
|
||||||
|
_scale(Stroke) {}
|
||||||
|
|
||||||
int zOrder() const {return _zOrder;}
|
int zOrder() const {return _zOrder;}
|
||||||
QPen pen(int zoom) const;
|
QPen pen(int zoom) const;
|
||||||
@ -147,6 +148,8 @@ public:
|
|||||||
private:
|
private:
|
||||||
friend class Style;
|
friend class Style;
|
||||||
|
|
||||||
|
enum Scale {None, Stroke, All};
|
||||||
|
|
||||||
int _zOrder;
|
int _zOrder;
|
||||||
QColor _strokeColor;
|
QColor _strokeColor;
|
||||||
qreal _strokeWidth;
|
qreal _strokeWidth;
|
||||||
@ -155,6 +158,7 @@ public:
|
|||||||
Qt::PenJoinStyle _strokeJoin;
|
Qt::PenJoinStyle _strokeJoin;
|
||||||
QBrush _brush;
|
QBrush _brush;
|
||||||
bool _area, _curve;
|
bool _area, _curve;
|
||||||
|
Scale _scale;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CircleRender : public Render
|
class CircleRender : public Render
|
||||||
|
Loading…
Reference in New Issue
Block a user