1 | | --- src/CGpx.cpp.orig 2014-04-02 19:23:46.000000000 +0200 |
2 | | +++ src/CGpx.cpp 2014-07-19 14:43:03.000000000 +0200 |
3 | | @@ -67,7 +67,7 @@ |
4 | | for (int i=0;;++i) |
5 | | { |
6 | | QColor trackColor = CTrack::lineColors[i]; |
7 | | - QString colorName = colorMap.left(trackColor); |
8 | | + QString colorName = colorMap.key(trackColor); |
9 | | if (!colorName.isEmpty()) trackColorMap.insert(colorName, i); |
10 | | if (trackColor == Qt::transparent) break; |
11 | | } |
12 | | @@ -80,13 +80,13 @@ |
13 | | } |
14 | | |
15 | | |
16 | | -const Dictionary<QString, QColor>& CGpx::getColorMap() const |
17 | | +const QMap<QString, QColor>& CGpx::getColorMap() const |
18 | | { |
19 | | return colorMap; |
20 | | } |
21 | | |
22 | | |
23 | | -const Dictionary<QString, int>& CGpx::getTrackColorMap() const |
24 | | +const QMap<QString, int>& CGpx::getTrackColorMap() const |
25 | | { |
26 | | return trackColorMap; |
27 | | } |
28 | | --- src/CGpx.h.orig 2014-04-02 19:23:47.000000000 +0200 |
29 | | +++ src/CGpx.h 2014-07-19 11:39:24.000000000 +0200 |
30 | | @@ -24,8 +24,6 @@ |
31 | | #include <QString> |
32 | | #include <QtXml/QDomDocument> |
33 | | |
34 | | -#include "Dictionary.h" |
35 | | - |
36 | | /// handle geo data from GPX files |
37 | | class CGpx : public QObject, public QDomDocument |
38 | | { |
39 | | @@ -68,10 +66,11 @@ |
40 | | void save(const QString& filename); |
41 | | void makeExtensions(); |
42 | | |
43 | | - static QMap<QString,QDomElement> mapChildElements(const QDomNode& parent); |
44 | | + static QMap<QString,QDomElement> mapChildElements(const QDomNode& |
45 | | + parent); |
46 | | |
47 | | - const Dictionary<QString, QColor>& getColorMap() const; |
48 | | - const Dictionary<QString, int>& getTrackColorMap() const; |
49 | | + const QMap<QString, QColor>& getColorMap() const; |
50 | | + const QMap<QString, int>& getTrackColorMap() const; |
51 | | |
52 | | QDomElement &getExtensions() { return extensions; } |
53 | | gpx_version version() { return file_version; } |
54 | | @@ -80,8 +79,8 @@ |
55 | | protected: |
56 | | void writeMetadata(); |
57 | | |
58 | | - Dictionary<QString, QColor> colorMap; |
59 | | - Dictionary<QString, int> trackColorMap; |
60 | | + QMap<QString, QColor> colorMap; |
61 | | + QMap<QString, int> trackColorMap; |
62 | | |
63 | | private: |
64 | | QDomElement extensions; |
65 | | --- src/CMakeLists.txt.orig 2014-05-18 15:36:36.000000000 +0200 |
66 | | +++ src/CMakeLists.txt 2014-07-21 21:45:56.000000000 +0200 |
67 | | @@ -463,7 +463,6 @@ |
68 | | CImageViewer.h |
69 | | CMapRmp.h |
70 | | CMapDEMSlopeSetup.h |
71 | | - Dictionary.h |
72 | | QFileExt.h |
73 | | IExchange.h |
74 | | CExchangeGarmin.h |
75 | | --- src/CTrackDB.cpp.orig 2014-04-02 19:23:46.000000000 +0200 |
76 | | +++ src/CTrackDB.cpp 2014-07-19 14:49:25.000000000 +0200 |
77 | | @@ -233,7 +233,7 @@ |
78 | | tmpelem = trackextensionmap.value(CGpx::gpxx_ns + ":" + "DisplayColor"); |
79 | | if (!tmpelem.isNull()) |
80 | | { |
81 | | - int colorID = gpx.getTrackColorMap().right(tmpelem.text(), -1); |
82 | | + int colorID = gpx.getTrackColorMap().value(tmpelem.text(), -1); |
83 | | if (colorID >= 0) track->setColor(colorID); |
84 | | } |
85 | | } |
86 | | @@ -488,7 +488,7 @@ |
87 | | QDomElement color = gpx.createElement("gpxx:DisplayColor"); |
88 | | gpxx_ext.appendChild(color); |
89 | | |
90 | | - QString colname = gpx.getTrackColorMap().left(track->getColorIdx()); |
91 | | + QString colname = gpx.getTrackColorMap().key(track->getColorIdx()); |
92 | | QDomText _color_ = gpx.createTextNode(colname); |
93 | | color.appendChild(_color_); |
94 | | |