37 Commits

Author SHA1 Message Date
nirvn
6a75d9d997 [text renderer] Add rotation-based orientation mode 2019-08-08 16:59:22 +07:00
nirvn
ec75aa0300 [FEATURE][text renderer] Support vertical text orientation 2019-08-06 13:24:15 +07:00
Nyall Dawson
802deddaf9 Sipify 2019-07-29 09:03:40 +10:00
Nyall Dawson
3484a0246d [labeling] Add API to allow curved labels to overrun features 2019-07-26 18:24:20 +10:00
Nyall Dawson
e208bc5888 Avoid cloning symbols during label rendering
This is expensive and unnecessary
2019-07-23 17:41:39 +10:00
Nyall Dawson
bae321ad28 Prioritize moving unplaced labels in the move label tool
These are most likely the ones which users are trying to move
when there's overlapping labels
2019-07-21 20:29:34 +10:00
nirvn
dded60611b [callouts] Add symbol-related variables to the expression context 2019-07-16 14:59:06 +07:00
Nyall Dawson
2cb8f72161 Data defined control over whether a callout is drawn 2019-07-11 13:03:12 +10:00
Nyall Dawson
fb1a610007 Early prototype of label callouts 2019-07-11 13:03:12 +10:00
Nyall Dawson
142308e712 Add a start/stopRender method to QgsPalLayerSettings
This allows us a chance to correctly call start/stopRender on all
symbols which are used as part of the labels and ensure they are
nicely prepared and cleaned up.

Also adapt labeling engine to add calls to startRender/stopRender where
appropriate.
2019-07-10 10:05:06 +10:00
Nyall Dawson
be23525a5e Use a non-const QgsRenderContext& when preparing labeling providers,
for compatibility with symbology (which requires non-const context)
2019-07-10 10:05:06 +10:00
Nyall Dawson
aa658e5d07 Allow label settings gui widget to work widget layers 2019-06-21 15:52:56 +10:00
Nyall Dawson
0fd4984b3b [FEATURE] Allow storage of label settings in style manager
Just like the earlier change which allows for text formats to
be managed in style manager, this change allows for layer-wide
label settings to be stored and managed in styles.

So while a text format includes just the font settings and other
appearance related settings, Label Settings also includes layer-type
specific settings such as label placement, priority, rendering
settings.
2019-06-21 15:52:56 +10:00
Nyall Dawson
9647a18c13 Move label preview background color setting to QgsTextFormat
So that we can utilise it outside of labeling
2019-06-21 15:52:56 +10:00
Nyall Dawson
3bd3aba25b [needs-docs] [labeling] Allow data defined control over line placement options
Allows users to override the line placement settings (e.g.
above/below/on line options) on a per-feature basis. Somehow
this one was the only(?) setting from labeling which
was missing a data defined control...
2019-06-20 10:24:16 +07:00
Nyall Dawson
a98d12e1e0 Dox 2019-06-04 06:18:17 +10:00
Nyall Dawson
1bc716fc61 [labeling] Fix incorrect bounding box of labels used when
map is rotated

Fixes #24680
2019-06-04 06:18:17 +10:00
Nyall Dawson
004b7d879a [labeling] Fix cannot use labeling map tools when canvas is rotated
Fixes #25384
2019-06-04 06:18:17 +10:00
Nyall Dawson
7213030ad9 [labeling] Fix missing labels when multilinestring features are used in
conjunction with the "merge connected lines" setting

Refs #12173
2019-05-30 17:27:00 +10:00
Matthias Kuhn
857fe53773
[FEATURE] Merge pull request #9460 from m-kuhn/labeling_geometry_generator
 Geometry generators for labeling 
2019-03-12 14:15:51 +01:00
Matthias Kuhn
05ff817a97
Update docs 2019-03-11 12:48:14 +01:00
Matthias Kuhn
da0e4741c1
Pal should also use 64 bit fids 2019-03-10 17:27:50 +01:00
Matthias Kuhn
67e1c333ee
Save geometry generator enabled/disabled state independently 2019-03-10 13:36:52 +01:00
Nyall Dawson
107b48a430 Add NULLPTR macro for use in doxygen comments
For the c++ api dox this expands to "\c nullptr" (the
\c directive indicates a code literal value), and for sipify/Python
it expands to ``None`` (`` is sphinx annotation for literal values)

Makes for nicer dox for both c++ and Python!
2019-02-27 09:41:11 +10:00
Nyall Dawson
b6d66becab Sipify 2019-02-27 09:41:11 +10:00
Matthias Kuhn
2fb37042a5
Fix TODO and docstrings 2019-02-07 14:36:43 +01:00
Matthias Kuhn
5f1cea13c7
Add docstrings and modernize code 2019-02-05 17:57:27 +01:00
Matthias Kuhn
4612521c50
Const correctnes for QgsFeature in labeling
A feature is not modified while it's sent through the labeling pipeline.
2019-02-05 17:16:23 +01:00
Nyall Dawson
eafedeeb8b Sipify 2019-01-21 14:48:19 +11:00
Denis Rouzaud
c20b5b2f75 fix multine removal for SIP_PYARGREOMVEq 2018-12-18 21:54:38 -04:00
Denis Rouzaud
edfb7e1465 run sipify 2018-12-18 17:17:25 -04:00
Nyall Dawson
234985b59d [needs-docs][labeling] Fix substitutions don't play well with wrapped labels
Fixes an issue identified in the upcoming QGIS Map Design 2nd ed
(spoiler alert!) where it's impossible to utilise label text
substitutions if you also want to use word wrapping.

This isn't possible to directly fix, because we need to evaluate
the full label expression (including the word wrapping component)
in order to actually HAVE text to substitute into.

So, a new setting has been added to the label formatting tab
allowing users to directly set an auto-wrapping line ideal
line size. This is applied AFTER label text evaluation, substitutions,
and the 'wrap text on' character, so it can play correctly well with
all these other settings. This also has the nice side-effect
of making auto label text wrapping more accessible to new
users/those unfamiliar with the wordwrap expression function.

Fixes #20007, and cleans up a chapter of QMD 2ed ;)
2018-10-05 06:58:56 +10:00
Denis Rouzaud
4b7da692d6 run sipify all 2018-09-10 11:41:57 -04:00
Denis Rouzaud
65bb60e96c run sipify 2018-05-28 10:39:34 -08:00
Nyall Dawson
38850bdb94 [pyqgis] Ensure that multiline param tags are indented for additional lines 2018-05-27 18:54:09 +10:00
Nyall Dawson
1c615c15cc More documentation compliance
Use Qt style "returns .." tense instead of "return ..", and lock
this in with a documentation compliance unit test
2018-05-25 15:09:00 +10:00
Denis Rouzaud
7df2593caf move auto generated sip file in dedicated folder 2018-05-14 10:23:37 -04:00