diff --git a/gpxsee.nsi b/gpxsee.nsi
index 711179c0..ded2cdcf 100644
--- a/gpxsee.nsi
+++ b/gpxsee.nsi
@@ -65,7 +65,7 @@ Section "GPXSee (required)" SEC_APP
; Write the uninstall keys for Windows
WriteRegStr HKLM "${REGENTRY}" "DisplayName" "GPXSee"
WriteRegStr HKLM "${REGENTRY}" "Publisher" "Martin Tuma"
- WriteRegStr HKLM "${REGENTRY}" "DisplayVersion" "2.11"
+ WriteRegStr HKLM "${REGENTRY}" "DisplayVersion" "2.12"
WriteRegStr HKLM "${REGENTRY}" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "${REGENTRY}" "NoModify" 1
WriteRegDWORD HKLM "${REGENTRY}" "NoRepair" 1
diff --git a/gpxsee.qrc b/gpxsee.qrc
index d24494c6..33194bcc 100644
--- a/gpxsee.qrc
+++ b/gpxsee.qrc
@@ -13,6 +13,7 @@
icons/arrow-right.png
icons/arrow-left-double.png
icons/arrow-right-double.png
+ icons/view-fullscreen.png
lang/gpxsee_cs.qm
diff --git a/icons/view-fullscreen.png b/icons/view-fullscreen.png
new file mode 100644
index 00000000..ceda8189
Binary files /dev/null and b/icons/view-fullscreen.png differ
diff --git a/lang/gpxsee_cs.ts b/lang/gpxsee_cs.ts
index 140a3ae5..a59b97fe 100644
--- a/lang/gpxsee_cs.ts
+++ b/lang/gpxsee_cs.ts
@@ -1,6 +1,6 @@
-
+
ElevationGraph
@@ -59,363 +59,368 @@
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
-
+
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
-
+
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
-
+
No GPX files loaded
Nejsou načteny žádné GPX soubory
-
+
Elevation
Výška
-
+
Speed
Rychlost
-
+
Heart rate
Tep
-
+
Next file
Následující soubor
-
+
Previous file
Předchozí soubor
-
+
First file
První soubor
-
+
Last file
Poslední 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:
-
+
The file format is one map entry per line, consisting of the map name and tiles URL delimited by a TAB character. The tile X and Y coordinates are replaced with $x and $y in the URL and the zoom level is replaced with $z. An example map file could look like:
Formát souboru je jeden mapový záznam na řádku, kde mapový záznam sestává ze jména mapy a URL dlaždic navzájem oddělených tabulátorem. Souřadnice dlaždice jsou v URL nahrazeny řetězci $x a $y, úroven přiblížení (zoom) pak řetězcem $z. Příklad:
-
+
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:
-
+
GPX files (*.gpx);;All files (*)
soubory GPX (*.gpx);;všechny soubory (*)
-
-
+
+
Line: %1
Řádka: %1
-
+
GPX files (*.gpx);;CSV files (*.csv);;All files (*)
soubory GPX (*.gpx);;soubory CSV (*.csv);;všechny soubory (*)
-
-
+
+
mi
mi
-
-
-
-
-
+
+
+
+
+
ft
ft
-
-
+
+
Maximum
Maximum
-
-
+
+
Minimum
Minimum
-
-
+
+
About GPXSee
O aplikaci GPXSee
-
+
Navigation
Navigace
-
+
GPX viewer and analyzer
Prohlížeč a analyzátor GPX
-
+
Map sources
Mapové zdroje
-
+
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 d943c6c4..eb35f27a 100644
--- a/src/config.h
+++ b/src/config.h
@@ -5,7 +5,7 @@
#define APP_NAME "GPXSee"
#define APP_HOMEPAGE "http://tumic.wz.cz/gpxsee"
-#define APP_VERSION "2.11"
+#define APP_VERSION "2.12"
#define FONT_FAMILY "Arial"
#define FONT_SIZE 12
diff --git a/src/gui.cpp b/src/gui.cpp
index 527258a0..2269c23f 100644
--- a/src/gui.cpp
+++ b/src/gui.cpp
@@ -180,6 +180,7 @@ void GUI::createActions()
_exitAction = new QAction(QIcon(QPixmap(QUIT_ICON)), tr("Quit"), this);
_exitAction->setShortcut(QKeySequence::Quit);
connect(_exitAction, SIGNAL(triggered()), this, SLOT(close()));
+ addAction(_exitAction);
// Help & About
_dataSourcesAction = new QAction(tr("Data sources"), this);
@@ -197,26 +198,31 @@ void GUI::createActions()
tr("Open"), this);
_openFileAction->setShortcut(QKeySequence::Open);
connect(_openFileAction, SIGNAL(triggered()), this, SLOT(openFile()));
+ addAction(_openFileAction);
_saveFileAction = new QAction(QIcon(QPixmap(SAVE_FILE_ICON)),
tr("Save"), this);
_saveFileAction->setShortcut(QKeySequence::Save);
_saveFileAction->setActionGroup(_fileActionGroup);
connect(_saveFileAction, SIGNAL(triggered()), this, SLOT(saveFile()));
+ addAction(_saveFileAction);
_saveAsAction = new QAction(QIcon(QPixmap(SAVE_AS_ICON)),
tr("Save as"), this);
_saveAsAction->setShortcut(QKeySequence::SaveAs);
_saveAsAction->setActionGroup(_fileActionGroup);
connect(_saveAsAction, SIGNAL(triggered()), this, SLOT(saveAs()));
+ addAction(_saveAsAction);
_closeFileAction = new QAction(QIcon(QPixmap(CLOSE_FILE_ICON)),
tr("Close"), this);
_closeFileAction->setShortcut(QKeySequence::Close);
_closeFileAction->setActionGroup(_fileActionGroup);
connect(_closeFileAction, SIGNAL(triggered()), this, SLOT(closeAll()));
+ addAction(_closeFileAction);
_reloadFileAction = new QAction(QIcon(QPixmap(RELOAD_FILE_ICON)),
tr("Reload"), this);
_reloadFileAction->setShortcut(QKeySequence::Refresh);
_reloadFileAction->setActionGroup(_fileActionGroup);
connect(_reloadFileAction, SIGNAL(triggered()), this, SLOT(reloadFile()));
+ addAction(_reloadFileAction);
// POI actions
_openPOIAction = new QAction(QIcon(QPixmap(OPEN_FILE_ICON)),
@@ -230,6 +236,7 @@ void GUI::createActions()
_showPOIAction->setCheckable(true);
_showPOIAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_P));
connect(_showPOIAction, SIGNAL(triggered(bool)), this, SLOT(showPOI(bool)));
+ addAction(_showPOIAction);
createPOIFilesActions();
// Map actions
@@ -238,6 +245,7 @@ void GUI::createActions()
_showMapAction->setCheckable(true);
_showMapAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_M));
connect(_showMapAction, SIGNAL(triggered(bool)), this, SLOT(showMap(bool)));
+ addAction(_showMapAction);
_clearMapCacheAction = new QAction(tr("Clear tile cache"), this);
connect(_clearMapCacheAction, SIGNAL(triggered()), this,
SLOT(clearMapCache()));
@@ -256,6 +264,7 @@ void GUI::createActions()
_showGraphsAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_G));
connect(_showGraphsAction, SIGNAL(triggered(bool)), this,
SLOT(showGraphs(bool)));
+ addAction(_showGraphsAction);
_showToolbarsAction = new QAction(tr("Show toolbars"), this);
_showToolbarsAction->setCheckable(true);
_showToolbarsAction->setChecked(true);
@@ -274,6 +283,13 @@ void GUI::createActions()
_imperialUnitsAction->setActionGroup(ag);
connect(_imperialUnitsAction, SIGNAL(triggered()), this,
SLOT(setImperialUnits()));
+ _fullscreenAction = new QAction(QIcon(QPixmap(FULLSCREEN_ICON)),
+ tr("Fullscreen mode"), this);
+ _fullscreenAction->setCheckable(true);
+ _fullscreenAction->setShortcut(QKeySequence("F11"));
+ connect(_fullscreenAction, SIGNAL(triggered(bool)), this,
+ SLOT(showFullscreen(bool)));
+ addAction(_fullscreenAction);
// Navigation actions
_nextAction = new QAction(QIcon(QPixmap(NEXT_FILE_ICON)), tr("Next"), this);
@@ -331,6 +347,8 @@ void GUI::createMenus()
_settingsMenu->addSeparator();
_settingsMenu->addAction(_showToolbarsAction);
_settingsMenu->addAction(_showGraphsAction);
+ _settingsMenu->addSeparator();
+ _settingsMenu->addAction(_fullscreenAction);
_helpMenu = menuBar()->addMenu(tr("Help"));
_helpMenu->addAction(_dataSourcesAction);
@@ -389,6 +407,7 @@ void GUI::createTrackGraphs()
_trackGraphs->setFixedHeight(200);
_trackGraphs->setSizePolicy(
QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed));
+ _trackGraphs->setDocumentMode(true);
}
void GUI::createStatusBar()
@@ -744,6 +763,37 @@ void GUI::showToolbars(bool checked)
}
}
+void GUI::showFullscreen(bool checked)
+{
+ if (checked) {
+ _contentsMargins = centralWidget()->layout()->contentsMargins();
+ _frameStyle = _track->frameStyle();
+ _showGraphs = _showGraphsAction->isChecked();
+
+ statusBar()->hide();
+ menuBar()->hide();
+ showToolbars(false);
+ showGraphs(false);
+ _showGraphsAction->setChecked(false);
+ centralWidget()->layout()->setContentsMargins(QMargins());
+ _track->setFrameStyle(QFrame::NoFrame);
+
+ showFullScreen();
+ } else {
+ statusBar()->show();
+ menuBar()->show();
+ if (_showToolbarsAction->isChecked())
+ showToolbars(true);
+ _showGraphsAction->setChecked(_showGraphs);
+ if (_showGraphsAction->isEnabled())
+ showGraphs(_showGraphs);
+ centralWidget()->layout()->setContentsMargins(_contentsMargins);
+ _track->setFrameStyle(_frameStyle);
+
+ showNormal();
+ }
+}
+
void GUI::clearMapCache()
{
_currentMap->clearCache();
@@ -854,17 +904,14 @@ void GUI::updateGraphTabs()
_trackGraphs->insertTab(i, gv, tabs[i].label);
}
- for (int i = 0; i < (int)ARRAY_SIZE(tabs); i++) {
- if (tabs[i].view->count()) {
- if (_showGraphsAction->isChecked())
- _trackGraphs->setHidden(false);
- _showGraphsAction->setEnabled(true);
- return;
- }
+ if (_trackGraphs->count()) {
+ if (_showGraphsAction->isChecked())
+ _trackGraphs->setHidden(false);
+ _showGraphsAction->setEnabled(true);
+ } else {
+ _trackGraphs->setHidden(true);
+ _showGraphsAction->setEnabled(false);
}
-
- _trackGraphs->setHidden(true);
- _showGraphsAction->setEnabled(false);
}
void GUI::updateTrackView()
diff --git a/src/gui.h b/src/gui.h
index 7ae9e5be..2da91031 100644
--- a/src/gui.h
+++ b/src/gui.h
@@ -45,6 +45,7 @@ private slots:
void showMap(bool checked);
void showGraphs(bool checked);
void showToolbars(bool checked);
+ void showFullscreen(bool checked);
void clearMapCache();
void mapChanged(int);
@@ -115,6 +116,7 @@ private:
QAction *_closePOIAction;
QAction *_showPOIAction;
QAction *_showMapAction;
+ QAction *_fullscreenAction;
QAction *_clearMapCacheAction;
QAction *_showGraphsAction;
QAction *_showToolbarsAction;
@@ -151,6 +153,10 @@ private:
int _trackCount;
qreal _sliderPos;
+
+ int _frameStyle;
+ QMargins _contentsMargins;
+ bool _showGraphs;
};
#endif // GUI_H
diff --git a/src/icons.h b/src/icons.h
index efc6b292..e057bde2 100644
--- a/src/icons.h
+++ b/src/icons.h
@@ -16,6 +16,7 @@
#define PREV_FILE_ICON ":/icons/arrow-left.png"
#define LAST_FILE_ICON ":/icons/arrow-right-double.png"
#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"
diff --git a/src/trackview.cpp b/src/trackview.cpp
index 1c83503c..f304522e 100644
--- a/src/trackview.cpp
+++ b/src/trackview.cpp
@@ -308,6 +308,13 @@ void TrackView::redraw()
resetCachedContent();
}
+void TrackView::rescale()
+{
+ _zoom = qMin(scale2zoom(trackScale()), scale2zoom(waypointScale()));
+ rescale(mapScale(_zoom));
+ _mapScale->setZoom(_zoom);
+}
+
void TrackView::wheelEvent(QWheelEvent *event)
{
if (_paths.isEmpty() && _locations.isEmpty())
@@ -467,6 +474,8 @@ void TrackView::resizeEvent(QResizeEvent *e)
if (_paths.isEmpty() && _locations.isEmpty())
return;
+ rescale();
+
QRectF br = trackBoundingRect() | waypointBoundingRect();
QRectF ba = br.adjusted(-TILE_SIZE, -TILE_SIZE, TILE_SIZE, TILE_SIZE);
diff --git a/src/trackview.h b/src/trackview.h
index 5bf826e6..53e11ef1 100644
--- a/src/trackview.h
+++ b/src/trackview.h
@@ -55,6 +55,7 @@ private:
qreal waypointScale() const;
qreal mapScale(int zoom) const;
void rescale(qreal scale);
+ void rescale();
void showMarkers(bool show);
void setTrackLineWidth(qreal width);