1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Added keyboard controls info

This commit is contained in:
Martin Tůma 2015-10-21 01:09:17 +02:00
parent fd9e504c89
commit 2248b9b036
3 changed files with 90 additions and 45 deletions

View File

@ -29,17 +29,17 @@
<translation>Stoupání</translation>
</message>
<message>
<location filename="../src/elevationgraph.cpp" line="51"/>
<location filename="../src/elevationgraph.cpp" line="52"/>
<source>Descent</source>
<translation>Klesání</translation>
</message>
<message>
<location filename="../src/elevationgraph.cpp" line="53"/>
<location filename="../src/elevationgraph.cpp" line="56"/>
<source>Minimum</source>
<translation>Minimum</translation>
</message>
<message>
<location filename="../src/elevationgraph.cpp" line="52"/>
<location filename="../src/elevationgraph.cpp" line="54"/>
<source>Maximum</source>
<translation>Maximum</translation>
</message>
@ -47,162 +47,188 @@
<context>
<name>GUI</name>
<message>
<location filename="../src/gui.cpp" line="86"/>
<location filename="../src/gui.cpp" line="91"/>
<source>About Qt</source>
<translation>O Qt</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="200"/>
<location filename="../src/gui.cpp" line="215"/>
<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>
</message>
<message>
<location filename="../src/gui.cpp" line="208"/>
<location filename="../src/gui.cpp" line="235"/>
<source>Open file</source>
<translation>Otevřít soubor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="100"/>
<location filename="../src/gui.cpp" line="105"/>
<source>Save as</source>
<translation>Uložit jako</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="251"/>
<location filename="../src/gui.cpp" line="281"/>
<source>Open POI file</source>
<translation>Otevřít POI soubor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="91"/>
<location filename="../src/gui.cpp" line="96"/>
<source>Open</source>
<translation>Otevřít</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="79"/>
<location filename="../src/gui.cpp" line="81"/>
<source>Quit</source>
<translation>Ukončit</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="95"/>
<location filename="../src/gui.cpp" line="86"/>
<location filename="../src/gui.cpp" line="224"/>
<source>Keyboard controls</source>
<translation>Ovládací klávesy</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="100"/>
<source>Save</source>
<translation>Uložit</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="105"/>
<location filename="../src/gui.cpp" line="110"/>
<source>Close</source>
<translation>Zavřít</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="112"/>
<location filename="../src/gui.cpp" line="115"/>
<source>Reload</source>
<translation>Znovu načíst</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="122"/>
<source>Load file</source>
<translation>Nahrát soubor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="115"/>
<location filename="../src/gui.cpp" line="125"/>
<source>Show</source>
<translation>Zobrazit</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="122"/>
<location filename="../src/gui.cpp" line="145"/>
<location filename="../src/gui.cpp" line="132"/>
<location filename="../src/gui.cpp" line="159"/>
<source>File</source>
<translation>Soubor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="134"/>
<location filename="../src/gui.cpp" line="153"/>
<location filename="../src/gui.cpp" line="146"/>
<location filename="../src/gui.cpp" line="168"/>
<source>POI</source>
<translation>POI</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="138"/>
<location filename="../src/gui.cpp" line="150"/>
<source>Help</source>
<translation>Nápověda</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="171"/>
<location filename="../src/gui.cpp" line="186"/>
<source>Elevation</source>
<translation>Výška</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="172"/>
<location filename="../src/gui.cpp" line="187"/>
<source>Speed</source>
<translation>Rychlost</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="307"/>
<location filename="../src/gui.cpp" line="225"/>
<source>Next file</source>
<translation>Následující soubor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="226"/>
<source>Previous file</source>
<translation>Předchozí soubor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="228"/>
<source>Append modifier</source>
<translation>Modifikátor nahradit/přidat</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="337"/>
<source>Maximum</source>
<translation>Maximum</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="309"/>
<location filename="../src/gui.cpp" line="339"/>
<source>Minimum</source>
<translation>Minimum</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="84"/>
<location filename="../src/gui.cpp" line="197"/>
<location filename="../src/gui.cpp" line="89"/>
<location filename="../src/gui.cpp" line="212"/>
<source>About GPXSee</source>
<translation>O aplikaci GPXSee</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="199"/>
<location filename="../src/gui.cpp" line="214"/>
<source>GPX viewer and analyzer</source>
<translation>Prohlížeč a analyzátor GPX</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="300"/>
<location filename="../src/gui.cpp" line="330"/>
<source>Distance</source>
<translation>Vzdálenost</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="302"/>
<location filename="../src/gui.cpp" line="332"/>
<source>Time</source>
<translation>Čas</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="303"/>
<location filename="../src/gui.cpp" line="333"/>
<source>Ascent</source>
<translation>Stoupání</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="304"/>
<location filename="../src/gui.cpp" line="306"/>
<location filename="../src/gui.cpp" line="308"/>
<location filename="../src/gui.cpp" line="310"/>
<location filename="../src/gui.cpp" line="334"/>
<location filename="../src/gui.cpp" line="336"/>
<location filename="../src/gui.cpp" line="338"/>
<location filename="../src/gui.cpp" line="340"/>
<source>m</source>
<translation>m</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="305"/>
<location filename="../src/gui.cpp" line="335"/>
<source>Descent</source>
<translation>Klesání</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="344"/>
<location filename="../src/gui.cpp" line="406"/>
<source>%1 tracks</source>
<translation>Počet tras: %1</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="301"/>
<location filename="../src/gui.cpp" line="349"/>
<location filename="../src/gui.cpp" line="331"/>
<location filename="../src/gui.cpp" line="409"/>
<source>km</source>
<translation>km</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="241"/>
<location filename="../src/gui.cpp" line="255"/>
<location filename="../src/gui.cpp" line="273"/>
<location filename="../src/gui.cpp" line="285"/>
<source>Error</source>
<translation>Chyba</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="242"/>
<location filename="../src/gui.cpp" line="274"/>
<source>Error loading GPX file:
%1</source>
<translation>Soubor GPX nelze otevřít:
%1</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="256"/>
<location filename="../src/gui.cpp" line="286"/>
<source>Error loading POI file:
%1</source>
<translation>Soubor POI nelze otevřít:

