296 Commits

Author SHA1 Message Date
Matthias Kuhn
665df5fbd6 Merge pull request #3436 from aaime/scaledep
Export map level scale based dependencies in most vector symbology
2016-09-01 13:28:48 +02:00
Andrea Aime
a25b0257a5 Export map level scale based dependencies in most vector symbology 2016-09-01 07:40:56 +02:00
Patrick Valsecchi
db91330b66 Avoid back and forth with WKB in rendering 2016-08-29 06:55:52 +02:00
Nyall Dawson
cf9292cc6d Color ramp dialogs no longer edit ramps in place
Now the dialogs use a copy of the ramp, and the edited
ramp is retrieved by calling ramp() on the dialog after
it is executed.

Avoids pointer lifetime issues by storing and working
on a ramp pointer which the dialog does not have ownership
on.

Also fix a bunch of leaks relating to cloning color ramps.
2016-08-24 21:01:03 +10:00
Nyall Dawson
932e469e5f Rename color ramp classes to more sensible names
QgsVectorColorRamp -> QgsColorRamp
QgsVectorGradientColorRamp -> QgsGradientColorRamp
QgsRandomColors -> QgsRandomColorRamp
QgsRandomColorRamp -> QgsLimitedRandomColorRamp
QgsVectorColorBrewerColorRamp -> QgsColorBrewerColorRamp

