1331 Commits

Author SHA1 Message Date
Juergen E. Fischer
ee50520a52 fix leak on loading layer definition (also fixes #12064) 2015-02-09 11:46:00 +01:00
Juergen E. Fischer
0593ef6a26 rename new QgsSnapper::snapPoint method to snapMapPoint and restore python name
of deprecated old version (fixes #12153)
2015-02-09 01:15:07 +01:00
Sandro Santilli
1ccf558497 Add a new visiblePolygon method to QgsMapSettings
Centralizes code to return a possible rotated map area boundaries.
Makes use of the new method from the grid decoration.

Adds new testcase for QgsMapSettings, including test for visibleExtent,
mapUnitsPerPixel and the new visiblePolygon method.
2015-02-07 15:05:00 +01:00
Nyall Dawson
4def416bbc Merge pull request #1858 from vmora/symbol_list_refacto
line symbol layer refacto to avoid code duplication
2015-02-07 20:51:40 +11:00
Nyall Dawson
e4fb95fad1 [pal] Some const correctness and avoid passing large object by value 2015-02-05 18:34:14 +11:00
Nyall Dawson
93a86835d6 Fix common memory leak after using QgsSymbolLayerV2Utils::loadSymbol 2015-02-03 21:22:46 +11:00
Nyall Dawson
b05e789c57 Fix build 2015-02-03 20:47:29 +11:00
Juergen E. Fischer
abd4a04399 sip update 2015-02-03 02:21:52 +01:00
Nyall Dawson
cd86710d87 Fix some warnings 2015-02-02 16:05:54 +11:00
Juergen E. Fischer
956c155e8f fix python pep8 warnings and fix some revealed errors
pep8 --ignore=E111,E128,E201,E202,E203,E211,E221,E222,E225,E226,E227,E231,E241,E261,E265,E272,E302,E303,E501,E701 \
     --exclude="ui_*.py,debian/*,python/ext-libs/*" \
     .
2015-02-01 20:46:47 +01:00
Nyall Dawson
f7f89b37b9 Fix calculation of blur ops with non ARGB32_Premultiplied images 2015-01-26 14:27:20 +11:00
Martin Dobias
334d885b6d Snapping tolerance: Fix "map units" vs "layer units" dilemma (fixes #11634)
Until now "map units" in snapping config dialog actually referred to layer units.
From now on, "map units" refer to project's CRS units. Where appropriate, it is
possible to choose "layer units" that refer to layer CRS units.

Projects from older versions of QGIS should be handled seamlessly (tolerances
in layer units will be still handled in layer units, not project units).

In API, QgsTolerance::MapUnits is deprecated as it is unclear to what units
it refers to (should be ProjectUnits, but actually it is LayerUnits)
2015-01-23 18:53:02 +07:00
vmora
261271518c line symbol layer refacto to avoid code duplication
The line symbol layer as been refactored to avoid code duplication and
expose the offset and offset units in the base class. Note that
the added functions in the base class where already defined in all
child classes.
2015-01-23 09:12:06 +01:00
Martin Dobias
cad3173d6e QgsSnappingUtils: improvements of the hybrid indexing strategy
Instead of calculating feature count (which may add extra overhead),
let's directly try to build index for layers. Only when a certain limit
of features is reached (currently 1 million), the indexing is cancelled
and layer is marked as non-indexable.
2015-01-23 14:30:46 +07:00
Martin Dobias
23c776e10d [FEATURE] New snapping mode to snap to all layers 2015-01-23 11:37:39 +07:00
Juergen E. Fischer
221e9ef7c7 dxf export: support line offsets 2015-01-23 00:14:39 +01:00
Juergen E. Fischer
cce2eb50cb indentation update 2015-01-22 20:56:02 +01:00
Matthias Kuhn
60712cd9bd [FEATURE] Allow to specify custom prefix for joins 2015-01-22 15:58:34 +01:00
Martin Dobias
aacb1bdf3e Save and restore expanded state of legend nodes in tree hierarchy 2015-01-22 13:42:31 +07:00
Martin Dobias
3d539c8cd3 [FEATURE] Show rule-based renderer's legend in a tree hierarchy
The functionality can be used in other renderers too, the only requirement
is that legend nodes need to specify their parent rule key via data().

Note that ayer tree model must have ShowLegendAsTree flag enabled, otherwise
the model will keep showing lists instead of trees.
2015-01-22 13:42:31 +07:00
Nathan Woodrow
bed278a729 Expand args for custom functions. Add auto arg count
Format test to use spaces and not tabs
2015-01-22 09:21:41 +10:00
vmora
6fb347d23f improve GUI consistency & UX for data-defined style
data defined buttons added to the gui
fixes #9881
2015-01-22 06:56:34 +11:00
Matthias Kuhn
8f6b0145e5 SIP update: QgsVectorLayer::applyNamedStyle, errorMsg is /Out/ 2015-01-21 12:45:49 +01:00
Nyall Dawson
670ad7b809 Add gaussian blur image operation 2015-01-21 20:02:42 +11:00
Nyall Dawson
be2d6d1a70 New QgsImageOperation class for operations that modify QImages
Contains framework for multithreaded operations on QImages, and
numerous operations such as grayscale, hue/saturation, brightness/
contrast modification, flip, blur, distance transform, alpha
modification and color overlays.
2015-01-21 18:58:10 +11:00
Nyall Dawson
6a080bada1 Add some missing type conversions to python bindings 2015-01-21 11:04:38 +11:00
mhugent
a2a82d2fe5 Merge pull request #1830 from manisandro/transaction
[FEATURE] Transactional editing for postgres layers
2015-01-20 17:22:55 +01:00
Martin Dobias
dbe830b0bb Point locator: Use just one R-tree for indexing instead of three R-trees
The maintenance of three R-trees was too complicated, using a lot of memory
and the performance benefit was questionable :)
The approach with just one R-tree leads to much simpler code

Removed k-NN queries in the process - they were not used in QGIS code. They can be
reintroduced later, but there is not much use for them right now...
2015-01-20 18:54:07 +07:00
Martin Dobias
0ea6a3d15f Support different indexing strategies in QgsSnappingUtils
Huge layers will not use all the memory - at the expense of slow queries
2015-01-20 10:21:55 +07:00
Martin Dobias
54e8493bc7 QgsPointLocator: make it possible to index just a part of layer 2015-01-20 10:21:55 +07:00
Martin Dobias
f8fc8a0a31 Final removals of QgsMapCanvasSnapper 2015-01-20 10:21:55 +07:00
Martin Dobias
4b8ea28262 Add QgsSnappingUtils::snapToCurrentLayer() + utility methods in QgsTolerance
Also added missing SIP wrappers for new classes QgsPointLocator and QgsSnappingUtils
2015-01-20 10:21:55 +07:00
Martin Dobias
83770dfd9e Hook snapping utils into QGIS interface
Now the new snapping engine is ues for add feature map tool
2015-01-20 10:18:39 +07:00
Sandro Mani
7b31a17e44 Fix infinite loop in QgsVectorLayer::deleteSelectedFeatures if removal of feature fails 2015-01-19 15:22:20 +01:00
Sandro Mani
40ad3b0993 [FEATURE]: Transactional editing for postgres layers (other datasources possible in the future). Funded by City of Uster 2015-01-19 15:22:20 +01:00
Nyall Dawson
1310b87081 Show recently used projections in QgsProjectionSelectionWidget 2015-01-19 22:57:46 +11:00
Martin Dobias
375dc32045 Make sure to update visibility presets if any layer's style name changes
Also adds signals to the QgsMapLayerStyleManager so others can watch the changes

This code has been funded by Tuscany Region (Italy) - SITA (CIG: 6002233F59)
and commissioned to Gis3W s.a.s.
2015-01-19 18:39:03 +07:00
Martin Dobias
5266fd97ee [FEATURE] Composer map - optionally store layer styles
There is a new check box that allows the user to tell whether a map should
keep the layer styles (it will store the state when the check box is checked).
The stored layer styles keep a snapshot of each layer's configuration
instead of just keeping name of the style.

This solves issues with styles and visibility presets in composer which were
not completely compatible.

This code has been funded by Tuscany Region (Italy) - SITA (CIG: 6002233F59)
and commissioned to Gis3W s.a.s.
2015-01-19 15:18:55 +07:00
Nathan Woodrow
6166eccc84 Add spacing above function editor combo. API docs for QgsLayerDefinition 2015-01-19 16:42:30 +10:00
Nathan Woodrow
8944ff7a48 Add group support for QLR files
Add class for handling QLR files. Add sip bindings

Funded by Nicholas Duggan
2015-01-19 14:25:15 +10:00
Martin Dobias
11d331dd66 Add QgsMapLayer::importNamedStyle() functions
Like this we do not need to use a temporary file to load a style
2015-01-16 14:14:41 +07:00
Nyall Dawson
ca4a60a6aa Fix redundant angle methods for QgsGradientFillSymbolLayerV2 2015-01-15 22:25:18 +11:00
Juergen E. Fischer
0ba232d1e8 dxf export: improve marker symbol export 2015-01-14 23:55:35 +01:00
Juergen E. Fischer
b49da36c7f * Save and restore visiblity state of embedded group layers (fixes #4097)
* Adds support for lists in custom properties
2015-01-13 14:55:03 +01:00
Martin Dobias
3711fd5899 WMS server: support multiple styles in GetStyles request
This code has been funded by Tuscany Region (Italy) - SITA (CIG: 6002233F59) and commissioned to Gis3W s.a.s.
2015-01-13 15:33:10 +07:00
Nathan Woodrow
d9042f590f Follow up 6a17a60ae2 - Fix error when passing usesgeometry to qgsfunction 2015-01-10 10:43:12 +10:00
Martin Dobias
4dead724f5 Allow multiple styles of layers in composer maps
When layer set is locked in composer map, also the styles associated with layers are kept.
As a result, a composition can contain maps of the same layer just with different styles.

Map settings and map renderer jobs have been improved to support temporary override of layer's style.
It is possible to pass to map settings which layers should have overridden style and map jobs
will temporarily replace the style (just for the rendering).
2015-01-09 21:48:15 +07:00
Martin Dobias
50e77a9d41 Added support for renaming of map layer styles 2015-01-09 21:48:15 +07:00
Sandro Santilli
e2e47d71c6 Add rotate and transform(QTransform) methods to QgsGeometry
Reimplement translate in terms of transform(QTransform).
Includes new unit test for rotate() and translate() methods.
Includes sip bindings update.
2015-01-09 12:37:00 +01:00
Martin Dobias
8b5587fe13 Improve the internals of map layer style manager
- style manager is always enabled (client code does not need to distinguish between enabled/disabled state)
- layers currently active style is stored only in QgsMapLayer - in style manager it has entry with no data (avoids duplication of data)

This also solves issues with visibility presets and styles when some presets do not have stored style
2015-01-09 17:04:26 +07:00