36 Commits

Author SHA1 Message Date
Nyall Dawson
f9c3da1e06 Move unit enums to Qgis, promote to enum class 2023-02-19 13:29:06 +10:00
Juergen E. Fischer
c6008b7ee1 fix MSVC build: reverts fee62e4, dff05dd and e3a77b9484c effectivly
reverting 3fb0f66 (followup #45348)

Using --no-public-is-protected (default on Windows) also works on Linux
and fixes #45331 too
2021-10-21 23:03:48 +02:00
nirvn
ef84e48a09 Run sipify_all.sh 2021-10-12 16:34:05 +10:00
Denis Rouzaud
ec16736306 run sipify 2021-10-12 16:34:05 +10:00
nirvn
9989cffb3c [feature][callouts] Add blending mode settings 2021-04-26 19:34:16 +10:00
Nyall Dawson
d9d0f9a9dd [feature] Add support for rounded corners for balloon callout styles
Allows for visually please rounded corners by exposing a "corner radius"
setting for balloon callouts.
2021-04-04 16:25:00 +10:00
Denis Rouzaud
ba8a445850 run sipify 2021-03-22 21:13:52 +01:00
Nyall Dawson
704b280065 Expose control over balloon wedge width 2021-03-21 16:57:29 +10:00
Nyall Dawson
2b0a2bf42c [feature] Add new "balloon" (speech bubble) callout style 2021-03-21 16:57:29 +10:00
Nyall Dawson
f759c59334 [feature] New callout style for curved lines
Renders a nice cartographically pleasing curved line between the
labels and features.

Options include selecting a specific curve orientation (clockwise
or counterclockwise), or an automatic orientation option which
determines optimal orientation for each individual label. Users
also have control over the amount of curvature applied to the
callout lines.
2021-03-19 18:47:23 +10:00
Nyall Dawson
e5ab5358e2 Cleanup callout code to remove a lot of duplicated code between
simple line and manhattan line callout classes
2021-03-18 13:58:09 +10:00
Nyall Dawson
5d06c1d48d [FEATURE] When the "show pinned labels" option is enabled, also
highlight any pinned callout start or end points

This allows users to immediately see which callouts points have
been manually placed vs are automatically placed.
2021-03-18 12:15:40 +10:00
Nyall Dawson
d84da56dca Add rendered callout details to QgsLabelingResults for retrieval after a map render completes 2021-02-23 15:49:23 +10:00
Nyall Dawson
ee25819b75 [FEATURE][labeling] Add data defined control over callout origin
and destination points

Allows users to data define the starting and ending points for
label callout lines, which is useful when needing to manually
control the exact placement of individual callout lines.
2021-02-23 13:41:58 +10:00
Nyall Dawson
d2e0e8d3b0 Add method for a callout to obtain a transform from the original
associated layer's crs to the destination map crs
2021-02-23 13:41:58 +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
81a9db9f57 [sipify] Fix creation of cross references 2020-06-15 13:43:58 +10:00
Nyall Dawson
bcf9c828f9 [FEATURE][callouts] Add control over anchor point for callout on label
This gives users control over where a callout should join to the label
text. (Previously, you only had control over where the callout would
join to the corresponding feature geometry).

Choices include:
- Closest point (previous behavior)
- Label Centroid
- Fixed corners: Top left/top right/bottom left/bottom right/etc

Data defined control over the label anchor is also possible
2020-03-09 15:29:51 +10:00
nirvn
0ffd1174db Address review 2019-07-30 18:06:26 +07:00
nirvn
ec99bd6240 [FEATURE][callouts] Add anchor point position settings for polygon features 2019-07-30 18:06:26 +07:00
Nyall Dawson
4d5fe9a086 [FEATURE][callouts] Add setting to allow callouts to be drawn to all parts
of a multi-part feature

Also data-definable!
2019-07-29 11:18:10 +10:00
Nyall Dawson
bb9267d11b Record whether a callout corresponds to a feature which has all parts labeled in the callout context
This is useful information for dictating how a callout should be rendered
2019-07-29 11:18:10 +10:00
Nyall Dawson
45b23fd5b2 [callouts] Allow callout types to have icons, and use them in the type combobox
...and pick ugly icons to prompt @nirvn into action ;)
2019-07-23 12:12:18 +10:00
nirvn
bc524b0e2e A couple of callouts dox fixes 2019-07-22 18:29:05 +07:00
nirvn
aab8e511bd [FEATURE][callouts] Allow specifying an offset from label area distance 2019-07-22 18:29:05 +07:00
Nyall Dawson
2b554d8bab [FEATURE][callouts] Allow specifying an offset from feature distance
which controls a distance from the feature where callout lines end

Makes for visually more appealing callouts vs drawing them right
up against the edges of features
2019-07-22 18:40:08 +10:00
Nyall Dawson
dbe7e6156e Append additional "QgsCalloutContext" member to callout rendering virtual
methods

While unused for now, this gives us flexibility in future to specify
additional useful contextual information about how a callout should
be rendered without breaking API (e.g. label text alignment, label
font settings, etc)
2019-07-19 13:38:49 +10:00
Nyall Dawson
171f06447a [callouts] Ensure simple callouts are rendered below all map labels
...instead of being rendered on top of some. For this callout style,
we don't want callouts overlapping labels (rather the opposite). But
leave API in place to allow other callout styles to render below
their associated labels only, as this may be wanted for some styles
(e.g. balloon style callouts)
2019-07-16 07:46:58 +10:00
Nyall Dawson
956c6d694e Add python subclass code 2019-07-11 13:03:12 +10:00
Nyall Dawson
b84d294412 Dox++ 2019-07-11 13:03:12 +10:00
Nyall Dawson
22ae228a9d Dox 2019-07-11 13:03:12 +10:00
Nyall Dawson
1d2dfda254 Add minimum length property for callouts, setup framework for data
defined properties of callouts
2019-07-11 13:03:12 +10:00
Nyall Dawson
8575f95c89 Use a registry for callouts 2019-07-11 13:03:12 +10:00
Nyall Dawson
b298a197e7 Start on registry 2019-07-11 13:03:12 +10:00
Nyall Dawson
4cb31b0694 Experiment with a manhattan line callout style 2019-07-11 13:03:12 +10:00
Nyall Dawson
fb1a610007 Early prototype of label callouts 2019-07-11 13:03:12 +10:00