From 4e59253dee9d62ec30176fc831d53d6febb1dddf Mon Sep 17 00:00:00 2001 From: HellAholic Date: Sun, 21 Dec 2025 15:48:29 +0100 Subject: [PATCH] Replace layer height properties with layer data maps Replaces currentLayerHeight and minimumLayerHeight properties with currentLayerData and minimumLayerData, returning all relevant layer data as QVariantMap. This provides more comprehensive information for each layer, including height, time elapsed, layer time, and time remaining. --- plugins/SimulationView/SimulationViewProxy.py | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/plugins/SimulationView/SimulationViewProxy.py b/plugins/SimulationView/SimulationViewProxy.py index bd8f066cf6..9ea3ac1f00 100644 --- a/plugins/SimulationView/SimulationViewProxy.py +++ b/plugins/SimulationView/SimulationViewProxy.py @@ -46,13 +46,21 @@ class SimulationViewProxy(QObject): def minimumLayer(self): return self._simulation_view.getMinimumLayer() - @pyqtProperty(float, notify=currentLayerChanged) - def currentLayerHeight(self): - return self._simulation_view.getCurrentLayerHeight() + @pyqtProperty('QVariantMap', notify=currentLayerChanged) + def currentLayerData(self): + """Get all data for the current layer as a dict. + + Contains: height (float), time_elapsed (str), layer_time (str), time_remaining (str) + """ + return self._simulation_view.getCurrentLayerData() - @pyqtProperty(float, notify=currentLayerChanged) - def minimumLayerHeight(self): - return self._simulation_view.getMinimumLayerHeight() + @pyqtProperty('QVariantMap', notify=currentLayerChanged) + def minimumLayerData(self): + """Get all data for the minimum layer as a dict. + + Contains: height (float), time_elapsed (str), layer_time (str), time_remaining (str) + """ + return self._simulation_view.getMinimumLayerData() @pyqtProperty(int, notify=maxPathsChanged) def numPaths(self):