mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Some fixes and cleanup for the network plugin
This commit is contained in:
parent
91d582622f
commit
a1b986fd3a
10 changed files with 94 additions and 55 deletions
|
@ -0,0 +1,32 @@
|
|||
# Copyright (c) 2019 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
from UM import i18nCatalog
|
||||
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):
|
||||
def __init__(self):
|
||||
super().__init__(
|
||||
title = I18N_CATALOG.i18nc("@info:status", "Sending Print Job"),
|
||||
text = I18N_CATALOG.i18nc("@info:status", "Uploading print job to printer."),
|
||||
progress = -1,
|
||||
lifetime = 0,
|
||||
dismissable = False,
|
||||
use_inactivity_timer = False
|
||||
)
|
||||
|
||||
## Shows the progress message.
|
||||
def show(self):
|
||||
self.setProgress(0)
|
||||
super().show()
|
||||
|
||||
## Updates the percentage of the uploaded.
|
||||
# \param percentage: The percentage amount (0-100).
|
||||
def update(self, percentage: int) -> None:
|
||||
if not self._visible:
|
||||
super().show()
|
||||
self.setProgress(percentage)
|
Loading…
Add table
Add a link
Reference in a new issue