diff --git a/lang/gpxsee_cs.ts b/lang/gpxsee_cs.ts index c8432f38..acb04aa9 100644 --- a/lang/gpxsee_cs.ts +++ b/lang/gpxsee_cs.ts @@ -1,6 +1,6 @@ - + ElevationGraph @@ -47,32 +47,32 @@ GUI - + About Qt O Qt - + 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 file Otevřít soubor - + Save as Uložit jako - + Open POI file Otevřít POI soubor - + Open Otevřít @@ -82,189 +82,221 @@ Ukončit - - - + + + Keyboard controls Ovládací klávesy - + Save Uložit - + Close Zavřít - + Reload Znovu načíst - + Show Zobrazit - - + + File Soubor - + + + + Data sources + Zdroje dat + + + Load POI file Nahrát POI soubor - + Show POIs Zobrazit POI - + Show map Zobrazit mapu - + Show graphs Zobrazovat grafy - + Show toolbars Zobrazovat nástrojové lišty - + Map Mapa - + POI POI - + Settings Nastavení - + Help Nápověda - + Elevation Výška - + Speed Rychlost - + Next file Následující soubor - + Previous file Předchozí soubor - + Append modifier Modifiká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: + + + + 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: + + + + Line: %1 Řádka: %1 - + Maximum Maximum - + Minimum Minimum - - + + About GPXSee O aplikaci GPXSee - + GPX viewer and analyzer Prohlížeč a analyzátor GPX - + + Map sources + Mapové zdroje + + + + The file format is one URL per line where the tile X and Y coordinates are replaced with $x and $y. The zoom level is replaced with $z. An example map file could look like: + Formát souboru je jedno URL na řádku, kde souřadnice dlaždice jsou nahrazeny řetězci $x a $y. Úroveň přiblížení (zoom) je pak nahrazena řetězcem $z. Příklad: + + + + POIs + POI body + + + Distance Vzdálenost - + Time Čas - + Ascent Stoupání - - - - + + + + m m - + Descent Klesání - + %1 tracks Počet tras: %1 - - + + km km - - + + Error Chyba - + Error loading GPX file: %1 Soubor GPX nelze otevřít: %1 - + Error loading POI file: %1 Soubor POI nelze otevřít: diff --git a/src/config.h b/src/config.h index a935b03e..83893867 100644 --- a/src/config.h +++ b/src/config.h @@ -8,8 +8,13 @@ #define FONT_FAMILY "Arial" #define FONT_SIZE 12 -#define POI_DIR "POI" -#define TILES_DIR "tiles" -#define MAP_LIST_FILE TILES_DIR"/list.txt" +#if defined(Q_OS_WIN32) +#define APP_DIR "GPXSee" +#else +#define APP_DIR ".gpxsee" +#endif +#define POI_DIR APP_DIR"/POI" +#define TILES_DIR APP_DIR"/tiles" +#define MAP_LIST_FILE APP_DIR"/maps.txt" #endif /* CONFIG_H */ diff --git a/src/gui.cpp b/src/gui.cpp index cd8a8cfa..621e1032 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -125,6 +125,8 @@ void GUI::createActions() connect(_exitAction, SIGNAL(triggered()), this, SLOT(close())); // Help & About + _dataSourcesAction = new QAction(tr("Data sources"), this); + connect(_dataSourcesAction, SIGNAL(triggered()), this, SLOT(dataSources())); _keysAction = new QAction(tr("Keyboard controls"), this); connect(_keysAction, SIGNAL(triggered()), this, SLOT(keys())); _aboutAction = new QAction(QIcon(QPixmap(APP_ICON)), @@ -221,6 +223,7 @@ void GUI::createMenus() _settingsMenu->addAction(_showGraphsAction); _helpMenu = menuBar()->addMenu(tr("Help")); + _helpMenu->addAction(_dataSourcesAction); _helpMenu->addAction(_keysAction); _helpMenu->addSeparator(); _helpMenu->addAction(_aboutAction); @@ -317,6 +320,34 @@ void GUI::keys() msgBox.exec(); } +void GUI::dataSources() +{ + QMessageBox msgBox(this); + + msgBox.setWindowTitle(tr("Data sources")); + msgBox.setText(QString("

") + tr("Data sources") + QString("

")); + msgBox.setInformativeText( + QString("

") + tr("Map sources") + QString("

") + + tr("Map (tiles) source URLs are read on program startup from the " + "following file:") + + QString("

") + QDir::homePath() + + QString("/"MAP_LIST_FILE"

") + + tr("The file format is one URL per line where the tile X and Y " + "coordinates are replaced with $x and $y. The zoom level is " + "replaced with $z. An example map file could look like:") + + QString("

http://tile.server.com/map/$z/$x/$y.png
" + "http://mapserver.org/map/$z-$x-$y

") + + + QString("

") + tr("POIs") + QString("

") + + tr("To make GPXSee load a POI file automatically on startup, add " + "the file to the following directory:") + + QString("

") + QDir::homePath() + + QString("/"POI_DIR"

") + ); + + msgBox.exec(); +} + void GUI::openFile() { QStringList files = QFileDialog::getOpenFileNames(this, tr("Open file")); diff --git a/src/gui.h b/src/gui.h index cf40efb8..c14cfb66 100644 --- a/src/gui.h +++ b/src/gui.h @@ -30,6 +30,7 @@ public: private slots: void about(); void keys(); + void dataSources(); void saveFile(); void saveAs(); void openFile(); @@ -74,6 +75,7 @@ private: QAction *_exitAction; QAction *_keysAction; + QAction *_dataSourcesAction; QAction *_aboutAction; QAction *_aboutQtAction; QAction *_saveFileAction;