mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 02:07:51 -06:00
Add properties of whether the queue can be manipulated
Not all printers can do that. Contributes to issue CURA-9220.
This commit is contained in:
parent
483911dc4a
commit
b4c4371929
2 changed files with 50 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2019 Ultimaker B.V.
|
||||
# Copyright (c) 2022 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
import os
|
||||
from typing import Optional, Dict, List, Callable, Any
|
||||
|
@ -103,6 +103,28 @@ class LocalClusterOutputDevice(UltimakerNetworkedPrinterOutputDevice):
|
|||
"""
|
||||
return True # This API always supports print job queueing.
|
||||
|
||||
@pyqtProperty(bool, constant = True)
|
||||
def canReadPrintJobs(self) -> bool:
|
||||
"""
|
||||
Whether this user can read the list of print jobs and their properties.
|
||||
"""
|
||||
return False # On LAN, the user can always read it.
|
||||
|
||||
@pyqtProperty(bool, constant = True)
|
||||
def canWriteOthersPrintJobs(self) -> bool:
|
||||
"""
|
||||
Whether this user can change things about print jobs made by other
|
||||
people.
|
||||
"""
|
||||
return True # On LAN, the user can always change this.
|
||||
|
||||
@pyqtProperty(bool, constant = True)
|
||||
def canWriteOwnPrintJobs(self) -> bool:
|
||||
"""
|
||||
Whether this user can change things about print jobs made by themself.
|
||||
"""
|
||||
return True # On LAN, the user can always change this.
|
||||
|
||||
def setJobState(self, print_job_uuid: str, action: str) -> None:
|
||||
"""Set the remote print job state.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue