diff --git a/lang/gpxsee_cs.ts b/lang/gpxsee_cs.ts
index b04b3371..5f494db4 100644
--- a/lang/gpxsee_cs.ts
+++ b/lang/gpxsee_cs.ts
@@ -15,13 +15,13 @@
Výška
-
+ kmkm
-
-
+
+ mm
@@ -41,13 +41,13 @@
Minimum
-
+ mimi
-
-
+
+ ftft
@@ -163,371 +163,358 @@
GUI
-
+ GPXSee is distributed under the terms of the GNU General Public License version 3. For more info about GPXSee visit the project homepage at Program GPXSee je distribuován pod podmínkami licence GNU General Public License verze 3. Pro více informací navštivte stránky programu na adrese
-
+ Open fileOtevřít soubor
-
+ Open POI fileOtevřít POI soubor
-
+ OpenOtevřít
-
+ QuitUkončit
-
-
-
+
+
+ Keyboard controlsOvládací klávesy
-
+ CloseZavřít
-
+ ReloadZnovu načíst
-
+ ShowZobrazit
-
-
+
+ FileSoubor
-
-
-
+
+
+ Data sourcesZdroje dat
-
+ Load POI fileNahrát POI soubor
-
+ Close POI filesZavřit POI soubory
-
+ Overlap POIsPřekrývat POI
-
+ Show POI labelsZobrazovat názvy POI
-
+ Show POIsZobrazit POI
-
+ Show mapZobrazit mapu
-
+ Clear tile cacheVymazat mezipaměť dlaždic
-
-
+
+ Next mapNásledující mapa
-
- Show tracks
- Zobrazit cesty
-
-
-
- Show routes
- Zobrazit trasy
-
-
-
- Show waypoints
- Zobrazit navigační body
-
-
-
+ Waypoint labelsNázvy navigačních bodů
-
+ Route WaypointsBody tras
-
+ Show graphsZobrazovat grafy
-
+ Show toolbarsZobrazovat nástrojové lišty
-
+ MetricMetrické
-
+ ImperialImperiální
-
+ Fullscreen modeCeloobrazovkový režim
-
+ NextNásledující
-
+ PreviousPředchozí
-
+ LastPoslední
-
+ FirstPrvní
-
+ MapMapa
-
+ POIPOI
-
+ POI filesPOI soubory
-
+ DataData
-
+ DisplayZobrazit
-
+ SettingsNastavení
-
+ UnitsJednotky
-
+ HelpNápověda
-
+ Previous mapPředchozí mapa
-
-
+
+ DateDatum
-
+
+
+ Routes
+ Počet tras
+
+
+ No GPX files loadedNejsou načteny žádné GPX soubory
-
+
+ %1 files
+ %1 souborů
+
+
+ Next fileNásledující soubor
-
+ Version Verze
-
+ Print...Tisknout...
-
+ Export to PDF...Exportovat do PDF...
-
+
+
+ Waypoints
+ Navigační body
+
+
+ Previous filePředchozí soubor
-
+ First filePrvní soubor
-
+ Last filePoslední soubor
-
+ Append modifierModifikátor nahradit/přidat
-
+ Map (tiles) source URLs are read on program startup from the following file:URL mapových zdrojů (dlaždic) jsou načteny při startu programu z následujícího souboru:
-
+ The file format is one map entry per line, consisting of the map name and tiles URL delimited by a TAB character. The tile X and Y coordinates are replaced with $x and $y in the URL and the zoom level is replaced with $z. An example map file could look like:Formát souboru je jeden mapový záznam na řádku, kde mapový záznam sestává ze jména mapy a URL dlaždic navzájem oddělených tabulátorem. Souřadnice dlaždice jsou v URL nahrazeny řetězci $x a $y, úroven přiblížení (zoom) pak řetězcem $z. Příklad:
-
+ To make GPXSee load a POI file automatically on startup, add the file to the following directory:POI soubory, které se mají automaticky nahrát při startu programu jsou načítány z následujícího adresáře:
-
+ GPX files (*.gpx);;All files (*)Soubory GPX (*.gpx);;Všechny soubory (*)
-
-
+
+ Line: %1Řádka: %1
-
+ GPX files (*.gpx);;CSV files (*.csv);;All files (*)Soubory GPX (*.gpx);;Soubory CSV (*.csv);;Všechny soubory (*)
-
+
+ Tracks
- Počet tras
+ Počet cest
-
- mi
- mi
-
-
-
-
+
+ About GPXSeeO aplikaci GPXSee
-
+ NavigationNavigace
-
+ Map sourcesMapové zdroje
-
+ POIsPOI body
-
-
+ DistanceVzdálenost
-
+ TimeČas
-
- %1 tracks
- Počet tras: %1
-
-
-
- km
- km
-
-
-
-
+
+ ErrorChyba
-
+ Error loading GPX file:
%1Soubor GPX nelze otevřít:
%1
-
+ Error loading POI file:
%1Soubor POI nelze otevřít:
@@ -548,7 +535,7 @@
Tep
-
+ kmkm
@@ -568,17 +555,17 @@
Maximum
-
+ mm
-
+ ftft
-
+ mimi
@@ -645,22 +632,22 @@
Rychlost
-
+ mm
-
+ km
-
+ ftft
-
+ km/hkm/h
@@ -675,12 +662,12 @@
Maximum
-
+ mimi
-
+ mi/hmi/h
@@ -714,32 +701,32 @@
Maximum
-
+ mm
-
+ kmkm
-
+ ftft
-
+ mimi
-
+ CC
-
+ FF
diff --git a/src/elevationgraph.cpp b/src/elevationgraph.cpp
index d960801e..6e754390 100644
--- a/src/elevationgraph.cpp
+++ b/src/elevationgraph.cpp
@@ -56,17 +56,10 @@ void ElevationGraph::loadPath(const QVector &data)
void ElevationGraph::loadGPX(const GPX &gpx)
{
- for (int i = 0; i < gpx.trackCount(); i++) {
- QVector data;
- gpx.track(i).elevationGraph(data);
- loadPath(data);
- }
-
- for (int i = 0; i < gpx.routeCount(); i++) {
- QVector data;
- gpx.route(i).elevationGraph(data);
- loadPath(data);
- }
+ for (int i = 0; i < gpx.tracks().count(); i++)
+ loadPath(gpx.tracks().at(i)->elevation());
+ for (int i = 0; i < gpx.routes().count(); i++)
+ loadPath(gpx.routes().at(i)->elevation());
setXUnits();
setInfo();
diff --git a/src/gpx.cpp b/src/gpx.cpp
index 7fc445e4..161a8098 100644
--- a/src/gpx.cpp
+++ b/src/gpx.cpp
@@ -4,12 +4,24 @@
#include "gpx.h"
+GPX::GPX() : _parser(_track_data, _route_data, _waypoint_data), _errorLine(0)
+{
+}
+
+GPX::~GPX()
+{
+ for (int i = 0; i < _tracks.count(); i++)
+ delete _tracks.at(i);
+ for (int i = 0; i < _routes.count(); i++)
+ delete _routes.at(i);
+}
+
bool GPX::loadFile(const QString &fileName)
{
- QFile file(fileName);
bool ret;
+ QFile file(fileName);
+
- _tracks.clear();
_error.clear();
_errorLine = 0;
@@ -18,11 +30,18 @@ bool GPX::loadFile(const QString &fileName)
return false;
}
- if (!(ret = _parser.loadFile(&file))) {
+ ret = _parser.loadFile(&file);
+ file.close();
+ if (ret == false) {
_error = _parser.errorString();
_errorLine = _parser.errorLine();
+ return false;
}
- file.close();
- return ret;
+ for (int i = 0; i < _track_data.count(); i++)
+ _tracks.append(new Track(_track_data.at(i)));
+ for (int i = 0; i < _route_data.count(); i++)
+ _routes.append(new Route(_route_data.at(i)));
+
+ return true;
}
diff --git a/src/gpx.h b/src/gpx.h
index e3862f30..b1daaf8e 100644
--- a/src/gpx.h
+++ b/src/gpx.h
@@ -13,25 +13,28 @@
class GPX
{
public:
- GPX() : _parser(_tracks, _routes, _waypoints), _errorLine(0) {}
+ GPX();
+ ~GPX();
+
bool loadFile(const QString &fileName);
const QString &errorString() const {return _error;}
int errorLine() const {return _errorLine;}
- int trackCount() const {return _tracks.count();}
- Track track(int i) const {return Track(_tracks.at(i));}
- int routeCount() const {return _routes.count();}
- Route route(int i) const {return Route(_routes.at(i));}
- const QList &waypoints() const {return _waypoints;}
+ const QList