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> <translation>Stoupání</translation>
</message> </message>
<message> <message>
<location filename="../src/elevationgraph.cpp" line="51"/> <location filename="../src/elevationgraph.cpp" line="52"/>
<source>Descent</source> <source>Descent</source>
<translation>Klesání</translation> <translation>Klesání</translation>
</message> </message>
<message> <message>
<location filename="../src/elevationgraph.cpp" line="53"/> <location filename="../src/elevationgraph.cpp" line="56"/>
<source>Minimum</source> <source>Minimum</source>
<translation>Minimum</translation> <translation>Minimum</translation>
</message> </message>
<message> <message>
<location filename="../src/elevationgraph.cpp" line="52"/> <location filename="../src/elevationgraph.cpp" line="54"/>
<source>Maximum</source> <source>Maximum</source>
<translation>Maximum</translation> <translation>Maximum</translation>
</message> </message>
@ -47,162 +47,188 @@
<context> <context>
<name>GUI</name> <name>GUI</name>
<message> <message>
<location filename="../src/gui.cpp" line="86"/> <location filename="../src/gui.cpp" line="91"/>
<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="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> <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="208"/> <location filename="../src/gui.cpp" line="235"/>
<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="100"/> <location filename="../src/gui.cpp" line="105"/>
<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="251"/> <location filename="../src/gui.cpp" line="281"/>
<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="91"/> <location filename="../src/gui.cpp" line="96"/>
<source>Open</source> <source>Open</source>
<translation>Otevřít</translation> <translation>Otevřít</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="79"/> <location filename="../src/gui.cpp" line="81"/>
<source>Quit</source> <source>Quit</source>
<translation>Ukončit</translation> <translation>Ukončit</translation>
</message> </message>
<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> <source>Save</source>
<translation>Uložit</translation> <translation>Uložit</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="105"/> <location filename="../src/gui.cpp" line="110"/>
<source>Close</source> <source>Close</source>
<translation>Zavřít</translation> <translation>Zavřít</translation>
</message> </message>
<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> <source>Load file</source>
<translation>Nahrát soubor</translation> <translation>Nahrát soubor</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="115"/> <location filename="../src/gui.cpp" line="125"/>
<source>Show</source> <source>Show</source>
<translation>Zobrazit</translation> <translation>Zobrazit</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="122"/> <location filename="../src/gui.cpp" line="132"/>
<location filename="../src/gui.cpp" line="145"/> <location filename="../src/gui.cpp" line="159"/>
<source>File</source> <source>File</source>
<translation>Soubor</translation> <translation>Soubor</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="134"/> <location filename="../src/gui.cpp" line="146"/>
<location filename="../src/gui.cpp" line="153"/> <location filename="../src/gui.cpp" line="168"/>
<source>POI</source> <source>POI</source>
<translation>POI</translation> <translation>POI</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="138"/> <location filename="../src/gui.cpp" line="150"/>
<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="171"/> <location filename="../src/gui.cpp" line="186"/>
<source>Elevation</source> <source>Elevation</source>
<translation>Výška</translation> <translation>Výška</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="172"/> <location filename="../src/gui.cpp" line="187"/>
<source>Speed</source> <source>Speed</source>
<translation>Rychlost</translation> <translation>Rychlost</translation>
</message> </message>
<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> <source>Maximum</source>
<translation>Maximum</translation> <translation>Maximum</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="309"/> <location filename="../src/gui.cpp" line="339"/>
<source>Minimum</source> <source>Minimum</source>
<translation>Minimum</translation> <translation>Minimum</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="84"/> <location filename="../src/gui.cpp" line="89"/>
<location filename="../src/gui.cpp" line="197"/> <location filename="../src/gui.cpp" line="212"/>
<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="199"/> <location filename="../src/gui.cpp" line="214"/>
<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="300"/> <location filename="../src/gui.cpp" line="330"/>
<source>Distance</source> <source>Distance</source>
<translation>Vzdálenost</translation> <translation>Vzdálenost</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="302"/> <location filename="../src/gui.cpp" line="332"/>
<source>Time</source> <source>Time</source>
<translation>Čas</translation> <translation>Čas</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="303"/> <location filename="../src/gui.cpp" line="333"/>
<source>Ascent</source> <source>Ascent</source>
<translation>Stoupání</translation> <translation>Stoupání</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="304"/> <location filename="../src/gui.cpp" line="334"/>
<location filename="../src/gui.cpp" line="306"/> <location filename="../src/gui.cpp" line="336"/>
<location filename="../src/gui.cpp" line="308"/> <location filename="../src/gui.cpp" line="338"/>
<location filename="../src/gui.cpp" line="310"/> <location filename="../src/gui.cpp" line="340"/>
<source>m</source> <source>m</source>
<translation>m</translation> <translation>m</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="305"/> <location filename="../src/gui.cpp" line="335"/>
<source>Descent</source> <source>Descent</source>
<translation>Klesání</translation> <translation>Klesání</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="344"/> <location filename="../src/gui.cpp" line="406"/>
<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="301"/> <location filename="../src/gui.cpp" line="331"/>
<location filename="../src/gui.cpp" line="349"/> <location filename="../src/gui.cpp" line="409"/>
<source>km</source> <source>km</source>
<translation>km</translation> <translation>km</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="241"/> <location filename="../src/gui.cpp" line="273"/>
<location filename="../src/gui.cpp" line="255"/> <location filename="../src/gui.cpp" line="285"/>
<source>Error</source> <source>Error</source>
<translation>Chyba</translation> <translation>Chyba</translation>
</message> </message>
<message> <message>
<location filename="../src/gui.cpp" line="242"/> <location filename="../src/gui.cpp" line="274"/>
<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="256"/> <location filename="../src/gui.cpp" line="286"/>
<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:

View File

@ -82,6 +82,9 @@ void GUI::createActions()
_exitAction->setShortcut(QKeySequence::Quit); _exitAction->setShortcut(QKeySequence::Quit);
connect(_exitAction, SIGNAL(triggered()), this, SLOT(close())); 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)), _aboutAction = new QAction(QIcon(QPixmap(APP_ICON)),
tr("About GPXSee"), this); tr("About GPXSee"), this);
connect(_aboutAction, SIGNAL(triggered()), this, SLOT(about())); connect(_aboutAction, SIGNAL(triggered()), this, SLOT(about()));
@ -144,9 +147,11 @@ void GUI::createMenus()
_poiMenu->addAction(_openPOIAction); _poiMenu->addAction(_openPOIAction);
_poiMenu->addAction(_showPOIAction); _poiMenu->addAction(_showPOIAction);
_aboutMenu = menuBar()->addMenu(tr("Help")); _helpMenu = menuBar()->addMenu(tr("Help"));
_aboutMenu->addAction(_aboutAction); _helpMenu->addAction(_keysAction);
_aboutMenu->addAction(_aboutQtAction); _helpMenu->addSeparator();
_helpMenu->addAction(_aboutAction);
_helpMenu->addAction(_aboutQtAction);
} }
void GUI::createToolBars() void GUI::createToolBars()
@ -213,6 +218,18 @@ void GUI::about()
+ QString("<a href=\""APP_HOMEPAGE"\">"APP_HOMEPAGE"</a>.</p>")); + 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() void GUI::openFile()
{ {
QStringList files = QFileDialog::getOpenFileNames(this, tr("Open file")); QStringList files = QFileDialog::getOpenFileNames(this, tr("Open file"));

View File

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