From 9e4ec6c1a5ab91589d06c462524efc21678a17b3 Mon Sep 17 00:00:00 2001 From: n07070 Date: Mon, 1 Jun 2026 21:40:28 +0200 Subject: [PATCH] Add support for QR code task --- src/task.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/task.py b/src/task.py index 2962618..b7a01f8 100644 --- a/src/task.py +++ b/src/task.py @@ -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): """