Commit a08fd19e authored by Benjamin Jakimow's avatar Benjamin Jakimow
Browse files

MapWidget: actions to move to next/previous last/first TSD


MapCanvasItems test support line-breaks
refactoring (a lot of)
fixed Hide/Show date in TimeSeriesTreeView context menu
async image loading: uses QgsTask progress values
Signed-off-by: Benjamin Jakimow's avatarbenjamin.jakimow <benjamin.jakimow@geo.hu-berlin.de>
parent 0d6958ca
......@@ -45,6 +45,7 @@ import qgis.utils
from eotimeseriesviewer.utils import *
from eotimeseriesviewer.timeseries import *
from eotimeseriesviewer.profilevisualization import SpectralTemporalVisualization
from eotimeseriesviewer.mapvisualization import MapView
from eotimeseriesviewer import SpectralProfile, SpectralLibrary, SpectralLibraryPanel
from eotimeseriesviewer.externals.qps.maptools import MapTools, CursorLocationMapTool, QgsMapToolSelect, QgsMapToolSelectionHandler
from eotimeseriesviewer.externals.qps.cursorlocationvalue import CursorLocationInfoModel, CursorLocationInfoDock
......@@ -170,7 +171,7 @@ class TimeSeriesViewerUI(QMainWindow,
# from timeseriesviewer.mapvisualization import MapViewDockUI
# self.dockMapViews = addDockWidget(MapViewDockUI(self))
self.dockTimeSeries = addDockWidget(TimeSeriesDockUI(self))
self.dockTimeSeries = addDockWidget(TimeSeriesDock(self))
self.dockTimeSeries.initActions(self)
from eotimeseriesviewer.profilevisualization import ProfileViewDockUI
......@@ -227,15 +228,26 @@ class TimeSeriesViewerUI(QMainWindow,
self.dockTimeSeries.raise_()
def registerMapToolAction(self, a:QAction):
def registerMapToolAction(self, a:QAction)->QAction:
"""
Registers this action as map tools action. If triggered, all other mapt tool actions with be set unchecked
:param a: QAction
:return: QAction
"""
assert isinstance(a, QAction)
if a not in self.mMapToolActions:
self.mMapToolActions.append(a)
a.setCheckable(True)
a.toggled.connect(lambda b, action=a: self.onMapToolActionToggled(b, action))
return a
def onMapToolActionToggled(self, b:bool, action:QAction):
"""
Reacts on togglinga map tool
:param b:
:param action:
"""
assert isinstance(action, QAction)
otherActions = [a for a in self.mMapToolActions if a != action]
......@@ -334,6 +346,15 @@ class TimeSeriesViewer(QgisInterface, QObject):
TimeSeriesViewer._instance = self
self.ui = TimeSeriesViewerUI()
mvd = self.ui.dockMapViews
dts = self.ui.dockTimeSeries
mw = self.ui.mapWidget
from eotimeseriesviewer.timeseries import TimeSeriesDock
from eotimeseriesviewer.mapvisualization import MapViewDock, MapWidget
assert isinstance(mvd, MapViewDock)
assert isinstance(mw, MapWidget)
assert isinstance(dts, TimeSeriesDock)
def onClosed():
TimeSeriesViewer._instance = None
self.ui.sigAboutToBeClosed.connect(onClosed)
......@@ -349,25 +370,28 @@ class TimeSeriesViewer(QgisInterface, QObject):
self.mSpatialMapExtentInitialized = False
self.mTimeSeries.sigTimeSeriesDatesAdded.connect(self.onTimeSeriesChanged)
self.ui.dockTimeSeries.setTimeSeries(self.mTimeSeries)
dts.setTimeSeries(self.mTimeSeries)
self.ui.dockSensors.setTimeSeries(self.mTimeSeries)
mw.setTimeSeries(self.mTimeSeries)
mvd.setTimeSeries(self.mTimeSeries)
mvd.setMapWidget(mw)
self.spectralTemporalVis = SpectralTemporalVisualization(self.mTimeSeries, self.ui.dockProfiles)
self.spectralTemporalVis.pixelLoader.sigLoadingFinished.connect(
lambda dt: self.ui.dockSystemInfo.addTimeDelta('Pixel Profile', dt))
assert isinstance(self, TimeSeriesViewer)
from eotimeseriesviewer.mapvisualization import SpatialTemporalVisualization
self.spatialTemporalVis = SpatialTemporalVisualization(self)
self.spatialTemporalVis.sigShowProfiles.connect(self.onShowProfile)
self.ui.dockMapViews.sigCrsChanged.connect(self.spatialTemporalVis.setCrs)
self.ui.dockMapViews.sigMapSizeChanged.connect(self.spatialTemporalVis.setMapSize)
self.ui.dockMapViews.sigMapCanvasColorChanged.connect(self.spatialTemporalVis.setMapBackgroundColor)
self.spatialTemporalVis.sigCRSChanged.connect(self.ui.dockMapViews.setCrs)
self.spatialTemporalVis.sigMapSizeChanged.connect(self.ui.dockMapViews.setMapSize)
self.spatialTemporalVis.sigSpatialExtentChanged.connect(self.timeSeries().setCurrentSpatialExtent)
self.spatialTemporalVis.sigVisibleDatesChanged.connect(self.timeSeries().setCurrentDates)
self.spectralTemporalVis.sigMoveToTSD.connect(self.setCurrentDate)
mw.sigSpatialExtentChanged.connect(self.timeSeries().setCurrentSpatialExtent)
mw.sigVisibleDatesChanged.connect(self.timeSeries().setVisibleDates)
mw.sigMapViewAdded.connect(self.onMapViewAdded)
self.ui.actionNextTSD.triggered.connect(mw.moveToNextTSD)
self.ui.actionPreviousTSD.triggered.connect(mw.moveToPreviousTSD)
self.ui.actionNextTSDFast.triggered.connect(mw.moveToNextTSDFast)
self.ui.actionPreviousTSDFast.triggered.connect(mw.moveToPreviousTSDFast)
self.ui.actionFirstTSD.triggered.connect(mw.moveToFirstTSD)
self.ui.actionLastTSD.triggered.connect(mw.moveToLastTSD)
tstv = self.ui.dockTimeSeries.timeSeriesTreeView
assert isinstance(tstv, TimeSeriesTreeView)
......@@ -428,7 +452,6 @@ class TimeSeriesViewer(QgisInterface, QObject):
#initMapToolAction(self.ui.dockLabeling., MapTools.AddFeature)
# set default map tool
self.ui.actionPan.toggle()
......@@ -438,18 +461,18 @@ class TimeSeriesViewer(QgisInterface, QObject):
self.ui.dockCursorLocation.mLocationInfoModel.setNodeExpansion(CursorLocationInfoModel.ALWAYS_EXPAND)
# D.actionIdentifyMapLayers.triggered.connect(lambda: self.spatialTemporalVis.activateMapTool('identifyMapLayers'))
self.ui.actionAddMapView.triggered.connect(self.spatialTemporalVis.mMapViewDock.createMapView)
self.ui.actionAddMapView.triggered.connect(mvd.createMapView)
self.ui.actionAddTSD.triggered.connect(lambda: self.addTimeSeriesImages(None))
self.ui.actionAddVectorData.triggered.connect(lambda: self.addVectorData())
self.ui.actionRemoveTSD.triggered.connect(lambda: self.mTimeSeries.removeTSDs(self.ui.dockTimeSeries.selectedTimeSeriesDates()))
self.ui.actionRefresh.triggered.connect(self.spatialTemporalVis.refresh)
self.ui.actionRemoveTSD.triggered.connect(lambda: self.mTimeSeries.removeTSDs(dts.selectedTimeSeriesDates()))
self.ui.actionRefresh.triggered.connect(mw.refresh)
self.ui.actionLoadTS.triggered.connect(self.loadTimeSeriesDefinition)
self.ui.actionClearTS.triggered.connect(self.clearTimeSeries)
self.ui.actionSaveTS.triggered.connect(self.saveTimeSeriesDefinition)
self.ui.actionAddTSExample.triggered.connect(lambda : self.loadExampleTimeSeries(loadAsync=False))
self.ui.actionAddTSExample.triggered.connect(lambda: self.loadExampleTimeSeries(loadAsync=False))
self.ui.actionLoadTimeSeriesStack.triggered.connect(self.loadTimeSeriesStack)
self.ui.actionShowCrosshair.toggled.connect(self.spatialTemporalVis.setCrosshairVisibility)
#self.ui.actionShowCrosshair.toggled.connect(mw.setCrosshairVisibility)
self.ui.actionExportMapsToImages.triggered.connect(lambda: self.exportMapsToImages())
self.spectralTemporalVis.ui.actionLoadProfileRequest.triggered.connect(self.activateIdentifyTemporalProfileMapTool)
......@@ -488,7 +511,7 @@ class TimeSeriesViewer(QgisInterface, QObject):
temporalProfileLayer.setName('EOTS Temporal Profiles')
self.mMapLayerStore.addMapLayer(temporalProfileLayer)
self.spatialTemporalVis.sigMapViewAdded.connect(self.onMapViewAdded)
eotimeseriesviewer.labeling.MAP_LAYER_STORES.append(self.mMapLayerStore)
eotimeseriesviewer.labeling.registerLabelShortcutEditorWidget()
......@@ -619,7 +642,12 @@ class TimeSeriesViewer(QgisInterface, QObject):
setValue(Keys.MapImageExportDirectory, path)
def onMapViewAdded(self, mapView):
def onMapViewAdded(self, mapView:MapView):
"""
:param mapView:
:return:
"""
mapView.addLayer(self.spectralTemporalVis.temporalProfileLayer())
mapView.addLayer(self.spectralLibrary())
......@@ -663,10 +691,7 @@ class TimeSeriesViewer(QgisInterface, QObject):
Moves the viewport of the scroll window to a specific TimeSeriesDate
:param tsd: TimeSeriesDate
"""
assert isinstance(tsd, TimeSeriesDate)
self.spatialTemporalVis.navigateToTSD(tsd)
self.ui.dockTimeSeries.showTSD(tsd)
self.ui.mapWidget.setCurrentDate(tsd)
def mapCanvases(self)->list:
......@@ -674,7 +699,7 @@ class TimeSeriesViewer(QgisInterface, QObject):
Returns all MapCanvases of the spatial visualization
:return: [list-of-MapCanvases]
"""
return self.spatialTemporalVis.mapCanvases()
return self.ui.mapWidget.mapCanvases()
def mapLayerStore(self)->QgsMapLayerStore:
"""
......@@ -695,7 +720,7 @@ class TimeSeriesViewer(QgisInterface, QObject):
x, y = c.asPoint()
crs = layer.crs()
center = SpatialPoint(crs, x, y)
self.spatialTemporalVis.setSpatialCenter(center)
self.ui.mapWidget.setSpatialCenter(center)
self.ui.actionRefresh.trigger()
def onSelectFeatureOptionTriggered(self):
......@@ -704,24 +729,17 @@ class TimeSeriesViewer(QgisInterface, QObject):
m = self.ui.actionSelectFeatures.menu()
if isinstance(a, QAction) and isinstance(m, QMenu) and a in m.actions():
for ca in m.actions():
assert isinstance(ca, QAction)
if ca == a:
for option in m.actions():
assert isinstance(option, QAction)
if option == a:
self.ui.actionSelectFeatures.setIcon(a.icon())
self.ui.actionSelectFeatures.setToolTip(a.toolTip())
ca.setChecked(ca == a)
self.setMapTool(MapTools.SelectFeature)
option.setChecked(option == a)
self.onSelectFeatureTriggered()
def onCrosshairPositionChanged(self, spatialPoint:SpatialPoint):
"""
Synchronizes all crosshair positions. Takes care of CRS differences.
:param spatialPoint: SpatialPoint of the new Crosshair position
"""
sender = self.sender()
from .mapcanvas import MapCanvas
for mapCanvas in self.mapCanvases():
if isinstance(mapCanvas, MapCanvas) and mapCanvas != sender:
mapCanvas.setCrosshairPosition(spatialPoint, emitSignal=False)
def onSelectFeatureTriggered(self):
self.setMapTool(MapTools.SelectFeature)
def initQGISConnection(self):
......@@ -740,13 +758,12 @@ class TimeSeriesViewer(QgisInterface, QObject):
def onSyncRequest(qgisChanged:bool):
if self.ui.optionSyncMapCenter.isChecked():
self.spatialTemporalVis.syncQGISCanvasCenter(qgisChanged)
self.ui.mapWidget.syncQGISCanvasCenter(qgisChanged)
self.spatialTemporalVis.sigSpatialExtentChanged.connect(lambda: onSyncRequest(False))
self.ui.mapWidget.sigSpatialExtentChanged.connect(lambda: onSyncRequest(False))
iface.mapCanvas().extentsChanged.connect(lambda: onSyncRequest(True))
def onShowSettingsDialog(self):
from eotimeseriesviewer.settings import SettingsDialog
d = SettingsDialog(self.ui)
......@@ -785,6 +802,10 @@ class TimeSeriesViewer(QgisInterface, QObject):
if isinstance(v, QColor):
self.ui.dockMapViews.setMapBackgroundColor(v)
v = value(Keys.MapTextColor)
if isinstance(v, QColor):
self.ui.dockMapViews.setMapTextColor(v)
v = value(Keys.MapSize)
if isinstance(v, QSize):
self.ui.mapWidget.setMapSize(v)
......@@ -797,6 +818,17 @@ class TimeSeriesViewer(QgisInterface, QObject):
:param kwds:
:return:
"""
if mapToolKey == MapTools.SelectFeature:
if self.ui.optionSelectFeaturesRectangle.isChecked():
mapToolKey = MapTools.SelectFeature
elif self.ui.optionSelectFeaturesPolygon.isChecked():
mapToolKey = MapTools.SelectFeatureByPolygon
elif self.ui.optionSelectFeaturesFreehand.isChecked():
mapToolKey = MapTools.SelectFeatureByFreehand
elif self.ui.optionSelectFeaturesRadius.isChecked():
mapToolKey = MapTools.SelectFeatureByRadius
self.ui.mapWidget.setMapTool(mapToolKey, *args)
kwds = {}
......@@ -985,14 +1017,14 @@ class TimeSeriesViewer(QgisInterface, QObject):
Creates a new MapView.
:return: MapView
"""
return self.spatialTemporalVis.createMapView(name=name)
return self.ui.dockMapViews.createMapView(name=name)
def mapViews(self)->list:
"""
Returns all MapViews
:return: [list-of-MapViews]
"""
return self.spatialTemporalVis.mMapViewDock[:]
return self.ui.dockMapViews[:]
def icon(self)->QIcon:
......@@ -1024,19 +1056,19 @@ class TimeSeriesViewer(QgisInterface, QObject):
self.ui.messageBar.pushMessage(tag, message, level=level)
print(r'{}({}): {}'.format(tag, level, message))
def onTimeSeriesChanged(self, *args):
if not self.mSpatialMapExtentInitialized:
if len(self.mTimeSeries) > 0:
if len(self.spatialTemporalVis.mMapViewDock) == 0:
# add an empty MapView by default
self.spatialTemporalVis.createMapView()
#self.spatialTemporalVis.createMapView()
if len(self.ui.dockMapViews) == 0:
self.ui.dockMapViews.createMapView()
extent = self.mTimeSeries.maxSpatialExtent()
self.spatialTemporalVis.setCrs(extent.crs())
self.spatialTemporalVis.setSpatialExtent(extent)
self.ui.mapWidget.setCrs(extent.crs())
self.ui.mapWidget.setSpatialExtent(extent)
self.mSpatialMapExtentInitialized = True
......
......@@ -119,6 +119,8 @@ class MapCanvasInfoItem(QgsMapCanvasItem):
self.mPenColor = QColor('yellow')
self.mVisibility = True
def setColor(self, color:QColor):
"""
Sets the map info color
......@@ -154,9 +156,10 @@ class MapCanvasInfoItem(QgsMapCanvasItem):
pen.setWidth(width)
pen.setColor(self.mPenColor)
nLines = len(text.splitlines())
text = text.replace('\\n', '\n')
font = QFont('Courier', pointSize=10)
font = QFont('Helvetica', pointSize=10)
painter.setFont(font)
brush = self.mCanvas.backgroundBrush()
c = brush.color()
c.setAlpha(170)
......@@ -172,7 +175,10 @@ class MapCanvasInfoItem(QgsMapCanvasItem):
painter.drawText(rect, flags, text)
#painter.drawText(position, text)
painter.setFont(QFont('Courier', pointSize=10))
def clearText(self):
self.mULText = self.mUCText = self.mURText = None
self.mLLText = self.mLCText = self.mLRText = None
def paint(self, painter, QStyleOptionGraphicsItem=None, QWidget_widget=None):
"""
......@@ -248,16 +254,26 @@ class MapCanvasMapTools(QObject):
self.mCanvas.setMapTool(self.mtAddFeature)
elif mapToolKey == MapTools.SelectFeature:
self.mCanvas.setMapTool(self.mtSelectFeature)
if 'mode' in kwds.keys():
mt = self.mCanvas.mapTool()
assert isinstance(mt, QgsF)
s = ""
self.mtSelectFeature.setSelectionMode(QgsMapToolSelectionHandler.SelectionMode.SelectSimple)
elif mapToolKey == MapTools.SelectFeatureByPolygon:
self.mCanvas.setMapTool(self.mtSelectFeature)
self.mtSelectFeature.setSelectionMode(QgsMapToolSelectionHandler.SelectionMode.SelectPolygon)
elif mapToolKey == MapTools.SelectFeatureByFreehand:
self.mCanvas.setMapTool(self.mtSelectFeature)
self.mtSelectFeature.setSelectionMode(QgsMapToolSelectionHandler.SelectionMode.SelectFreehand)
elif mapToolKey == MapTools.SelectFeatureByRadius:
self.mCanvas.setMapTool(self.mtSelectFeature)
self.mtSelectFeature.setSelectionMode(QgsMapToolSelectionHandler.SelectionMode.SelectRadius)
else:
print('Unknown MapTool key: {}'.format(mapToolKey))
# if undefined, set a current vector layer
if mapToolKey in [MapTools.SelectFeature, MapTools.SelectFeatureByPolygon, MapTools.SelectFeatureByRadius, MapTools.SelectFeatureByFreehand] \
and self.mCanvas.currentLayer() is None:
for vl in self.mCanvas.layers():
if isinstance(vl, QgsVectorLayer):
self.mCanvas.setCurrentLayer(vl)
break
class MapCanvas(QgsMapCanvas):
......@@ -271,6 +287,7 @@ class MapCanvas(QgsMapCanvas):
RefreshRenderer = 1
Clear = 3
UpdateLayers = 4
UpdateMapItems = 5
......@@ -405,10 +422,18 @@ class MapCanvas(QgsMapCanvas):
self.setCrosshairPosition(spatialPoint)
def setMapView(self, mapView):
"""
Sets the map canvas MapView
:param mapView: MapView
"""
from eotimeseriesviewer.mapvisualization import MapView
assert isinstance(mapView, MapView)
self.mMapView = mapView
self.mInfoItem.setColor(mapView.mapTextColor())
self.addToRefreshPipeLine(mapView.mapBackgroundColor())
self.addToRefreshPipeLine(MapCanvas.Command.UpdateMapItems)
def setTSD(self, tsd:TimeSeriesDate):
"""
......@@ -426,9 +451,11 @@ class MapCanvas(QgsMapCanvas):
self.mTSD = tsd
if isinstance(tsd, TimeSeriesDate):
self.mTSD.sensor().sigNameChanged.connect(self.updateScope)
self.updateScope()
def updateScope(self):
"""
Updates map-canvas TSD variables
......@@ -532,7 +559,7 @@ class MapCanvas(QgsMapCanvas):
self.mTimedRefreshPipeLine[SpatialExtent] = a
elif isinstance(a, SpatialPoint):
self.mTimedRefreshPipeLine[SpatialExtent] = a
self.mTimedRefreshPipeLine[SpatialPoint] = a
elif isinstance(a, QColor):
self.mTimedRefreshPipeLine[QColor] = a
......@@ -558,9 +585,10 @@ class MapCanvas(QgsMapCanvas):
existing = self.layers()
existingSources = [l.source() for l in existing]
if not self.mapView():
return
if not self.tsd():
if self.mapView() is None or self.tsd() is None:
self.setLayers([])
self.mInfoItem.clearText()
self.update()
return
for lyr in self.mMapView.layers():
......@@ -632,6 +660,8 @@ class MapCanvas(QgsMapCanvas):
l.setRenderer(renderer)
except Exception as ex:
s = ""
if command == MapCanvas.Command.UpdateMapItems:
#self.update()
pass
......@@ -676,16 +706,17 @@ class MapCanvas(QgsMapCanvas):
"""
return self.mCrosshairItem.crosshairStyle
def setCrosshairPosition(self, spatialPoint:SpatialPoint, emitSignal=True):
def setCrosshairPosition(self, spatialPoint:SpatialPoint):
"""
Sets the position of the Crosshair.
:param spatialPoint: SpatialPoint
:param emitSignal: True (default). Set False to avoid emitting sigCrosshairPositionChanged
:return:
"""
point = spatialPoint.toCrs(self.mapSettings().destinationCrs())
self.mCrosshairItem.setPosition(point)
if emitSignal:
if self.mCrosshairItem.mPosition != point:
self.mCrosshairItem.setPosition(point)
self.sigCrosshairPositionChanged.emit(point)
def crosshairPosition(self)->SpatialPoint:
......@@ -972,37 +1003,22 @@ class MapCanvas(QgsMapCanvas):
"""
if isinstance(self.mTSD, TimeSeriesDate):
if isinstance(self.tsd(), TimeSeriesDate) and isinstance(eotsv, TimeSeriesViewer):
menu.addSeparator()
ts = eotsv.timeSeries()
action = menu.addAction('Focus on Spatial Extent')
action.triggered.connect(self.onFocusToCurrentSpatialExtent)
action.triggered.connect(ts.focusVisibilityToExtent)
action = menu.addAction('Hide Date')
action.triggered.connect(lambda: self.mTSD.setIsVisible(False))
if isinstance(eotsv, TimeSeriesViewer):
ts = eotsv.timeSeries()
action = menu.addAction('Remove Date')
action.triggered.connect(lambda *args, : ts.removeTSDs([tsd]))
action.triggered.connect(lambda *args: ts.hideTSDs([tsd]))
#action = menu.addAction('Hide map view')
#action.triggered.connect(lambda: self.sigChangeMVRequest.emit(self, 'hide_mapview'))
#action = menu.addAction('Remove map view')
#action.triggered.connect(lambda: self.sigChangeMVRequest.emit(self, 'remove_mapview'))
action = menu.addAction('Remove Date')
action.triggered.connect(lambda *args, : ts.removeTSDs([tsd]))
return menu
def onFocusToCurrentSpatialExtent(self):
mapView = self.mapView()
from .mapvisualization import MapView
if isinstance(mapView, MapView):
mapView.timeSeries().focusVisibilityToExtent()
def onPasteStyleFromClipboard(self, lyr):
from .externals.qps.layerproperties import pasteStyleFromClipboard
......
This diff is collapsed.
This diff is collapsed.
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>277</width>
<height>269</height>
<width>248</width>
<height>238</height>
</rect>
</property>
<property name="sizePolicy">
......@@ -98,7 +98,7 @@
</property>
<property name="minimumSize">
<size>
<width>40</width>
<width>25</width>
<height>0</height>
</size>
</property>
......@@ -131,6 +131,12 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>25</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string/>
</property>
......@@ -138,45 +144,13 @@
<string>T</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="popupMode">
<enum>QToolButton::DelayedPopup</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnAddVectorLayer">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Toggle map view visibility</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/timeseriesviewer/icons/mActionAddOgrLayer.svg</normaloff>:/timeseriesviewer/icons/mActionAddOgrLayer.svg</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="popupMode">
<enum>QToolButton::DelayedPopup</enum>
<enum>QToolButton::MenuButtonPopup</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
......@@ -184,22 +158,28 @@
</widget>
</item>
<item>
<widget class="QToolButton" name="btnAddRasterLayer">
<widget class="QToolButton" name="btnAddLayer">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>25</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Toggle map view visibility</string>
<string>Add additional map layers.</string>
</property>
<property name="text">