Go to file
Jesse Qu c8f71cb9e3 ⏺ feat: add Document layer with serialization, dirty tracking, and file actions
Introduce a Document QObject that composes DesignerScene + QUndoStack,
  following "composition over inheritance" and unidirectional signal-slot
  communication per Qt Graphics View Framework conventions.

  New files:
  - include/document.h — Document class declaration
  - source/document.cpp — full implementation (~450 lines)

  Core capabilities:
  - JSON serialization/deserialization for rect, roundRect, polygon, group
    (uses dynamic_cast dispatch since subclasses don't override type())
  - Two-path dirty tracking:
    1. QUndoStack::indexChanged for undoable ops (add/delete/group/ungroup)
    2. Explicit markDirty() via DesignerScene::notifyDocumentModified()
       called by selectors after successful move/scale/rotate/edit
  - save()/saveAs()/load()/clear() with maybeSave() prompt on close
  - File actions (New/Open/Save/Save As) wired to toolbar and File menu;
    window title tracks filename + modified indicator

  Integration changes:
  - DrawingPanel now receives scene via setScene() instead of creating it
  - CMainWindow routes all modifications through Document::execute()
  - DesignerScene gains notifyDocumentModified() for selector dirty marking
  - GraphicsRectItem gains isRound()/ratioX()/ratioY() accessors
  - CreatingSelector: fix missing signalAddItem emit for polygon completion
  - Scene lifecycle uses clear() instead of delete+recreate to avoid
    dangling view pointer

  Moved QUndoStack ownership from CMainWindow into Document.
2026-07-08 16:57:46 +08:00
PropertyEditor Add property-editor function. 2026-07-03 15:58:09 +08:00
QtADS first commit for HMI 2026-07-03 11:29:21 +08:00
include ⏺ feat: add Document layer with serialization, dirty tracking, and file actions 2026-07-08 16:57:46 +08:00
resource first commit for HMI 2026-07-03 11:29:21 +08:00
source ⏺ feat: add Document layer with serialization, dirty tracking, and file actions 2026-07-08 16:57:46 +08:00
ui Fix resource include path in drawingPanel.ui 2026-07-08 14:42:46 +08:00
.drone.yml change CI machine 2026-07-03 11:54:57 +08:00
.gitignore ⏺ feat: add Document layer with serialization, dirty tracking, and file actions 2026-07-08 16:57:46 +08:00
CMakeLists.txt ⏺ feat: add Document layer with serialization, dirty tracking, and file actions 2026-07-08 16:57:46 +08:00
README.md first commit for HMI 2026-07-03 11:29:21 +08:00

README.md

Build Status

HMI

桌面端 HMIDesktop HMI