diff --git a/gpxsee.pro b/gpxsee.pro index bde502dd..6ae2b2ef 100644 --- a/gpxsee.pro +++ b/gpxsee.pro @@ -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 \ diff --git a/lang/gpxsee_cs.ts b/lang/gpxsee_cs.ts index 7ed48f94..65e1ae14 100644 --- a/lang/gpxsee_cs.ts +++ b/lang/gpxsee_cs.ts @@ -58,11 +58,6 @@ 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 @@ -74,7 +69,7 @@ Otevřít soubor - + Save as Uložit jako @@ -84,159 +79,159 @@ Otevřít POI soubor - + Open Otevřít - + Quit 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 - + Close POI files Zavřit POI soubory - + Show POIs Zobrazit POI - + Show map Zobrazit mapu - + Clear tile cache Vymazat mezipaměť dlaždic - - + + Next map Následující mapa - + Show graphs Zobrazovat grafy - + Show toolbars Zobrazovat nástrojové lišty - + Metric Metrické - + Imperial Imperiální - + Fullscreen mode Celoobrazovkový režim - + Next Následující - + Previous Předchozí - + Last Poslední - + First První - + Map Mapa - + POI POI - + POI files POI soubory - + Settings Nastavení - + Units Jednotky - + Help Nápověda @@ -270,6 +265,11 @@ Next file Následující soubor + + + Version + Verze + Previous file @@ -349,21 +349,16 @@ Minimum - - + + About GPXSee O aplikaci GPXSee - + Navigation Navigace - - - GPX viewer and analyzer - Prohlížeč a analyzátor GPX - Map sources diff --git a/src/gui.cpp b/src/gui.cpp index 34cf7e37..7e2b6610 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -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("

") + QString(APP_NAME " " APP_VERSION) - + QString("

") + tr("GPX viewer and analyzer") + QString("

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

") + QString(APP_NAME) + QString("

") + + QString("

") + tr("Version ") + APP_VERSION + QString(" (") + + CPU_ARCH + QString(", Qt ") + QString(QT_VERSION_STR) + + QString(")

")); msgBox.setInformativeText(QString("
") + 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(); diff --git a/src/gui.h b/src/gui.h index c3b9cfcb..3010870d 100644 --- a/src/gui.h +++ b/src/gui.h @@ -159,7 +159,6 @@ private: qreal _sliderPos; int _frameStyle; - QMargins _contentsMargins; bool _showGraphs; }; diff --git a/src/icons.h b/src/icons.h index e057bde2..4b6bcf93 100644 --- a/src/icons.h +++ b/src/icons.h @@ -1,8 +1,6 @@ #ifndef ICONS_H #define ICONS_H -#include - #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 */