Commit Graph

3 Commits

Author SHA1 Message Date
jessequ e1671fdbe3 fix: resolve Q_CLASSINFO metadata for child properties by matching all path segments
resloveMetaData() only matched Q_CLASSINFO against the first segment of
  the property path (e.g. "ptPosition" from "ptPosition.x"), so child
  handles like x/y under a QPointF tree never picked up Min/Max/Step
  metadata declared with Q_CLASSINFO("x", ...). This caused the x/y
  NumberBox editors to fall back to numeric_limits min/max, clamping
  negative values to ~0.

  Now iterates path segments from most specific (last) to least specific
  (first), so child property names correctly match their Q_CLASSINFO
  annotations.

  Also add Q_CLASSINFO("x"/"y", "Min=-1000,Max=1000,Step=1") on
  GraphicsTextItem to constrain position editing to a reasonable range.
2026-07-31 16:39:24 +08:00
jessequ fda709c0e2 feat: add ptposition property to tect item 2026-07-31 14:29:17 +08:00
jessequ 8ea5033f0d feat: add text item with IShape interface decoupling
Extract a pure virtual IShape interface from AbstractShapeType<T> so
  selectors and Document use dynamic_cast<IShape *> instead of
  qgraphicsitem_cast<AbstractShape *>. This decouples the selector
  system from the template hierarchy, enabling GraphicsTextItem (backed
  by QGraphicsTextItem) to work uniformly with all existing selectors.

  GraphicsTextItem supports inline text editing (double-click to edit,
  focus-out to finish), font/color properties via PropertyEditor, resize
  with proportional font scaling, move, rotate, and full serialization.
  Adds CM_place creation mode for single-click placement.
2026-07-22 09:56:28 +08:00