STAR-322: Improving documentation

This commit is contained in:
Daniel Schiavini 2018-12-17 15:11:01 +01:00
parent d28ac5e120
commit c5f438819a
2 changed files with 45 additions and 14 deletions

View file

@ -12,6 +12,7 @@ class T:
SENDING_DATA_TITLE = _I18N_CATALOG.i18nc("@info:status", "Sending data to remote cluster")
## Class responsible for showing a progress message while a mesh is being uploaded to the cloud.
class CloudProgressMessage(Message):
def __init__(self):
super().__init__(
@ -23,15 +24,19 @@ class CloudProgressMessage(Message):
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)
## Returns a boolean indicating whether the message is currently visible.
@property
def visible(self) -> bool:
return self._visible