60 Commits

Author SHA1 Message Date
Denis Rouzaud
37efb4d598
Merge pull request #35382 from 3nids/dnd-across-qgis-instances
[FEATURE] allow to drag'n'drop layer across several QGIS instances
2020-05-06 16:04:07 +02:00
Denis Rouzaud
c6ee633b7d add level and duration to message emitted 2020-05-06 14:45:55 +02:00
Nyall Dawson
1e0b890dc1 [feature][layouts] Expose control over layer legend splitting behavior on a layer-by-layer basis
This allows users to manually override the legend's default setting for "split layers"
on a layer-by-layer basis, by double clicking a layer in the layout legend panel
and choosing whether that layer:
- follows the default legend setting for splitting
- can ALWAYS be split over multiple columns (regardless of the legend's setting)
or
- can NEVER be split over multiple columns (regardless of the legend's setting)

Sponsored by SLYR
2020-05-06 16:27:31 +10:00
Nyall Dawson
32c17c316e [FEATURE] Allow placing manual column breaks in legends
Adds the option when configuring a legend item to place a column
break before the item, causing it to be placed into a new column

This allows user control over the column content, for cases when
the automatic column generation doesn't result in the desired results
2020-05-06 00:22:27 +10:00
Denis Rouzaud
7fbc8a4843 add missing doc+ 2020-05-05 10:29:39 +02:00
Denis Rouzaud
01f766255b layer tree model can emit messages which will be shown in the message bar 2020-05-05 09:25:31 +02:00
Nyall Dawson
7a6220a77f [FEATURE][layouts] Allow overriding the default symbol for a legend node
This allows users to (optionally!) customise the symbol appearance
for a legend node, e.g. to tweak the colors or symbol sizes to better
provide a "representative" patch symbol compared with how those
corresponding features actually appear on the map.

It's useful for exaggerating symbol widths, or for manually tweaking
the colors of semi-transparent symbols so that the colors represent
the actual appearance of the symbols when rendered on top of the map
content. Or to tweak the marker interval/offset in marker lines so that the
markers are nicely spaced in the legend patch.

Fixes #14077
2020-05-05 11:49:05 +10:00
Nyall Dawson
0c64fd7907 [FEATURE] Allow overriding the legend patch size on a per-item basis
Allows users to override the symbol patch size for individual legend
nodes, by double clicking the node

Width and height can be individually overridden, with the node falling
back to the default width or height when the override isn't set.

Sponsored by SLYR
2020-04-28 11:31:43 +10:00
Nyall Dawson
ae8e5cfeaa Move default legend patch shape handling to QgsStyle 2020-04-21 10:40:50 +10:00
Nyall Dawson
b920e358c7 Add methods to serialize QgsLegendPatchShape 2020-04-11 05:25:22 +10:00
Nyall Dawson
07b64a3f2d Add support for setting legend patch shapes for nodes in the layer tree 2020-04-11 05:25:22 +10:00
Nyall Dawson
e1b23139ac Add API to convert legend patch shapes to QPolygonF based paths for rendering 2020-04-11 05:25:22 +10:00
Nyall Dawson
8564c453ec Add methods to get default patch shapes to QgsLegendPatchShape 2020-04-11 05:25:22 +10:00
Nyall Dawson
fd95215355 Allow for null QgsLegendPatchShapes 2020-04-11 05:25:22 +10:00
Nyall Dawson
1b5f4dd771 New class QgsLegendPatchShape
Represents a patch shape for use in map legends.
2020-04-11 05:25:22 +10:00
uclaros
b48a5760be more missed spelling 2020-04-05 08:05:28 +10:00
uclaros
6aca7b6964 Added move to bottom in layertreeview context menu 2020-04-05 08:05:28 +10:00
Juergen E. Fischer
b81d306047 spelling fixes (closes #32408) 2019-10-26 10:50:30 +10:00
Denis Rouzaud
758d7cff4a run sipify to update deprecation annotations 2019-10-15 13:17:38 +02:00
Denis Rouzaud
c88e82af1a
rename QgsLayerTreeRegistryBridge.InsertionPoint.parent to group (#32031)
because I find it confusing to do insertionPoint.parent.insertLayer
insertionPoint.group.insertLayer
2019-09-27 09:58:27 +02:00
Denis Rouzaud
13119193ba fix API doc and init values 2019-09-19 09:05:40 +02:00
Denis Rouzaud
838dbef3c0 [layer tree] dedicated method in QgisApp to determine insertion point
and create bindings to get the current insertion point in QgisInterface
2019-09-17 20:55:40 +02:00
Nyall Dawson
d014d63ede Don't show canvas specific formatting settings in layer tree model
used outside of main canvas

E.g. we shouldn't show scale based visibility text format changes
or the editable toggle in models used for snapping dialog, project
properties, etc.

These properties are only associated with the main map canvas.
2019-08-21 20:33:02 +10:00
Nyall Dawson
b9482dda6b Dox++, unit tests 2019-07-31 05:08:37 +10:00
Alexander Bruy
39124dad04 update SIP file 2019-07-15 15:59:25 +03:00
Alex
248af94ba9 Symbol aware legend expression (#9648) 2019-07-15 07:12:24 +02:00
Nyall Dawson
6aeedfe20b [FEATURE][layouts] Expose choice of arrangement of legends (i.e.
symbols to the left OR symbols to the right of legend text), and
alignment for group/subgroup/item text

Allows creation of right-to-left locale friendly legends. Additionally,
we default to this right-to-left style alignment when creating new
legends under a RTL based locale.
2019-06-28 09:45:48 +10:00
Denis Rouzaud
d7fa0286c4
do not insert layers in embedded groups (#10004)
fixes #29678
2019-05-26 23:25:15 -05:00
Blottiere Paul
c09e10ceb2 Update doc and sip binding 2019-04-09 15:43:11 +02:00
Blottiere Paul
911ef98677 Update sip binding 2019-04-09 15:43:11 +02:00
Nyall Dawson
16a64ed84d Deprecate some methods, dox++ 2019-03-22 12:16:22 +10:00
Blottiere Paul
90b46f6a38 Add context in doc 2019-03-20 09:56:30 +00:00
Blottiere Paul
4efd410840 Update sip 2019-03-20 09:33:17 +00:00
Blottiere Paul
0cdd80d723 Update doc 2019-03-20 09:00:26 +00:00
Blottiere Paul
89a1b1a1ac Rename methods 2019-03-20 08:55:50 +00:00
Blottiere Paul
7adb1145c6 Update SIP binding 2019-03-19 14:38:04 +00: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
a7ca08784c Nullptr consistency in dox 2019-02-27 09:41:11 +10:00
Nyall Dawson
b6d66becab Sipify 2019-02-27 09:41:11 +10:00
Nyall Dawson
27bb2c156f Fix undersized layertree icons on hidpi displays 2019-01-28 07:16:33 +11:00
Alex
004d6bae5f Add QgsRenderContext to QgsLayerTreeModelLegendNode::ItemContext 2019-01-15 13:37:36 +11:00
nirvn
9200f538e9 Don't hard-code black and gray for layer tree items' text color 2018-12-21 21:13:19 +07:00
Alessandro Pasotti
465479056d Move toggle action first and fix since 3.6 2018-12-07 08:07:18 +01:00
Alessandro Pasotti
ff99f1b825 [feature] Add a toggle action to vector layer legend items 2018-12-05 12:34:43 +01:00
Nyall Dawson
6cc41a9474 Remove an incorrect /Transfer/ annotation, add a missing /Transfer/ annotation 2018-11-27 19:07:06 +10:00
Alessandro Pasotti
f856b4c8e3 Renamed originalXmlProperties methods and variables 2018-11-05 10:24:35 +01:00
Alessandro Pasotti
1b041f4f4f Add storeInvalidLayersProperties to store invalid layers
This can be used to restore initial layer status or to
apply styles and other layer properties if the data
source is changed.

The idea is that the user can fix bad layers at any time,
and by setting a new datasource she probably wants
to keep the original layer properties.
2018-11-05 10:24:35 +01:00
Nyall Dawson
d1e2978314 Add warning to QgsLayerTreeLayer::layer() dox
Because the returned pointer must ALWAYS be tested before
being dereferenced
2018-10-26 16:57:36 +10:00
Martin Dobias
a1d130ac97 Fix spelling 2018-09-27 00:46:37 +02:00
Martin Dobias
8831f19b79 Fix missing indicators after they are moved to a different group
The issue was that during drag&drop, we first connect to layer's signal
for the second time, but then the disconnect() call on removal of the original
layer node would disconnect all connections (not just one). For that reason
now we only connect/disconnect when the layer is in the tree only once.
2018-09-27 00:46:37 +02:00