43 Commits

Author SHA1 Message Date
Denis Rouzaud
ba8a445850 run sipify 2021-03-22 21:13:52 +01:00
Nyall Dawson
c6370c7f52
Speed up QGIS compilation by removing all Qt Module-wide includes
Refs https://www.kdab.com/beware-of-qt-module-wide-includes/
2021-03-05 11:23:15 +10:00
Nyall Dawson
50b9beaad6 [sipify] Catch more class references and insert :py:class: annotations 2021-01-31 05:41:22 +10:00
Nyall Dawson
f3648ba3f6 Move getters and setters for layer opacity from QgsVectorLayer to QgsMapLayer
All the logic for rendering non-opaque layers is handled in a layer
type agnostic way already, so this just allows the existing handling
to be used for mesh/point cloud/vector tile/etc layers also
2020-11-13 21:27:06 +10:00
Nyall Dawson
819fc50b0e Don't use generic "QgsMapLayer" class name in map layer Python repr
strings

Rather use actual layer subclass type, e.g. QgsVectorLayer
2020-11-12 16:05:52 +10:00
Nyall Dawson
b9cd453674 Add method to determine whether an annotation layer is empty 2020-09-01 15:29:32 +10:00
Nyall Dawson
d1bc82ca7b Misc typo fixes 2020-08-31 11:38:02 +10:00
Nyall Dawson
69665cd534 Add method to reset QgsAnnotationLayer back to default state 2020-08-27 13:08:51 +10:00
Nyall Dawson
199cd7e8d2 Add clear method to QgsAnnotationLayer 2020-08-27 13:08:51 +10: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
25a78e1589 [api] Add QgsAnnotationPointTextItem annotation item class for
rendering text at a specified map point
2020-08-11 14:14:25 +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
f0d2f3d21d Allow removing items from annotation layers 2020-08-05 16:27:09 +10:00
Nyall Dawson
5e9264dfb7 Add unit tests for annotation layer 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
c31ee84b46 Don't return reference 2020-08-05 16:27:09 +10:00
Nyall Dawson
a90555bf95 Remove data provider from annotation layer -- this is no longer required 2020-08-05 16:27:09 +10:00
Nyall Dawson
8300856615 Code shuffle 2020-08-05 16:27:09 +10:00
Nyall Dawson
ef58029369 Minor cleanups 2020-08-05 16:27:09 +10:00
Nyall Dawson
e6c8113260 Tweak api, add tests for annotation item registry 2020-08-05 16:27:09 +10:00
Nyall Dawson
6f90139fe9 Dox, build fixes 2020-08-05 16:27:09 +10:00
Nyall Dawson
fe5b423e33 Hookup initial marker item in registry 2020-08-05 16:27:09 +10:00
Nyall Dawson
b0e2a8b5a9 Add registry for annotation item classes 2020-08-05 16:27:09 +10:00
Nyall Dawson
96cf240b39 Dox cleanup 2020-08-05 16:27:09 +10:00
Nyall Dawson
c523063401 Basic storage and restore of annotation layers in projects 2020-08-05 16:27:09 +10:00
Nyall Dawson
bc745a14e1 Create minimal data provider for annotation layers 2020-08-05 16:27:09 +10:00
Nyall Dawson
83e48c0254 Add missing Transfer annotation 2020-08-05 16:27:09 +10:00
Nyall Dawson
c8e86aefc7 Move QgsAnnotationItem to its own file 2020-08-05 16:27:09 +10:00
Nyall Dawson
21a2599d0d Move annotation layer renderer to own file 2020-08-05 16:27:09 +10:00
Nyall Dawson
9f943f72a8 First steps towards free-form graphics item layer
Based on a port from the downstream Kadas application's item layer
type

Kudos to @manisandro
2020-08-05 16:27:09 +10:00
Nyall Dawson
81a9db9f57 [sipify] Fix creation of cross references 2020-06-15 13:43:58 +10:00
Denis Rouzaud
758d7cff4a run sipify to update deprecation annotations 2019-10-15 13:17:38 +02:00
Nyall Dawson
590d1aae9d [FEATURE][API] Visitor API for style entities
Adds a new visitor pattern API for creation of visitors which visit
all the style entities (symbols, color ramps, text formats, and
label styles) associated with different objects. Can be used on a
renderer, map layer, or project wide level.

E.g. on a project wide level, allows collection of ALL the style
symbols/color ramps/text settings inside a project, including those
in layouts or annotations!
2019-07-06 12:36:54 +10:00
Nyall Dawson
38ef62e1cc Fix incorrect annotation scaling when exporting layouts
Previously, annotation size and position always used pixel units. This
did not work well when exporting layouts, resulting in tiny annotations
(it also caused issues when moving projects between hidpi/non hidpi
displays).

Instead, use millimeters for annotation size and position so that the
appearance is consistent across displays and works correctly in layout
exports.

Add lots of unit tests covering this.

Fixes #18373
2019-04-30 15:21:39 +10:00
Nyall Dawson
b6d66becab Sipify 2019-02-27 09:41:11 +10:00
Pierre-Eric Pelloux-Prayer
96a9a7238a Remove unnecessary includes 2019-01-22 21:45:38 +01:00
Nyall Dawson
4c3a9ef7be Ensure that class \brief comes before \since (#7081)
Otherwise it breaks the Python docstrings, which require
the brief to come first
2018-05-28 04:03:46 -08:00
Nyall Dawson
f8bc97030b Remove extra space added before first line of docstring 2018-05-28 08:22:11 +10:00
Nyall Dawson
2cb8a33884 Fix broken see also links 2018-05-25 11:16:18 +10:00
Denis Rouzaud
7df2593caf move auto generated sip file in dedicated folder 2018-05-14 10:23:37 -04:00