Commit Graph

6 Commits

Author SHA1 Message Date
Jesse Qu f6d6e71e32 Fix serialization/deserialization for rounded rects, polygons, and groups
- Rounded rects: serialize/restore isRound, ratioX, ratioY; pass isRound
  to constructor so rounded-corner control handles are created
- Polygons: implement full serialization/deserialization including vertex
  points; add updateBoundingRectFromPoints() to fix hit-test and handles
  after deserialization
- Groups: add updateBoundingRectFromChildren() to correctly compute
  bounding rect after child items are deserialized

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 10:27:47 +08:00
Jesse Qu acf56d7c83 Add Save As feature and fix document serialization
- Add saveAsToFile() method to Document class for "Save As" functionality
- Add actionSaveAs menu item and onAction_saveAs() handler in MainWindow
- Add isValidItem() method to GraphicsBaseItem to filter helper elements
- Add using declarations to expose AbstractShapeType members in GraphicsBaseItem
- Fix document serialization to properly handle GraphicsItemGroup pen/brush
- HandleType enum starts from 50 to avoid conflicts with future handle types
- Improve deserialization to properly restore item properties

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 17:55:56 +08:00
Jesse Qu 78f2edf24b Add Document class for file persistence
- Add Document class (include/document.h, source/document.cpp)
  - JSON serialization/deserialization of DesignerScene
  - State management: filename, modified flag, timestamps, metadata
  - File operations: New, Open, Save with .bay extension
- Integrate Document into CMainWindow
  - initializeDocument() to create and associate with DesignerScene
  - File menu actions connected to Document methods
  - Window title updates on modified/filename changes
  - Close event checks for unsaved changes
- Update CLAUDE.md with Document architecture documentation
2026-05-13 16:24:21 +08:00
Jesse Qu ff67c48a86 Update build instructions to use CMake presets
Simplified the build commands in CLAUDE.md from complex absolute-path CMake configuration to preset-based approach:
- Changed from cmake -B <build-dir> -S <source-dir> ... to cmake --preset default
- Changed from cmake --build <build-dir> to ninja -C build/Debug
- Updated output location to macOS-specific build/Debug/BayTemplate.app
2026-04-16 14:16:43 +08:00
Jesse Qu ba12fb1017 renamed 2026-03-25 17:40:40 +08:00
Jesse Qu ab6960acb5 Initial commit: BayTemplate Grid Framework DesignTime tool
- Qt-based application for designing electrical power grid structures
- Features dockable UI with graphics canvas for placing grid elements
- Includes QtADS (Advanced Docking System v4.3.1) and PropertyEditor
- Supports Qt5/Qt6, multiple platforms (Windows, macOS, Linux, Android)
- Architecture: DesignerView/Scene, SelectorManager, Command Pattern for undo/redo
2026-03-25 17:15:51 +08:00