Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port annotation feature handling to QgsAnnotation
Not an ideal implementation (too much logic resides in the gui QgsMapCanvasAnnotationItem class), but any approach using current api will be dependant on some hacks. Ideally we need a QgsVectorDataProvider method for finding the closest feature(s) to a point(/line/polygon) within a certain tolerance, with provider specific implementations which offload this to the data store's spatial indices. Then this handling could be bumped up to reside in QgsAnnotation.
- Loading branch information
Showing with 199 additions and 138 deletions.
- +3 −0 python/core/annotations/qgsannotation.sip
- +2 −0 python/core/annotations/qgshtmlannotation.sip
- +16 −0 src/core/annotations/qgsannotation.h
- +7 −41 src/core/annotations/qgshtmlannotation.cpp
- +3 −12 src/core/annotations/qgshtmlannotation.h
- +16 −68 src/gui/qgsformannotation.cpp
- +5 −15 src/gui/qgsformannotation.h
- +41 −0 src/gui/qgsmapcanvasannotationitem.cpp
- +3 −0 src/gui/qgsmapcanvasannotationitem.h
- +23 −1 tests/src/python/test_qgsannotation.py
- +39 −1 tests/src/python/test_qgsmapcanvasannotationitem.py
- BIN tests/testdata/control_images/annotations/expected_html_feature/expected_html_feature.png
- BIN tests/testdata/control_images/annotations/expected_html_nofeature/expected_html_nofeature.png
- +41 −0 tests/testdata/test_html_feature.html
Oops, something went wrong.