Commit 05af73e6 authored by Benjamin Jakimow's avatar Benjamin Jakimow
Browse files

added resteView button to 2D temporal profile plot

parent 6512761f
# this file lists packages that are required to run the HUB TimeSeriesViewer
# this file lists packages that are required to run the EO Time Series Viewer
# see https://pip.pypa.io/en/stable/reference/pip_install/#requirements-file-format
###### Requirements without Version Specifiers ######
......
......@@ -1619,6 +1619,8 @@ class SpectralTemporalVisualization(QObject):
self.ui.btnRefresh2D.setDefaultAction(self.ui.actionRefresh2D)
self.ui.btnRefresh3D.setDefaultAction(self.ui.actionRefresh3D)
self.ui.btnRemoveTemporalProfile.setDefaultAction(self.ui.actionRemoveTemporalProfile)
self.ui.btnReset2DPlot.setDefaultAction(self.ui.actionReset2DPlot)
self.ui.btnReset3DCamera.setDefaultAction(self.ui.actionReset3DCamera)
self.ui.actionRefresh2D.triggered.connect(self.updatePlot2D)
......@@ -1632,7 +1634,11 @@ class SpectralTemporalVisualization(QObject):
self.ui.actionRemoveStyle2D.triggered.connect(lambda:self.removePlotStyles2D(self.selected2DPlotStyles()))
self.ui.actionRemoveTemporalProfile.triggered.connect(lambda :self.removeTemporalProfiles(self.selectedTemporalProfiles()))
self.ui.actionReset2DPlot.triggered.connect(self.plot2D.resetViewBox)
self.plot2D.resetTransform()
self.ui.actionReset3DCamera.triggered.connect(self.reset3DCamera)
self.tpCollection.sigMaxProfilesChanged.connect(self.ui.sbMaxTP.setValue)
self.ui.sbMaxTP.valueChanged.connect(self.tpCollection.setMaxProfiles)
......
......@@ -335,6 +335,9 @@ class DateTimePlotWidget(pg.PlotWidget):
self.proxy2D = pg.SignalProxy(self.scene().sigMouseMoved, rateLimit=60, slot=self.onMouseMoved2D)
def resetViewBox(self):
self.plotItem.getViewBox().autoRange()
def onMouseMoved2D(self, evt):
pos = evt[0] ## using signal proxy turns original arguments into a tuple
......
......@@ -146,7 +146,7 @@
</sizepolicy>
</property>
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="page2D">
<layout class="QVBoxLayout" name="verticalLayout_3">
......@@ -241,6 +241,20 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnReset2DPlot">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/timeseriesviewer/icons/mActionZoomFullExtent.svg</normaloff>:/timeseriesviewer/icons/mActionZoomFullExtent.svg</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnAddStyle2D">
<property name="text">
......@@ -1074,6 +1088,15 @@ background-color: rgb(0, 0, 0);</string>
<string>Backspace</string>
</property>
</action>
<action name="actionReset2DPlot">
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/timeseriesviewer/icons/mActionZoomFullExtent.svg</normaloff>:/timeseriesviewer/icons/mActionZoomFullExtent.svg</iconset>
</property>
<property name="text">
<string>Reset View</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment