diff --git a/doc/source/user_guide.rst b/doc/source/user_guide.rst index 90bba2a384fc9a277ed1ec6d0aa0f8aa42036eac..2970a4c4d068e751f1da8b17f1895a7be2828919 100644 --- a/doc/source/user_guide.rst +++ b/doc/source/user_guide.rst @@ -21,14 +21,17 @@ Quick Start 2. Click :menuselection:`Files --> Add example` to load an exemplary time series of Landsat and RapidEye observations. + Open the sensor panel :menuselection:`View --> Panels... --> Sensors / Products` and change the sensor names - 5bands@5.0m RapidEye3. Open the sensor panel :menuselection:`View --> Panels... --> Sensors / Products` and change the sensor names + ============ ========= + Default Changed + ============ ========= + 6bands@30.0m Landsat + 5bands@5.0m RapidEye3 + ============ ========= - ============ ========= - Default Changed - ============ ========= - 6bands@30.0m Landsat - ============ ========= + The change of sensor names becomes visible in other other parts of the GUI as well, e.g. the + list of time series source images. 4. Use the scroll band and the map tools |mActionZoomIn| |mActionZoomOut| |mActionPan| to change the temporal and spatial subset shown from the time series. @@ -326,7 +329,7 @@ The spectral library view allows you to visualize, label and export spectral pro .. note:: The spectral library table behaves quite similar to the attribute table you know from QGIS: - * You can edit the content by entering the editing mode (|mActionToggleEditing|) + * You can edit the content by entering the editing mode |mActionToggleEditing| * You can add further information by adding fields via the |mActionNewAttribute| button (e.g. different class labels). Remove them with |mActionDeleteAttribute|, accordingly. * Double-click into a desired field to change its content diff --git a/eotimeseriesviewer/main.py b/eotimeseriesviewer/main.py index 761e70335bb4c65013fee84d33bbfca9ef22dab7..eed166aee21aeeb7f748114e0c04ccec53d6ce4a 100644 --- a/eotimeseriesviewer/main.py +++ b/eotimeseriesviewer/main.py @@ -205,8 +205,6 @@ class EOTimeSeriesViewerUI(QMainWindow): self.dockTimeSeries.raise_() - - def addDockWidget(self, area: Qt.DockWidgetArea, dock: QDockWidget) -> QDockWidget: """ shortcut to add a created dock and return it @@ -470,8 +468,6 @@ class EOTimeSeriesViewer(QgisInterface, QObject): dts = self.ui.dockTimeSeries mw: MapWidget = self.ui.mMapWidget - - assert isinstance(mvd, MapViewDock) assert isinstance(mw, MapWidget) assert isinstance(dts, TimeSeriesDock) @@ -644,10 +640,10 @@ class EOTimeSeriesViewer(QgisInterface, QObject): assert isinstance(SLW, SpectralLibraryWidget) SLW.actionSelectProfilesFromMap.setVisible(True) SLW.sigLoadFromMapRequest.connect(lambda *args: self.setMapTool(MapTools.SpectralProfile)) - #SLW.setMapInteraction(True) - #SLW.setCurrentProfilesMode(SpectralLibraryWidget.CurrentProfilesMode.automatically) - #SLW.sigMapExtentRequested.connect(self.setSpatialExtent) - #SLW.sigMapCenterRequested.connect(self.setSpatialCenter) + # SLW.setMapInteraction(True) + # SLW.setCurrentProfilesMode(SpectralLibraryWidget.CurrentProfilesMode.automatically) + # SLW.sigMapExtentRequested.connect(self.setSpatialExtent) + # SLW.sigMapCenterRequested.connect(self.setSpatialCenter) SLW.setVectorLayerTools(self.mVectorLayerTools) # add time-specific fields sl = self.spectralLibrary() @@ -1477,7 +1473,7 @@ class EOTimeSeriesViewer(QgisInterface, QObject): filters = "CSV (*.csv *.txt);;" + \ "All files (*.*)" path, filter = QFileDialog.getSaveFileName(caption='Save Time Series definition', filter=filters, - directory=defFile) + directory=defFile) if path not in [None, '']: path = self.mTimeSeries.saveToFile(path) s.setValue('FILE_TS_DEFINITION', path) diff --git a/eotimeseriesviewer/timeseries.py b/eotimeseriesviewer/timeseries.py index 059aadfd5a42cd82916417cca84e09c8a3c3be6b..b3d1136b05faa85f9384494d36d30e7a00d88168 100644 --- a/eotimeseriesviewer/timeseries.py +++ b/eotimeseriesviewer/timeseries.py @@ -1793,12 +1793,24 @@ class TimeSeries(QAbstractItemModel): """ assert isinstance(sensor, SensorInstrument) if not sensor in self.mSensors: + sensor.sigNameChanged.connect(self.onSensorNameChanged) self.mSensors.append(sensor) self.sigSensorAdded.emit(sensor) return sensor else: return None + def onSensorNameChanged(self, name: str): + sensor = self.sender() + + if isinstance(sensor, SensorInstrument) and sensor in self.sensors(): + c = self.columnNames().index(self.cnSensor) + + idx0 = self.index(0, c) + idx1 = self.index(self.rowCount()-1, c) + self.dataChanged.emit(idx0, idx1) + s = "" + def checkSensorList(self): """ Removes sensors without linked TSD / no data