1331 Commits

Author SHA1 Message Date
Martin Dobias
8db77fcff7 Fix Andreas' problem with checkboxes in legend + update SIP bindings
The problem was that rule-based renderer allowed cloned rules to have the same unique rule key.
That in turn created the confusion with checkboxes in legend. Now rules always have new rule key
when cloned. The only exception is when the whole renderer is cloned - in such case we preserve
their rule keys, so that other components (legend / visibility presets) can still keep using
the original rule keys.

Projects where this problem appears need to be fixed - the easiest way is to select all rules,
copy&paste them and remove the previous rules.
2014-10-24 12:25:33 +07:00
Martin Dobias
cc306099d9 Fix #11474 (cannot move layers in layer tree anymore)
I have managed to break that with implementation of #11369.
Obviously it is a bad idea to change selection in a slot connected to model's rowsInserted signals
because the drag'n'drop does not work properly anymore. Now registry bridge will emit a signal after
new layers have been added, so the selection change at that point should be safe.
2014-10-23 19:08:54 +07:00
Martin Dobias
aeb9d934ed Fix QgsRasterInterface bindings again (fixes PyQgsRasterFileWriter test) 2014-10-23 16:16:21 +07:00
Martin Dobias
37ba8e4187 Fix #9319 (copy of QgsExpression crashes)
Disabled the copy constructor for now (later we may introduce implicit sharing)
2014-10-22 23:03:53 +07:00
Martin Dobias
6db04b41f9 Fixed SIP wrapper for conversion to QgsRasterInterface subclasses 2014-10-22 17:39:14 +07:00
Juergen E. Fischer
3bdb104a01 use QgsCredentials to request wms/ows credentials on demand and wms cleanups (fixes #11184) 2014-10-21 23:26:36 +02:00
Matthias Kuhn
338e138be6 SIP update: expose QgsAttributeAction icon, iconPath and name
Fix #11458
2014-10-21 15:32:17 +02:00
Nyall Dawson
5b9210b91d [composer] Respect reference point when resizing scalebar and legend
Previously, the reference point (and data defined position/size) were
ignored when scalebars or legends resized themselves.

Fix #11321, #11380
2014-10-21 23:03:55 +11:00
Juergen E. Fischer
82b6e0342a cosmetic cleanups, typo fixes, formatting 2014-10-21 01:33:20 +02:00
Martin Dobias
4906d56955 Fix #10819 (simple/marker line with offset on the wrong side of inner rings) 2014-10-21 00:51:52 +07:00
Nyall Dawson
0f4bd4e0fc [composer] Move ungrouping logic from composer view to composition
As per previous commit, this is useful for plugin authors. It also
fixes a potential bad crash (itemRemoved emitted for group item after
the group item was already deleted) and adds unit tests.
2014-10-19 14:45:19 +11:00
Nyall Dawson
993f0dcd3d [composer] Move code for creating groups to QgsComposition
Previously this code was located in QgsComposerView. Moving it to
QgsComposition simplifies grouping items for plugins. Also start
a new unit test for QgsComposerItemGroup.
2014-10-19 14:45:19 +11:00
Nyall Dawson
71fbe9c9ce [composer] Fixes to composer item sip bindings
- Added some missing /TransferThis/ arguments
- Ensure that correct item type is returned for all item types
2014-10-19 14:45:18 +11:00
Nyall Dawson
0cb985465b [composer] Fix area calculation in expressions with OTF (fix #9791)
Adds an argument to QgsExpression::replaceExpressionText to allow
passing an optional QgsDistanceArea to use during calculations.
Ensure that html and label composer items correctly specify this
argument.
2014-10-19 11:04:57 +11:00
Nyall Dawson
4ea5c80948 [composer] Avoid crash when using redo on multiframe (fix #11351)
Since multiframe changes can remove and create new frame items,
it's not safe to directly manipulate frame items in
QgsComposerItemCommand. Now, commands which apply to a frame always
fetch a reference to the correct frame item directly from the
parent multiframe. Also added unit tests for this crash.
2014-10-15 20:17:10 +11:00
Juergen E. Fischer
2cef8d50f2 remove get from QgsProviderRegistry::getProviderCapabilities() (followup 2e943c93) 2014-10-14 13:30:33 +02:00
Jürgen Fischer
e0df5d4dd9 Merge pull request #1621 from manisandro/bad_layer_improvements
Bad layer dialog improvements
2014-10-14 13:25:22 +02:00
Nyall Dawson
1cb22c084d [composer] Seperate draw empty rows option from empty table behaviour
Now "draw empty rows" is a seperate checkbox (fix #11392)
2014-10-14 21:25:12 +11:00
Nathan Woodrow
1770ec1a6b Merge pull request #1618 from ccrook/GraduatedRendererBugFix11366
Fix #11366 Customised graduated renderer labels ignored
2014-10-13 08:14:43 +10:00
Sandro Mani
2e943c936c Bad layer dialog improvements (Funded by Sourcepole) 2014-10-09 16:49:31 +02:00
Nyall Dawson
a5b5bd4c45 [composer] Fix new frames not inheriting outline color, clean up item api a bit 2014-10-09 19:56:59 +11:00
Chris Crook
823b57e360 Fix for bug 11366 2014-10-09 09:37:19 +13:00
Nathan Woodrow
e5850f38b1 Fix #10858 - Set relative path to QLR save folder. Load relative to QLR file 2014-10-06 22:55:27 +10:00
Matthias Kuhn
7318c73012 Convert values to target field format
For the field calculator and virtual fields.

Fix #11000
Fix #10995
Fix #10993
2014-10-06 10:18:02 +02:00
Chris Crook
6c2c6e2b6b Two bug fixes for graduated renderer 2014-10-06 07:41:54 +13:00
Nyall Dawson
6ec751f634 [composer] Cache transformed grid lines and intersections to slightly
speed up grid drawing
2014-10-03 23:11:47 +10:00
Nathan Woodrow
0d5fb236ba Merge pull request #1599 from ccrook/CategorizedRendererFixes
Categorized renderer fixes
2014-10-03 16:01:23 +10:00
Chris Crook
ba0f9d40c9 Reverting to preferred QgsRenderRangeV2LabelFormat 2014-10-03 18:09:23 +13:00
Nyall Dawson
10d75c0066 [composer] Fix display name for attribute table frames 2014-10-03 09:15:07 +10:00
Nyall Dawson
456e971372 [composer] Fix table background extending beyond table rows (fix #11272).
It was necessary to add a new 'table background' color option to prevent
regressions when loading old compositions, since users may desire
the old behaviour where the entire frame is filled.
2014-10-03 09:08:23 +10:00
Chris Crook
0d1f719652 Adding missing elements from SIP 2014-10-03 06:14:38 +13:00
Nyall Dawson
a2d5acb516 Add argument to QgsCoordinateTransform::transformBoundingBox to flag that
handling of a bounding box which crosses the 180 degree longitude line
is required. Fix composer map reprojected grids which cross 180 degree line.
2014-10-02 06:48:53 +10:00
Chris Crook
a5f0de9dd7 API fixes to use Legend instead of Label where it makes more sense 2014-10-01 12:47:01 +13:00
Chris Crook
21ddf1294d Changing decimal places to precision, allowing negative precision, improving rounding for locales with , instead of . for decimal point 2014-10-01 09:41:07 +13:00
Nyall Dawson
fb7415c3ff [composer] Refresh refetches atlas feature from provider, more removal of duplicate map redraws 2014-09-30 20:37:16 +10:00
Nyall Dawson
8c502c19fc [composer] Fix pages are added but never removed with multiframe resizing 2014-09-29 22:19:08 +10:00
Nyall Dawson
8725c2df4b [composer] Fix ctrl modifier not applying to wheel events when in move item
content mode, add missing undo merge command for item zoom (refs #7974)
2014-09-29 19:21:01 +10:00
Nathan Woodrow
fcfafa0a51 Use a single format string using Qt format for renderer label 2014-09-28 17:24:10 +10: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
mhugent
6fcfb97bf6 Merge pull request #1593 from rldhont/qgis-server-print-legend
[FEATURE][QGIS-Server] Legend filtering based on map in GetPrint Request
2014-09-26 12:57:29 +02:00
Nathan Woodrow
0c6576c423 Merge pull request #1587 from ccrook/CategorizedRendererUpdate
Categorized and graduated renderer enhancements
2014-09-26 20:23:03 +10:00
rldhont
251a8a4d3a [FEATURE][QGIS-Server] Legend filtering based on map in GetPrint Request
Feature funded by Tecnostudi Ambiente, Faunalia and Andromede-oceanologie.

The legend in composition was fixed and did not represent the layers in the map.
With the work made by @wonder-sk on layer-tree and QgsComposerLegend users will be able
 to configure composer legend as based on all the project layer tree with auto-update
 model or filtered by map.
This commit reused these two QgsComposerLegend's properties to filter it based on map in
 GetPrint Request

The issue #4003 qgis_mapserver getPrint legend options can be closed.
2014-09-26 12:09:40 +02:00
Nyall Dawson
a9c97ae153 [composer] Add a checkbox to prevent drawing border and background for empty frame items 2014-09-26 17:45:07 +10:00
Nyall Dawson
ce2142585a [FEATURE][composer] Add checkbox and data defined button for controlling
whether an item is excluded from composer exports/printouts.
2014-09-26 16:03:31 +10:00
Chris Crook
25a7be2966 Modified labelling to include prefix, separator, suffix. 2014-09-26 14:47:46 +12:00
Nyall Dawson
89a7573faf [FEATURE][composer] Allow data defined control of atlas margin for maps 2014-09-26 09:05:52 +10:00
Nyall Dawson
272b79b6ca [FEATURE][composer] Add checkbox to frame items for preventing export
of page containing frame when frame is empty. This change allows
users to create multiple pages containing extra frames for multiframe
items (currently HTML and Attribute Table items), which are then only
printed/exported if required. Sponsored by the City of Uster, Switzerland.
2014-09-26 01:08:07 +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
Nyall Dawson
b83722346e Improved method for selecting random colors for categorised renderer,
which should result in more visually distinct color choices
2014-09-25 10:44:07 +10:00
Chris Crook
a5911e78b7 Implementation of graduated renderer breakpoint editor, minus SIP for editor 2014-09-24 20:46:06 +12:00