Commit cedf04fd authored by benjamin.jakimow@geo.hu-berlin.de's avatar benjamin.jakimow@geo.hu-berlin.de
Browse files

refactoring

fixed icon of mainwindow
parent c4ff58f9
......@@ -22,7 +22,7 @@
from __future__ import absolute_import
VERSION = '0.4'
LICENSE = 'GNU GPL-3'
TITLE = 'HUB TimeSeriesViewer'
TITLE = 'HUB Time Series Viewer'
DESCRIPTION = 'A QGIS Plugin to visualize multi-sensor remote-sensing time-series data.'
WEBSITE = 'bitbucket.org/jakimowb/hub-timeseriesviewer'
REPOSITORY = 'bitbucket.org/jakimowb/hub-timeseriesviewer'
......@@ -112,9 +112,7 @@ def initSettings():
initSettings()
def icon():
return QIcon(os.path.join(os.path.dirname(__file__), *['ui','icons','icon.png']))
return QIcon(':/timeseriesviewer/icons/IconTimeSeries.svg')
......
......@@ -414,7 +414,6 @@ class TimeSeriesViewer(QObject):
# initialize GUI
self.ui = TimeSeriesViewerUI()
msgLog = QgsMessageLog.instance()
#msgLog.messageReceived.connect(self.logMessage)
......
......@@ -29,13 +29,24 @@ from PyQt4.QtCore import *
from PyQt4.QtGui import *
import numpy as np
from timeseriesviewer.utils import *
from timeseriesviewer.main import TimeSeriesViewer
from timeseriesviewer.timeseries import SensorInstrument, TimeSeriesDatum, TimeSeries
from timeseriesviewer.ui.docks import TsvDockWidgetBase, loadUi
from timeseriesviewer.ui.widgets import TsvMimeDataUtils, maxWidgetSizes
from timeseriesviewer.mapcanvas import MapCanvas
from timeseriesviewer.crosshair import CrosshairStyle
class MapViewScrollArea(QScrollArea):
sigResized = pyqtSignal()
def __init__(self, *args, **kwds):
super(MapViewScrollArea, self).__init__(*args, **kwds)
def resizeEvent(self, event):
super(MapViewScrollArea, self).resizeEvent(event)
self.sigResized.emit()
class MapViewUI(QFrame, loadUi('mapviewdefinition.ui')):
......@@ -892,9 +903,9 @@ class SpatialTemporalVisualization(QObject):
self.mMapCanvases = []
self.ui = timeSeriesViewer.ui
from timeseriesviewer.ui.widgets import TsvScrollArea
self.scrollArea = self.ui.scrollAreaSubsets
assert isinstance(self.scrollArea, TsvScrollArea)
assert isinstance(self.scrollArea, MapViewScrollArea)
self.mRefreshTimer = QTimer(self)
......@@ -1613,7 +1624,7 @@ class MapViewListModel(QAbstractListModel):
value = mapView
return value
class MapViewCollectionDock(QgsDockWidget, loadUi('mapviewdockV2.ui')):
class MapViewCollectionDock(QgsDockWidget, loadUi('mapviewdock.ui')):
sigMapViewAdded = pyqtSignal(MapView)
sigMapViewRemoved = pyqtSignal(MapView)
......
......@@ -6,14 +6,14 @@
<rect>
<x>0</x>
<y>0</y>
<width>480</width>
<height>175</height>
<width>218</width>
<height>272</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>175</height>
<width>124</width>
<height>218</height>
</size>
</property>
<property name="windowTitle">
......@@ -22,13 +22,13 @@
<widget class="QWidget" name="dockWidgetContents">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
<number>2</number>
</property>
<property name="margin">
<number>0</number>
<number>2</number>
</property>
<item>
<widget class="QScrollArea" name="scrollAreaMapViews">
<widget class="QFrame" name="BVButtonList">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
......@@ -37,175 +37,175 @@
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>100</height>
<width>25</width>
<height>0</height>
</size>
</property>
<property name="autoFillBackground">
<bool>true</bool>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="lineWidth">
<number>1</number>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAsNeeded</enum>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<widget class="QWidget" name="scrollAreaMapsViewDockContent">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>480</width>
<height>153</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>100</height>
</size>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>2</number>
</property>
<property name="styleSheet">
<string notr="true"/>
<property name="margin">
<number>0</number>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<property name="spacing">
<number>2</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QFrame" name="BVButtonList">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>25</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>25</width>
<height>16777215</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>1</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QToolButton" name="btnApplyStyles">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/timeseriesviewer/icons/mActionRefresh.svg</normaloff>:/timeseriesviewer/icons/mActionRefresh.svg</iconset>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnAddMapView">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/timeseriesviewer/icons/mActionAddMapView.svg</normaloff>:/timeseriesviewer/icons/mActionAddMapView.svg</iconset>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<item>
<widget class="QToolButton" name="btnAddMapView">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/timeseriesviewer/icons/mActionAddMapView.svg</normaloff>:/timeseriesviewer/icons/mActionAddMapView.svg</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnRemoveMapView">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/timeseriesviewer/icons/mActionRemoveMapView.svg</normaloff>:/timeseriesviewer/icons/mActionRemoveMapView.svg</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnRefresh">
<property name="toolTip">
<string>Refresh map view rendering</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/timeseriesviewer/icons/mActionRefresh.png</normaloff>:/timeseriesviewer/icons/mActionRefresh.png</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cbMapView">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Select the rendersettings for a specific map view</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnHighlightMapView">
<property name="text">
<string>?</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QStackedWidget" name="stackedWidget"/>
</item>
</layout>
</widget>
<action name="actionApplyStyles">
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/timeseriesviewer/icons/mActionRefresh.svg</normaloff>:/timeseriesviewer/icons/mActionRefresh.svg</iconset>
<normaloff>:/timeseriesviewer/icons/mActionRefresh.png</normaloff>:/timeseriesviewer/icons/mActionRefresh.png</iconset>
</property>
<property name="text">
<string>ApplyStyles</string>
</property>
<property name="toolTip">
<string>Refresh this map view and apply all render settings</string>
</property>
</action>
<action name="actionRemoveMapView">
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/timeseriesviewer/icons/mActionRemoveMapView.svg</normaloff>:/timeseriesviewer/icons/mActionRemoveMapView.svg</iconset>
</property>
<property name="text">
<string>Remove view</string>
</property>
<property name="toolTip">
<string>Remove this map view</string>
</property>
</action>
<action name="actionAddMapView">
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/timeseriesviewer/icons/mActionAddMapView.svg</normaloff>:/timeseriesviewer/icons/mActionAddMapView.svg</iconset>
</property>
<property name="text">
<string>ApplyStyles</string>
</property>
<property name="toolTip">
<string>Apply Render Styles</string>
<string>Create a new map view</string>
</property>
</action>
<action name="actionHighlightMapView">
<property name="text">
<string>?</string>
</property>
<property name="toolTip">
<string>Click to highlight this map view</string>
</property>
</action>
</widget>
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>dockMapViews</class>
<widget class="QDockWidget" name="dockMapViews">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>218</width>
<height>272</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>124</width>
<height>218</height>
</size>
</property>
<property name="windowTitle">
<string>Map Views</string>
</property>
<widget class="QWidget" name="dockWidgetContents">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>2</number>
</property>
<property name="margin">
<number>2</number>
</property>
<item>
<widget class="QFrame" name="BVButtonList">
<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="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>2</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QToolButton" name="btnAddMapView">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/timeseriesviewer/icons/mActionAddMapView.svg</normaloff>:/timeseriesviewer/icons/mActionAddMapView.svg</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnRemoveMapView">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/timeseriesviewer/icons/mActionRemoveMapView.svg</normaloff>:/timeseriesviewer/icons/mActionRemoveMapView.svg</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnRefresh">
<property name="toolTip">
<string>Refresh map view rendering</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/timeseriesviewer/icons/mActionRefresh.png</normaloff>:/timeseriesviewer/icons/mActionRefresh.png</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cbMapView">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnHighlightMapView">
<property name="text">
<string>?</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QStackedWidget" name="stackedWidget"/>
</item>
</layout>
</widget>
<action name="actionApplyStyles">
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/timeseriesviewer/icons/mActionRefresh.png</normaloff>:/timeseriesviewer/icons/mActionRefresh.png</iconset>
</property>
<property name="text">
<string>ApplyStyles</string>
</property>
<property name="toolTip">
<string>Refresh this map view and apply all render settings</string>
</property>
</action>
<action name="actionRemoveMapView">
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/timeseriesviewer/icons/mActionRemoveMapView.svg</normaloff>:/timeseriesviewer/icons/mActionRemoveMapView.svg</iconset>
</property>
<property name="text">
<string>Remove view</string>
</property>
<property name="toolTip">
<string>Remove this map view</string>