mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
Convert doxygen to rst for UM3NetworkPrinting
This commit is contained in:
parent
de82406782
commit
5eb5ffd916
38 changed files with 797 additions and 487 deletions
|
@ -7,12 +7,12 @@ from UM.Message import Message
|
|||
I18N_CATALOG = i18nCatalog("cura")
|
||||
|
||||
|
||||
## Message shown when trying to connect to a legacy printer device.
|
||||
class LegacyDeviceNoLongerSupportedMessage(Message):
|
||||
|
||||
# Singleton used to prevent duplicate messages of this type at the same time.
|
||||
"""Message shown when trying to connect to a legacy printer device."""
|
||||
|
||||
__is_visible = False
|
||||
|
||||
"""Singleton used to prevent duplicate messages of this type at the same time."""
|
||||
|
||||
def __init__(self) -> None:
|
||||
super().__init__(
|
||||
text = I18N_CATALOG.i18nc("@info:status", "You are attempting to connect to a printer that is not "
|
||||
|
|
|
@ -13,11 +13,11 @@ if TYPE_CHECKING:
|
|||
I18N_CATALOG = i18nCatalog("cura")
|
||||
|
||||
|
||||
## Message shown when sending material files to cluster host.
|
||||
class MaterialSyncMessage(Message):
|
||||
"""Message shown when sending material files to cluster host."""
|
||||
|
||||
# Singleton used to prevent duplicate messages of this type at the same time.
|
||||
__is_visible = False
|
||||
"""Singleton used to prevent duplicate messages of this type at the same time."""
|
||||
|
||||
def __init__(self, device: "UltimakerNetworkedPrinterOutputDevice") -> None:
|
||||
super().__init__(
|
||||
|
|
|
@ -16,11 +16,11 @@ if TYPE_CHECKING:
|
|||
I18N_CATALOG = i18nCatalog("cura")
|
||||
|
||||
|
||||
## Message shown when trying to connect to a printer that is not a host.
|
||||
class NotClusterHostMessage(Message):
|
||||
"""Message shown when trying to connect to a printer that is not a host."""
|
||||
|
||||
# Singleton used to prevent duplicate messages of this type at the same time.
|
||||
__is_visible = False
|
||||
"""Singleton used to prevent duplicate messages of this type at the same time."""
|
||||
|
||||
def __init__(self, device: "UltimakerNetworkedPrinterOutputDevice") -> None:
|
||||
super().__init__(
|
||||
|
|
|
@ -7,9 +7,9 @@ from UM.Message import Message
|
|||
I18N_CATALOG = i18nCatalog("cura")
|
||||
|
||||
|
||||
## Message shown when uploading a print job to a cluster is blocked because another upload is already in progress.
|
||||
class PrintJobUploadBlockedMessage(Message):
|
||||
|
||||
"""Message shown when uploading a print job to a cluster is blocked because another upload is already in progress."""
|
||||
|
||||
def __init__(self) -> None:
|
||||
super().__init__(
|
||||
text = I18N_CATALOG.i18nc("@info:status", "Please wait until the current job has been sent."),
|
||||
|
|
|
@ -7,9 +7,9 @@ from UM.Message import Message
|
|||
I18N_CATALOG = i18nCatalog("cura")
|
||||
|
||||
|
||||
## Message shown when uploading a print job to a cluster failed.
|
||||
class PrintJobUploadErrorMessage(Message):
|
||||
|
||||
"""Message shown when uploading a print job to a cluster failed."""
|
||||
|
||||
def __init__(self, message: str = None) -> None:
|
||||
super().__init__(
|
||||
text = message or I18N_CATALOG.i18nc("@info:text", "Could not upload the data to the printer."),
|
||||
|
|
|
@ -7,8 +7,9 @@ from UM.Message import Message
|
|||
I18N_CATALOG = i18nCatalog("cura")
|
||||
|
||||
|
||||
## Class responsible for showing a progress message while a mesh is being uploaded to the cloud.
|
||||
class PrintJobUploadProgressMessage(Message):
|
||||
"""Class responsible for showing a progress message while a mesh is being uploaded to the cloud."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(
|
||||
title = I18N_CATALOG.i18nc("@info:status", "Sending Print Job"),
|
||||
|
@ -19,14 +20,17 @@ class PrintJobUploadProgressMessage(Message):
|
|||
use_inactivity_timer = False
|
||||
)
|
||||
|
||||
## Shows the progress message.
|
||||
def show(self):
|
||||
"""Shows the progress message."""
|
||||
|
||||
self.setProgress(0)
|
||||
super().show()
|
||||
|
||||
## Updates the percentage of the uploaded.
|
||||
# \param percentage: The percentage amount (0-100).
|
||||
def update(self, percentage: int) -> None:
|
||||
"""Updates the percentage of the uploaded.
|
||||
|
||||
:param percentage: The percentage amount (0-100).
|
||||
"""
|
||||
if not self._visible:
|
||||
super().show()
|
||||
self.setProgress(percentage)
|
||||
|
|
|
@ -7,9 +7,9 @@ from UM.Message import Message
|
|||
I18N_CATALOG = i18nCatalog("cura")
|
||||
|
||||
|
||||
## Message shown when uploading a print job to a cluster succeeded.
|
||||
class PrintJobUploadSuccessMessage(Message):
|
||||
|
||||
"""Message shown when uploading a print job to a cluster succeeded."""
|
||||
|
||||
def __init__(self) -> None:
|
||||
super().__init__(
|
||||
text = I18N_CATALOG.i18nc("@info:status", "Print job was successfully sent to the printer."),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue