Move per-type serialization logic out of Document's monolithic
serializeItem()/deserializeItem() into each item class:
- Add virtual serialize() to AbstractShapeType template, overridden by
GraphicsRectItem, GraphicPolygonItem, and GraphicsItemGroup
- Add static createFromJson() factory + self-registration to each item
- Extract shared pen/brush/common helpers into serializationUtils
- Add type registry (serializationRegistry) for factory-based deserialization
- Document::saveAs()/load() now delegate to item->serialize() and
createItemFromJson() — no longer owns per-type dispatch
- Adding a new shape type no longer requires touching Document
|
||
|---|---|---|
| .. | ||
| graphicsItem | ||
| propertyType | ||
| util | ||
| designerScene.cpp | ||
| designerView.cpp | ||
| document.cpp | ||
| drawingPanel.cpp | ||
| graphicElementsPanel.cpp | ||
| main.cpp | ||
| mainwindow.cpp | ||
| operationCommand.cpp | ||