367 Commits

Author SHA1 Message Date
Denis Rouzaud
d87c60512c [sipify] fix bad handling of \see within sentences
and other docstrings improvements
2018-01-09 21:40:10 -04:00
Denis Rouzaud
5babec5e07 run sipify 2018-01-09 11:40:39 -04:00
Nyall Dawson
c94d26a5d5 Doxygen++ 2018-01-04 12:27:38 +11:00
Denis Rouzaud
64c99e054c run sipify for code snippets 2017-12-19 21:17:29 -04:00
Denis Rouzaud
90e5196996 run sipify 2017-12-19 14:55:46 -04:00
Denis Rouzaud
be8d1d7782 run sipify 2017-12-16 10:45:52 -04:00
Denis Rouzaud
c604d2dda6 run sipify 2017-12-15 22:13:44 -04: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
Denis Rouzaud
f2b3ed0a9b run sipify 2017-12-15 11:12:19 -04:00
Denis Rouzaud
e48cf98edb run sipify 2017-12-06 07:19:50 -04:00
Alessandro Pasotti
72553a60a9
Merge pull request #5710 from elpaso/api-code-cleaning-int-2-enums
QgsVectorLayer code cleaning use enums instead of int
2017-11-24 16:16:26 +01:00
Matthias Kuhn
916c9c4cdb Open heart surgery on expression context for processing sources 2017-11-24 16:09:05 +01:00
Alessandro Pasotti
7a63a07f7f Add return cases to the docs and fully qualified enums 2017-11-24 11:53:49 +01:00
Alessandro Pasotti
def85fa202 QgsVectorLayer code cleaning use enums instead of int
It was one of the TODOs for QGIS 3
2017-11-23 12:09:30 +01:00
Nyall Dawson
5d476e51df Use QVector where possible in geometry classes 2017-11-14 21:52:09 +11:00
Nyall Dawson
ba62ffce2c Make constructors for QgsVectorLayer and QgsRasterLayer more flexible
...by moving extra arguments to new LayerOptions structs. This allows
us to more easily add new layer constructor options without making
the API cumbersome to use.
2017-11-09 14:28:51 +11:00
Blottiere Paul
9bbd0eacd1 Update sip binding 2017-10-09 07:32:12 +01:00
Blottiere Paul
3f8ae8b225 Some minor refactoring 2017-10-09 05:13:59 +01:00
Blottiere Paul
821aadc400 Hide auxiliary columns which can be edited by "change label properties" map tool 2017-10-09 05:13:59 +01:00
Blottiere Paul
5b278d746e Move/rotate/hide/pin map tools are always available 2017-10-09 05:13:59 +01:00
Blottiere Paul
4920a14aab Move isAuxiliaryField to QgsVectorLayer 2017-10-09 05:01:35 +01:00
Blottiere Paul
88e8eb4fd7 Update sip binding 2017-10-09 05:01:35 +01:00
Blottiere Paul
4a8fce2b00 Implement delete field action 2017-10-09 05:01:34 +01:00
Blottiere Paul
a550a32719 Auxiliary layers may be created or loaded from auxiliary storage 2017-10-09 05:01:34 +01:00
Nyall Dawson
42676dc93c Move some getters which are incorrectly marked as slots,
remove some unnecessary 'const's from signals