View File

@ -82,6 +82,9 @@ void GUI::createActions()
_exitAction->setShortcut(QKeySequence::Quit);
connect(_exitAction, SIGNAL(triggered()), this, SLOT(close()));
// Help & About
_keysAction = new QAction(tr("Keyboard controls"), this);
connect(_keysAction, SIGNAL(triggered()), this, SLOT(keys()));
_aboutAction = new QAction(QIcon(QPixmap(APP_ICON)),
tr("About GPXSee"), this);
connect(_aboutAction, SIGNAL(triggered()), this, SLOT(about()));
@ -144,9 +147,11 @@ void GUI::createMenus()
_poiMenu->addAction(_openPOIAction);
_poiMenu->addAction(_showPOIAction);
_aboutMenu = menuBar()->addMenu(tr("Help"));
_aboutMenu->addAction(_aboutAction);
_aboutMenu->addAction(_aboutQtAction);
_helpMenu = menuBar()->addMenu(tr("Help"));
_helpMenu->addAction(_keysAction);
_helpMenu->addSeparator();
_helpMenu->addAction(_aboutAction);
_helpMenu->addAction(_aboutQtAction);
}
void GUI::createToolBars()
@ -213,6 +218,18 @@ void GUI::about()
+ QString("<a href=\""APP_HOMEPAGE"\">"APP_HOMEPAGE"</a>.</p>"));
}
void GUI::keys()
{
QMessageBox msgBox(this);
msgBox.setText(QString("<h3>") + tr("Keyboard controls") + QString("</h3>")
+ QString("<div><table><tr><td width=\"120\">") + tr("Next file")
+ QString("</td><td><i>SPACE</i></td></tr><tr><td>") + tr("Previous file")
+ QString("</td><td><i>BACKSPACE</i></td></tr><tr><td>")
+ tr("Append modifier") + QString("</td><td><i>SHIFT</i></td></tr>"
"</table></div>"));
msgBox.exec();
}
void GUI::openFile()
{
QStringList files = QFileDialog::getOpenFileNames(this, tr("Open file"));

View File

@ -29,6 +29,7 @@ public:
private slots:
void about();
void keys();
void saveFile();
void saveAs();
void openFile();
@ -54,7 +55,7 @@ private:
void keyPressEvent(QKeyEvent * event);
QMenu *_fileMenu;
QMenu *_aboutMenu;
QMenu *_helpMenu;
QMenu *_poiMenu;
QToolBar *_fileToolBar;
@ -63,6 +64,7 @@ private:
QActionGroup *_fileActionGroup;
QAction *_exitAction;
QAction *_keysAction;
QAction *_aboutAction;
QAction *_aboutQtAction;
QAction *_saveFileAction;