mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 18:27:51 -06:00
Document old functions
I was reading through these to check if they'd still work. They should still work, but since I went through them I went ahead and documented them too. Contributes to issues CURA-1278 and CURA-1588.
This commit is contained in:
parent
e94220f46d
commit
c8de272ec4
1 changed files with 17 additions and 1 deletions
|
@ -153,6 +153,7 @@ class CuraEngineBackend(Backend):
|
||||||
job.finished.connect(self._onStartSliceCompleted)
|
job.finished.connect(self._onStartSliceCompleted)
|
||||||
job.start()
|
job.start()
|
||||||
|
|
||||||
|
## Terminate the engine process.
|
||||||
def _terminate(self):
|
def _terminate(self):
|
||||||
self._slicing = False
|
self._slicing = False
|
||||||
self._restart = True
|
self._restart = True
|
||||||
|
@ -172,7 +173,14 @@ class CuraEngineBackend(Backend):
|
||||||
self._message.hide()
|
self._message.hide()
|
||||||
self._message = None
|
self._message = None
|
||||||
|
|
||||||
|
## Event handler to call when the job to initiate the slicing process is
|
||||||
|
# completed.
|
||||||
|
#
|
||||||
|
# When the start slice job is successfully completed, it will be happily
|
||||||
|
# slicing. This function handles any errors that may occur during the
|
||||||
|
# bootstrapping of a slice job.
|
||||||
|
#
|
||||||
|
# \param job The start slice job that was just finished.
|
||||||
def _onStartSliceCompleted(self, job):
|
def _onStartSliceCompleted(self, job):
|
||||||
if job.getError() or job.getResult() != True:
|
if job.getError() or job.getResult() != True:
|
||||||
if self._message:
|
if self._message:
|
||||||
|
@ -180,6 +188,11 @@ class CuraEngineBackend(Backend):
|
||||||
self._message = None
|
self._message = None
|
||||||
return
|
return
|
||||||
|
|
||||||
|
## Listener for when the scene has changed.
|
||||||
|
#
|
||||||
|
# This should start a slice if the scene is now ready to slice.
|
||||||
|
#
|
||||||
|
# \param source The scene node that was changed.
|
||||||
def _onSceneChanged(self, source):
|
def _onSceneChanged(self, source):
|
||||||
if type(source) is not SceneNode:
|
if type(source) is not SceneNode:
|
||||||
return
|
return
|
||||||
|
@ -195,6 +208,9 @@ class CuraEngineBackend(Backend):
|
||||||
|
|
||||||
self._onChanged()
|
self._onChanged()
|
||||||
|
|
||||||
|
## Called when an error occurs in the socket connection towards the engine.
|
||||||
|
#
|
||||||
|
# \param error The exception that occurred.
|
||||||
def _onSocketError(self, error):
|
def _onSocketError(self, error):
|
||||||
if Application.getInstance().isShuttingDown():
|
if Application.getInstance().isShuttingDown():
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue