feat: add outfit batch runner

This commit is contained in:
2026-06-18 17:52:05 +08:00
parent 28fcc018bc
commit 5b57a4d39a
5 changed files with 487 additions and 2 deletions
+1
View File
@@ -0,0 +1 @@
+29
View File
@@ -0,0 +1,29 @@
from PySide6.QtCore import QObject, Signal, Slot
from core.outfit_batch import OutfitBatchOptions, OutfitBatchRunner
class AiOutfitWorker(QObject):
"""Qt signal wrapper for the core outfit batch runner."""
log = Signal(str)
progress = Signal(int, int, object) # completed, total, OutfitResult
finished = Signal(object) # OutfitBatchSummary
def __init__(self, tasks, generate_func, options=None, parent=None):
super().__init__(parent)
self._runner = OutfitBatchRunner(
tasks=tasks,
generate_func=generate_func,
options=options or OutfitBatchOptions(),
progress_callback=self.progress.emit,
log_callback=self.log.emit,
)
@Slot()
def run(self):
self.finished.emit(self._runner.run())
@Slot()
def stop(self):
self._runner.stop()