mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-02-17 16:20:48 +01:00
Added default maps
This commit is contained in:
parent
30e78591c5
commit
7723392c01
@ -14,5 +14,6 @@
|
|||||||
<file>icons/arrow-left-double.png</file>
|
<file>icons/arrow-left-double.png</file>
|
||||||
<file>icons/arrow-right-double.png</file>
|
<file>icons/arrow-right-double.png</file>
|
||||||
<file>lang/gpxsee_cs.qm</file>
|
<file>lang/gpxsee_cs.qm</file>
|
||||||
|
<file>maps.txt</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
2
maps.txt
Normal file
2
maps.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
OSM http://tile.openstreetmap.org/$z/$x/$y.png
|
||||||
|
Thunderforest http://tile.thunderforest.com/outdoors/$z/$x/$y.png
|
@ -75,6 +75,7 @@ void GUI::loadFiles()
|
|||||||
{
|
{
|
||||||
// Maps
|
// Maps
|
||||||
_maps = MapList::load(QString("%1/"MAP_LIST_FILE).arg(QDir::homePath()));
|
_maps = MapList::load(QString("%1/"MAP_LIST_FILE).arg(QDir::homePath()));
|
||||||
|
_maps += MapList::load(":/maps.txt");
|
||||||
|
|
||||||
// POI files
|
// POI files
|
||||||
QDir dir(QString("%1/"POI_DIR).arg(QDir::homePath()));
|
QDir dir(QString("%1/"POI_DIR).arg(QDir::homePath()));
|
||||||
@ -181,8 +182,10 @@ void GUI::createActions()
|
|||||||
connect(_showMapAction, SIGNAL(triggered(bool)), this, SLOT(showMap(bool)));
|
connect(_showMapAction, SIGNAL(triggered(bool)), this, SLOT(showMap(bool)));
|
||||||
if (_maps.empty())
|
if (_maps.empty())
|
||||||
_showMapAction->setEnabled(false);
|
_showMapAction->setEnabled(false);
|
||||||
else
|
else {
|
||||||
createMapActions();
|
createMapActions();
|
||||||
|
_showMapAction->setChecked(true);
|
||||||
|
}
|
||||||
|
|
||||||
// Settings actions
|
// Settings actions
|
||||||
_showGraphsAction = new QAction(tr("Show graphs"), this);
|
_showGraphsAction = new QAction(tr("Show graphs"), this);
|
||||||
@ -299,6 +302,9 @@ void GUI::createToolBars()
|
|||||||
void GUI::createTrackView()
|
void GUI::createTrackView()
|
||||||
{
|
{
|
||||||
_track = new Track(this);
|
_track = new Track(this);
|
||||||
|
|
||||||
|
if (_showMapAction->isChecked())
|
||||||
|
_track->setMap(_currentMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GUI::createTrackGraphs()
|
void GUI::createTrackGraphs()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user