55 Commits

Author SHA1 Message Date
Nyall Dawson
c3a57434d9 Fix clazy 'pass small and trivially-copyable type by value' warnings 2016-02-02 19:47:21 +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
323f265c94 Misc cleanups following c9f0d83 2015-11-20 10:38:34 +11:00
Stéphane Brunner
c9f0d83aaf The plugin define the following methods:
* layerFilterExpression
  Return an additional filter, used in
  WMS/GetMap, WMS/GetFeatureInfo, WFS/GetFeature to filter the features
* layerFilterSubsetString
  Return an additional the subset string (typically SQL) filter.
  Faster than the layerFilterExpression but not supported on all the
  type of layer
* layerPermissions
  Change the rights on the layer per user (known by the plugin)
  Concern rights: publish, insert, update, delete.
  Mostly used in WFS/Transaction, and the publish in all requests.
* authorizedLayerAttributes
  Be able to show some attributes only for a subset of user
  Used in: WMS/GetFeatureInfo, WFS/GetFeature
* allowToEdit
  Be able to don't allow to edit a particular feature, in our case base
  on the Geometry
  Used in: WFS/Transaction
* cacheKey
  Cache key to used to create the capabilities cache, "" for no cache,
  shouldn't contains any "-", default to ""
2015-11-18 14:49:43 +01: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
1491d5636f Remove const from labeling QgsRenderContext usage 2015-10-01 15:42:02 +10:00
Martin Dobias
d0fcc9557f More labeling engine refactoring
- QgsPalLabeling now internally uses new engine
- label/diagram providers can hook into rendering loop to avoid extra feature loops
- map rendering uses the new engine instead of QgsPalLabeling

This code has been funded by Tuscany Region (Italy) - SITA (CIG: 63526840AE) and commissioned to Gis3W s.a.s.
2015-09-21 12:57:09 +08:00
Juergen E. Fischer
9752c468c1 indentation update 2015-07-29 11:52:14 +02:00
Juergen E. Fischer
abd4a04399 sip update 2015-02-03 02:21:52 +01:00
Juergen E. Fischer
9ceb5ceab6 sip sync 2014-11-21 01:17:21 +01:00
Juergen E. Fischer
67e077853e DXF export improvements:
* tree view and attribute selection for layer assigment in dialog
* support fill polygons/HATCH
* represent texts as MTEXT instead of TEXT (including font, slant and weight)
* support for RGB colors when there's no exact color match
* use AutoCAD 2000 DXF (R15) instead of R12
* remove R18 test methods

Funded-By: City of Uster
Funded-By: Ville de Morges
Funded-By: SIGE
2014-09-26 14:10:26 +02: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
Juergen E. Fischer
6d4dee914e Save blendmode/composition mode in project file 2014-09-02 10:31:03 +02:00
Martin Dobias
0f5d7438e3 Avoid second transform of extent (in QgsMapRender) on change of dest CRS 2014-06-11 19:19:43 +07:00
Juergen E. Fischer
850a1eeebd fix doxygen warning 2014-05-29 02:34:27 +02:00
Juergen E. Fischer
c4c131ef75 sip sync 2014-05-27 23:32:42 +02:00
Martin Dobias
3a317a061e Fix #9658 (crash with diagrams) 2014-02-28 12:11:20 +07:00
Martin Dobias
5a4f8d07a0 Change "added/deprecated in 2.1" notes to 2.4 for stuff related to threading 2014-02-21 17:33:09 +07: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
Juergen E. Fischer
7ca60b30e5 followup f33c4904d3b: add Q_DECL_DEPRECATED and sip annotation to hasCrsTransformEnabled signal 2014-01-17 14:09:25 +01:00
Radim Blazek
f33c4904d3 signal hasCrsTransformEnabled() renamed to hasCrsTransformEnabledChanged() 2014-01-16 17:28:00 +01:00
Martin Dobias
2bece090f5 Update Python bindings to match changes in core/gui libraries. 2013-12-05 18:27:45 +07:00
Marco Hugentobler
8f9b89dd67 Clean up code related to old overlay object system 2013-07-06 16:18:30 +02:00
Larry Shaffer
45f374f428 Update labeling gui and add expression support as data defined value
- Add QgsDataDefined class
- Add QgsDataDefinedButton class
- Add data defined Python support
- Add standalone SVG selector dialog to QgsSvgSelectorWidget class

