38541 Commits

Author SHA1 Message Date
Nyall Dawson
5b6b035d83 Correctly handle restoring atlas coverage layer from template
(when template was created in a different project)

On behalf of Faunalia, sponsored by ENEL
2017-04-19 09:57:43 +10:00
Martin Dobias
832d2dd045 Node tool: improvements for deletion of vertices
- fix issue when deleting the repeated first+last vertex of polygon's ring
- make deletion aware of topological editing (also delete other vertices at the same position)
- fix issue with dragging not being stopped when deleting multiple vertices
- make deletion in node editor follow the same code path
- unit tests for topological editing (moving / deleting vertices)
2017-04-18 17:32:19 +08:00
Nyall Dawson
e6aa44f877 Merge pull request #4368 from nyalldawson/composer_map_layer_ref
More use of weak layer references in composer templates
2017-04-18 17:23:53 +10:00
Nyall Dawson
f413963e2f Change &operator to get() 2017-04-18 16:49:22 +10:00
Nyall Dawson
2ca70dc48a [composer] Correctly restore map item layers when loading a template
in a different project to that which the template was created in

On behalf of Faunalia, sponsored by ENEL
2017-04-18 16:36:19 +10:00
Nyall Dawson
dc3b2cdbd4 Add some methods for working with lists of map layer references 2017-04-18 16:36:19 +10:00
Nyall Dawson
eb1e8205e1 [composer] Use weak layer reference matching when loading attribute table from XML
Allows attribute tables in templates to reattach to matching layers
when loaded in a different project to the project the template was
created in.

On behalf of Faunalia, sponsored by ENEL
2017-04-18 16:36:19 +10:00
Nyall Dawson
85a7327aae Add some useful operators to layer reference 2017-04-18 16:36:19 +10:00
Nyall Dawson
1efd623c07 Move layer ref resolving to QgsMapLayerRef
Add unit tests
2017-04-18 16:36:19 +10:00
Nyall Dawson
35410fd4b7 Some API improvements to QgsMapLayerRef, unit tests 2017-04-18 16:36:19 +10:00
Nyall Dawson
6bb3fa61c5 Merge pull request #4353 from nyalldawson/range
New QgsRange template based class for storing interval ranges
2017-04-18 13:14:25 +10:00
Martin Dobias
405da5950f Rename QgsNodeTool2 to QgsNodeTool 2017-04-18 10:58:57 +08:00
Nyall Dawson
7949c81c3d Add templated docs to acceptable missing docs 2017-04-18 12:19:42 +10:00
Nyall Dawson
c460f07d92 Add missing docs 2017-04-18 12:19:42 +10:00
Nyall Dawson
c4ea048e5b New QgsRange template based class for storing interval ranges
QgsRange classes represent a range of values of some element
type. For instance, ranges of QDateTime might be used to
represent the ranges of timestamp ranges.

Ranges can indicate whether the upper and lower values are
inclusive or exclusive. The inclusivity or exclusivity of
bounds is considered when determining things like whether
ranges overlap or during calculation of range intersections.

Includes typedefs for QgsDoubleRange, QgsIntRange, QgsDateRange.
2017-04-18 12:19:42 +10:00
Nyall Dawson
33b6c41dd2 Merge pull request #4357 from nyalldawson/composer_layer_ref
Use weak layer references and loose matching for composer legend customisation
2017-04-18 12:06:38 +10:00
Nyall Dawson
302e9dd363 Fix ui build warning 2017-04-18 11:27:27 +10:00
Nyall Dawson
0c1f97c438 Merge pull request #4367 from nyalldawson/distance_area_api
Cleanup QgsDistanceArea API and sipify, add cache for ellipsoid lookup
2017-04-18 11:22:35 +10:00
Nyall Dawson
3535ee2d55 Allow QgsDataProvider access through QgsMapLayer
Avoids having to cast to QgsRasterLayer/QgsVectorLayer before
accessing the common QgsDataProvider members
2017-04-18 11:14:01 +10:00
Nyall Dawson
87a670848b [sipify] Always add virtual keyword for overridden methods
sip often requires the virtual keyword to be present, or
it chokes on covariant return types in overridden methods
2017-04-18 11:14:01 +10:00
Nyall Dawson
1805a70952 Add missing docs 2017-04-18 10:27:05 +10:00
Nyall Dawson
023ad46525 sipify QgsLayerTreeLayer 2017-04-18 10:27:05 +10:00
Nyall Dawson
468c784f7e sipify QgsLayerTreeGroup 2017-04-18 10:27:05 +10:00
Nyall Dawson
0b36ee3aac Use weak layer references and loose matching for composer legend
customisation

Allows legend customisation to be restored when loading a composer
template

