WIP: Multi-printers #32

Draft
n07070 wants to merge 25 commits from multi-printers into master
Showing only changes of commit 9e4ec6c1a5 - Show all commits

View File

@@ -30,6 +30,7 @@ class TaskType(Enum):
TEXT = "text"
IMAGE = "image"
CUT = "cut"
QR = "qr"
class PrintTask(ABC):
@@ -67,6 +68,15 @@ class TextTask(PrintTask):
def get_print_data(self):
return {"txt": self.content, "sign": self.signature}
class QRTask(TextTask):
"""This task prints a QR-Code, the signature is ignore and is always the content itself"""
def __init__(self, content):
super().__init__(content, signature="")
self.content = content
self.signature = content
def get_print_data(self):
return {"txt": self.content, "sign": self.signature}
class ImageTask(PrintTask):
"""