50 Commits

Author SHA1 Message Date
Nyall Dawson
b904731259 Respect transform context in point locator 2018-01-04 15:04:42 +11:00
Nyall Dawson
4da1ce8404 Drop redundant virtual keywords on overrides
Run clang-tidy modernize-use-override to remove all the redundant
virtual keywords from overridden methods, and add some missing
overrides.

Another benefit is that this has also added the overrides
on destructors, which will cause a build failure if a base
class is missing a virtual destructor.
2017-12-16 08:49:36 +10:00
Nyall Dawson
a15b54d997 Swap missing 0->nullptr and add missing overrides 2017-12-12 21:14:58 +11:00
Nyall Dawson
04a9cd9211 Add more consistency to doxygen formatting 2017-10-06 08:19:00 +10:00
Nyall Dawson
49b426d951 Make doxygen_space script convert multiline //! comments
Because:
- the /** format is much more prevalent throughout QGIS
- sipify works correctly with /**
2017-10-06 07:55:52 +10:00
Nyall Dawson
a87d352bd7 Run clang-tidy modernize-use-default-member-init to move member
initialization to headers (c++11 style)
2017-09-27 05:02:34 +10:00
Martin Dobias
220b58d0c9 Fix vertex+segment vs segment snapping type
When user picked snapping to current layer / all layers, snapping to
vertex+segment vs segment were working the other way around
(advanced configuration was working correctly though)
2017-09-12 09:25:11 +02:00
Juergen E. Fischer
8333b71034 Remove unused SnapToMapMode in QgsSnappingUtils 2017-06-14 13:15:47 +02:00
Matthias Kuhn
a9d7630a69 Rename QgsPointV2 to QgsPoint and QgsPoint to QgsPointXY
Because 3D coordinates should be the default.

References https://github.com/qgis/qgis3.0_api/issues/36
2017-06-02 19:53:37 +02:00
Denis Rouzaud
1df3c51606 sipify batch 2017-05-22 10:12:08 +02:00
Denis Rouzaud
d3bc0e37a7 [sip] mass introduction of annotations into headers 2017-05-02 10:11:50 +02:00
Nyall Dawson
11dcfd935c @param -> \param 2017-04-03 13:17:27 +10:00
Matthias Kuhn
fb91ed7395 Use "\since" instead of "@note added in" 2017-04-03 01:06:33 +02:00
Denis Rouzaud
40c056cae0 run astyle on src/core 2017-03-03 09:09:37 +01:00
Denis Rouzaud
5176ecf597 [needs-docs] keyboard shortcut to toggle snapping (S)
Pressing the key "S" will toggle snapping. This helps to quickly
enable/disable snapping while digitizing.
2017-02-28 12:13:41 +01:00
Nyall Dawson
d19e70700f Ensure all pointer variables are initialized to nullptr 2017-02-18 20:23:18 +10:00
Matthias Kuhn
b1e226c069 Add missing #include "qgis_core.h" 2017-01-05 16:49:00 +01:00
Juergen E. Fischer
c6fb25375c allow limiting snapping to a given area 2017-01-01 18:40:14 +01:00
Nyall Dawson
32b1603c81 Update indentation 2016-11-08 08:57:51 +10:00
Nyall Dawson
1367fd09fc Prepare commit converts single line doxygen block format
Flips single line doxygen comments to use the proper single line
format:

/*!< comment */   to   //!< Comment

and

/** comment */    to   //! Comment
2016-10-25 09:17:39 +10:00
Nyall Dawson
44289084e9 Optimise passing of variables by ref/value 2016-10-24 10:36:23 +10:00
Denis Rouzaud
64d3c788f1 Use toolbar or status bar for snapping config 2016-10-20 12:56:35 +02:00
Nyall Dawson
4cfacf14e3 Make API more consistent
- rename methods with XML to Xml, CRS to Crs, WMS to Wms, ID to Id
- rename methods with SRS to Crs
- rename methods with abbreviations like "dest" to "destination"
- rename methods with abbreviations like "src" to "source"
2016-07-21 08:40:50 +10:00
Nyall Dawson
7d2027faa9 Fix most remaining methods which return a reference to
QgsCoordinateReferenceSystem or which take a pointer to a
CRS
2016-07-15 06:01:39 +10:00
Nyall Dawson
0a056f8a1f Add doxygen test to force use of \ingroup for classes
Using the group tag helps keep the API docs organized
2016-07-04 19:57:13 +10:00
Matthias Kuhn
dab157f70f Minor fixes and doxymentation for QgsSnappingUtils 2016-06-21 11:46:18 +02:00
Nyall Dawson
ccebd83aa4 Standardise format of initializer lists 2016-05-03 09:38:04 +10:00
Nyall Dawson
c3a57434d9 Fix clazy 'pass small and trivially-copyable type by value' warnings 2016-02-02 19:47:21 +11:00
Martin Dobias
fa66583e6f Improve indexing strategy for snapping (fixes #12578)
Implemented a simple heuristic that should keep the number of cached
features per layer reasonable - and thus lower the amount of consumed
memory and CPU for big layers.
2016-01-27 23:16:47 +01:00
Martin Dobias
86307ffc7c Add debug capabilities to snapping utils 2016-01-27 23:16:46 +01:00
Juergen E. Fischer
00633811c9 spelling fixes 2016-01-21 10:42:25 +01:00
Martin Dobias
3e4839344c [tracer] Make tracer follow layers configuration from snapping utils 2016-01-11 16:45:42 +01:00
Nyall Dawson
576875e998 Followup 320c696 use clang-modernize to replace 0/NULL use with nullptr 2015-12-15 11:24:51 +11:00
Nyall Dawson
c49b5b777f Change a lot of arguments to const references in core/gui
Rationale:
- there was a lot of large objects passed by value, so potentially
there's a speed bump from this
- even for implicitly shared classes like QString/QList there's still
a (small) cost for copying the objects when there's no reason to
- it's the right thing to do!
2015-10-07 12:02:04 +11:00
Matthias Kuhn
3613ba5701 QgsPointLocator::Type : Type safety 2015-09-26 13:45:07 +02:00
Matthias Kuhn
287590eea2 Fix concurrency issue in snap indexing 2015-09-24 08:25:16 +02:00
Juergen E. Fischer
9752c468c1 indentation update 2015-07-29 11:52:14 +02:00
Denis Rouzaud
9e3183c63f Revert "sort includes"
This reverts commit 2b7d3d3c73b50ba6dc74abec6dd652ff1b87c0ec.
2015-06-10 14:54:47 +02:00
Denis Rouzaud
2b7d3d3c73 sort includes 2015-06-10 13:59:08 +02:00
Martin Dobias
e22edc82ef QgsSnappingUtils: show a progress dialog if initial indexing takes long 2015-01-23 14:30:46 +07: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
106358c46c fix windows build 2015-01-20 22:43:30 +01: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
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
30684c7d57 Add support for match filtering, fix unit tests 2015-01-20 10:21:54 +07:00
Martin Dobias
f956464c7c Add snapping to current layer mode + make it default for new projects 2015-01-20 10:21:54 +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
Martin Dobias
1dae560c02 Added initial tests for QgsPointLocator and QgsSnappingUtils 2015-01-20 10:18:39 +07:00
Martin Dobias
3a0dbf274f Initial import of new classes for more efficient snapping
QgsPointLocator: index vector layer geometries for fast lookups
QgsSnappingUtils: combine locators according to snapping configuration

Also adds fast point in polygon queries.
2015-01-20 10:18:39 +07:00