3346 Commits

Author SHA1 Message Date
Denis Rouzaud
15e4903890 sipify improvements
* add demo file and start a short doc
* fix some annotations
* do not display hidden line (SIP_SKIP, delete)
* use a defined var for SIP_SKIP
* remove constructor definition in header
* fix comment after method definition in header
* add a test for sipify itself
2017-03-30 15:13:01 +02:00
Denis Rouzaud
21be025d25 use sip includes rather than listing header to generate all sip files 2017-03-30 15:13:01 +02:00
Denis Rouzaud
a3bdd4405a SIP test: use blacklist rather than whitelist 2017-03-30 15:13:01 +02:00
Denis Rouzaud
988c504d77 test auto-generated sip files on Travis 2017-03-30 15:13:01 +02:00
Nyall Dawson
636e9c5ea3 [FEATURE] Add geometry snapper modes to only snap end points of lines
Allows snapping of end points only, or end point to end point only

Also update processing algorithm to match
2017-03-30 15:52:49 +10:00
Nyall Dawson
ece3991dbe [FEATURE] New class QgsInternalGeometrySnapper
Used for snapping geometries within a set of features to other
features from that same set.

Just like QgsGeometrySnapper, except that where QgsGeometrySnapper
requires a separate reference layer to snap to
QgsInternalGeometrySnapper snaps *within* a single layer. E.g.
allows you to close gaps within that layer.
2017-03-30 13:54:05 +10:00
Nyall Dawson
456fdc48a7 Fix Coverity divide by zero errors 2017-03-28 09:24:11 +10:00
Nyall Dawson
e55fbebf68 Add failing test to ensure that QgsAbstractGeometry.centroid
result matches that of GEOS

It doesn't, and reveals the the QGIS native centroid calculation
is quite broken
2017-03-26 14:34:51 +10:00
Nyall Dawson
631c7cd1dd Port GEOS centroid tests to PyQGIS 2017-03-26 14:34:51 +10:00
Nyall Dawson
51035cfb67 Add optimised constructors for QgsLineString
Instead of requiring all linestrings to be constructed by
first creating QgsPointSequence (requiring creation or
conversion of points to QgsPointV2), allow construction
of LineStrings directly from vectors of values (fastest!)
or lists of QgsPoint.

Likely results in speedups for lots of geometry operations,
but using the same layer as earlier tested for densify
improvements the densify operation time dropped further
from 25 seconds to 15 seconds.
2017-03-25 20:44:31 +10:00
Nyall Dawson
345ce734c4 [composer] Correctly draw overview frame when map item CRS differs 2017-03-25 17:58:48 +10:00
Nyall Dawson
a769448e70 Also port processing densify to distance to c++
- Add QgsGeometry method to densify by distance
- Fix bug in processing algorithm which resulted in duplicate
vertices and incorrectly spaced extra vertices
2017-03-25 16:23:29 +10:00
Nyall Dawson
77e7693c48 Fix spelling errors in processing algorithm help 2017-03-25 16:23:29 +10:00
Nyall Dawson
5360b79174 [FEATURE] New API QgsGeometry::densifyByCount
Densifies a geometry by adding a specified number of vertices
to each segment
2017-03-25 15:07:16 +10:00
Matthias Kuhn
1ffa9ee7a6 Revert renaming of main layer-tree-group node 2017-03-23 15:29:28 +01:00
Matthias Kuhn
baa4c86262 Fix tests 2017-03-23 15:29:12 +01:00
Matthias Kuhn
f33aabd90a Completely move layer order to core 2017-03-23 15:29:12 +01:00
Nyall Dawson
746d288e33 Don't emit layerOrderChanged when removing layers
Otherwise it automatically enables the layer order panel
2017-03-22 13:01:32 +10:00
Nyall Dawson
a8e8eec95d Convert almost all core connects to new style
Just a handful remain which for various reasons cannot
be converted
2017-03-22 10:03:43 +10:00
Nyall Dawson
b7d2b9fd72 Merge pull request #4283 from nyalldawson/filterrect
Remove QgsFeatureRequest::FilterRect
2017-03-22 07:38:53 +10:00
lbartoletti
fb3d07f3f5 [FEATURE] New class for triangle
Adds a new geometry class for Triangle geometries

Methods include orthocenter, bisectors, medians, medial, circumscribed (center,
radius), inscribed (center, radius)

Also adds make_triangle expression function for creating triangles
2017-03-21 18:50:47 +10:00
jdugge
45f2cd5583 Fix duplicate QgsRectangle.toString methods
Condenses the 2 duplicate methods to a single method which is usable from the Python bindings.
2017-03-21 15:58:39 +10:00
Nyall Dawson
51c1d67091 Fix Coverity null pointer dereference warning 2017-03-21 15:32:56 +10:00
Nyall Dawson
041129d507 Fix loading composition triggers render of all composer maps
Also cleanup some more unused API methods
2017-03-21 10:32:53 +10:00
Nyall Dawson
8d01573168 Add/refine test masks for server test 2017-03-21 10:32:53 +10:00
Nyall Dawson
885269ee78 Only create composer item config widgets on demand
Instead of creating them for all items when composer window
is opened, instead just create and destroy them when
required. None are too heavy to have a noticable delay
when selecting items, but in contrast keeping them around
forever is wasteful on memory.

