Commit Graph

6 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 e63fae92c8 feat: add QPointF tree-expandable type editor to PropertyEditor 2026-07-31 15:26:08 +08:00
jessequ 94c48e7de8 feat: add QPointF tree-expandable type editor to PropertyEditor
Add PropertyTypeCustomization_PointF that renders QPointF as an
  expandable tree row: collapsed header shows formatted "(x, y)" text,
  expanded children provide NumberBox editing for x and y coordinates.
  Registered in mMetaTypeCustomizationMap alongside the existing QFont
  customization, reusing the RawType branch of getCustomPropertyType().
2026-07-31 15:13:47 +08:00
jessequ 2e93156093 feat: add QFont type editor with FontBox and fix property name top-alignment
Add FontBox QML editor for QFont properties — collapsed display shows
  "family, size pt", expanded inline dropdown provides family ComboBox
  (populated from QFontDatabase), compact +/- size buttons, and
  Bold/Italic/Underline toggles.

  QFont is a Q_GADGET type classified as Object by parserType(), so it
  requires both a PropertyTypeCustomization_Font (overrides
  customizeHeaderRow to create the value editor, customizeChildren as
  no-op) and a mMetaTypeCustomizationMap entry — the Object branch of
  getCustomPropertyType() is extended to check this map first.

  Also fix property name column to always top-align (anchors.top +
  implicitHeight) so it stays fixed when inline editors like FontBox
  expand vertically, rather than drifting to row center.

  Files (8 changed):
  - resources/Qml/ValueEditor/FontBox.qml           (new)
  - source/src/Customization/PropertyTypeCustomization_Font.h  (new)
  - source/src/Customization/PropertyTypeCustomization_Font.cpp (new)
  - resources.qrc
  - source/src/QQuickDetailsViewBasicTypeEditor.cpp
  - source/src/QQuickDetailsViewMananger.cpp
  - source/src/QQuickDetailsViewLayoutBuilder.cpp
  - source/src/PropertyHandleImpl/IPropertyHandleImpl.cpp
2026-07-27 21:54:57 +08:00
Jesse Qu a9dc41cf80 fix: add missing override keywords and virtual destructor to resolve all compiler warnings
- Mark 27 overriding functions with 'override' across GraphicsItemGroup,
    GraphicsRectItem, and GraphicPolygonItem headers
  - Add virtual destructor to IPropertyHandleImpl (fixes -Wdelete-abstract-non-virtual-dtor)
  - Build is now 0 warnings, 0 errors
2026-07-15 11:27:08 +08:00
Jesse Qu 5d2caba154 Add property-editor function. 2026-07-03 15:58:09 +08:00