chore: scaffold PySide6 application

This commit is contained in:
QiuSW
2026-06-15 15:53:01 +08:00
parent 5613f08213
commit e91207357b
23 changed files with 116 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
PySide6==6.5.3
shiboken6==6.5.3
Pillow==9.5.0
PyInstaller==5.13.2
+1
View File
@@ -0,0 +1 @@
+17
View File
@@ -0,0 +1,17 @@
from PySide6.QtCore import Qt
from PySide6.QtWidgets import QLabel, QMainWindow
from version import APP_NAME, APP_VERSION
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("{} v{}".format(APP_NAME, APP_VERSION))
self.resize(1280, 720)
label = QLabel("自动合成印花服饰效果图工具\n\n工程骨架已创建")
label.setAlignment(Qt.AlignCenter)
self.setCentralWidget(label)
self.statusBar().showMessage("就绪")
+1
View File
@@ -0,0 +1 @@
+5
View File
@@ -0,0 +1,5 @@
from PySide6.QtWidgets import QWidget
class ExportPanel(QWidget):
pass
+7
View File
@@ -0,0 +1,7 @@
from PySide6.QtWidgets import QGraphicsScene, QGraphicsView
class ImageCanvas(QGraphicsView):
def __init__(self, parent=None):
super().__init__(parent)
self.setScene(QGraphicsScene(self))
+5
View File
@@ -0,0 +1,5 @@
from PySide6.QtWidgets import QWidget
class ImageListPanel(QWidget):
pass
+5
View File
@@ -0,0 +1,5 @@
from PySide6.QtWidgets import QWidget
class TemplatePanel(QWidget):
pass
+5
View File
@@ -0,0 +1,5 @@
from PySide6.QtWidgets import QWidget
class TransformPanel(QWidget):
pass
+1
View File
@@ -0,0 +1 @@
+2
View File
@@ -0,0 +1,2 @@
def run_batch(*args, **kwargs):
raise NotImplementedError("Batch composition is not implemented yet.")
+2
View File
@@ -0,0 +1,2 @@
def compose_image(*args, **kwargs):
raise NotImplementedError("Image composition is not implemented yet.")
+18
View File
@@ -0,0 +1,18 @@
from dataclasses import dataclass
from pathlib import Path
@dataclass
class ImageAsset:
path: Path
selected: bool = True
@dataclass
class TransformState:
x: float = 0
y: float = 0
width: float = 0
height: float = 0
rotation: float = 0
keep_aspect_ratio: bool = True
+20
View File
@@ -0,0 +1,20 @@
import sys
from PySide6.QtWidgets import QApplication
from app.main_window import MainWindow
from version import APP_NAME
def main():
app = QApplication(sys.argv)
app.setApplicationName(APP_NAME)
window = MainWindow()
window.show()
return app.exec()
if __name__ == "__main__":
sys.exit(main())
+1
View File
@@ -0,0 +1 @@
+1
View File
@@ -0,0 +1 @@
+1
View File
@@ -0,0 +1 @@
+2
View File
@@ -0,0 +1,2 @@
def load_config():
return {}
+5
View File
@@ -0,0 +1,5 @@
SUPPORTED_IMAGE_EXTENSIONS = {".png", ".jpg", ".jpeg", ".webp"}
def is_supported_image(path):
return path.suffix.lower() in SUPPORTED_IMAGE_EXTENSIONS
+8
View File
@@ -0,0 +1,8 @@
import logging
def setup_logging():
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
)
+2
View File
@@ -0,0 +1,2 @@
def load_templates():
return []
+2
View File
@@ -0,0 +1,2 @@
APP_NAME = "自动合成印花服饰效果图工具"
APP_VERSION = "1.0.0"
+1
View File
@@ -0,0 +1 @@