Also clean up a lot of duplicate composer/composition
code and remove unnecessary signals from api (use a single
itemAdded signal instead of multiple signals for every
item type)
2017-03-21 10:32:53 +10:00
Nyall Dawson
53160c7b21 [composer] Port composer manager to layout manager
Also switch to using a proper model to show/edit compositions
in the dialog.
2017-03-21 10:32:53 +10:00
Nyall Dawson
148e2bcf52 Better method to autogenerate composer names 2017-03-21 10:32:53 +10:00
Nyall Dawson
79a11dcdfe Extend layout manager tests 2017-03-21 10:32:52 +10:00
Nyall Dawson
3a1ac1a995 [composer] Attach compositions to QgsProject
This adds a new QgsLayoutManager class which is used for
storage and serializing/deserializing of compositions.

A QgsLayoutManager is attached to QgsProject. This allows
core code to access the compositions attached to a project.
The intention is to move all handling of compositions from
app to core, making it easy for server to access project
compositions without resorting to fragile xml parsing.
2017-03-21 10:32:52 +10:00
Alessandro Pasotti
5adbc641d4 QgsSettings: added Auth, App and Providers sections
That should be all we need for namespaced settings.
2017-03-20 16:09:34 +01:00
Nyall Dawson
603d02d45e Fix incorrect results when using QgsFeatureRequest.acceptFeature with filter rect 2017-03-20 14:34:21 +10:00
Matthias Kuhn
616b4dd987 Set feature valid on setId 2017-03-18 12:11:52 +01:00
Matthias Kuhn
babab3da01 Fix failing test 2017-03-18 12:11:52 +01:00
Matthias Kuhn
255eb98be6 Make features valid on setAttribute and setGeometry
Implements https://github.com/qgis/qgis3.0_api/issues/75
2017-03-18 12:11:52 +01:00
Even Rouault
ed1b0a2e74 Merge pull request #4270 from rouault/wfs_outputformat
[WFS provider] Select GML3 output format for WFS 1.0 when available
2017-03-17 13:48:28 +01:00
Even Rouault
852f01b0f9 [WFS provider] Select GML3 output format for WFS 1.0 when available
Some WFS servers like QGIS servers can expose GML3 output format for GetFeature
requests, which enable to retrieve curve geometries, instead of linearized ones
with the default GML2 output format. So use GML3 when advertized, and that
no explicit outputFormat is passed in the URI.
2017-03-16 13:32:39 +01:00
Nyall Dawson
ae45d8d490 Move composer title to composition name
Allows the name to be retrieved from core code
2017-03-15 15:19:13 +10:00
Nyall Dawson
738f4415d9 Merge pull request #4253 from nyalldawson/multi_canvas2
[FEATURE] Multi canvas/additional map views
2017-03-15 10:06:39 +10:00
Nyall Dawson
647e814bfd Merge pull request #4248 from arnaud-morvan/expressions_with_null
Improve NULL handling in expressions
2017-03-15 06:59:54 +10:00
Nyall Dawson
730d10a153 Fix failing test 2017-03-14 17:27:45 +10:00
Nyall Dawson
dbfee13bbf Indentation 2017-03-14 09:34:50 +10:00
Nyall Dawson
95806bb59b Make extra map views either follow the main canvas layers/styles,
or allow them to be set to follow a map theme preset

I.e. all styling and configuration operations for secondary
views are done in the main map canvas. Theme presets can be made
in the main canvas, and then assigned to the secondary views.
2017-03-14 09:28:34 +10:00
Nyall Dawson
ee969df8a9 Correctly handle reading/writing multiple canvas to project 2017-03-14 09:28:33 +10:00
Juergen E. Fischer
8bea742216 fix flake8 warnings 2017-03-13 20:13:51 +01:00
arnaud.morvan@camptocamp.com
f355fcd96e Fix geometry aggregate when first geometry is NULL (usertype) 2017-03-13 13:16:43 +01:00
arnaud.morvan@camptocamp.com
adb13e1cc7 Fix aggregate when group_by value is NULL 2017-03-13 13:16:43 +01:00
arnaud.morvan@camptocamp.com
b798c3a7ca Handle NULL in function "Array" 2017-03-13 13:16:43 +01:00
Nyall Dawson
a271199b0c When theme is removed, canvas falls back to default view 2017-03-13 15:03:07 +10:00
Nyall Dawson
2cba52846e If no project layer order set, use layer tree layer order
for QgsMapThemeCollection::masterVisibleLayers()
2017-03-13 14:42:22 +10:00