37 Commits

Author SHA1 Message Date
Juergen E. Fischer
a90be95f7b sip sync 2016-02-14 03:50:49 +01:00
Nyall Dawson
3744ac2fc4 Fix categorised renderer does not store changes to the source symbol
Avoids the frustrating situation where changes to a symbol in the
categorised renderer are lost when the layer properties window
is reopened

Also improve docs and fix a leak in the Python bindings
2016-01-27 09:58:47 +11:00
Nyall Dawson
39e1f68ccc Fix filtering legend content by map when renderer contains
duplicate symbols (fix #14131)

Now, we don't test for map content using the symbols but instead
use the legend key during the hit test
2016-01-25 14:43:54 +11: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
9eee121115 Apply filters to feature request for categorized renderer
Makes rendering much faster when only certain categories are checked,
as only the matching records for the displayed features are fetched
from the provider.
2015-12-04 07:29:06 +11:00
Nyall Dawson
cdf21b7c3e Return derived classes from clone() methods, avoids need to
dynamic_cast results
2015-11-12 20:29:06 +11:00
Juergen E. Fischer
b5794b2f2d sip coverage fixes:
* make sip coverage test aware that there are less classes where QSci sip
  headers are not available
* exclude properties from members
* fix QgsFeatureIds typedef (fixes missing signal
  QgsVectorLayer.featuresDeleted and others)
* add missing notes for PyNames
* include some missing new methods in bindings
2015-11-08 19:30:39 +00:00
Nyall Dawson
f9559003d4 Really fix #13545
I'm not sure what sip voodoo is preventing the bindings from
calling methods in the base class, so for QGIS <3.0 I've aliased
all the new signatures and will rename them back for 3.0
2015-10-12 21:56:30 +11:00
Nyall Dawson
3520f038dd Fix missing sip bindings for renderers (fix #13545) 2015-10-08 23:47:51 +11:00
Nyall Dawson
c49b5b777f Change a lot of arguments to const references in core/gui
Rationale:
- there was a lot of large objects passed by value, so potentially
there's a speed bump from this
- even for implicitly shared classes like QString/QList there's still
a (small) cost for copying the objects when there's no reason to
- it's the right thing to do!
2015-10-07 12:02:04 +11:00
Nyall Dawson
d7ab102daf Fix some leaks in symbology widgets 2015-09-01 16:06:35 +10:00
Nyall Dawson
57669e71c0 Make QgsRenderContext available to more renderer methods 2015-08-22 19:01:38 +10:00
Matthias Kuhn
1e6483c6d1 Fix marker rotation
The rotation is no longer saved in the Qgs*SymbolRendererV2 but in the
QgsMarkerSymbolV2 in a QgsDataDefined. This commit fixes the legacy API and
redirects calls to the new API.
2015-08-07 08:47:52 +10:00
Matthias Kuhn
e984fb00fd Remove QgsRenderOptions, return filter in separate method 2015-07-29 12:09:44 +02:00
Matthias Kuhn
b47b9a54b7 Add return type QgsRenderOptions to QgsRendererV2::startRender
This allows to specify additional filter constraints for the feature request to
be specified.
2015-07-29 12:08:54 +02:00
Juergen E. Fischer
9ceb5ceab6 sip sync 2014-11-21 01:17:21 +01:00
Juergen E. Fischer
d4f64d9bde indentation update and typo fixes 2014-11-13 23:13:13 +01:00
Nathan Woodrow
0c6576c423 Merge pull request #1587 from ccrook/CategorizedRendererUpdate
Categorized and graduated renderer enhancements
2014-09-26 20:23:03 +10:00
Martin Dobias
e37a5ad8df [FEATURE] Legend filtering based on map content (in main window, composer, WMS)
There is new "filter" button in layers panel that toggles this functionality
and in composer legend widget.

Related feature is that layer tree now shows symbols in map units with correct size
(even when filtering is not enabled) so as the map view changes the legend node icons
are updated too (if they use map units).

GetLegendGraphics in WMS server
-------------------------------

This is an extension of standard GetLegendGraphics request according to MapServer RFC 101.
See the document for more details: http://mapserver.org/development/rfc/ms-rfc-101.html

In summary, clients need to add BBOX and CRS/SRS parameters to get appropriate legend based on the given map view.
Parameters WIDTH and HEIGHT are also taken into account as they specify map view image size for correct calculation
of size of legend symbols (if they are based on map units).

--

This software has been commissioned by Tuscany Region (Italy),
co-funded by the European Commission and developed under the project LIFE12 ENV/IT/001054 LIFE + IMAGINE.
The software has been realized by Gis3W s.a.s.

Questo software è stato commissionato da Regione Toscana (Italia),
cofinanziato dalla Commissione Europea e sviluppato nell'ambito del progetto LIFE12 ENV/IT/001054 LIFE + IMAGINE.
Il software è stato realizzato da Gis3W s.a.s.
2014-09-25 12:56:37 +02:00
Chris Crook
abd9e3cd21 Numerous enhancements to graduated and categorized symbol renderers 2014-09-20 18:30:12 +12:00
Leyan
9931dde90a refactor to a more general convertFromRenderer function 2014-09-09 19:55:21 +08:00
Leyan
11d159cd85 Add factory annotation and use clone for rule based renderer 2014-09-09 19:47:28 +08:00
Leyan
45dfd53b4a add sip 2014-09-09 19:47:28 +08:00
Martin Dobias
cf955822a6 Identify renderer's categories/rules by key instead of index 2014-09-01 10:10:35 +07:00
Juergen E. Fischer
51408e1608 categorized renderer: show category by default (followup 4867b7fa) 2014-07-05 00:49:45 +02:00
Nathan Woodrow
b4edd9d364 Use index to render legend symbol items 2014-07-05 08:25:30 +10:00
Juergen E. Fischer
4867b7fa37 [FEATURE][API] categorized render: support disabling rendering of some categories
Funded-By: norBIT
2014-07-04 21:40:22 +02:00
Juergen E. Fischer
c4c131ef75 sip sync 2014-05-27 23:32:42 +02:00
Martin Dobias
a3af93394e Merge branch 'master' into threading-revival
Some features are still disabled - will be fixed later

Conflicts:
	python/core/composer/qgscomposition.sip
	python/core/diagram/qgsdiagram.sip
	python/core/diagram/qgshistogramdiagram.sip
	python/core/diagram/qgspiediagram.sip
	python/core/diagram/qgstextdiagram.sip
	python/core/qgsdiagramrendererv2.sip
	python/core/qgsfield.sip
	python/core/qgslabelsearchtree.sip
	python/core/qgsmaprenderer.sip
	python/core/qgsrenderchecker.sip
	python/core/symbology-ng/qgssymbollayerv2.sip
	python/gui/qgsmapcanvas.sip
	src/app/composer/qgscomposerlegendwidget.cpp
	src/app/qgisapp.cpp
	src/core/composer/qgsatlascomposition.cpp
	src/core/composer/qgscomposerattributetable.cpp
	src/core/composer/qgscomposermap.cpp
	src/core/composer/qgscomposition.cpp
	src/core/composer/qgscomposition.h
	src/core/diagram/qgsdiagram.h
	src/core/diagram/qgshistogramdiagram.cpp
	src/core/diagram/qgshistogramdiagram.h
	src/core/diagram/qgspiediagram.cpp
	src/core/diagram/qgspiediagram.h
	src/core/diagram/qgstextdiagram.cpp
	src/core/diagram/qgstextdiagram.h
	src/core/qgsdiagramrendererv2.cpp
	src/core/qgsdiagramrendererv2.h
	src/core/qgsmaprenderer.cpp
	src/core/qgsmaprenderer.h
	src/core/qgsnetworkaccessmanager.h
	src/core/qgspallabeling.cpp
	src/core/qgsrenderchecker.h
	src/core/qgsvectorlayer.cpp
	src/core/qgsvectorlayer.h
	src/core/qgsvectorlayerfeatureiterator.cpp
	src/core/qgsvectorlayerfeatureiterator.h
	src/core/raster/qgsrasterlayer.cpp
	src/core/symbology-ng/qgscategorizedsymbolrendererv2.cpp
	src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
	src/core/symbology-ng/qgsmarkersymbollayerv2.cpp
	src/core/symbology-ng/qgssinglesymbolrendererv2.cpp
	src/core/symbology-ng/qgssymbollayerv2.cpp
	src/core/symbology-ng/qgssymbollayerv2.h
	src/core/symbology-ng/qgssymbolv2.cpp
	src/gui/qgshighlight.cpp
	src/gui/qgsmapcanvas.cpp
	src/gui/qgsmapcanvas.h
	src/gui/qgsmapcanvasitem.cpp
	src/gui/qgsmaptoolidentify.cpp
	src/plugins/georeferencer/qgsgeorefplugingui.cpp
	src/providers/memory/qgsmemoryfeatureiterator.cpp
	src/providers/ogr/qgsogrfeatureiterator.cpp
	src/providers/ogr/qgsogrfeatureiterator.h
	src/providers/ogr/qgsogrprovider.cpp
	src/providers/oracle/qgsoraclefeatureiterator.cpp
	src/providers/oracle/qgsoracleprovider.cpp
	src/providers/postgres/qgspostgresconn.cpp
	src/providers/postgres/qgspostgresfeatureiterator.cpp
	src/providers/postgres/qgspostgresfeatureiterator.h
	src/providers/wfs/qgswfsfeatureiterator.cpp
	src/providers/wms/qgswmsprovider.cpp
	src/providers/wms/qgswmsprovider.h
	src/ui/qgsoptionsbase.ui
	tests/src/core/CMakeLists.txt
	tests/src/core/testqgscomposereffects.cpp
	tests/src/core/testqgscomposerhtml.cpp
	tests/src/core/testqgscomposerscalebar.cpp
	tests/src/core/testqgscomposershapes.cpp
2014-02-18 11:28:46 +07:00
Martin Dobias
e6c2ecd9f3 Fix #9290 (crashes in symbology on fields with special characters)
Fixes several crashes and problems with backwards compatibility.
Before expressions were allowed, field names were loaded and saved
unquoted, e.g. x.y  - with introduction of expressions it was
necessary to use properly quoted "x.y" name so that expression
is correctly parsed. With these changes both options are possible
and when possible, the unquoted field name is used for compatibility
2014-02-11 14:27:01 +07:00
Juergen E. Fischer
74e7314c36 update sip bindings II 2014-01-27 09:22:53 +01:00
vmora
7d404d97ca allow for expressions in symbol rotation and scale
the single, graduated and categorised symbol renderers have been
refactored to avoid use of raw pointers (auto_ptr are used instead, they
are deprecated in c++11 but the change for unique_ptr is an easy one and
they clearly state the design intend: exclusive ownership)

2 general use function to quote and unquote strings for/from xml have
been added to qgis.h
2014-01-14 17:25:00 +01:00
Martin Dobias
2bece090f5 Update Python bindings to match changes in core/gui libraries. 2013-12-05 18:27:45 +07:00
Juergen E. Fischer
cf22bcf383 symbology-ng: make dump() methods const 2013-07-22 21:42:44 +02:00
Juergen E. Fischer
3854086d47 sip update 2013-06-23 16:00:24 +02:00
Juergen E. Fischer
f3cb57b1eb SIP bindings update:
- update methods of existing classes
- add comment to methods missing in the sip bindings
- split up collective sip files into single files and use
  same directory structure in python/ as in src/
- add a lot of missing classes (some might not make sense because of
  missing python methods in those classes)
- remove some non-existing methods from the header files
- add scripts/sipdiff
- replace some usages of std::vector and std::set with QVector/QSet
2012-09-24 02:42:57 +02:00