Fix #2738
2017-04-18 10:27:05 +10:00
Nyall Dawson
05b737c215 Add doxygen note linking QgsDistanceArea to QgsEllipsoidUtils 2017-04-18 10:23:09 +10:00
Nyall Dawson
5f1656b8e9 Move retrieval of lists of known ellipsoids to QgsEllipsoidUtils 2017-04-18 10:18:48 +10:00
Nyall Dawson
147bb7f1ed Move ellipsoid parameter retrieval to new QgsEllipsoidUtils class 2017-04-18 09:53:00 +10:00
Nyall Dawson
cc5b9bfe17 More QgsDistanceArea API cleanups and simplification
- setEllipsoidalMode() was removed. Ellipsoidal calculations are
now enabled whenever a valid ellipsoid() has been set. Set the
ellipsoid to 'NONE' to disable ellipsoidal calculations.

- ellipsoidalEnabled() was removed. Ellipsoidal calculations
are now enabled whenever a valid ellipsoid() is set. Check
willUseEllipsoid() to determine whether ellipsoidal
calculations will be performed.

- sourceCrs() and setSourceCrs() now always take and return
QgsCoordinateReferenceSystem objects. All string/ID based CRS
methods were removed.

- geographic() was removed. This was only used internally
in one place, so was replaced with sourceCrs().isGeographic() instead.

- some largely overlapping measurement functions were consolidated
2017-04-18 08:14:16 +10:00
Nyall Dawson
ca2b199c76 Fix possible corruption of cache 2017-04-18 08:14:16 +10:00
Nyall Dawson
3ada8a2a28 Use a transparent cache to avoid db lookups when setting QgsDistanceArea ellipsoid 2017-04-18 08:14:16 +10:00
Nyall Dawson
4925fab05c C++11 = good 2017-04-18 08:14:16 +10:00
Nyall Dawson
cdef0764b5 Use default copy constructors and assignment operators for QgsDistanceArea
There's no complex member variables here - the default implementations
should be fine (actually faster, since they won't require
recalculation of the derived parameters)
2017-04-18 08:14:16 +10:00
Nyall Dawson
275158aa30 Cleanup ellipsoidal mode detection in QgsDistanceArea 2017-04-18 08:14:16 +10:00
Nyall Dawson
53e1df45ab sipify QgsDistanceArea 2017-04-18 08:14:16 +10:00
Nyall Dawson
4fc49c9613 Cleanup QgsDistanceArea API
- remove methods which accept a QgsGeometry pointer, leave
duplicate methods which accept QgsGeometry reference (caller
should handle null geometry pointers in an acceptable
way instead of just returning 0 measurements)
- make protected members private. This class isn't designed
to be subclassed
- remove some methods not exposed to bindings and not used
anywhere
2017-04-18 08:14:16 +10:00
Martin Dobias
7b202edf04 Remove QgsVectorLayer::snapPoint() and unused code in QgsSelectedFeature 2017-04-17 17:37:16 +08:00
Alexander Bruy
c749057f02 Merge pull request #4363 from alexbruy/passwordlineedits
[needs-docs] use QgsPasswordLineEdit in the master password dialog
2017-04-17 12:28:50 +03:00
Mathieu Pellerin
8c20d993f8 sipify qgscolorbutton and qgscolorrampbutton (#4365)
* get rid of params to get rid of warnings
2017-04-17 16:10:11 +07:00
Martin Dobias
316d9c3359 R.I.P. QgsSnapper and QgsMapCanvasSnapper
These classes have been replaced by more efficient and flexible classes
(see QgsPointLocator, QgsSnappingUtils, QgsMapCanvasSnappingUtils)
2017-04-17 17:08:48 +08:00
Mark Johnson
8b08285e90 added measureLineProjected and computeSpheroidProject to QgsDistanceArea 2017-04-17 19:06:30 +10:00
Martin Dobias
8a46a1d0dc R.I.P. old node tool 2017-04-17 16:18:30 +08:00
Alexander Bruy
85788151c2 doxymentation 2017-04-17 10:59:17 +03:00
Alexander Bruy
6bcc066d6f sipify QgsCredentials dialog 2017-04-17 10:59:17 +03:00
Alexander Bruy
ec5a8911a8 use QgsPasswordLineEdit in the master password dialog 2017-04-17 10:59:16 +03:00
Martin Dobias
e73a52bb35 [FEATURE] New node tool implementation 2017-04-17 14:23:36 +08:00
Nyall Dawson
eff5a823c9 [sipify] Convert "\a arg" to "`arg`" when processing Docstrings
Allows argument names to be highlighted in Python docs
2017-04-17 13:49:59 +10:00
Nyall Dawson
e4d6bbfe76 Fix Coverity divide by 0 error 2017-04-17 12:44:54 +10:00
Nyall Dawson
952bc02144 Fix some Coverity null pointer dereference warnings 2017-04-17 12:43:05 +10:00
Nyall Dawson
6a72c945af [sipify] Don't autocreate Docstrings for overridden members
Skip the autocreated Docstrings with rtype annotations if the
member is overridden - better to use the base class
Docstring in this case.
2017-04-17 11:03:02 +10:00
Nyall Dawson
96d5b9dae6 Implement a QGIS 3.0 TODO for QgsMessageLogViewer, cleanup docs 2017-04-17 10:55:53 +10:00