Converted comments in dir Cura/cura to rst style

Converted doxygen style comments to reStructuredText style in the files found in Cura/cura directory using the script dox_2_rst.py (provided in the Uranium repo). Comments were manually checked and changed if needed.
This commit is contained in:
Jelle Spijker 2020-04-21 16:58:45 +02:00 committed by Jelle Spijker
parent fb4aec96a8
commit 6aedab78dc
No known key found for this signature in database
GPG key ID: 6662DC033BE6B99A
15 changed files with 371 additions and 208 deletions

View file

@ -43,9 +43,10 @@ class CuraActions(QObject):
event = CallFunctionEvent(self._openUrl, [QUrl("https://github.com/Ultimaker/Cura/issues")], {})
cura.CuraApplication.CuraApplication.getInstance().functionEvent(event)
## Reset camera position and direction to default
@pyqtSlot()
def homeCamera(self) -> None:
"""Reset camera position and direction to default"""
scene = cura.CuraApplication.CuraApplication.getInstance().getController().getScene()
camera = scene.getActiveCamera()
if camera:
@ -54,9 +55,10 @@ class CuraActions(QObject):
camera.setPerspective(True)
camera.lookAt(Vector(0, 0, 0))
## Center all objects in the selection
@pyqtSlot()
def centerSelection(self) -> None:
"""Center all objects in the selection"""
operation = GroupedOperation()
for node in Selection.getAllSelectedObjects():
current_node = node
@ -73,18 +75,21 @@ class CuraActions(QObject):
operation.addOperation(center_operation)
operation.push()
## Multiply all objects in the selection
#
# \param count The number of times to multiply the selection.
@pyqtSlot(int)
def multiplySelection(self, count: int) -> None:
"""Multiply all objects in the selection
:param count: The number of times to multiply the selection.
"""
min_offset = cura.CuraApplication.CuraApplication.getInstance().getBuildVolume().getEdgeDisallowedSize() + 2 # Allow for some rounding errors
job = MultiplyObjectsJob(Selection.getAllSelectedObjects(), count, min_offset = max(min_offset, 8))
job.start()
## Delete all selected objects.
@pyqtSlot()
def deleteSelection(self) -> None:
"""Delete all selected objects."""
if not cura.CuraApplication.CuraApplication.getInstance().getController().getToolsEnabled():
return
@ -106,11 +111,13 @@ class CuraActions(QObject):
op.push()
## Set the extruder that should be used to print the selection.
#
# \param extruder_id The ID of the extruder stack to use for the selected objects.
@pyqtSlot(str)
def setExtruderForSelection(self, extruder_id: str) -> None:
"""Set the extruder that should be used to print the selection.
:param extruder_id: The ID of the extruder stack to use for the selected objects.
"""
operation = GroupedOperation()
nodes_to_change = []