1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Added support for tiles cache clearing

This commit is contained in:
Martin Tůma 2016-04-01 19:25:34 +02:00
parent 9fa031ca4d
commit f247c2fa22
6 changed files with 174 additions and 125 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS> <!DOCTYPE TS>
<TS version="2.1" language="cs_CZ"> <TS version="2.0" language="cs_CZ">
<context> <context>
<name>ElevationGraph</name> <name>ElevationGraph</name>
<message> <message>
@ -14,44 +14,44 @@
<translation>Výška</translation> <translation>Výška</translation>
</message> </message>
<message> <message>
<location filename="../src/elevationgraph.cpp" line="16"/> <location filename="../src/elevationgraph.cpp" line="81"/>
<location filename="../src/elevationgraph.cpp" line="86"/>
<source>km</source> <source>km</source>
<translation>km</translation> <translation>km</translation>
</message> </message>
<message> <message>
<location filename="../src/elevationgraph.cpp" line="17"/> <location filename="../src/elevationgraph.cpp" line="78"/>
<location filename="../src/elevationgraph.cpp" line="87"/> <location filename="../src/elevationgraph.cpp" line="98"/>
<source>m</source> <source>m</source>
<translation>m</translation> <translation>m</translation>
</message> </message>
<message> <message>
<location filename="../src/elevationgraph.cpp" line="24"/> <location filename="../src/elevationgraph.cpp" line="22"/>
<source>Ascent</source> <source>Ascent</source>
<translation>Stoupání</translation> <translation>Stoupání</translation>
</message> </message>
<message> <message>
<location filename="../src/elevationgraph.cpp" line="26"/> <location filename="../src/elevationgraph.cpp" line="24"/>
<source>Descent</source> <source>Descent</source>
<translation>Klesání</translation> <translation>Klesání</translation>
</message> </message>
<message> <message>
<location filename="../src/elevationgraph.cpp" line="30"/> <location filename="../src/elevationgraph.cpp" line="28"/>
<source>Minimum</source> <source>Minimum</source>
<translation>Minimum</translation> <translation>Minimum</translation>
</message> </message>
<message> <message>
<location filename="../src/elevationgraph.cpp" line="91"/> <location filename="../src/elevationgraph.cpp" line="89"/>
<source>mi</source> <source>mi</source>
<translation>mi</translation> <translation>mi</translation>
</message> </message>
<message> <message>
<location filename="../src/elevationgraph.cpp" line="92"/> <location filename="../src/elevationgraph.cpp" line="86"/>
<location filename="../src/elevationgraph.cpp" line="101"/>
<source>ft</source> <source>ft</source>
<translation>ft</translation> <translation>ft</translation>
</message> </message>
<message> <message>
<location filename="../src/elevationgraph.cpp" line="28"/> <location filename="../src/elevationgraph.cpp" line="26"/>
<source>Maximum</source> <source>Maximum</source>
<translation>Maximum</translation> <translation>Maximum</translation>
</message> </message>
@ -59,356 +59,363 @@
<context> <context>
<name>GUI</name> <name>GUI</name>
<message> <message>
<location filename="../src/gui.cpp" line="186"/> <location filename="../src/gui.cpp" line="192"/>
<source>About Qt</source> <source>About Qt</source>
<translation>O Qt</translation> <translation>O Qt</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="406"/> <location filename="../src/gui.cpp" line="418"/>
<source>GPXSee is distributed under the terms of the GNU General Public License version 3. For more info about GPXSee visit the project homepage at </source> <source>GPXSee is distributed under the terms of the GNU General Public License version 3. For more info about GPXSee visit the project homepage at </source>
<translation>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 </translation> <translation>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 </translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="465"/> <location filename="../src/gui.cpp" line="477"/>
<source>Open file</source> <source>Open file</source>
<translation>Otevřít soubor</translation> <translation>Otevřít soubor</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="200"/> <location filename="../src/gui.cpp" line="206"/>
<source>Save as</source> <source>Save as</source>
<translation>Uložit jako</translation> <translation>Uložit jako</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="532"/> <location filename="../src/gui.cpp" line="548"/>
<source>Open POI file</source> <source>Open POI file</source>
<translation>Otevřít POI soubor</translation> <translation>Otevřít POI soubor</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="191"/> <location filename="../src/gui.cpp" line="197"/>
<source>Open</source> <source>Open</source>
<translation>Otevřít</translation> <translation>Otevřít</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="174"/> <location filename="../src/gui.cpp" line="180"/>
<source>Quit</source> <source>Quit</source>
<translation>Ukončit</translation> <translation>Ukončit</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="181"/> <location filename="../src/gui.cpp" line="187"/>
<location filename="../src/gui.cpp" line="422"/> <location filename="../src/gui.cpp" line="434"/>
<location filename="../src/gui.cpp" line="423"/> <location filename="../src/gui.cpp" line="435"/>
<source>Keyboard controls</source> <source>Keyboard controls</source>
<translation>Ovládací klávesy</translation> <translation>Ovládací klávesy</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="195"/> <location filename="../src/gui.cpp" line="201"/>
<source>Save</source> <source>Save</source>
<translation>Uložit</translation> <translation>Uložit</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="205"/> <location filename="../src/gui.cpp" line="211"/>
<source>Close</source> <source>Close</source>
<translation>Zavřít</translation> <translation>Zavřít</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="210"/> <location filename="../src/gui.cpp" line="216"/>
<source>Reload</source> <source>Reload</source>
<translation>Znovu načíst</translation> <translation>Znovu načíst</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="342"/> <location filename="../src/gui.cpp" line="354"/>
<source>Show</source> <source>Show</source>
<translation>Zobrazit</translation> <translation>Zobrazit</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="287"/> <location filename="../src/gui.cpp" line="297"/>
<location filename="../src/gui.cpp" line="333"/> <location filename="../src/gui.cpp" line="345"/>
<source>File</source> <source>File</source>
<translation>Soubor</translation> <translation>Soubor</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="179"/> <location filename="../src/gui.cpp" line="185"/>
<location filename="../src/gui.cpp" line="440"/> <location filename="../src/gui.cpp" line="452"/>
<location filename="../src/gui.cpp" line="441"/> <location filename="../src/gui.cpp" line="453"/>
<source>Data sources</source> <source>Data sources</source>
<translation>Zdroje dat</translation> <translation>Zdroje dat</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="217"/> <location filename="../src/gui.cpp" line="223"/>
<source>Load POI file</source> <source>Load POI file</source>
<translation>Nahrát POI soubor</translation> <translation>Nahrát POI soubor</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="220"/> <location filename="../src/gui.cpp" line="226"/>
<source>Close POI files</source> <source>Close POI files</source>
<translation>Zavřit soubory POI</translation> <translation>Zavřit POI soubory</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="223"/> <location filename="../src/gui.cpp" line="229"/>
<source>Show POIs</source> <source>Show POIs</source>
<translation>Zobrazit POI</translation> <translation>Zobrazit POI</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="230"/> <location filename="../src/gui.cpp" line="236"/>
<source>Show map</source> <source>Show map</source>
<translation>Zobrazit mapu</translation> <translation>Zobrazit mapu</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="243"/> <location filename="../src/gui.cpp" line="241"/>
<source>Clear tile cache</source>
<translation>Vymazat mezipaměť dlaždic</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="253"/>
<source>Show graphs</source> <source>Show graphs</source>
<translation>Zobrazovat grafy</translation> <translation>Zobrazovat grafy</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="249"/> <location filename="../src/gui.cpp" line="259"/>
<source>Show toolbars</source> <source>Show toolbars</source>
<translation>Zobrazovat nástrojové lišty</translation> <translation>Zobrazovat nástrojové lišty</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="256"/> <location filename="../src/gui.cpp" line="266"/>
<source>Metric</source> <source>Metric</source>
<translation>Metrické</translation> <translation>Metrické</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="262"/> <location filename="../src/gui.cpp" line="272"/>
<source>Imperial</source> <source>Imperial</source>
<translation>Imperiální</translation> <translation>Imperiální</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="269"/> <location filename="../src/gui.cpp" line="279"/>
<source>Next</source> <source>Next</source>
<translation>Následující</translation> <translation>Následující</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="272"/> <location filename="../src/gui.cpp" line="282"/>
<source>Previous</source> <source>Previous</source>
<translation>Předchozí</translation> <translation>Předchozí</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="276"/> <location filename="../src/gui.cpp" line="286"/>
<source>Last</source> <source>Last</source>
<translation>Poslední</translation> <translation>Poslední</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="279"/> <location filename="../src/gui.cpp" line="289"/>
<source>First</source> <source>First</source>
<translation>První</translation> <translation>První</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="301"/> <location filename="../src/gui.cpp" line="311"/>
<source>Map</source> <source>Map</source>
<translation>Mapa</translation> <translation>Mapa</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="306"/> <location filename="../src/gui.cpp" line="318"/>
<source>POI</source> <source>POI</source>
<translation>POI</translation> <translation>POI</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="307"/> <location filename="../src/gui.cpp" line="319"/>
<source>POI files</source> <source>POI files</source>
<translation>POI soubory</translation> <translation>POI soubory</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="315"/> <location filename="../src/gui.cpp" line="327"/>
<source>Settings</source> <source>Settings</source>
<translation>Nastavení</translation> <translation>Nastavení</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="316"/> <location filename="../src/gui.cpp" line="328"/>
<source>Units</source> <source>Units</source>
<translation>Jednotky</translation> <translation>Jednotky</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="323"/> <location filename="../src/gui.cpp" line="335"/>
<source>Help</source> <source>Help</source>
<translation>Nápověda</translation> <translation>Nápověda</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="732"/> <location filename="../src/gui.cpp" line="756"/>
<source>No GPX files loaded</source> <source>No GPX files loaded</source>
<translation>Nejsou načteny žádné GPX soubory</translation> <translation>Nejsou načteny žádné GPX soubory</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="804"/> <location filename="../src/gui.cpp" line="838"/>
<source>Elevation</source> <source>Elevation</source>
<translation>Výška</translation> <translation>Výška</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="805"/> <location filename="../src/gui.cpp" line="839"/>
<source>Speed</source> <source>Speed</source>
<translation>Rychlost</translation> <translation>Rychlost</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="806"/> <location filename="../src/gui.cpp" line="840"/>
<source>Heart rate</source> <source>Heart rate</source>
<translation>Tep</translation> <translation>Tep</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="425"/> <location filename="../src/gui.cpp" line="437"/>
<source>Next file</source> <source>Next file</source>
<translation>Následující soubor</translation> <translation>Následující soubor</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="426"/> <location filename="../src/gui.cpp" line="438"/>
<source>Previous file</source> <source>Previous file</source>
<translation>Předchozí soubor</translation> <translation>Předchozí soubor</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="428"/> <location filename="../src/gui.cpp" line="440"/>
<source>First file</source> <source>First file</source>
<translation>První soubor</translation> <translation>První soubor</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="429"/> <location filename="../src/gui.cpp" line="441"/>
<source>Last file</source> <source>Last file</source>
<translation>Poslední soubor</translation> <translation>Poslední soubor</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="430"/> <location filename="../src/gui.cpp" line="442"/>
<source>Append modifier</source> <source>Append modifier</source>
<translation>Modifikátor nahradit/přidat</translation> <translation>Modifikátor nahradit/přidat</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="444"/> <location filename="../src/gui.cpp" line="456"/>
<source>Map (tiles) source URLs are read on program startup from the following file:</source> <source>Map (tiles) source URLs are read on program startup from the following file:</source>
<translation>URL mapových zdrojů (dlaždic) jsou načteny při startu programu z následujícího souboru:</translation> <translation>URL mapových zdrojů (dlaždic) jsou načteny při startu programu z následujícího souboru:</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="447"/> <location filename="../src/gui.cpp" line="459"/>
<source>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:</source> <source>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:</source>
<translation>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:</translation> <translation>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:</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="455"/> <location filename="../src/gui.cpp" line="467"/>
<source>To make GPXSee load a POI file automatically on startup, add the file to the following directory:</source> <source>To make GPXSee load a POI file automatically on startup, add the file to the following directory:</source>
<translation>POI soubory, které se mají automaticky nahrát při startu programu jsou načítány z následujícího adresáře:</translation> <translation>POI soubory, které se mají automaticky nahrát při startu programu jsou načítány z následujícího adresáře:</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="466"/> <location filename="../src/gui.cpp" line="478"/>
<source>GPX files (*.gpx);;All files (*)</source> <source>GPX files (*.gpx);;All files (*)</source>
<translation>soubory GPX (*.gpx);;všechny soubory (*)</translation> <translation>soubory GPX (*.gpx);;všechny soubory (*)</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="523"/> <location filename="../src/gui.cpp" line="539"/>
<location filename="../src/gui.cpp" line="549"/> <location filename="../src/gui.cpp" line="565"/>
<source>Line: %1</source> <source>Line: %1</source>
<translation>Řádka: %1</translation> <translation>Řádka: %1</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="533"/> <location filename="../src/gui.cpp" line="549"/>
<source>GPX files (*.gpx);;CSV files (*.csv);;All files (*)</source> <source>GPX files (*.gpx);;CSV files (*.csv);;All files (*)</source>
<translation>soubory GPX (*.gpx);;soubory CSV (*.csv);;všechny soubory (*)</translation> <translation>soubory GPX (*.gpx);;soubory CSV (*.csv);;všechny soubory (*)</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="614"/> <location filename="../src/gui.cpp" line="630"/>
<location filename="../src/gui.cpp" line="743"/> <location filename="../src/gui.cpp" line="771"/>
<source>mi</source> <source>mi</source>
<translation>mi</translation> <translation>mi</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="617"/> <location filename="../src/gui.cpp" line="633"/>
<location filename="../src/gui.cpp" line="619"/> <location filename="../src/gui.cpp" line="635"/>
<location filename="../src/gui.cpp" line="621"/> <location filename="../src/gui.cpp" line="637"/>
<location filename="../src/gui.cpp" line="623"/> <location filename="../src/gui.cpp" line="639"/>
<location filename="../src/gui.cpp" line="768"/>
<source>ft</source> <source>ft</source>
<translation>ft</translation> <translation>ft</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="620"/> <location filename="../src/gui.cpp" line="636"/>
<location filename="../src/gui.cpp" line="632"/> <location filename="../src/gui.cpp" line="648"/>
<source>Maximum</source> <source>Maximum</source>
<translation>Maximum</translation> <translation>Maximum</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="622"/> <location filename="../src/gui.cpp" line="638"/>
<location filename="../src/gui.cpp" line="634"/> <location filename="../src/gui.cpp" line="650"/>
<source>Minimum</source> <source>Minimum</source>
<translation>Minimum</translation> <translation>Minimum</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="184"/> <location filename="../src/gui.cpp" line="190"/>
<location filename="../src/gui.cpp" line="402"/> <location filename="../src/gui.cpp" line="414"/>
<source>About GPXSee</source> <source>About GPXSee</source>
<translation>O aplikaci GPXSee</translation> <translation>O aplikaci GPXSee</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="349"/> <location filename="../src/gui.cpp" line="361"/>
<source>Navigation</source> <source>Navigation</source>
<translation>Navigace</translation> <translation>Navigace</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="404"/> <location filename="../src/gui.cpp" line="416"/>
<source>GPX viewer and analyzer</source> <source>GPX viewer and analyzer</source>
<translation>Prohlížeč a analyzátor GPX</translation> <translation>Prohlížeč a analyzátor GPX</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="443"/> <location filename="../src/gui.cpp" line="455"/>
<source>Map sources</source> <source>Map sources</source>
<translation>Mapové zdroje</translation> <translation>Mapové zdroje</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="454"/> <location filename="../src/gui.cpp" line="466"/>
<source>POIs</source> <source>POIs</source>
<translation>POI body</translation> <translation>POI body</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="613"/> <location filename="../src/gui.cpp" line="629"/>
<location filename="../src/gui.cpp" line="625"/> <location filename="../src/gui.cpp" line="641"/>
<source>Distance</source> <source>Distance</source>
<translation>Vzdálenost</translation> <translation>Vzdálenost</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="615"/> <location filename="../src/gui.cpp" line="631"/>
<location filename="../src/gui.cpp" line="627"/> <location filename="../src/gui.cpp" line="643"/>
<source>Time</source> <source>Time</source>
<translation>Čas</translation> <translation>Čas</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="616"/> <location filename="../src/gui.cpp" line="632"/>
<location filename="../src/gui.cpp" line="628"/> <location filename="../src/gui.cpp" line="644"/>
<source>Ascent</source> <source>Ascent</source>
<translation>Stoupání</translation> <translation>Stoupání</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="629"/> <location filename="../src/gui.cpp" line="645"/>
<location filename="../src/gui.cpp" line="631"/> <location filename="../src/gui.cpp" line="647"/>
<location filename="../src/gui.cpp" line="633"/> <location filename="../src/gui.cpp" line="649"/>
<location filename="../src/gui.cpp" line="635"/> <location filename="../src/gui.cpp" line="651"/>
<location filename="../src/gui.cpp" line="775"/>
<source>m</source> <source>m</source>
<translation>m</translation> <translation>m</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="618"/> <location filename="../src/gui.cpp" line="634"/>
<location filename="../src/gui.cpp" line="630"/> <location filename="../src/gui.cpp" line="646"/>
<source>Descent</source> <source>Descent</source>
<translation>Klesání</translation> <translation>Klesání</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="739"/> <location filename="../src/gui.cpp" line="763"/>
<source>%1 tracks</source> <source>%1 tracks</source>
<translation>Počet tras: %1</translation> <translation>Počet tras: %1</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="626"/> <location filename="../src/gui.cpp" line="642"/>
<location filename="../src/gui.cpp" line="746"/> <location filename="../src/gui.cpp" line="778"/>
<source>km</source> <source>km</source>
<translation>km</translation> <translation>km</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="525"/> <location filename="../src/gui.cpp" line="541"/>
<location filename="../src/gui.cpp" line="550"/> <location filename="../src/gui.cpp" line="566"/>
<source>Error</source> <source>Error</source>
<translation>Chyba</translation> <translation>Chyba</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="520"/> <location filename="../src/gui.cpp" line="536"/>
<source>Error loading GPX file: <source>Error loading GPX file:
%1</source> %1</source>
<translation>Soubor GPX nelze otevřít: <translation>Soubor GPX nelze otevřít:
%1</translation> %1</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="546"/> <location filename="../src/gui.cpp" line="562"/>
<source>Error loading POI file: <source>Error loading POI file:
%1</source> %1</source>
<translation>Soubor POI nelze otevřít: <translation>Soubor POI nelze otevřít:
@ -418,38 +425,47 @@
<context> <context>
<name>HeartRateGraph</name> <name>HeartRateGraph</name>
<message> <message>
<location filename="../src/heartrategraph.cpp" line="9"/> <location filename="../src/heartrategraph.cpp" line="10"/>
<source>Distance</source> <source>Distance</source>
<translation>Vzdálenost</translation> <translation>Vzdálenost</translation>
</message> </message>
<message> <message>
<location filename="../src/heartrategraph.cpp" line="10"/> <location filename="../src/heartrategraph.cpp" line="11"/>
<source>Heart rate</source> <source>Heart rate</source>
<translation>Tep</translation> <translation>Tep</translation>
</message> </message>
<message> <message>
<location filename="../src/heartrategraph.cpp" line="11"/> <location filename="../src/heartrategraph.cpp" line="78"/>
<location filename="../src/heartrategraph.cpp" line="76"/>
<source>km</source> <source>km</source>
<translation>km</translation> <translation>km</translation>
</message> </message>
<message> <message>
<location filename="../src/heartrategraph.cpp" line="12"/> <location filename="../src/heartrategraph.cpp" line="9"/>
<source>1/min</source> <source>1/min</source>
<translation>1/min</translation> <translation>1/min</translation>
</message> </message>
<message> <message>
<location filename="../src/heartrategraph.cpp" line="19"/> <location filename="../src/heartrategraph.cpp" line="18"/>
<source>Average</source> <source>Average</source>
<translation>Průměr</translation> <translation>Průměr</translation>
</message> </message>
<message> <message>
<location filename="../src/heartrategraph.cpp" line="21"/> <location filename="../src/heartrategraph.cpp" line="20"/>
<source>Maximum</source> <source>Maximum</source>
<translation>Maximum</translation> <translation>Maximum</translation>
</message> </message>
<message> <message>
<location filename="../src/heartrategraph.cpp" line="79"/> <location filename="../src/heartrategraph.cpp" line="75"/>
<source>m</source>
<translation>m</translation>
</message>
<message>
<location filename="../src/heartrategraph.cpp" line="83"/>
<source>ft</source>
<translation>ft</translation>
</message>
<message>
<location filename="../src/heartrategraph.cpp" line="86"/>
<source>mi</source> <source>mi</source>
<translation>mi</translation> <translation>mi</translation>
</message> </message>
@ -480,44 +496,52 @@
<context> <context>
<name>SpeedGraph</name> <name>SpeedGraph</name>
<message> <message>
<location filename="../src/speedgraph.cpp" line="10"/> <location filename="../src/speedgraph.cpp" line="11"/>
<source>Distance</source> <source>Distance</source>
<translation>Vzdálenost</translation> <translation>Vzdálenost</translation>
</message> </message>
<message> <message>
<location filename="../src/speedgraph.cpp" line="11"/> <location filename="../src/speedgraph.cpp" line="12"/>
<source>Speed</source> <source>Speed</source>
<translation>Rychlost</translation> <translation>Rychlost</translation>
</message> </message>
<message> <message>
<location filename="../src/speedgraph.cpp" line="12"/> <location filename="../src/speedgraph.cpp" line="72"/>
<source>m</source>
<translation>m</translation>
</message>
<message>
<location filename="../src/speedgraph.cpp" line="75"/> <location filename="../src/speedgraph.cpp" line="75"/>
<source>km</source> <source>km</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/speedgraph.cpp" line="13"/> <location filename="../src/speedgraph.cpp" line="80"/>
<location filename="../src/speedgraph.cpp" line="76"/> <source>ft</source>
<translation>ft</translation>
</message>
<message>
<location filename="../src/speedgraph.cpp" line="92"/>
<source>km/h</source> <source>km/h</source>
<translation>km/h</translation> <translation>km/h</translation>
</message> </message>
<message> <message>
<location filename="../src/speedgraph.cpp" line="21"/> <location filename="../src/speedgraph.cpp" line="19"/>
<source>Average</source> <source>Average</source>
<translation>Průměr</translation> <translation>Průměr</translation>
</message> </message>
<message> <message>
<location filename="../src/speedgraph.cpp" line="23"/> <location filename="../src/speedgraph.cpp" line="21"/>
<source>Maximum</source> <source>Maximum</source>
<translation>Maximum</translation> <translation>Maximum</translation>
</message> </message>
<message> <message>
<location filename="../src/speedgraph.cpp" line="80"/> <location filename="../src/speedgraph.cpp" line="83"/>
<source>mi</source> <source>mi</source>
<translation>mi</translation> <translation>mi</translation>
</message> </message>
<message> <message>
<location filename="../src/speedgraph.cpp" line="81"/> <location filename="../src/speedgraph.cpp" line="95"/>
<source>mi/h</source> <source>mi/h</source>
<translation>mi/h</translation> <translation>mi/h</translation>
</message> </message>

