1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-27 21:24:47 +01:00

Missing changes from previous commit

Yet another GUI polishing
This commit is contained in:
Martin Tůma 2016-04-12 23:15:17 +02:00
parent 2bf93f891a
commit 37d9bf1b9b
5 changed files with 58 additions and 64 deletions

View File

@ -35,7 +35,8 @@ HEADERS += src/config.h \
src/waypointitem.h \
src/palette.h \
src/heartrategraph.h \
src/range.h
src/range.h \
src/cpuarch.h
SOURCES += src/main.cpp \
src/gui.cpp \
src/gpx.cpp \

View File

@ -58,11 +58,6 @@
</context>
<context>
<name>GUI</name>
<message>
<location filename="../src/gui.cpp" line="193"/>
<source>About Qt</source>
<translation>O Qt</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="448"/>
<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>
@ -74,7 +69,7 @@
<translation>Otevřít soubor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="209"/>
<location filename="../src/gui.cpp" line="208"/>
<source>Save as</source>
<translation>Uložit jako</translation>
</message>
@ -84,159 +79,159 @@
<translation>Otevřít POI soubor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="198"/>
<location filename="../src/gui.cpp" line="197"/>
<source>Open</source>
<translation>Otevřít</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="180"/>
<location filename="../src/gui.cpp" line="181"/>
<source>Quit</source>
<translation>Ukončit</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="188"/>
<location filename="../src/gui.cpp" line="189"/>
<location filename="../src/gui.cpp" line="464"/>
<location filename="../src/gui.cpp" line="465"/>
<source>Keyboard controls</source>
<translation>Ovládací klávesy</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="203"/>
<location filename="../src/gui.cpp" line="202"/>
<source>Save</source>
<translation>Uložit</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="215"/>
<location filename="../src/gui.cpp" line="214"/>
<source>Close</source>
<translation>Zavřít</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="221"/>
<location filename="../src/gui.cpp" line="220"/>
<source>Reload</source>
<translation>Znovu načíst</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="381"/>
<location filename="../src/gui.cpp" line="379"/>
<source>Show</source>
<translation>Zobrazit</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="322"/>
<location filename="../src/gui.cpp" line="372"/>
<location filename="../src/gui.cpp" line="321"/>
<location filename="../src/gui.cpp" line="370"/>
<source>File</source>
<translation>Soubor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="186"/>
<location filename="../src/gui.cpp" line="187"/>
<location filename="../src/gui.cpp" line="487"/>
<location filename="../src/gui.cpp" line="488"/>
<source>Data sources</source>
<translation>Zdroje dat</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="229"/>
<location filename="../src/gui.cpp" line="228"/>
<source>Load POI file</source>
<translation>Nahrát POI soubor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="232"/>
<location filename="../src/gui.cpp" line="231"/>
<source>Close POI files</source>
<translation>Zavřit POI soubory</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="235"/>
<location filename="../src/gui.cpp" line="234"/>
<source>Show POIs</source>
<translation>Zobrazit POI</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="243"/>
<location filename="../src/gui.cpp" line="242"/>
<source>Show map</source>
<translation>Zobrazit mapu</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="249"/>
<location filename="../src/gui.cpp" line="248"/>
<source>Clear tile cache</source>
<translation>Vymazat mezipaměť dlaždic</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="259"/>
<location filename="../src/gui.cpp" line="263"/>
<location filename="../src/gui.cpp" line="258"/>
<location filename="../src/gui.cpp" line="262"/>
<location filename="../src/gui.cpp" line="474"/>
<source>Next map</source>
<translation>Následující mapa</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="270"/>
<location filename="../src/gui.cpp" line="269"/>
<source>Show graphs</source>
<translation>Zobrazovat grafy</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="277"/>
<location filename="../src/gui.cpp" line="276"/>
<source>Show toolbars</source>
<translation>Zobrazovat nástrojové lišty</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="284"/>
<location filename="../src/gui.cpp" line="283"/>
<source>Metric</source>
<translation>Metrické</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="290"/>
<location filename="../src/gui.cpp" line="289"/>
<source>Imperial</source>
<translation>Imperiální</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="296"/>
<location filename="../src/gui.cpp" line="295"/>
<source>Fullscreen mode</source>
<translation>Celoobrazovkový režim</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="304"/>
<location filename="../src/gui.cpp" line="303"/>
<source>Next</source>
<translation>Následující</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="307"/>
<location filename="../src/gui.cpp" line="306"/>
<source>Previous</source>
<translation>Předchozí</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="311"/>
<location filename="../src/gui.cpp" line="310"/>
<source>Last</source>
<translation>Poslední</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="314"/>
<location filename="../src/gui.cpp" line="313"/>
<source>First</source>
<translation>První</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="336"/>
<location filename="../src/gui.cpp" line="335"/>
<source>Map</source>
<translation>Mapa</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="343"/>
<location filename="../src/gui.cpp" line="342"/>
<source>POI</source>
<translation>POI</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="344"/>
<location filename="../src/gui.cpp" line="343"/>
<source>POI files</source>
<translation>POI soubory</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="352"/>
<location filename="../src/gui.cpp" line="351"/>
<source>Settings</source>
<translation>Nastavení</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="353"/>
<location filename="../src/gui.cpp" line="352"/>
<source>Units</source>
<translation>Jednotky</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="362"/>
<location filename="../src/gui.cpp" line="361"/>
<source>Help</source>
<translation>Nápověda</translation>
</message>
@ -270,6 +265,11 @@
<source>Next file</source>
<translation>Následující soubor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="444"/>
<source>Version </source>
<translation>Verze </translation>
</message>
<message>
<location filename="../src/gui.cpp" line="468"/>
<source>Previous file</source>
@ -349,21 +349,16 @@
<translation>Minimum</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="191"/>
<location filename="../src/gui.cpp" line="444"/>
<location filename="../src/gui.cpp" line="192"/>
<location filename="../src/gui.cpp" line="442"/>
<source>About GPXSee</source>
<translation>O aplikaci GPXSee</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="388"/>
<location filename="../src/gui.cpp" line="386"/>
<source>Navigation</source>
<translation>Navigace</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="446"/>
<source>GPX viewer and analyzer</source>
<translation>Prohlížeč a analyzátor GPX</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="490"/>
<source>Map sources</source>