Thanks to clazy const-signal-or-slot check
2017-10-09 11:53:06 +10:00
Martin Dobias
68bb68d176 [FEATURE] QGIS 3D (pull request #5203) 2017-10-02 23:02:37 +02:00
Matthias Kuhn
2fbb6f09cc
Avoid recursion in apply on update default values 2017-09-29 17:52:34 +02:00
Matthias Kuhn
89289598fe
Doxygen 2017-09-29 17:52:33 +02:00
Matthias Kuhn
17fe7e8aec
Doxygen updates for changed method names 2017-09-29 17:52:32 +02:00
Matthias Kuhn
f2d512a73a
Apply default values on update 2017-09-29 17:52:30 +02:00
Matthias Kuhn
7b36287ff3
Use QgsDefaultValue throughout the code 2017-09-29 17:52:29 +02:00
Matthias Kuhn
cab3a38461
Doxymentation 2017-09-29 17:52:29 +02:00
Nyall Dawson
01d34ede9d Sip sync 2017-09-25 17:12:03 +10:00
rldhont
f88af6d55f QgsVectorLayer, countSymbolFeatures return QgsVectorLayerFeatureCounter 2017-09-19 07:34:35 +02:00
Matthias Kuhn
63def3d870
Doxygen improvements 2017-09-18 18:32:06 +02:00
Vincent Mora
f63c302420 [FEATURE] Add undo and redo on transaction groups (#4765)
* [FEATURE] adds undo/redo for transaction groups

[needs-docs] the undo/redo now works with transcation groups. Just check
that there is no restriction in the transaction groups doc concerning
undo.

related to #14799

The undo/redo is implemented using SAVEPOINT.

The QgsTransaction interface has been enlarged to allow savepoints
creation and management. The savepoint is destroyed on
rollbackToSavepoint to have the same behavior has the sql ROLLBACK TO
SAVEPPOINT.

To avoid the creation of a savepoint for each feature modified in bulk
editing (e.g. paste, field calculator) the logic is a bit complicated: the
savepoint is created on QgsVectorLayer::editCommandStarted and the first
actual undo command (QgsVectorLayerUndoPassthroughCommand) is
responsible for the re-creation of the savepoint in case of undo-redo.
Since the behavior must be different in case edition doesn't take place
inside an edit command, a member function has been added to
QgsVectorLayer to expose the mEditCommandActive state.

Another (commented) tricky bit is the modification of the database
structure on add/delete attributes. On undo, the attribute is removed
before the rollback to savepoint, i.e. there is a useless ALTER TABLE
issued to restore the structure just before restoring it with the
ROLLBACK TO SAVEPOINT. This is necessary to make the provider
aware of the change of structure. It could be nicer/cleaner to have a way
to reload providers metadata.

The editPaste function has also been modified to use addFeatures instead of
addFeature (plural/singular), this is at the expense of an additional "cpy"
of the clipboard in memory, but it should improve perf with postgis provider.

* fixup operator aliases
2017-09-15 14:55:43 +02:00
Martin Dobias
6df6681326 Read/write 3D renderers of map layers to project files 2017-09-15 10:39:07 +02:00
Nyall Dawson
f799d3afc8 Move allFeatureIds from QgsVectorLayer to QgsFeatureSource 2017-09-08 20:09:29 +10:00
Blottiere Paul
7ef2e7046e Some cleanup and renaming 2017-09-06 14:46:37 +01:00
Blottiere Paul
eb725f3305 Do not update extent by default if trust project option is activated 2017-09-06 14:46:37 +01:00
Blottiere Paul
384e85ca77 Add option on layer to read extent from xml in case of data source without metadata 2017-09-06 14:46:37 +01:00
Matthias Kuhn
4ea4478bad Thread safety for feature counter
Make sure that results from a feature counter will only be delivered on
the main thread and that they will be discarded if the layer is deleted
meanwhile.
2017-09-05 12:18:52 +02:00
Blottiere Paul
477775a5d7 [FEATURE] Joined fields are editable if the option is activated 2017-08-28 14:09:55 +01:00
Nyall Dawson
eb0c3015f9 Push minimumValues/maximumValues up to QgsFeatureSource base class
Allows these methods to be called on feature sources
2017-07-13 20:07:33 +10:00
Harrissou Sant-anna
9e6b8ed59d Use PostGIS and PostgreSQL spelling when appropriate 2017-07-07 01:26:38 +02:00
Harrissou Sant-anna
6fab688298 Use SpatiaLite right spelling when needed 2017-07-07 01:26:38 +02:00
Denis Rouzaud
5b8e2c2f27 remove QgsVectorLayer::hasGeometryType in favor of QgsMapLayer::isSpatial 2017-07-05 10:18:32 +02:00
Nyall Dawson
7ae1ee975d Add sourceName() method to QgsFeatureSource
Sometimes it's necessary to retrieve the name of a source...
2017-06-26 12:15:01 +10:00
Nyall Dawson
fc339f9ac5 Add a flag argument to QgsFeatureSink::addFeatures
Flags can be used to control how features are added to the sink.

For now, there's only a single flag available - FastInsert.
When FastInsert is set, faster inserts will be use at the cost
of updating the passed features to reflect changes made at the
provider.

This includes skipping the update of the passed feature IDs
to match the resulting feature IDs for the feature within
the data provider.

Individual sink subclasses may or may not choose to respect
this flag, depending on whether or not skipping this update
represents a significant speed boost for the operation.

QgsVectorLayer always ignores the flag - feature ids are
required for the featureAdded signal to be correctly emitted,
and it's expected that performance critical applications will
add features directly to a data provider instead of
via QgsVectorLayer's edit buffer.
2017-06-15 17:04:27 +10:00
Nyall Dawson
de9e70e6ba Merge pull request #4684 from nyalldawson/processing_pt3
Add sourceExtent method to QgsFeatureSource
2017-06-06 21:50:45 +10:00