These color ramps are used throughout all of QGIS (not
just in vector symbology) and the current names are
misleading.
2016-08-24 21:01:03 +10:00
Juergen E. Fischer
3f22a7a77f another scripts/replacev2.sh with minor manual fixes 2016-08-10 12:12:28 +02:00
Juergen E. Fischer
0688621046 scripts/replacev2.sh run 2016-08-10 12:08:52 +02:00
Denis Rouzaud
acbf5cddb4 renamed QgsSymbologyV2Conversion to QgsSymbologyConversion 2016-08-05 08:32:13 +02:00
Denis Rouzaud
275736de92 removed V2 from QgsSymbolV2* 2016-08-05 08:22:21 +02:00
Denis Rouzaud
c16d1393a2 removed V2 from QgsSymbolLayerV2* 2016-08-05 08:18:01 +02:00
Nyall Dawson
c40d6d3f28 Add missing docs 2016-08-05 06:08:07 +10:00
Nyall Dawson
967d37adc7 QgsFeature::fields() returns a value, not a pointer
Also remove all other QgsFields pointers and replace with
references/values, since QgsFields objects are implicitly shared
2016-08-05 06:07:02 +10:00
Matthias Kuhn
bb79d13e82 Remove deprecated Qgis::WKBType and API cleanup (#3325)
* Remove deprecated Qgis::WKBType and API cleanup

Renames QgsWKBTypes to QgsWkbTypes

Replaces usage of the enums:

* Qgis::WKBType with QgsWkbTypes::Type
* Qgis::GeometryType with QgsWkbTypes::GeometryType

Their values should be forward compatible (a fact that was already
explited up to now by casting between the types)

Renames some SSLxxx to SslXxx and URIxxx to UriXxx

* Fix build warnings and simplify type handling

* Add a fixer to rewrite imports

* The forgotten rebase conflictThe forgotten rebase conflicts

* QgsDataSourcURI > QgsDataSourceUri

* QgsWKBTypes > QgsWkbTypes

* Qgis.WKBGeom > QgsWkbTypes.Geom

* Further python fixes

* Guess what... Qgis::wkbDimensions != QgsWkbTypes::wkbDimensions

* Fix tests

* Python 3 updates

* [travis] pull request caching cannot be disabled

so at least use it in r/w mode

* Fix python3 print in plugins
2016-08-04 09:10:08 +02:00
Matthias Kuhn
8182f2970f QgsFeatureRendererV2::Capabilities to flags 2016-08-02 17:24:38 +02:00
Nyall Dawson
813ed5e96f Add missing docs 2016-07-26 10:08:18 +10:00
Nyall Dawson
f6b09eaee1 Add Distance*, Area*, Angle* prefixes to QgsUnitTypes enum values 2016-07-26 08:29:24 +10:00
Nyall Dawson
503d0941ee Add missing docs 2016-07-25 15:22:36 +10:00
Nyall Dawson
0324de3bf5 Remove QgsSymbolLayerV2Utils::encodeOutputUnit() and decodeOutputUnit()
QgsUnitTypes::encodeUnit() and QgsUnitTypes::decodeRenderUnit() should
be used instead.
2016-07-25 15:22:36 +10:00
Nyall Dawson
ce6bd6c973 Move QgsSymbolV2::OutputUnit enum to QgsUnitTypes
And rename to QgsUnitTypes::RenderUnits. This enum is used in
much more contexts than just symbols, so QgsUnitTypes is a
better fit for it.

All methods which previously accepted QgsSymbolV2::OutputUnit
parameters or QgsSymbolV2::OutputUnitList parameters now take
QgsUnitTypes::RenderUnit or QgsUnitTypes::RenderUnitList
parameters respectively.
2016-07-25 15:22:12 +10:00
Nyall Dawson
1a2231f10c Rename QGis class to Qgis, for capitalisation consistency 2016-07-21 22:01:38 +10: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
Nyall Dawson
5c270ebeb0 Fix first range when exporting graduated renderer to sld (fix #15212) 2016-07-05 09:56:57 +10:00
Nyall Dawson
9f0ae9b408 Make outline only simple markers work with categorised/graduated
etc renderers (fix #15132)
2016-06-27 10:17:54 +10:00
Nyall Dawson
e6034e9a1e Fix vector field symbol does not use subsymbol color (fix #15130) 2016-06-26 17:40:50 +10:00
Nyall Dawson
6568da6ce0 Rename arrow symbol head width/height to length/thickness
Width/height naming is dependant on line direction, so for
clarity rename them to something which doesn't depend
on direction (fix #15002)
2016-06-14 12:54:49 +10:00
Matthias Kuhn
a03e28bb5b Fix sip bindings 2016-06-07 22:00:02 +02:00
Nyall Dawson
7a8d9dd506 Add missing proxies for legend check behaviour to subrenderers
for inverted polygon and displacement renderers
2016-06-07 15:18:36 +10:00
Nyall Dawson
b2c43cb997 Fix inverted polygons and displacement renderer don't allow right
click on legend items (fix #14966)
2016-06-07 15:05:30 +10:00
Nyall Dawson
b32afce79d Fix inverted polygon & displacement renderer don't show
color wheel in legend menu

Move embedded renderer handling to QgsFeatureRendererV2 and
add support for embedded renders to legend context menu

Fix #14967
2016-06-07 14:49:45 +10:00
Nyall Dawson
94e1d5e52e Fix crash when using inverted polygons with heatmap renderer
Add methods to QgsRendererV2AbstractMetadata and QgsRendererV2Registry
to control renderer compatiblity by layer type. Should make it
easier to avoid this recurring bug popping up again in future.

Also add unit tests for QgsRendererV2Registry

Fix #14968
2016-06-07 13:33:31 +10:00
Matthias Kuhn
e80e54162f Show correct feature count with rule that requires geometry
Fix #14758
2016-06-06 13:59:18 +02:00
Hugo Mercier
efd32ff2a8 Arrow symbol layer: option to repeat or not the arrow on the line 2016-06-02 09:52:03 +02:00
Hugo Mercier
6c9b588906 Arrow symbol layer: halved arrows and head width/height
The head size can now be configured by its width and its height
Arrows can also be rendered as "half arrows"
2016-06-02 09:52:03 +02:00
Alvaro Huarte
6969a1a401 Fix travis errors 2016-05-25 22:53:01 +02:00
Alvaro Huarte
51f06edbf7 Allow override WkbPtr and define WkbSimplifierPtr class
This commit simplifies the geometry just before to paint it in the
current QPainter device.

This commit allows to override the '>>' operators of the QgsWkbPtr
class. Also, It defines a new QgsWkbSimplifierPtr class to automatically
simplify the input point stream.
2016-05-25 22:50:28 +02:00
Nyall Dawson
3e45369f77 Followup 71712a, add missing SIP bindings
Also change QPointF& -> QPointF (faster)
2016-05-24 05:26:46 +10:00
Nyall Dawson
79f3d4221b Add equality operator for gradients, ensure stops are always in order 2016-05-12 20:55:27 +10:00
Nyall Dawson
ea20149239 [FEATURE] New "Filled marker" symbol layer type
A "filled marker" is similar to the simple marker symbol layer, except
that it uses a fill sub symbol to render the marker. This allows use
of all the existing QGIS fill (and outline) styles for rendering
markers, eg gradient or shapeburst fills.

A new abstract class QgsSimpleMarkerSymbolLayerBase has been created
from which both QgsSimpleMarkerSymbolLayerV2 and
QgsFilledMarkerSymbolLayer derive. All common code has been moved to
this base class, allowing for easy addition of new shapes or features
to both simple markers and filled markers without duplication.

Also, adds a lot of missing docs to marker symbol layers.
2016-05-07 22:06:10 +10:00
Nyall Dawson
cda387cb6f Ensure that @symbol_color is always correct for symbol layer types
with subsymbols
2016-05-07 21:52:19 +10:00
Nyall Dawson
d75eaff573 Fixes to arrow line symbology:
- Fix crash in Python bindings caused by subsymbol ownership
- Make symbol work correctly with categorised and graduated
renderers
2016-05-05 16:56:20 +10:00
Nyall Dawson
a67853f825 Fix calculation of point symbol bounds using data defined rotation or offset 2016-04-29 20:16:38 +10:00
Webmaster
fef8c1fef2 [FEATURE] add setting to control centroid fill point rendering
on all parts or a single part of multi-features (fixes #9199)
2016-04-27 21:10:41 +07:00
nirvn
9735c13e33 [FEATURE] add outline settings to font markers 2016-04-22 09:09:00 +07:00
Matthias Kuhn
0875c68363 Fix default value for marker pen join style in sip bindings 2016-04-21 09:28:44 +02:00
Hugo Mercier
34b7ebc2b5 Add a new "arrow" symbol layer
The "arrow" symbol layer is a symbol layer allowing to draw straight
or curved arrows from a line layer.
2016-04-18 11:36:12 +02:00
Juergen E. Fischer
c30f71ac73 dxf export: add support for expression contexts and rotated symbols (fixes #14495) 2016-04-13 14:51:58 +02:00
Webmaster
3cf75d8047 [symbology] add filled cross and hexagon markers 2016-04-13 09:30:11 +07:00
Nyall Dawson
4bbe318c20 [symbology] Remove distorted star symbol 2016-04-12 12:12:57 +10:00
Nyall Dawson
e21de0394d Add methods for retrieving and setting size units for QgsMarkerSymbolV2 2016-04-11 15:34:43 +10:00
Nyall Dawson
3ba3986ae2 Fix calculation of diagram size in map units when using scale limits 2016-04-06 22:27:07 +10:00