Skip to content

Add optional QML-based map view (QQuickWidget) with feature flag and migration notes - #573

Closed
axelvonkamp wants to merge 1 commit into
codex/migrate-codebase-to-qt-6.8from
codex/convert-qgraphicsview-to-qml-implementation
Closed

Add optional QML-based map view (QQuickWidget) with feature flag and migration notes#573
axelvonkamp wants to merge 1 commit into
codex/migrate-codebase-to-qt-6.8from
codex/convert-qgraphicsview-to-qml-implementation

Conversation

@axelvonkamp

Copy link
Copy Markdown
Member

Motivation

  • Introduce an experimental Qt Quick / QML based map canvas to enable a hardware-accelerated rendering path while preserving the existing QGraphicsView implementation as the default.
  • Provide a smooth migration path so the rest of the codebase can treat either backend as a drop-in map widget.

Description

  • Add a new QmlMapView implementation in cnapy/gui_elements/qml_map_view.py which exposes a QmlMapController and ReactionBoxListModel to QML and mirrors the MapView API and signals.
  • Add QML UI files qml/MapView.qml and qml/ReactionBoxDelegate.qml that render the map background, reaction boxes, panning/zooming, selection, context menu and drag/drop behavior.
  • Introduce factory/helper functions create_cnapy_map_view and is_cnapy_map_view in central_widget.py, use them where MapView was constructed or type-checked, and keep existing MapView behavior as the default; enable QML path when CNAPY_QML_MAP_VIEW=1.
  • Update main_window.py to import and use the factory and type helper, and add migration documentation docs/qml-map-view-migration.md describing architecture and porting notes.

Testing

  • Ran the project's automated test suite with pytest which completed successfully.
  • Performed an automated syntax/compile check with python -m compileall . which succeeded.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant