242 Commits

Author SHA1 Message Date
Mathieu Pellerin
541463718d [FEATURE] add outline join style to ellipse markers 2016-04-04 14:38:52 +10:00
nirvn
6ad3537403 [FEATURE] add outline join style settings to simple markers
(fixes #3797)
2016-04-03 09:57:11 +07:00
Nyall Dawson
96c60fdaec Workaround failing color ramp test on OSX, add some docs
Failure is odd.
c = r.stops()[0].color
self.assertEqual(c, QColor(100, 100, 40))

fails, but

s = r.stops()
self.assertEqual(s[0].color, QColor(100, 100, 40))

passes!
2016-03-16 10:10:07 +11:00
Nyall Dawson
6be8d06dc6 Fix searching for symbols by tag (fix #14445), add tests 2016-03-09 15:22:34 +11:00
Matthias Kuhn
23546775d2 Python binding fixes for 2.5D renderer 2016-03-03 20:40:24 +01:00
Nyall Dawson
13ac821249 Fix build 2016-03-01 15:46:37 +11:00
Nyall Dawson
5612936836 Fix setting symbol for single symbol renderer via legend dbl click
Eg if diagram legend is also shown for layer it's possible for the
single symbol renderer to show a legend item.
2016-03-01 15:30:23 +11:00
Alvaro Huarte
1a29030383 Remove duplicate methods of conversion
Remove duplicate methods of conversion of map coordinates to screen
coordinates
2016-02-19 09:43:01 +01:00
Nyall Dawson
4285d70b6c Fix "feature rendering order" checkbox is not honored (fix #14323) 2016-02-19 10:11:43 +11:00
Nyall Dawson
1f2cc3d051 Revert deprecation of QgsSymbolV2Utils::encode/decodeOutputUnit
...as it causes circular dependancies. Defer to 3.0 when we can
move QgsSymbolV2::OutputUnit to QgsUnitTypes
2016-02-15 07:24:35 +11:00
Juergen E. Fischer
a90be95f7b sip sync 2016-02-14 03:50:49 +01:00
Juergen E. Fischer
2ea3d7744d port more WKB parsing to Qgs(Const)WkbPtr including bounds checking 2016-02-09 14:20:07 +01:00
Nyall Dawson
ddabad247f Move unit handling helpers out of QGis and QgsSymbolLayerUtils
into a new QgsUnitTypes helper class. Add unit tests.

TODO QGIS 3.0: Move QGis::UnitType and QgsSymbolV2::OutputUnit
to QgsUnitTypes
2016-02-04 08:01:32 +11:00
Nyall Dawson
c3a57434d9 Fix clazy 'pass small and trivially-copyable type by value' warnings 2016-02-02 19:47:21 +11:00
Juergen E. Fischer
490236f2f2 spelling fixes 2016-02-02 02:37:15 +01:00
Juergen E. Fischer
ecfcd319ef sip sync QgsFeatureRendererV2 2016-01-28 12:20:20 +01:00
Nyall Dawson
082f113197 Readd missing sip binding 2016-01-28 21:43:09 +11:00
Juergen E. Fischer
4dd76da7f8 geometry sip sync and some cosmetics 2016-01-28 10:31:08 +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
24d9c65494 Fix more classes which violate the rule-of-three
Also remove some empty destructors
2016-01-26 14:24:45 +11:00
Martin Dobias
492c1a9ff0 Improve documentation for renderer registry metadata (refs #13973) 2016-01-25 18:16:32 +01:00
Martin Dobias
83eed1109c Improve renderer class documentation (refs #14025) 2016-01-25 18:16:32 +01: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
752f6bd150 Fix classes which violate rule of three, by implementing required
copy/= operators or making them private

This revealed (and fixes) some issues, including a potential crash
using server access control (refs #13919), and a potential crash with
diagrams
2016-01-22 18:45:45 +11:00
Matthias Kuhn
8d72f13a57 [25d] Improve convertability to other layers
* Move height and angle expressions for 2.5D renderer to layer
 * Apply color based on main symbol color

This makes the transition to other renderers easy.

Fixes #14132
2016-01-21 22:37:51 +01:00
Matthias Kuhn
3529433729 Fix memory leak in rulebased renderer sip bindings 2016-01-19 00:23:13 +01:00
Matthias Kuhn
b66e50bf7b Fix build warnings 2016-01-18 10:40:06 +01:00
Matthias Kuhn
0c02f1812e [FEATURE] Add 2.5D Renderer
This adds a configuration interface and renderer that makes it easy to
put all the pieces together which are required to get a 2.5D effect.

It allow for configuring some of the styling and is meant to create an
easy-to-use setup.

Since every part of the system is built around QGIS' internal rendering
and symbology engine, there is much to fine tune. To get all the
possibilities, just change the renderer to a graduated, categorized or
single symbol renderer upon creation and you will find full access to
improve the style to your needs.

Funded by
 * Regional Council of Picardy
 * ADUGA
 * Ville de Nyon
 * Wetu GIT cc
2016-01-15 12:37:50 +01:00
Matthias Kuhn
4e9afcec4c Expression variable for the currently rendered part
During rendering, two new variables will be available:

  * `geometry_part_count`
  * `geometry_part_num` (1-based index)

Useful to apply different styles to different parts of multipart
features
2016-01-13 08:17:49 +01:00
Nyall Dawson
9dccce87ee Followup 3a1d47
- Fix dialog tab order
- Avoid use of hardcoded enum int conversion
- Remove some unneeded implicit casts
- Doc tweaks
2016-01-13 09:38:18 +11:00
Sebastian Dietrich
95e571c3f8 added functions to QgsStyleV2 for getting groups by id 2016-01-06 02:56:30 +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
Matthias Kuhn
e6a265c103 Merge pull request #2600 from m-kuhn/orderby-renderer
Allow definition of feature rendering order
2015-12-22 17:45:01 +01:00
Matthias Kuhn
52a39fc286 QgsSymbolV2 may not be copied 2015-12-22 16:39:22 +01:00
Matthias Kuhn
168c6f70bc Rename OrderBys -> OrderBy and OrderBy -> OrderByClause
And some sip fixes
2015-12-22 09:12:32 +01:00
Nyall Dawson
85eebff69b Avoid some unnecessary object conversion during point rendering 2015-12-15 22:36:49 +11:00
Matthias Kuhn
ac5ff0c2ca Fix doxymentation also in sip 2015-12-10 15:57:21 +01:00
Matthias Kuhn
c423d64a8e Reduce wkb parsing 2015-12-10 12:33:43 +01:00
Matthias Kuhn
123a60e651 [sip, doxygen] Geometry modifier bindings
and lots of doxymentation
2015-12-10 12:33:43 +01:00
Matthias Kuhn
17f9d554f8 [FEATURE] Add geometry generator symbols 2015-12-10 12:33:43 +01: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
8cac36433d [FEATURE] Add support for transparency in SVG color params
...and update all bundled SVGs to suit

Non-bundled SVGs must add:

fill-opacity="param(fill-opacity)"
and
stroke-opacity="param(outline-opacity)"

to enable transparency support
2015-12-08 22:45:51 +11:00
Nyall Dawson
9cc9d424ce Add extra check for deprecations to documentation test
This check tests that if a function has been declared deprecated
with either Q_DECL_DEPRECATED or has a @deprecated Doxygen note
then it MUST have both the Q_DECL_DEPRECATD and @deprecated note.

It's important that both are used, as Q_DECL_DEPRECATED allows
throwing a warning if that method is used in code, while the
@deprecated doxygen note gives an indication to devs/PyQGIS users
of why it's deprecated and what should be used instead.

Ideally we'd also test for SIP /Deprecated/ tags, but I can't
find any reliable way to do this.
2015-12-07 21:55:36 +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
4203a7c1f4 Add method to determine approximate rendered symbol bounds for markers
Sponsored by City of Uster
2015-11-20 19:55:02 +11:00
Nyall Dawson
dc0639c794 Add missing /Transfer/s to setSubSymbol 2015-11-18 06:46:30 +11:00
Nyall Dawson
936b6506ec Add method to QgsSvgCache to return SVG viewbox size 2015-11-15 14:45:42 +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
Matthias Kuhn
56ccb2b858 sipClass_Klass is deprecated for a long time: replace with sipType_Klass 2015-11-11 23:22:51 +01:00
Nyall Dawson
719ff408a5 Add some missing SIP bindings, comment some classes as not available
in Python
2015-11-10 17:08:27 +11:00