15 Commits

Author SHA1 Message Date
Nyall Dawson
a7d299df92 Use an edit operation for annotation item translation, instead of
transform

Will make it easier to add undo/redo support in future
2021-09-10 15:01:26 +10:00
Nyall Dawson
1228f59bff Make annotation item edit API a bit more flexible 2021-09-10 15:01:26 +10:00
Nyall Dawson
1537d393e3 Add framework for retrieving the temporary results of a in-progress
edit operation on an annotation item

This is used for the item to return a representative geometry
of what the item would look like if the operation were to be
applied. It's used to generate a rubber band showing a preview
of the modification during interactive editing operations on
an annotation item.
2021-09-10 15:01:26 +10:00
Nyall Dawson
631343265d Allow QgsAnnotationItemEditOperationMoveNode operations to be
applied to annotation items to move nodes in the item
2021-09-10 15:01:26 +10:00
Nyall Dawson
6d926d4ffe Add method to create rubber band geometry for an annotation item 2021-09-07 15:48:17 +10:00
Nyall Dawson
8d1f2bf7a6 Add a method to transform QgsAnnotationItems using a QTransform
transform
2021-09-07 15:48:17 +10:00
Nyall Dawson
4ff1e55a21 [api] Add method to retrieve the nodes for an annotation item
For now all nodes just directly represent vertices in the item,
but the intention here is that they can represent any form of handle
which can be used to manipulate an item (e.g. a bezier curve point,
some "smart shape" handle for resizing or rotating an item, etc)
2021-09-03 08:06:48 +10:00
Denis Rouzaud
ba8a445850 run sipify 2021-03-22 21:13:52 +01:00
Nyall Dawson
5a7cb166d0 [annotations] Refactor annotation item subclasses so that they
work correctly with curved geometry types, and tweak some API naming
accordingly

There's no need to be restrictive and only require linear geometries
for these items!
2020-08-19 14:33:55 +10:00
Nyall Dawson
50d4bf0f10 Treat item crs as matching annotation layer CRS 2020-08-05 16:27:09 +10:00
Nyall Dawson
ca384b2452 Address review comments 2020-08-05 16:27:09 +10:00
Nyall Dawson
ea392ea17a Dox 2020-08-05 16:27:09 +10:00
Nyall Dawson
f2d172fcd3 Implement layer extent calculation 2020-08-05 16:27:09 +10:00
Nyall Dawson
c924ec3087 Add unit tests for marker/line/polygon items 2020-08-05 16:27:09 +10:00
Nyall Dawson
8300856615 Code shuffle 2020-08-05 16:27:09 +10:00