Skip to content
Commits on Source (10)
......@@ -30,8 +30,8 @@ endif(WIN32)
set(APPLICATION_NAME qmapshack)
set(APPLICATION_VERSION_MAJOR "1")
set(APPLICATION_VERSION_MINOR "9")
set(APPLICATION_VERSION_PATCH "1")
set(APPLICATION_VERSION_MINOR "10")
set(APPLICATION_VERSION_PATCH "0")
add_definitions(-DVER_MAJOR=${APPLICATION_VERSION_MAJOR} -DVER_MINOR=${APPLICATION_VERSION_MINOR} -DVER_STEP=${APPLICATION_VERSION_PATCH} -DAPPLICATION_NAME=${PROJECT_NAME})
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.2.1, 2017-09-17T18:37:15. -->
<!-- Written by QtCreator 4.4.1, 2017-12-21T08:47:17. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{dde28225-baec-4799-bf76-35ee2cd74ec5}</value>
<value type="QByteArray">{866bca39-16eb-4541-961c-07f20b41e42e}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
......@@ -59,16 +59,21 @@
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{d45dd77d-c492-49f6-8679-9d0bf3a1f5ad}</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 5.6.2 (qt5)</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Qt 5.6.2 (qt5)</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{8715122a-3e83-46ae-83d4-72f9a7d29e4c}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<valuelist type="QVariantList" key="CMake.Configuration">
<value type="QString">BUILD_FOR_LOCAL_SYSTEM:BOOL=ON</value>
<value type="QString">CMAKE_BUILD_TYPE:STRING=RelWithDebInfo</value>
<value type="QString">CMAKE_BUILD_TYPE:STRING=Debug</value>
<value type="QString">CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++-7</value>
<value type="QString">CMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc-7</value>
<value type="QString">CMAKE_INSTALL_PREFIX:PATH=/usr</value>
<value type="QString">CMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}</value>
<value type="QString">QT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable}</value>
<value type="QString">UPDATE_TRANSLATIONS:BOOL=OFF</value>
</valuelist>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/oeichler/Code/cpp/build_QMapShack</value>
......@@ -79,7 +84,7 @@
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
......@@ -95,7 +100,7 @@
<value type="QString">clean</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
......@@ -169,7 +174,7 @@
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguation.Title">qmapshack</value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory.default">/home/oeichler/Code/cpp/build_QMapShack/bin</value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory.default">/home/oeichlerx/Code/cpp/build_QMapShack/bin</value>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmapshack</value>
......@@ -222,15 +227,15 @@
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguation.Title">qttest</value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguation.Title">qmaptool</value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory.default">/home/oeichler/Code/cpp/build_QMapShack/bin</value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory.default">/home/oeichlerx/Code/cpp/build_QMapShack/bin</value>
<value type="int" key="PE.EnvironmentAspect.Base">-1</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qttest (deaktiviert)</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmaptool (deaktiviert)</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.qttest</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.qmaptool</value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
......
......@@ -15,7 +15,7 @@ And change back to build_QMapShack:
make
As everything is better with a GUI you might want to have a look at [TortoiseHg](http://tortoisehg.bitbucket.org/).
As everything is better with a GUI you might want to have a look at [TortoiseHg](https://tortoisehg.bitbucket.io/).
Dependencies
......
V 1.10.0
* Fine tune code for screen gestures.
[Issue #253] Tracksorting in Datawindow somehow random- should be alphabetical
[Issue #254] Selection in Datawindow does not highligt track on map
[Issue #257] Diagram - Zoom: Center of zoom should be the mouse position
[Issue #276] No-go areas in BRouter
[Issue #279] Suunto SML/LOG : wrong start time
[Issue #285] Do not add auto-increment number to waypoint names that have no number as last character
[Issue #284] Read *.qlb from QLandkarte
[Issue #277] Show position of min/max values for track properties like elevation, speed, etc
[Issue #275] Some Suunto sml files do not have <UTC> in first <sample>
[Issue #274] Make visibility of database a toggle option in the menu
[Issue #256] Option to show inclination in % instead of °
[Issue #272] Skip message box when changing an imported item
[Issue #271] Drag'n drop missing - Openambit files
[Issue #263] Reduce size of y label strings in graphs to avoid unintended truncation
[Issue #270] Ask to hide invalid points when loading a GPX file with invalid points.
[Issue #265] Inconsistent timestamp formats?
V 1.9.1
Add: Fullscreen mode
Add: Templates for project documentation
......
qmapshack (1.10.0-1~bpo9+1) stretch-backports; urgency=medium
* Rebuild for stretch-backports.
-- Bas Couwenberg <sebastic@debian.org> Mon, 01 Jan 2018 09:15:39 +0100
qmapshack (1.10.0-1) unstable; urgency=medium
* Move from experimental to unstable.
-- Bas Couwenberg <sebastic@debian.org> Tue, 26 Dec 2017 22:42:01 +0100
qmapshack (1.10.0-1~exp1) experimental; urgency=medium
* New upstream release.
* Bump Standards-Version to 4.1.2, no changes.
* Add lintian override for spelling-error-in-binary false positive.
-- Bas Couwenberg <sebastic@debian.org> Thu, 21 Dec 2017 17:00:39 +0100
qmapshack (1.9.1-1~bpo9+1) stretch-backports; urgency=medium
* Rebuild for stretch-backports.
......
......@@ -18,7 +18,7 @@ Build-Depends: cmake,
qttools5-dev,
qttools5-dev-tools,
qtscript5-dev
Standards-Version: 4.0.0
Standards-Version: 4.1.2
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-grass/qmapshack.git
Vcs-Git: https://anonscm.debian.org/git/pkg-grass/qmapshack.git -b stretch-backports
Homepage: https://bitbucket.org/maproom/qmapshack/wiki/Home
......
# False positive, abbreviation: Sea Lev. Pres.
qmapshack: spelling-error-in-binary usr/bin/qmapshack Pres Press
......@@ -23,7 +23,8 @@
#include "config.h"
#include "dem/CDemDraw.h"
#include "dem/CDemList.h"
#include "gis/CGisWidget.h"
#include "gis/CGisDatabase.h"
#include "gis/CGisWorkspace.h"
#include "gis/IGisLine.h"
#include "gis/WptIcons.h"
#include "gis/db/CSetupWorkspace.h"
......@@ -76,12 +77,29 @@ CMainWindow::CMainWindow()
initWptIcons();
IUnit::self().setUnitType((IUnit::type_e)cfg.value("MainWindow/units",IUnit::eTypeMetric).toInt(), this);
IUnit::setUnitType((IUnit::type_e)cfg.value("MainWindow/units",IUnit::eTypeMetric).toInt(), this);
IUnit::setSlopeMode((IUnit::slope_mode_e)cfg.value("Units/slopeMode", IUnit::eSlopeDegrees).toInt());
QByteArray tz;
IUnit::tz_mode_e tzmode;
bool useShortFormat;
tz = cfg.value("Units/timezone", "UTC").toByteArray();
tzmode = (IUnit::tz_mode_e)cfg.value("Units/timezone/mode", IUnit::eTZUtc).toInt();
useShortFormat = cfg.value("Units/time/useShortFormat", false).toBool();
IUnit::setTimeZoneSetup(tzmode, tz, useShortFormat);
IUnit::coord_format_e coordFormat;
coordFormat = (IUnit::coord_format_e)cfg.value("Units/coordFormat", IUnit::eCoordFormat1).toInt();
IUnit::setCoordFormat(coordFormat);
CKnownExtension::init(IUnit::self());
CActivityTrk::init();
gisWidget = new CGisWidget(menuProject, this);
dockGis->setWidget(gisWidget);
widgetGisWorkspace = new CGisWorkspace(menuProject, this);
dockWorkspace->setWidget(widgetGisWorkspace);
widgetGisDatabase = new CGisDatabase(this);
dockDatabase->setWidget(widgetGisDatabase);
// start ---- restore window geometry -----
cfg.beginGroup("MainWindow");
......@@ -133,6 +151,7 @@ CMainWindow::CMainWindow()
connect(actionPOIText, &QAction::changed, this, &CMainWindow::slotUpdateCurrentWidget);
connect(actionMapToolTip, &QAction::changed, this, &CMainWindow::slotUpdateCurrentWidget);
connect(actionNightDay, &QAction::changed, this, &CMainWindow::slotUpdateCurrentWidget);
connect(actionMinMaxTrackValues, &QAction::changed, this, &CMainWindow::slotUpdateCurrentWidget);
connect(actionProfileIsWindow, &QAction::toggled, this, &CMainWindow::slotSetProfileMode);
connect(actionSetupMapFont, &QAction::triggered, this, &CMainWindow::slotSetupMapFont);
connect(actionSetupMapBackground, &QAction::triggered, this, &CMainWindow::slotSetupMapBackground);
......@@ -146,7 +165,7 @@ CMainWindow::CMainWindow()
connect(actionSetupCoordFormat, &QAction::triggered, this, &CMainWindow::slotSetupCoordFormat);
connect(actionSetupToolbar, &QAction::triggered, this, &CMainWindow::slotSetupToolbar);
connect(actionImportDatabase, &QAction::triggered, this, &CMainWindow::slotImportDatabase);
connect(actionSaveGISData, &QAction::triggered, gisWidget, &CGisWidget::slotSaveAll);
connect(actionSaveGISData, &QAction::triggered, widgetGisWorkspace, &CGisWorkspace::slotSaveAll);
connect(actionLoadGISData, &QAction::triggered, this, &CMainWindow::slotLoadGISData);
connect(actionVrtBuilder, &QAction::triggered, this, &CMainWindow::slotBuildVrt);
connect(actionStoreView, &QAction::triggered, this, &CMainWindow::slotStoreView);
......@@ -172,9 +191,7 @@ CMainWindow::CMainWindow()
for(const QString &name : names)
{
CCanvas * view = new CCanvas(tabWidget, name);
tabWidget->addTab(view, view->objectName());
connect(view, &CCanvas::sigMousePosition, this, &CMainWindow::slotMousePosition);
CCanvas * view = addView(name);
cfg.beginGroup(name);
view->loadConfig(cfg);
......@@ -182,40 +199,28 @@ CMainWindow::CMainWindow()
}
if(names.isEmpty())
{
CCanvas * view = new CCanvas(tabWidget, QString());
CCanvas * view = addView(QString());
// call just to setup default values
view->loadConfig(cfg);
tabWidget->addTab(view, view->objectName());
connect(view, &CCanvas::sigMousePosition, this, &CMainWindow::slotMousePosition);
}
cfg.endGroup(); // Views
testForNoView();
CCanvas::gisLayerOpacity = cfg.value("gisLayerOpacity",1.0).toFloat();
gisWidget->setOpacity(CCanvas::gisLayerOpacity);
widgetGisWorkspace->setOpacity(CCanvas::gisLayerOpacity);
actionShowScale->setChecked(cfg.value("isScaleVisible", true).toBool());
actionShowGrid->setChecked(cfg.value("isGridVisible", false).toBool());
actionPOIText->setChecked(cfg.value("POIText", true).toBool());
actionMapToolTip->setChecked(cfg.value("MapToolTip", true).toBool());
actionNightDay->setChecked(cfg.value("isNight", false).toBool());
actionMinMaxTrackValues->setChecked(cfg.value("MinMaxTrackValues", false).toBool());
actionFlipMouseWheel->setChecked(cfg.value("flipMouseWheel", false).toBool());
actionProfileIsWindow->setChecked(cfg.value("profileIsWindow", false).toBool());
mapFont = cfg.value("mapFont", font()).value<QFont>();
tabWidget->setCurrentIndex(cfg.value("visibleCanvas",0).toInt());
cfg.endGroup(); // Canvas
QByteArray tz;
IUnit::tz_mode_e tzmode;
bool useShortFormat;
tz = cfg.value("Units/timezone", "UTC").toByteArray();
tzmode = (IUnit::tz_mode_e)cfg.value("Units/timezone/mode", IUnit::eTZUtc).toInt();
useShortFormat = cfg.value("Units/time/useShortFormat", false).toBool();
IUnit::setTimeZoneSetup(tzmode, tz, useShortFormat);
IUnit::coord_format_e coordFormat;
coordFormat = (IUnit::coord_format_e)cfg.value("Units/coordFormat", IUnit::eCoordFormat1).toInt();
IUnit::setCoordFormat(coordFormat);
QStatusBar * status = statusBar();
......@@ -234,7 +239,8 @@ CMainWindow::CMainWindow()
docks << dockMaps
<< dockDem
<< dockGis
<< dockWorkspace
<< dockDatabase
<< dockRte;
if (cfg.contains("MainWindow/activedocks"))
......@@ -270,16 +276,22 @@ CMainWindow::CMainWindow()
actionToggleDem->setIcon(QIcon(":/icons/32x32/ToggleDem.png"));
menuWindow->insertAction(actionSetupToolbar,actionToggleDem);
QAction * actionToggleGis = dockGis->toggleViewAction();
actionToggleGis->setObjectName("actionToggleGis");
actionToggleGis->setIcon(QIcon(":/icons/32x32/ToggleGis.png"));
menuWindow->insertAction(actionSetupToolbar,actionToggleGis);
QAction * actionToggleWorkspace = dockWorkspace->toggleViewAction();
actionToggleWorkspace->setObjectName("actionToggleWorkspace");
actionToggleWorkspace->setIcon(QIcon(":/icons/32x32/ToggleGis.png"));
menuWindow->insertAction(actionSetupToolbar,actionToggleWorkspace);
QAction * actionToggleDatabase = dockDatabase->toggleViewAction();
actionToggleDatabase->setObjectName("actionToggleDatabase");
actionToggleDatabase->setIcon(QIcon(":/icons/32x32/ToggleDatabase.png"));
menuWindow->insertAction(actionSetupToolbar,actionToggleDatabase);
QAction * actionToggleRte = dockRte->toggleViewAction();
actionToggleRte->setObjectName("actionToggleRte");
actionToggleRte->setIcon(QIcon(":/icons/32x32/ToggleRouter.png"));
menuWindow->insertAction(actionSetupToolbar,actionToggleRte);
menuWindow->insertSeparator(actionSetupToolbar);
QAction * separator = new QAction("---------------",this);
......@@ -298,6 +310,7 @@ CMainWindow::CMainWindow()
<< actionPOIText
<< actionNightDay
<< actionMapToolTip
<< actionMinMaxTrackValues
<< actionSetupDEMPaths
<< actionAbout
<< actionHelp
......@@ -327,7 +340,8 @@ CMainWindow::CMainWindow()
<< actionSetupToolbar
<< actionToggleMaps
<< actionToggleDem
<< actionToggleGis
<< actionToggleWorkspace
<< actionToggleDatabase
<< actionToggleRte
<< actionToggleDocks
<< actionToggleToolBar
......@@ -348,12 +362,14 @@ CMainWindow::CMainWindow()
<< actionPOIText
<< actionNightDay
<< actionMapToolTip
<< actionMinMaxTrackValues
<< actionProfileIsWindow
<< separator1
<< actionSetupToolbar
<< actionToggleMaps
<< actionToggleDem
<< actionToggleGis
<< actionToggleWorkspace
<< actionToggleDatabase
<< actionToggleRte
<< actionToggleDocks
<< actionFullScreen;
......@@ -383,7 +399,8 @@ void CMainWindow::prepareMenuForMac()
toolBar->toggleViewAction()->setMenuRole(QAction::NoRole);
dockMaps->toggleViewAction()->setMenuRole(QAction::NoRole);
dockDem->toggleViewAction()->setMenuRole(QAction::NoRole);
dockGis->toggleViewAction()->setMenuRole(QAction::NoRole);
dockWorkspace->toggleViewAction()->setMenuRole(QAction::NoRole);
dockDatabase->toggleViewAction()->setMenuRole(QAction::NoRole);
dockRte->toggleViewAction()->setMenuRole(QAction::NoRole);
}
......@@ -446,6 +463,7 @@ CMainWindow::~CMainWindow()
cfg.setValue("POIText", actionPOIText->isChecked());
cfg.setValue("MapToolTip", actionMapToolTip->isChecked());
cfg.setValue("isNight", actionNightDay->isChecked());
cfg.setValue("MinMaxTrackValues", actionMinMaxTrackValues->isChecked());
cfg.setValue("flipMouseWheel", actionFlipMouseWheel->isChecked());
cfg.setValue("profileIsWindow",actionProfileIsWindow->isChecked());
cfg.setValue("mapFont", mapFont);
......@@ -463,7 +481,7 @@ CMainWindow::~CMainWindow()
/*
Delete all canvas objects now to make sure they are destroyed before all
other objects. This allows children of the canvas to access central objects
like CGisWidget safely upon their destruction. (e.g. CMouseRangeTrk to reset
like CGisWorkspace safely upon their destruction. (e.g. CMouseRangeTrk to reset
it's track's draw mode by key)
*/
qDeleteAll(allViews);
......@@ -476,12 +494,22 @@ CMainWindow::~CMainWindow()
cfg.setValue("Units/timezone", tz);
cfg.setValue("Units/timezone/mode", tzmode);
cfg.setValue("Units/time/useShortFormat", useShortFormat);
cfg.setValue("Units/coordFormat", IUnit::getCoordFormat());
cfg.setValue("Units/slopeMode", IUnit::getSlopeMode());
toolBarConfig->saveSettings();
}
CCanvas *CMainWindow::addView(const QString& name)
{
CCanvas * view = new CCanvas(tabWidget, name);
tabWidget->addTab(view, view->objectName());
connect(view, &CCanvas::sigMousePosition, this, &CMainWindow::slotMousePosition);
connect(actionMinMaxTrackValues, &QAction::triggered, view, &CCanvas::slotUpdateTrackStatistic);
return view;
}
QWidget * CMainWindow::getBestWidgetForParent()
{
QWidget * w = CProgressDialog::self();
......@@ -546,6 +574,11 @@ bool CMainWindow::isMapToolTip() const
return actionMapToolTip->isChecked();
}
bool CMainWindow::isMinMaxTrackValues() const
{
return actionMinMaxTrackValues->isChecked();
}
bool CMainWindow::flipMouseWheel() const
{
return actionFlipMouseWheel->isChecked();
......@@ -582,6 +615,22 @@ CCanvas* CMainWindow::getVisibleCanvas() const
return dynamic_cast<CCanvas*>(tabWidget->currentWidget());
}
QList<CCanvas*> CMainWindow::getCanvas() const
{
QList<CCanvas*> result;
const int N = tabWidget->count();
for(int n = 0; n < N; n++)
{
CCanvas * canvas = dynamic_cast<CCanvas*>(tabWidget->widget(n));
if(canvas != nullptr)
{
result << canvas;
}
}
return result;
}
void CMainWindow::zoomCanvasTo(const QRectF rect)
{
CCanvas * canvas = getVisibleCanvas();
......@@ -754,11 +803,8 @@ void CMainWindow::slotAddCanvas()
}
}
CCanvas * canvas = new CCanvas(tabWidget, QString());
tabWidget->addTab(canvas, canvas->objectName());
connect(canvas, &CCanvas::sigMousePosition, this, &CMainWindow::slotMousePosition);
tabWidget->setCurrentWidget(canvas);
CCanvas * view = addView(QString());
tabWidget->setCurrentWidget(view);
testForNoView();
}
......@@ -938,7 +984,7 @@ void CMainWindow::slotMousePosition(const QPointF& pos, qreal ele, qreal slope)
{
QString val, unit;
IUnit::self().meter2elevation(ele, val, unit);
lblElevation->setText(tr("Ele: %1%2").arg(val).arg(unit));
lblElevation->setText(tr("Ele.: %1%2").arg(val).arg(unit));
lblElevation->show();
}
else
......@@ -950,7 +996,7 @@ void CMainWindow::slotMousePosition(const QPointF& pos, qreal ele, qreal slope)
{
QString val;
val.sprintf("%.1f", slope);
lblSlope->setText(tr("Slope: %1%2").arg(val).arg(QChar(0260)));
lblSlope->setText(tr("Slope: %1%2", "terrain").arg(val).arg("°"));
lblSlope->show();
}
else
......@@ -1126,7 +1172,7 @@ void CMainWindow::loadGISData(const QStringList& filenames)
{
for(const QString &filename : filenames)
{
gisWidget->loadGisProject(filename);
widgetGisWorkspace->loadGisProject(filename);
}
}
......@@ -1251,11 +1297,16 @@ void CMainWindow::slotToggleDocks()
{
if (docksVisible())
{
dockStates = saveState();
hideDocks();
}
else
{
showDocks();
if (!dockStates.isEmpty())
{
restoreState(dockStates);
}
}
}
......@@ -1450,7 +1501,7 @@ void CMainWindow::dragEnterEvent(QDragEnterEvent *event)
QFileInfo fi(urls[0].path());
QString ext = fi.suffix().toUpper();
if ((ext == "QMS") || (ext == "GPX") || (ext == "SLF") || (ext == "FIT") || (ext == "TCX"))
if ((ext == "QMS") || (ext == "GPX") || (ext == "SLF") || (ext == "FIT") || (ext == "TCX") || (ext == "SML") || (ext == "LOG"))
{
event->acceptProposedAction();
}
......
......@@ -26,7 +26,8 @@
class CMapList;
class CDemList;
class QLabel;
class CGisWidget;
class CGisWorkspace;
class CGisDatabase;
class CCanvas;
class CToolBarConfig;
struct SGisLine;
......@@ -55,6 +56,7 @@ public:
bool isNight() const;
bool isPOIText() const;
bool isMapToolTip() const;
bool isMinMaxTrackValues() const;
bool flipMouseWheel() const;
bool profileIsWindow() const;
const QFont& getMapFont() const
......@@ -79,6 +81,7 @@ public:
@return If the currently visible tab does not contain a CCanvas object 0 is returned.
*/
CCanvas* getVisibleCanvas() const;
QList<CCanvas*> getCanvas() const;
QAction * getMapSetupAction()
{
......@@ -150,6 +153,7 @@ private:
void hideDocks();
void displayRegular();
void displayFullscreen();
CCanvas * addView(const QString &name);
static CMainWindow * pSelf;
......@@ -161,7 +165,8 @@ private:
QFont mapFont;
CGisWidget * gisWidget;
CGisWorkspace * widgetGisWorkspace;
CGisDatabase * widgetGisDatabase;
CToolBarConfig * toolBarConfig;
......
This diff is collapsed.
......@@ -55,7 +55,7 @@
<x>0</x>
<y>0</y>
<width>800</width>
<height>22</height>
<height>23</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
......@@ -87,6 +87,7 @@
<addaction name="actionPOIText"/>
<addaction name="actionMapToolTip"/>
<addaction name="actionNightDay"/>
<addaction name="actionMinMaxTrackValues"/>
<addaction name="separator"/>
<addaction name="actionFlipMouseWheel"/>
<addaction name="actionProfileIsWindow"/>
......@@ -118,7 +119,7 @@
</widget>
<widget class="QMenu" name="menuProject">
<property name="title">
<string>Project</string>
<string>Workspace</string>
</property>
<addaction name="actionAddEmptyProject"/>
<addaction name="actionSearchGoogle"/>
......@@ -144,12 +145,6 @@
</widget>
<widget class="QStatusBar" name="statusbar"/>
<widget class="QDockWidget" name="dockMaps">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="features">
<set>QDockWidget::DockWidgetFeatureMask</set>
</property>
......@@ -187,12 +182,6 @@
</widget>
</widget>
<widget class="QDockWidget" name="dockDem">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="features">
<set>QDockWidget::DockWidgetFeatureMask</set>
</property>
......@@ -225,74 +214,59 @@
</layout>
</widget>
</widget>
<widget class="QDockWidget" name="dockGis">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<widget class="QDockWidget" name="dockWorkspace">
<property name="features">
<set>QDockWidget::DockWidgetFeatureMask</set>
</property>
<property name="windowTitle">
<string>Data</string>
<string>Workspace</string>
</property>
<attribute name="dockWidgetArea">
<number>2</number>
</attribute>
<widget class="QWidget" name="dockWidgetContents_2"/>
</widget>
<widget class="QDockWidget" name="dockRte">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<widget class="QToolBar" name="toolBar">
<property name="windowTitle">
<string>Toolbar</string>
</property>
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
</widget>
<widget class="QDockWidget" name="dockDatabase">
<property name="features">
<set>QDockWidget::DockWidgetFeatureMask</set>
</property>
<property name="windowTitle">
<string>Route</string>
<string>Database</string>
</property>
<attribute name="dockWidgetArea">
<number>2</number>
</attribute>
<widget class="QWidget" name="dockWidgetContents_5">
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
<widget class="QWidget" name="dockWidgetContents_4"/>
</widget>
<widget class="QDockWidget" name="dockRte">
<property name="features">
<set>QDockWidget::DockWidgetFeatureMask</set>
</property>
<property name="bottomMargin">
<number>0</number>
<property name="windowTitle">
<string>Routing</string>
</property>
<attribute name="dockWidgetArea">
<number>2</number>
</attribute>
<widget class="QWidget" name="dockWidgetContents_6">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="CRouterSetup" name="widget" native="true"/>
<widget class="CRouterSetup" name="widget_2" native="true"/>
</item>
</layout>
</widget>
</widget>
<widget class="QToolBar" name="toolBar">
<property name="windowTitle">
<string>Toolbar</string>
</property>
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
</widget>
<action name="actionAddMapView">
<property name="icon">
<iconset resource="resources.qrc">
......@@ -857,6 +831,24 @@
<string>F11</string>
</property>
</action>
<action name="actionMinMaxTrackValues">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/icons/32x32/TrackMinMax.png</normaloff>:/icons/32x32/TrackMinMax.png</iconset>
</property>
<property name="text">
<string>Min./Max. Track Values</string>
</property>
<property name="toolTip">
<string>Show the minimum and maximum values of the track properties along the track in the map view.</string>
</property>
<property name="shortcut">
<string>Ctrl+N</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
......
/**********************************************************************************************
Copyright (C) 2014 Oliver Eichler oliver.eichler@gmx.de
Copyright (C) 2017 Norbert Truchsess norbert.truchsess@t-online.de
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -22,7 +23,7 @@
#include "canvas/CCanvasSetup.h"
#include "dem/CDemDraw.h"
#include "gis/CGisDraw.h"
#include "gis/CGisWidget.h"
#include "gis/CGisWorkspace.h"
#include "gis/IGisLine.h"
#include "gis/Poi.h"
#include "gis/ovl/CGisItemOvlArea.h"
......@@ -38,6 +39,7 @@
#include "mouse/CMouseMoveWpt.h"
#include "mouse/CMouseNormal.h"
#include "mouse/CMousePrint.h"
#include "mouse/CMouseRadiusWpt.h"
#include "mouse/CMouseRangeTrk.h"
#include "mouse/CMouseSelect.h"
#include "mouse/CMouseWptBubble.h"
......@@ -104,9 +106,13 @@ CCanvas::CCanvas(QWidget *parent, const QString &name)
labelStatusMessages = new QLabel(this);
labelStatusMessages->setWordWrap(true);
labelStatusMessages->setMinimumWidth(300);
labelStatusMessages->setAlignment(Qt::AlignJustify);
labelStatusMessages->hide();
labelTrackStatistic = new QLabel(this);
labelTrackStatistic->setWordWrap(true);
labelTrackStatistic->setMinimumWidth(300);
labelTrackStatistic->hide();
connect(map, &CMapDraw::sigStartThread, mapLoadIndicator, &QLabel::show);
connect(map, &CMapDraw::sigStopThread, mapLoadIndicator, &QLabel::hide);
......@@ -207,6 +213,11 @@ void CCanvas::resetMouse()
}
}
void CCanvas::mouseTrackingLost()
{
mouseLost = true;
}
void CCanvas::setMouseCursor(IMouse& mouse, const QString& src)
{
if(underMouse())
......@@ -223,6 +234,13 @@ void CCanvas::setMouseMoveWpt(CGisItemWpt& wpt)
setMouseCursor(*mouse, "setMouseMoveWpt");
}
void CCanvas::setMouseRadiusWpt(CGisItemWpt& wpt)
{
mouse->deleteLater();
mouse = new CMouseRadiusWpt(wpt, gis, this);
setMouseCursor(*mouse, "setMouseWptRadius");
}
void CCanvas::setMouseEditTrk(const QPointF &pt)
{
mouse->deleteLater();
......@@ -332,15 +350,18 @@ void CCanvas::resizeEvent(QResizeEvent * e)
setDrawContextSize(e->size());
QWidget::resizeEvent(e);
const QRect& r = rect();
// move map loading indicator to new center of canvas
QPoint p1(mapLoadIndicator->width()>>1, mapLoadIndicator->height()>>1);
mapLoadIndicator->move(rect().center() - p1);
mapLoadIndicator->move(r.center() - p1);
QPoint p2(demLoadIndicator->width()>>1, demLoadIndicator->height()>>1);
demLoadIndicator->move(rect().center() - p2);
demLoadIndicator->move(r.center() - p2);
labelStatusMessages->move(20,50);
slotUpdateTrackStatistic(CMainWindow::self().isMinMaxTrackValues());
setSizeTrackProfile();
}
......@@ -381,6 +402,7 @@ void CCanvas::paintEvent(QPaintEvent*)
drawStatusMessages(p);
drawTrackStatistic(p);
drawScale(p);
p.end();
......@@ -544,9 +566,20 @@ void CCanvas::drawStatusMessages(QPainter& p)
{
if(labelStatusMessages->isVisible())
{
QRect r = labelStatusMessages->rect();
QRect r = labelStatusMessages->frameGeometry();
r.adjust(-5, -5, 5, 5);
p.setPen(CDraw::penBorderGray);
p.setBrush(CDraw::brushBackWhite);
p.drawRoundedRect(r, RECT_RADIUS, RECT_RADIUS);
}
}
void CCanvas::drawTrackStatistic(QPainter& p)
{
if(labelTrackStatistic->isVisible())
{
QRect r = labelTrackStatistic->frameGeometry();
r.adjust(-5, -5, 5, 5);
r.moveTopLeft(QPoint(15,45));
p.setPen(CDraw::penBorderGray);
p.setBrush(CDraw::brushBackWhite);
p.drawRoundedRect(r, RECT_RADIUS, RECT_RADIUS);
......@@ -648,9 +681,11 @@ void CCanvas::slotCheckTrackOnFocus()
delete plotTrackProfile;
delete colorLegend;
keyTrackOnFocus.clear();
labelTrackStatistic->clear();
labelTrackStatistic->hide();
// get access to next track object
CGisItemTrk * trk2 = dynamic_cast<CGisItemTrk*>(CGisWidget::self().getItemByKey(key));
CGisItemTrk * trk2 = dynamic_cast<CGisItemTrk*>(CGisWorkspace::self().getItemByKey(key));
if(nullptr == trk2)
{
return;
......@@ -669,6 +704,32 @@ void CCanvas::slotCheckTrackOnFocus()
// finally store the new key as track on focus
keyTrackOnFocus = key;
slotUpdateTrackStatistic(CMainWindow::self().isMinMaxTrackValues());
}
}
void CCanvas::slotUpdateTrackStatistic(bool show)
{
CGisItemTrk * trk = dynamic_cast<CGisItemTrk*>(CGisWorkspace::self().getItemByKey(keyTrackOnFocus));
if(show && trk)
{
QString text = trk->getInfo(IGisItem::eFeatureShowName|IGisItem::eFeatureShowActivity);
text += trk->getInfoLimits();
labelTrackStatistic->setMinimumWidth((trk->getActivities().getActivityCount() > 1) ? 450 : 350);
labelTrackStatistic->setText(text);
labelTrackStatistic->adjustSize();
labelTrackStatistic->move(rect().width() - labelTrackStatistic->width() - 20, rect().height() - labelTrackStatistic->height() - 60);
labelTrackStatistic->show();
update();
}
else
{
labelTrackStatistic->clear();
labelTrackStatistic->hide();
}
}
......@@ -886,7 +947,7 @@ void CCanvas::showProfileAsWindow(bool yes)
delete plotTrackProfile;
keyTrackOnFocus.clear();
CGisWidget::self().focusTrkByKey(true, key);
CGisWorkspace::self().focusTrkByKey(true, key);
}
}
......@@ -957,31 +1018,15 @@ bool CCanvas::event(QEvent *event)
{
return gestureEvent(static_cast<QGestureEvent*>(event));
}
else if (isPinch)
else if (mouseLost)
{
QMouseEvent * me = dynamic_cast<QMouseEvent*>(event);
if (me != nullptr)
{
isPinch = false;
// right after executing a pinchgesture when placing the finger at some
// other place on the screen the generated QMouseEvent sometimes is not the expected
// MouseButtonPress but a MouseMove. As the last known position is where the first
// finger was set to start the pinch this MouseMove forces the map to 'jump' by a major
// and unexpected distance.
// As a workouround an artificial MouseButtonPress-event is inserted which resets the start
// of the beginning MouseMove to the current finger-position.
if (event->type() == QEvent::MouseMove)
{
QWidget::event(new QMouseEvent(QEvent::MouseButtonPress,
me->pos(),
me->windowPos(),
me->globalPos(),
Qt::LeftButton,
Qt::LeftButton,
me->modifiers()));
}
// notify IMouse that the upcomming QMouseEvent needs special treatment
// as some mouse-events may have been lost
mouse->afterMouseLostEvent(me);
mouseLost = false;
}
}
return QWidget::event(event);
......@@ -1019,7 +1064,8 @@ bool CCanvas::gestureEvent(QGestureEvent* e)
slotTriggerCompleteUpdate(needsRedraw);
}
}
isPinch = true;
mouseLost = true;
mouse->pinchGestureEvent(pinch);
}
return true;
}
/**********************************************************************************************
Copyright (C) 2014 Oliver Eichler oliver.eichler@gmx.de
Copyright (C) 2017 Norbert Truchsess norbert.truchsess@t-online.de
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -108,7 +109,9 @@ public:
void resetMouse();
void mouseTrackingLost();
void setMouseMoveWpt(CGisItemWpt& wpt);
void setMouseRadiusWpt(CGisItemWpt& wpt);
void setMouseEditTrk(CGisItemTrk& trk);
void setMouseRangeTrk(CGisItemTrk& trk);
void setMouseEditTrk(const QPointF& pt);
......@@ -160,6 +163,7 @@ signals:
public slots:
void slotTriggerCompleteUpdate(CCanvas::redraw_e flags);
void slotUpdateTrackStatistic(bool show);
protected:
bool event(QEvent *) override;
......@@ -180,8 +184,10 @@ private slots:
void slotToolTip();
void slotCheckTrackOnFocus();
private:
void drawStatusMessages(QPainter& p);
void drawTrackStatistic(QPainter& p);
void drawScale(QPainter& p);
void setZoom(bool in, redraw_e &needsRedraw);
void setSizeTrackProfile();
......@@ -189,6 +195,7 @@ private:
void setDrawContextSize(const QSize& s);
void setMouseCursor(IMouse& mouse, const QString& src);
QColor backColor = "#FFFFBF"; //< the background color used in case of missing map tiles
redraw_e needsRedraw = eRedrawAll; //< set true to initiate a complete redraw of the screen content
CMapDraw * map; //< the map object attached to this canvas
......@@ -226,12 +233,14 @@ private:
IGisItem::key_t keyTrackOnFocus;
/// the track profile plot
QPointer<IPlot> plotTrackProfile;
/// a label with a track
QLabel * labelTrackStatistic;
QLabel * labelStatusMessages;
QMap<QString, QString> statusMessages;
QMutex mousePressMutex;
bool isPinch = false;
bool mouseLost = false;
};
#endif //CCANVAS_H
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>622</height>
<width>245</width>
<height>250</height>
</rect>
</property>
<property name="windowTitle">
......@@ -73,17 +73,11 @@
<item>
<widget class="QLabel" name="labelIcon">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>64</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
......@@ -91,7 +85,7 @@
<pixmap resource="../resources.qrc">:/icons/48x48/Help.png</pixmap>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
</widget>
</item>
......
/**********************************************************************************************
Copyright (C) 2014 Oliver Eichler oliver.eichler@gmx.de
Copyright (C) 2017 Norbert Truchsess norbert.truchsess@t-online.de
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -20,6 +21,7 @@
#include "device/IDevice.h"
#include "gis/CGisListWks.h"
#include "gis/prj/IGisProject.h"
#include "gis/rte/router/IRouter.h"
#include "helpers/CSelectCopyAction.h"
#ifdef HAVE_DBUS
......@@ -122,6 +124,26 @@ void IDevice::getItemsByArea(const QRectF& area, IGisItem::selflags_t flags, QLi
}
}
void IDevice::getNogoAreas(QVector<IRouter::circle_t> & areas)
{
const int N = childCount();
for(int n = 0; n < N; n++)
{
IGisProject * project = dynamic_cast<IGisProject*>(child(n));
if(project != nullptr)
{
project->getNogoAreas(areas);
continue;
}
IDevice * device = dynamic_cast<IDevice*>(child(n));
if(device != nullptr)
{
device->getNogoAreas(areas);
}
}
}
IGisItem * IDevice::getItemByKey(const IGisItem::key_t& key)
{
IGisItem * item = nullptr;
......
/**********************************************************************************************
Copyright (C) 2014 Oliver Eichler oliver.eichler@gmx.de
Copyright (C) 2017 Norbert Truchsess norbert.truchsess@t-online.de
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -23,6 +24,7 @@
#include <QTreeWidgetItem>
#include "gis/IGisItem.h"
#include "gis/rte/router/IRouter.h"
class CGisDraw;
class CGisItemWpt;
class CDeviceGarmin;
......@@ -68,6 +70,7 @@ public:
void getItemsByPos(const QPointF& pos, QList<IGisItem *> &items);
void getItemsByArea(const QRectF& area, IGisItem::selflags_t flags, QList<IGisItem *> &items);
void getNogoAreas(QVector<IRouter::circle_t> &areas);
IGisItem * getItemByKey(const IGisItem::key_t& key);
void getItemsByKeys(const QList<IGisItem::key_t>& keys, QList<IGisItem*>& items);
void editItemByKey(const IGisItem::key_t& key);
......
/**********************************************************************************************
Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
**********************************************************************************************/
#include "gis/CGisDatabase.h"
#include "helpers/CSettings.h"
#include <QtWidgets>
CGisDatabase * CGisDatabase::pSelf = nullptr;
CGisDatabase::CGisDatabase(QWidget *parent)
: QWidget(parent)
{
pSelf = this;
setupUi(this);
SETTINGS;
treeDB->header()->restoreState(cfg.value("Database/treeDB/state", treeDB->header()->saveState()).toByteArray());
connect(treeDB, &CGisListDB::sigChanged, this, &CGisDatabase::slotHelpText);
QTimer::singleShot(1, this, SLOT(slotHelpText()));
}
CGisDatabase::~CGisDatabase()
{
SETTINGS;
cfg.setValue("Database/treeDB/state", treeDB->header()->saveState());
}
void CGisDatabase::slotHelpText()
{
frameHelp->setVisible(treeDB->topLevelItemCount() == 0);
}
void CGisDatabase::postEventForDb(QEvent * event)
{
QCoreApplication::postEvent(treeDB, event);
}
void CGisDatabase::sendEventForDb(QEvent * event)
{
QCoreApplication::sendEvent(treeDB, event);
}
/**********************************************************************************************
Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
**********************************************************************************************/
#ifndef CGISDATABASE_H
#define CGISDATABASE_H
#include "ui_IGisDatabase.h"
class CGisDatabase : public QWidget, private Ui::IGisDatabase
{
Q_OBJECT
public:
static CGisDatabase& self()
{
return *pSelf;
}
virtual ~CGisDatabase();
void postEventForDb(QEvent * event);
void sendEventForDb(QEvent * event);
private slots:
void slotHelpText();
private:
friend class CMainWindow;
CGisDatabase(QWidget * parent);
static CGisDatabase * pSelf;
};
#endif //CGISDATABASE_H
......@@ -17,7 +17,7 @@
**********************************************************************************************/
#include "gis/CGisDraw.h"
#include "gis/CGisWidget.h"
#include "gis/CGisWorkspace.h"
#include "helpers/CDraw.h"
#include <QtWidgets>
......@@ -25,7 +25,7 @@
CGisDraw::CGisDraw(CCanvas *parent)
: IDrawContext("gis", CCanvas::eRedrawGis, parent)
{
connect(&CGisWidget::self(), &CGisWidget::sigChanged, this, &CGisDraw::emitSigCanvasUpdate);
connect(&CGisWorkspace::self(), &CGisWorkspace::sigChanged, this, &CGisDraw::emitSigCanvasUpdate);
}
CGisDraw::~CGisDraw()
......@@ -34,7 +34,7 @@ CGisDraw::~CGisDraw()
void CGisDraw::draw(QPainter& p, const QRect& rect)
{
CGisWidget::self().fastDraw(p, rect, this);
CGisWorkspace::self().fastDraw(p, rect, this);
}
void CGisDraw::drawt(buffer_t& currentBuffer)
......@@ -63,5 +63,5 @@ void CGisDraw::drawt(buffer_t& currentBuffer)
USE_ANTI_ALIASING(p,true);
p.translate(-pp);
CGisWidget::self().draw(p,viewport, this);
CGisWorkspace::self().draw(p,viewport, this);
}