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.
This commit is contained in:
HellAholic 2025-12-21 15:48:29 +01:00
parent af6a915cf1
commit 4e59253dee

View file

@ -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):