View File

@ -238,9 +238,13 @@ void GUI::createActions()
_showMapAction->setCheckable(true); _showMapAction->setCheckable(true);
_showMapAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_M)); _showMapAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_M));
connect(_showMapAction, SIGNAL(triggered(bool)), this, SLOT(showMap(bool))); connect(_showMapAction, SIGNAL(triggered(bool)), this, SLOT(showMap(bool)));
if (_maps.empty()) _clearMapCacheAction = new QAction(tr("Clear tile cache"), this);
connect(_clearMapCacheAction, SIGNAL(triggered()), this,
SLOT(clearMapCache()));
if (_maps.empty()) {
_showMapAction->setEnabled(false); _showMapAction->setEnabled(false);
else { _clearMapCacheAction->setEnabled(false);
} else {
createMapActions(); createMapActions();
_showMapAction->setChecked(true); _showMapAction->setChecked(true);
} }
@ -307,6 +311,8 @@ void GUI::createMenus()
_mapMenu = menuBar()->addMenu(tr("Map")); _mapMenu = menuBar()->addMenu(tr("Map"));
_mapMenu->addActions(_mapActions); _mapMenu->addActions(_mapActions);
_mapMenu->addSeparator(); _mapMenu->addSeparator();
_mapMenu->addAction(_clearMapCacheAction);
_mapMenu->addSeparator();
_mapMenu->addAction(_showMapAction); _mapMenu->addAction(_showMapAction);
_poiMenu = menuBar()->addMenu(tr("POI")); _poiMenu = menuBar()->addMenu(tr("POI"));
@ -738,6 +744,12 @@ void GUI::showToolbars(bool checked)
} }
} }
void GUI::clearMapCache()
{
_currentMap->clearCache();
_track->redraw();
}
void GUI::updateStatusBarInfo() void GUI::updateStatusBarInfo()
{ {
if (_files.count() == 0) { if (_files.count() == 0) {

View File

@ -45,6 +45,7 @@ private slots:
void showMap(bool checked); void showMap(bool checked);
void showGraphs(bool checked); void showGraphs(bool checked);
void showToolbars(bool checked); void showToolbars(bool checked);
void clearMapCache();
void mapChanged(int); void mapChanged(int);
void graphChanged(int); void graphChanged(int);
@ -114,6 +115,7 @@ private:
QAction *_closePOIAction; QAction *_closePOIAction;
QAction *_showPOIAction; QAction *_showPOIAction;
QAction *_showMapAction; QAction *_showMapAction;
QAction *_clearMapCacheAction;
QAction *_showGraphsAction; QAction *_showGraphsAction;
QAction *_showToolbarsAction; QAction *_showToolbarsAction;
QAction *_nextAction; QAction *_nextAction;

View File

@ -5,6 +5,8 @@
#include "config.h" #include "config.h"
#include "map.h" #include "map.h"
#include <QDebug>
Map::Map(QObject *parent, const QString &name, const QString &url) Map::Map(QObject *parent, const QString &name, const QString &url)
: QObject(parent) : QObject(parent)
@ -16,7 +18,7 @@ Map::Map(QObject *parent, const QString &name, const QString &url)
SLOT(emitLoaded())); SLOT(emitLoaded()));
QString path = TILES_DIR + QString("/") + _name; QString path = TILES_DIR + QString("/") + _name;
if (!QDir::home().mkpath(path)) if (!QDir().mkpath(path))
fprintf(stderr, "Error creating tiles dir: %s\n", qPrintable(path)); fprintf(stderr, "Error creating tiles dir: %s\n", qPrintable(path));
} }
@ -54,3 +56,13 @@ void Map::loadTiles(QList<Tile> &list)
if (!dl.empty()) if (!dl.empty())
Downloader::instance().get(dl); Downloader::instance().get(dl);
} }
void Map::clearCache()
{
QString path = TILES_DIR + QString("/") + _name;
QDir dir = QDir(path);
QStringList list = dir.entryList();
for (int i = 0; i < list.count(); i++)
dir.remove(list.at(i));
}

View File

@ -24,15 +24,16 @@ class Map : public QObject
{ {
Q_OBJECT Q_OBJECT
signals:
void loaded();
public: public:
Map(QObject *parent = 0, const QString &name = QString(), Map(QObject *parent = 0, const QString &name = QString(),
const QString &url = QString()); const QString &url = QString());
const QString &name() const {return _name;} const QString &name() const {return _name;}
void loadTiles(QList<Tile> &list); void loadTiles(QList<Tile> &list);
void clearCache();
signals:
void loaded();
private slots: private slots:
void emitLoaded(); void emitLoaded();

View File

@ -42,8 +42,6 @@ public:
public slots: public slots:
void movePositionMarker(qreal val); void movePositionMarker(qreal val);
private slots:
void redraw(); void redraw();
private: private: