mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-25 08:58:35 -07:00
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:
parent
af6a915cf1
commit
4e59253dee
1 changed files with 14 additions and 6 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue