84 Commits

Author SHA1 Message Date
Nyall Dawson
89bc84395e Update sip 2017-06-26 12:18:34 +10:00
Martin Dobias
8c4d5bbb95 [FEATURE] Rendering of data-defined size in legend in "collapsed" mode
Instead of having different marker sizes in legend as separate legend nodes,
the new "collapsed" mode packs all sizes into one legend node.

This commit only makes it available in the API, not exposed in GUI yet.
2017-06-15 16:47:56 +02:00
Denis Rouzaud
f5c3b8a1f8 [sipify] fix enum again 2017-06-09 10:16:08 +02:00
Nyall Dawson
1be5fbda96 More consistency across scale API
Use a real scale widget for point displacement label scale
2017-06-09 10:26:01 +10:00
Denis Rouzaud
736e303d30 missing annotation and fix warning 2017-05-30 14:39:33 +02:00
Matthias Kuhn
28a21209b9 [sipify] seealso 2017-04-30 16:52:05 +02:00
Denis Rouzaud
897e2f0410 [sipify] do not take // comments into docstrings 2017-04-30 16:34:08 +02:00
Denis Rouzaud
a60b31d3b3 fix doxymentation 2017-04-25 13:28:01 +02:00
Denis Rouzaud
157709129e sipify layer tree classes 2017-04-25 13:28:01 +02:00
Denis Rouzaud
1bfa539df1 [sipify] remove extra blank line 2017-04-24 07:39:30 +02:00
Denis Rouzaud
8f2a5c7c00 sipify all 2017-04-20 14:21:36 +02:00
Nyall Dawson
87a670848b [sipify] Always add virtual keyword for overridden methods
sip often requires the virtual keyword to be present, or
it chokes on covariant return types in overridden methods
2017-04-18 11:14:01 +10:00
Nyall Dawson
1805a70952 Add missing docs 2017-04-18 10:27:05 +10:00
Nyall Dawson
023ad46525 sipify QgsLayerTreeLayer 2017-04-18 10:27:05 +10:00
Nyall Dawson
468c784f7e sipify QgsLayerTreeGroup 2017-04-18 10:27:05 +10:00
Nyall Dawson
0b36ee3aac Use weak layer references and loose matching for composer legend
customisation

Allows legend customisation to be restored when loading a composer
template

Fix #2738
2017-04-18 10:27:05 +10:00
Matthias Kuhn
baa4c86262 Fix tests 2017-03-23 15:29:12 +01:00
Matthias Kuhn
f33aabd90a Completely move layer order to core 2017-03-23 15:29:12 +01:00
Denis Rouzaud
e2d7181289 spelling 2017-03-15 08:23:05 +01:00
Nyall Dawson
2cba52846e If no project layer order set, use layer tree layer order
for QgsMapThemeCollection::masterVisibleLayers()
2017-03-13 14:42:22 +10:00
Martin Dobias
137eb3a0f9 Make layer tree implementation independent from QgsProject::instance()
Another bit in the project refactoring work to get rid of dependencies
on QgsProject singleton.

Reading of layer trees from XML is now split into two phases:
1. read XML and keep layer IDs
2. resolve layer IDs to QgsMapLayer instances (using QgsProject)

There are convenience methods to do both phases in one go.
2017-01-27 09:29:04 +08:00
Nyall Dawson
231f6af0e1 Don't return const references to implicitly shared Qt classes
Instead return the inexpensive copies. Should provide extra safety
against issues like #14822

(refs #14822)
2017-01-14 15:53:45 +10:00
Denis Rouzaud
37ebcdd1cd [spellcheck] allow inwords checks and line skipping
spell check will be done automatically in words by default (when some conditions are fulfilled)
possibility to avoid in words checking by adding :* at the end in spelling.dat

one can add #spellok at the end of a line of code to skip spell check on this line
2017-01-10 20:18:37 +01:00
Even Rouault
60a1701377 [FEATURE] Change of ergonomy of the visibility of layers inside groups
See https://github.com/qgis/QGIS-Enhancement-Proposals/issues/86

- Checking/unchecking a group doesn't change the check state of its children.
A node is visible if and only if it is checked and all its parents too.
- There is no more a semi-checked state for a group
- Ctrl-clic on a unchecked group will check the group and all its descendants.
- Ctrl-clic on a unchecked layer will check the lager and all its parents.
- Ctrl-clic on a checked group will uncheck the group and all its descendants.
- Ctrl-clic on a checked layer will uncheck the layer and all its parents.
- Those actions are available in contextual menu items in the tree view.
- Invisible layers because they or their parent(s) is unchecked are greyed out.
2017-01-02 13:25:25 +01:00
Martin Dobias
5fc10d6207 Migrate QgsMapThemeCollection away from using layer IDs 2016-12-10 23:23:18 +08:00
Martin Dobias
64f1356cf3 Added missing api docs 2016-12-10 16:18:03 +08:00
Martin Dobias
d56a97d4fe Merge QgsMapLayerRegistry into QgsProject
All methods/signals of QgsMapLayerRegistry moved verbatim to QgsProject.
2016-12-10 15:18:12 +08:00
Nyall Dawson
7de1cc2f13 Removed unused QgsLayerTreeModelLegendNode::SymbolLegacyRuleKeyRole 2016-12-02 13:55:41 +10:00
Martin Dobias
645514a23b Remove setLayerName(), layerName() from QgsLayerTreeLayer
(replaced by setName(), name() overridden from the parent)
2016-11-15 00:56:22 +08:00
Martin Dobias
9950b085d4 Fix missing docs and sip coverage (followup 968e02d6) 2016-11-14 23:39:58 +08:00
Martin Dobias
968e02d6fe Propagate layer/group name changes in the layer tree (fixes #15844) 2016-11-14 19:57:00 +08:00
Matthias Kuhn
4981bfcf18 Fix memory leak 2016-11-11 16:55:57 +01:00
Martin Dobias
6b120a8600 Fix display of diagram legend entries (fixes #15448)
To make the implementation saner, the legend node that may be embedded within parent
layer node is kept separately from activeNodes.

(cherry picked from commit b385ebd9ba9272516eed61e5825a603fcee969e9)
2016-11-01 11:41:23 +08:00
Nyall Dawson
44289084e9 Optimise passing of variables by ref/value 2016-10-24 10:36:23 +10:00
Nyall Dawson
bc30cdf41d Followup c9251c, fix crash 2016-10-20 17:32:39 +10:00
Nyall Dawson
c9251c5793 Avoid creating multiple render contexts when calculating legend
node size

Partial fix for qgis slowdown when using layer with large
number of legend nodes
2016-10-20 07:50:41 +10:00
Nyall Dawson
fe65063c2b Remove many deprecated methods 2016-09-15 18:34:15 +10:00
Juergen E. Fischer
0688621046 scripts/replacev2.sh run 2016-08-10 12:08:52 +02:00
Denis Rouzaud
275736de92 removed V2 from QgsSymbolV2* 2016-08-05 08:22:21 +02:00
Nyall Dawson
4cfacf14e3 Make API more consistent
- rename methods with XML to Xml, CRS to Crs, WMS to Wms, ID to Id
- rename methods with SRS to Crs
- rename methods with abbreviations like "dest" to "destination"
- rename methods with abbreviations like "src" to "source"
2016-07-21 08:40:50 +10:00
Matthias Kuhn
95f81391d3 sip bindings 2016-06-03 15:13:42 +02:00
Nyall Dawson
3b4638ab83 Followup 01f615d 2016-03-10 07:43:25 +11:00
Patrick Valsecchi
a112dfe63e Make out of range layers greyed out in the tree 2016-03-09 09:56:15 +01:00
Nyall Dawson
c3a57434d9 Fix clazy 'pass small and trivially-copyable type by value' warnings 2016-02-02 19:47:21 +11:00
Nyall Dawson
c7204cc722 Fix editing composer legend titles while filtering enabled (fix #11459) 2016-01-27 15:51:47 +11:00
Hugo Mercier
bbf2137940 Allow to filter joined fields with a virtual layer 2016-01-07 16:34:34 +01:00
Nyall Dawson
881074b194 Boost coverage of SIP bindings
Now all classes and members are either exposed to bindings or marked
as "not available in Python bindings" in the docs.

Drop test thresholds to 0. Now it should be much easier to determine
what missing members have been added which are causing test
failures.
2016-01-05 11:16:15 +11:00
Nyall Dawson
6e140b97fd [FEATURE] Edit legend symbols directly from layer tree
This adds a new "edit symbol" item to the right-click menu for a
renderer child legend item (eg categories for the categorised
renderer). Selecting it opens a symbol editor dialog which allows
for directly editing the classes symbol. It's much faster than
opening the layer properties and going through the style tab.
2015-12-09 07:25:03 +11:00
Nyall Dawson
83e139a550 Add method for retrieving legend nodes by layer ID and legend rule key 2015-12-09 06:01:12 +11:00
Nyall Dawson
91f7918e21 [FEATURE] Add a show/hide all context menu for layer tree symbol items
Allows toggling on/off all the symbol items for categorized/graduated/
rule based layers via the right click menu on an item. Previously
you'd have to manually toggle each item one-by-one.

Fix #13458
2015-12-07 07:39:20 +11:00