View File

@ -26,6 +26,7 @@
#include "trackview.h"
#include "infoitem.h"
#include "filebrowser.h"
#include "cpuarch.h"
#include "gui.h"
@ -74,6 +75,10 @@ GUI::GUI(QWidget *parent) : QMainWindow(parent)
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(_track);
layout->addWidget(_trackGraphs);
layout->setContentsMargins(0, 0, 0, 0);
#ifdef Q_OS_WIN32
layout->setSpacing(0);
#endif // Q_OS_WIN32
QWidget *widget = new QWidget;
widget->setLayout(layout);
@ -190,8 +195,6 @@ void GUI::createActions()
_aboutAction = new QAction(QIcon(QPixmap(APP_ICON)),
tr("About GPXSee"), this);
connect(_aboutAction, SIGNAL(triggered()), this, SLOT(about()));
_aboutQtAction = new QAction(QIcon(QPixmap(QT_ICON)), tr("About Qt"), this);
connect(_aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
// File related actions
_openFileAction = new QAction(QIcon(QPixmap(OPEN_FILE_ICON)),
@ -364,7 +367,6 @@ void GUI::createMenus()
_helpMenu->addAction(_keysAction);
_helpMenu->addSeparator();
_helpMenu->addAction(_aboutAction);
_helpMenu->addAction(_aboutQtAction);
}
void GUI::createToolBars()
@ -398,6 +400,9 @@ void GUI::createToolBars()
void GUI::createTrackView()
{
_track = new TrackView(this);
#ifdef Q_OS_WIN32
_track->setFrameShape(QFrame::NoFrame);
#endif // Q_OS_WIN32
if (_showMapAction->isChecked())
_track->setMap(_currentMap);
@ -419,6 +424,9 @@ void GUI::createTrackGraphs()
_trackGraphs->setFixedHeight(200);
_trackGraphs->setSizePolicy(
QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed));
#ifdef Q_OS_WIN32
_trackGraphs->setDocumentMode(true);
#endif // Q_OS_WIN32
}
void GUI::createStatusBar()
@ -442,8 +450,10 @@ void GUI::about()
QMessageBox msgBox(this);
msgBox.setWindowTitle(tr("About GPXSee"));
msgBox.setText(QString("<h3>") + QString(APP_NAME " " APP_VERSION)
+ QString("</h3><p>") + tr("GPX viewer and analyzer") + QString("<p/>"));
msgBox.setText(QString("<h2>") + QString(APP_NAME) + QString("</h2><p>")
+ QString("<p>") + tr("Version ") + APP_VERSION + QString(" (")
+ CPU_ARCH + QString(", Qt ") + QString(QT_VERSION_STR)
+ QString(")</p>"));
msgBox.setInformativeText(QString("<table width=\"300\"><tr><td>")
+ tr("GPXSee is distributed under the terms of the GNU General Public "
"License version 3. For more info about GPXSee visit the project "
@ -782,7 +792,6 @@ void GUI::showToolbars(bool checked)
void GUI::showFullscreen(bool checked)
{
if (checked) {
_contentsMargins = centralWidget()->layout()->contentsMargins();
_frameStyle = _track->frameStyle();
_showGraphs = _showGraphsAction->isChecked();
@ -791,7 +800,6 @@ void GUI::showFullscreen(bool checked)
showToolbars(false);
showGraphs(false);
_showGraphsAction->setChecked(false);
centralWidget()->layout()->setContentsMargins(QMargins());
_track->setFrameStyle(QFrame::NoFrame);
showFullScreen();
@ -803,7 +811,6 @@ void GUI::showFullscreen(bool checked)
_showGraphsAction->setChecked(_showGraphs);
if (_showGraphsAction->isEnabled())
showGraphs(_showGraphs);
centralWidget()->layout()->setContentsMargins(_contentsMargins);
_track->setFrameStyle(_frameStyle);
showNormal();

View File

@ -159,7 +159,6 @@ private:
qreal _sliderPos;
int _frameStyle;
QMargins _contentsMargins;
bool _showGraphs;
};

View File

@ -1,8 +1,6 @@
#ifndef ICONS_H
#define ICONS_H
#include <QtGlobal>
#define APP_ICON ":/icons/gpxsee.png"
#define OPEN_FILE_ICON ":/icons/document-open.png"
#define SAVE_FILE_ICON ":/icons/document-save.png"
@ -18,10 +16,4 @@
#define FIRST_FILE_ICON ":/icons/arrow-left-double.png"
#define FULLSCREEN_ICON ":/icons/view-fullscreen.png"
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
#define QT_ICON ":/trolltech/qmessagebox/images/qtlogo-64.png"
#else
#define QT_ICON ":/qt-project.org/qmessagebox/images/qtlogo-64.png"
#endif
#endif /* ICONS_H */