Move signal definition to top of file

It's easier to understand what is going on if the signal definitions are not spread out

CURA-10717
This commit is contained in:
Jaime van Kessel 2023-07-11 11:38:21 +02:00
parent 19a4e0d2f8
commit bf32b83c82
No known key found for this signature in database
GPG key ID: C85F7A3AF1BAA7C4

View file

@ -46,6 +46,19 @@ catalog = i18nCatalog("cura")
class CuraEngineBackend(QObject, Backend): class CuraEngineBackend(QObject, Backend):
backendError = Signal() backendError = Signal()
printDurationMessage = Signal()
"""Emitted when we get a message containing print duration and material amount.
This also implies the slicing has finished.
:param time: The amount of time the print will take.
:param material_amount: The amount of material the print will use.
"""
slicingStarted = Signal()
"""Emitted when the slicing process starts."""
slicingCancelled = Signal()
"""Emitted when the slicing process is aborted forcefully."""
def __init__(self) -> None: def __init__(self) -> None:
"""Starts the back-end plug-in. """Starts the back-end plug-in.
@ -267,19 +280,6 @@ class CuraEngineBackend(QObject, Backend):
return command return command
printDurationMessage = Signal()
"""Emitted when we get a message containing print duration and material amount.
This also implies the slicing has finished.
:param time: The amount of time the print will take.
:param material_amount: The amount of material the print will use.
"""
slicingStarted = Signal()
"""Emitted when the slicing process starts."""
slicingCancelled = Signal()
"""Emitted when the slicing process is aborted forcefully."""
@pyqtSlot() @pyqtSlot()
def stopSlicing(self) -> None: def stopSlicing(self) -> None:
self.setState(BackendState.NotStarted) self.setState(BackendState.NotStarted)