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

new icons, refactoring

parent 4680e2e1
doc/source/img/screenshot1.png

131 Bytes | W: | H:

doc/source/img/screenshot1.png

131 Bytes | W: | H:

doc/source/img/screenshot1.png
doc/source/img/screenshot1.png
doc/source/img/screenshot1.png
doc/source/img/screenshot1.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -598,7 +598,7 @@ if __name__ == '__main__':
if False:
updateInfoHTML()
if True:
if False:
updateMetadataTxt()
if False:
......
# -*- coding: utf-8 -*-
# noinspection PyPep8Naming
"""
/***************************************************************************
HUB TimeSeriesViewer
......@@ -18,12 +19,16 @@
* *
***************************************************************************/
"""
# noinspection PyPep8Naming
import os, sys, re, fnmatch, collections, copy, traceback, six, bisect
import os, sys, re, fnmatch, collections, copy, traceback, bisect
import logging
logger = logging.getLogger(__name__)
from qgis.core import *
from qgis.core import QgsContrastEnhancement, QgsRasterShader, QgsColorRampShader, QgsProject, QgsCoordinateReferenceSystem, \
QgsRasterLayer, QgsVectorLayer, QgsMapLayer, QgsMapLayerProxyModel, QgsColorRamp, QgsSingleBandPseudoColorRenderer
from qgis.gui import QgsDockWidget, QgsMapCanvas, QgsMapTool
from PyQt5.QtXml import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
......@@ -31,7 +36,7 @@ import numpy as np
from timeseriesviewer.utils import *
from timeseriesviewer.timeseries import SensorInstrument, TimeSeriesDatum, TimeSeries
from timeseriesviewer.ui.docks import TsvDockWidgetBase, loadUI
from timeseriesviewer.ui.docks import loadUI
from timeseriesviewer.main import TsvMimeDataUtils
from timeseriesviewer.ui.mapviewscrollarea import MapViewScrollArea
from timeseriesviewer.mapcanvas import MapCanvas
......@@ -193,6 +198,7 @@ class MapView(QObject):
if isinstance(self.mVectorLayer, QgsVectorLayer):
d = QgsRendererPropertiesDialog(self.mVectorLayer, QgsStyle.defaultStyle())
d.exec_()
s = ""
def vectorLayerRenderer(self):
......
......@@ -279,7 +279,6 @@ class SignalPrinter(object):
def sandboxTestdata():
from timeseriesviewer.main import TimeSeriesViewer
S = TimeSeriesViewer(None)
S.ui.show()
S.run()
......@@ -294,6 +293,47 @@ def sandboxTestdata():
import example.Images
S.loadExampleTimeSeries()
from example import exampleEvents
S.addVectorData([exampleEvents])
#ml = QgsVectorLayer(exampleEvents, 'labels', 'ogr')
#QgsProject.instance().addMapLayer(ml)
def sandboxDemo():
from timeseriesviewer.main import TimeSeriesViewer
S = TimeSeriesViewer(None)
S.ui.show()
S.run()
S.spatialTemporalVis.MVC.createMapView()
S.spatialTemporalVis.MVC.createMapView()
import timeseriesviewer.profilevisualization
import timeseriesviewer.temporalprofiles2d
timeseriesviewer.profilevisualization.DEBUG = True
timeseriesviewer.temporalprofiles2d.DEBUG = True
import example.Images
#load Landsat
p = r'F:\TSData'
files = file_search(p, re.compile('.*BOA\.tif$'), recursive=True)
S.addTimeSeriesImages(files)
#load RapidEye
files = file_search(p, re.compile('re.*\.tif$'), recursive=True)
S.addTimeSeriesImages(files)
#load Pleiades
p = r'Y:\Pleiades'
files = file_search(p,re.compile('IMG_.*JP2$'), recursive=True)
S.addTimeSeriesImages(files)
#load CBERS
p = 'Y:\CBERS\VRTs'
files = file_search(p, re.compile('CBERS_*.vrt$'), recursive=True)
S.addTimeSeriesImages(files)
from example import exampleEvents
ml = QgsVectorLayer(exampleEvents, 'labels', 'ogr')
QgsProject.instance().addMapLayer(ml)
......@@ -318,7 +358,7 @@ if __name__ == '__main__':
if False: sandboxGui()
if True: sandboxTestdata()
if False: sandboxDemo()
#close QGIS
qgsApp.exec_()
qgsApp.exitQgis()
......@@ -564,12 +564,13 @@ class TemporalProfilePlotStyleBase(PlotStyle):
self.update()
def copyFrom(self, plotStyle):
assert isinstance(plotStyle, TemporalProfilePlotStyleBase)
super(TemporalProfilePlotStyleBase, self).copyFrom(plotStyle)
self.setExpression(plotStyle.expression())
self.setSensor(plotStyle.sensor())
self.setTemporalProfile(plotStyle.temporalProfile())
if isinstance(plotStyle, TemporalProfilePlotStyleBase):
super(TemporalProfilePlotStyleBase, self).copyFrom(plotStyle)
self.setExpression(plotStyle.expression())
self.setSensor(plotStyle.sensor())
self.setTemporalProfile(plotStyle.temporalProfile())
else:
s = ""
class TemporalProfile2DPlotStyle(TemporalProfilePlotStyleBase):
......
......@@ -46,7 +46,7 @@ class TsvDockWidgetBase(QgsDockWidget):
class RenderingDockUI(QgsDockWidget, loadUI('renderingdock.ui')):
class DEPR_RenderingDockUI(QgsDockWidget, loadUI('renderingdock.ui')):
from timeseriesviewer.crosshair import CrosshairStyle
sigMapCanvasColorChanged = pyqtSignal(QColor)
......
......@@ -14,7 +14,7 @@
height="24"
id="svg5692"
version="1.1"
inkscape:version="0.91 r13725"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"
sodipodi:docname="mActionZoomPoint.svg"
inkscape:export-filename="/media/home1/robert/svn/graphics/trunk/toolbar-icons/24x24/zoom-1to1.png"
inkscape:export-xdpi="90"
......@@ -418,10 +418,10 @@
inkscape:grid-bbox="true"
inkscape:document-units="px"
borderlayer="false"
inkscape:window-width="1276"
inkscape:window-height="755"
inkscape:window-x="4"
inkscape:window-y="1"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
showguides="true"
inkscape:guide-bbox="true"
......@@ -436,8 +436,10 @@
enabled="true"
snapvisiblegridlinesonly="true"
dotted="true"
originx="2.5px"
originy="2.5px" />
originx="2.5"
originy="2.5"
spacingx="1"
spacingy="1" />
</sodipodi:namedview>
<metadata
id="metadata5697">
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="24"
width="24"
version="1.1"
id="svg23"
sodipodi:docname="map.svg"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)">
<metadata
id="metadata29">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs27" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="736"
inkscape:window-height="566"
id="namedview25"
showgrid="false"
inkscape:zoom="9.8333333"
inkscape:cx="1.3220339"
inkscape:cy="12"
inkscape:window-x="1128"
inkscape:window-y="56"
inkscape:window-maximized="0"
inkscape:current-layer="svg23" />
<linearGradient
id="a"
gradientUnits="userSpaceOnUse"
x1="3.5"
x2="11.5"
y1="19.5"
y2="19.5"
gradientTransform="translate(0,-8)">
<stop
offset="0"
stop-color="#b7b7b7"
id="stop2" />
<stop
offset="1"
stop-color="#e6e6e6"
id="stop4" />
</linearGradient>
<path
inkscape:connector-curvature="0"
style="fill:url(#a);fill-rule:evenodd;stroke:#9a9a9a"
id="path7"
d="m 21.5,21.5 h -17 c -1,0 -1.977816,-1.420625 -2,-2.5 V 2.5 h 19 z" />
<path
style="fill:#e6e6e6;fill-rule:evenodd;stroke:#9a9a9a"
inkscape:connector-curvature="0"
id="path9"
d="m 6.5,1.9999996 c -1,-0.9999995 -3,-0.9999995 -4,0 V 18 c 1,-1 3,-1 4,0 z" />
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="256"
width="256"
version="1.1"
id="svg23"
sodipodi:docname="mapCenterExport.svg"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)">
<metadata
id="metadata29">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs27">
<linearGradient
id="Gradient_1"
gradientUnits="userSpaceOnUse"
x1="200.78799"
y1="249.007"
x2="197.17"
y2="11.232">
<stop
offset="0"
stop-color="#589632"
id="stop5878" />
<stop
offset="1"
stop-color="#93B023"
id="stop5880" />
</linearGradient>
<linearGradient
id="Gradient_2"
gradientUnits="userSpaceOnUse"
x1="129.939"
y1="252.718"
x2="126.351"
y2="16.927999">
<stop
offset="0"
stop-color="#589632"
id="stop5883" />
<stop
offset="1"
stop-color="#93B023"
id="stop5885" />
</linearGradient>
<linearGradient
id="Gradient_1-0"
gradientUnits="userSpaceOnUse"
x1="200.78799"
y1="249.007"
x2="197.17"
y2="11.232">
<stop
offset="0"
stop-color="#589632"
id="stop6112" />
<stop
offset="1"
stop-color="#93B023"
id="stop6114" />
</linearGradient>
<linearGradient
id="Gradient_2-9"
gradientUnits="userSpaceOnUse"
x1="129.939"
y1="252.718"
x2="126.351"
y2="16.927999">
<stop
offset="0"
stop-color="#589632"
id="stop6117" />
<stop
offset="1"
stop-color="#93B023"
id="stop6119" />
</linearGradient>
<linearGradient
id="Gradient_1-7"
gradientUnits="userSpaceOnUse"
x1="200.78799"
y1="249.007"
x2="197.17"
y2="11.232">
<stop
offset="0"
stop-color="#589632"
id="stop6112-8" />
<stop
offset="1"
stop-color="#93B023"
id="stop6114-0" />
</linearGradient>
<linearGradient
id="Gradient_2-8"
gradientUnits="userSpaceOnUse"
x1="129.939"
y1="252.718"
x2="126.351"
y2="16.927999">
<stop
offset="0"
stop-color="#589632"
id="stop6117-4" />
<stop
offset="1"
stop-color="#93B023"
id="stop6119-6" />
</linearGradient>
</defs>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1017"
id="namedview25"
showgrid="false"
inkscape:zoom="1.2291667"
inkscape:cx="-168.53912"
inkscape:cy="-10.091022"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg23"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<linearGradient
id="a"
gradientUnits="userSpaceOnUse"
x1="3.5"
x2="11.5"
y1="19.5"
y2="19.5"
gradientTransform="matrix(10.800997,0,0,10.800997,-19.11266,-69.14569)">
<stop
offset="0"
stop-color="#b7b7b7"
id="stop2" />
<stop
offset="1"
stop-color="#e6e6e6"
id="stop4" />
</linearGradient>
<path
inkscape:connector-curvature="0"
style="fill:url(#a);fill-rule:evenodd;stroke:#9a9a9a;stroke-width:10.80099678"
id="path7"
d="M 213.10882,249.48372 H 29.49186 c -10.80099,0 -21.36242,-15.34423 -21.60199,-27.0025 V 44.264774 h 205.21895 z" />
<path
style="fill:#e6e6e6;fill-rule:evenodd;stroke:#9a9a9a;stroke-width:10.80099678"
inkscape:connector-curvature="0"
id="path9"
d="m 51.09385,38.864281 c -10.80099,-10.801002 -32.40298,-10.801002 -43.20398,0 V 211.68022 c 10.801,-10.80099 32.40299,-10.80099 43.20398,0 z" />
<g
style="display:inline;fill:#24221c;stroke:#666666;stroke-width:0.99999997;stroke-miterlimit:4;stroke-dasharray:0.99999997,0.99999997;stroke-dashoffset:0"
id="g4212"
transform="matrix(9.2029794,0,0,9.2029794,-5.8213498,-25.583913)">
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path5046"
d="M 15.130435,9.7620072 V 26.790087"
style="fill:#24221c;fill-rule:evenodd;stroke:#999999;stroke-width:0.99999997;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.99999997,0.99999997;stroke-dashoffset:0;stroke-opacity:1" />
<path
style="fill:#24221c;fill-rule:evenodd;stroke:#999999;stroke-width:0.99999997;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.99999997,0.99999997;stroke-dashoffset:0;stroke-opacity:1"
d="M 23.644475,18.276047 H 6.6163952"
id="path4210"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</g>
<g
style="display:inline"
id="g3772"
transform="matrix(7.1032559,0,0,7.1032559,28.329902,-133.88657)">
<rect
ry="2.6149368"
inkscape:export-ydpi="120"
inkscape:export-xdpi="120"
y="19"
x="19"
height="13"
width="13"
id="rect3563"
style="display:inline;fill:#5a8c5a;fill-opacity:1;stroke:#555753;stroke-width:0;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:export-filename="C:\Program Files\QGIS-Dev\themes\gis-0.1\mActionAddOgrLayer.png"
rx="2.6149371" />
<path
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccsssc"
id="path6992"
d="m 20.3,25.499999 h 10.4 c 0,0 0,0 0,-2.6 C 30.7,20.3 30.05,20.3 25.5,20.3 c -4.55,0 -5.2,0 -5.2,2.599999 0,2.6 0,2.6 0,2.6 z"
style="display:inline;opacity:0.3;fill:#fcffff;fill-rule:evenodd;stroke:none;enable-background:new" />
</g>
<path
style="display:inline;fill:#eeeeec;stroke:#eeeeec;stroke-width:7.50567055;stroke-linejoin:round"
inkscape:connector-curvature="0"
d="m 179.44019,78.561657 v 0 c 0.26561,-25.61362 19.26154,-23.21958 37.52832,-22.51713 0,0 0,22.51713 0,22.51713 l 22.51712,-29.75024 -22.51712,-30.2952 c 0,0 0,15.01134 0,22.517 -30.02266,0 -37.52832,0 -37.52832,37.52844 z"
id="path6842-8" />
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="256"
width="256"
version="1.1"
id="svg23"
sodipodi:docname="mapCenterImport.svg"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)">
<metadata
id="metadata29">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs27">
<linearGradient
id="Gradient_1"
gradientUnits="userSpaceOnUse"
x1="200.78799"
y1="249.007"
x2="197.17"
y2="11.232">
<stop
offset="0"
stop-color="#589632"
id="stop5878" />
<stop
offset="1"
stop-color="#93B023"
id="stop5880" />
</linearGradient>
<linearGradient
id="Gradient_2"
gradientUnits="userSpaceOnUse"
x1="129.939"
y1="252.718"
x2="126.351"
y2="16.927999">
<stop
offset="0"
stop-color="#589632"
id="stop5883" />
<stop
offset="1"
stop-color="#93B023"
id="stop5885" />
</linearGradient>
<linearGradient
id="Gradient_1-0"
gradientUnits="userSpaceOnUse"
x1="200.78799"
y1="249.007"
x2="197.17"
y2="11.232">
<stop
offset="0"
stop-color="#589632"
id="stop6112" />
<stop
offset="1"
stop-color="#93B023"
id="stop6114" />
</linearGradient>
<linearGradient
id="Gradient_2-9"
gradientUnits="userSpaceOnUse"
x1="129.939"
y1="252.718"
x2="126.351"
y2="16.927999">
<stop
offset="0"
stop-color="#589632"
id="stop6117" />
<stop
offset="1"
stop-color="#93B023"
id="stop6119" />
</linearGradient>
<linearGradient
id="Gradient_1-7"
gradientUnits="userSpaceOnUse"
x1="200.78799"
y1="249.007"
x2="197.17"
y2="11.232">
<stop
offset="0"
stop-color="#589632"
id="stop6112-8" />
<stop
offset="1"
stop-color="#93B023"
id="stop6114-0" />
</linearGradient>
<linearGradient
id="Gradient_2-8"
gradientUnits="userSpaceOnUse"
x1="129.939"
y1="252.718"
x2="126.351"
y2="16.927999">
<stop
offset="0"
stop-color="#589632"
id="stop6117-4" />
<stop
offset="1"
stop-color="#93B023"
id="stop6119-6" />
</linearGradient>
</defs>
<sodipodi:namedview