- Fix for #4607, show only pertinent fields when setting a data defined value
- Fix for #5048 and #5049, data defined settings are literally used
- Fix for #5726, number formatting does not work for expressions
- Fix for #7755, using bufferSize to enable/disable label buffer is confusing
- Fix for #7779, labels do not register in label collision engine; and for #4719, inactive options in labeling dialog
- Prepare label text's expression upfront when preparing layer; makes rendering much faster
- Change name of 'feature obstacles' to appropriate terminology
2013-05-20 12:22:29 -06:00
Denis Rouzaud
42fc689e60 added layerToMapCoordinates for rectangles, and more detailed comments 2013-04-29 14:53:06 +02:00
Larry Shaffer
b809723977 [FEATURE] Add background shapes and svg symbols to labels
- Rectangle, square, circle and ellipse generated symbols
- SVG background via new symbology, so uses cache
- Add new gui class QgsSvgSelectorWidget, symbol selector setup culled from symbologyV2
- Does not include any associated data defined mappings, yet
- Does not auto-search for missing SVGs, yet
- Caveat: does not currently account for background size in PAL collision calculations (overlaps occur)
- Allow direct update of QgsColorButton background
2013-04-04 15:38:27 -06:00
Juergen E. Fischer
86b6c5bbdf don't crash when transforming between the same CRSes and update map renderer sip bindings 2013-11-11 17:56:22 +01:00
Marco Hugentobler
64440cfc81 Change tr() to transformation() and add python binding. Make datum_shift db update in a transaction 2013-11-08 16:19:02 +01:00
Alexander Bruy
5e45a22d06 remove deprecated methods from API 2012-12-23 10:40:23 +02:00
Marco Hugentobler
e0d9796fda Use coordinate transform cache in maprenderer 2012-12-17 08:55:31 +01:00
Marco Hugentobler
d4aa0ed62a Change binding for QgsMapRenderer::render 2012-12-16 11:05:51 +01:00
Larry Shaffer
3b3d1a75da Update labeling tools and make more undo/redo friendly
- Change QgsVectorLayer::redoEditCommand to only strip invalid QVariants, not null ones
- Update undo/redo command text to start with action and end with sample of label text
- Update pin/unpin labels tool to be fully undo/redo-able
- Store generated label text in QgsLabelPosition (sans direction symbols)
- Update change label properties dialog to show whether label text is expression
2012-12-15 17:30:39 -07:00
Larry Shaffer
e3d30af735 Update to limit of number of features sent to PAL
- Distributes max number across total number of features registered in PAL
- Caveat: PAL may not show label for every registered feature
2012-11-15 21:21:13 -07:00
Juergen E. Fischer
74fd0e48ae more sip fixes:
- also move enum StyleEntity in QgsStyleV2
- fix some warnings
2012-09-24 18:43:20 +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
Marco Hugentobler
18f2c43e5f [FEATURE]: possibility to have scale bar in meters also for maps in degrees (based on map diagonal) 2012-08-13 15:00:15 +02:00
Larry Shaffer
0c62390027 sip binding for QgsLabelingEngineInterface::labelsWithinRect()
qgis.utils.iface.mapCanvas().mapRenderer().labelingEngine().labelsWithinRect(some_extent) can now return all labels shown within the canvas (if that's the extent given).
2012-07-18 16:06:46 -06:00
wonder
f760d016b9 PyQGIS: added new destination CRS methods, deprecated old ones.
git-svn-id: http://svn.osgeo.org/qgis/trunk@15619 c8812cc2-4d05-0410-92ff-de0c093fc19c
2011-03-27 17:45:43 +00:00
jef
ce8e3d5f05 add 'deprecated' annotation to SIP bindings
git-svn-id: http://svn.osgeo.org/qgis/trunk@15209 c8812cc2-4d05-0410-92ff-de0c093fc19c
2011-02-19 13:24:24 +00:00
mhugent
ac51927071 [FEATURE]: move/rotate/change label edit tools to interactively change data defined label properties
git-svn-id: http://svn.osgeo.org/qgis/trunk@14697 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-11-17 15:01:15 +00:00
mhugent
33194f8a6f [FEATURE]: data defined font and buffer settings for labeling-ng
git-svn-id: http://svn.osgeo.org/qgis/trunk@13998 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-08-02 15:09:17 +00:00
mhugent
c8edb3da7b Use floating point numbers for size and dpi. This is necessary to avoid distortions on devices where painter units are not pixels (e.g. graphics scene in print composer)
git-svn-id: http://svn.osgeo.org/qgis/trunk@13995 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-08-02 08:44:52 +00:00
wonder
3b280fa705 Applied patch #2747 from Marco.
git-svn-id: http://svn.osgeo.org/qgis/trunk@13587 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-05-29 10:32:56 +00:00
wonder
757c42e8ac Fixed compilation of python bindings due my recent changes.
git-svn-id: http://svn.osgeo.org/qgis/trunk@12899 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-02-08 09:33:23 +00:00
wonder
a81156fa78 Fix new labeling to work with render caching.
git-svn-id: http://svn.osgeo.org/qgis/trunk@12540 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-12-20 16:35:45 +00:00
wonder
c1676d5137 Improved labeling engine interface, now connected with QgsMapRenderer instead of individual layers.
Also fixes #2108.


git-svn-id: http://svn.osgeo.org/qgis/trunk@12174 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-11-18 18:46:12 +00:00
wonder
68f2530603 Added missing bindings to QgsMapRenderer.
git-svn-id: http://svn.osgeo.org/qgis/trunk@10467 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-04-04 22:23:50 +00:00
timlinux
b40ceb2d62 API cleanups for QgsRect that got overlooked...
git-svn-id: http://svn.osgeo.org/qgis/trunk@9605 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-11-09 00:14:12 +00:00
timlinux
e1b3c93e6a API cleanups to qgis project and maprenderer classes
git-svn-id: http://svn.osgeo.org/qgis/trunk@9536 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-10-24 21:47:48 +00:00
timlinux
5aeb250006 api cleanups for distance area
git-svn-id: http://svn.osgeo.org/qgis/trunk@9504 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-10-20 20:41:06 +00:00