1016 Commits

Author SHA1 Message Date
signedav
2bfe2296e5 tests, project store and other
not yet working all translations
project handling can be improved
project store after translation working
and fix some errors
tests not ready yet
2018-08-07 14:31:17 +02:00
David
778734fd94 translator basics
basics work - translation of layername, relations
fields and aliases have a problem
2018-08-07 14:31:17 +02:00
Matthias Kuhn
c60efaf039 Remove double semicolon 2018-08-06 11:09:49 +02:00
Nyall Dawson
6ecc69ff90 Add dataSourceChanged signal to QgsVectorLayer, add tests 2018-08-06 13:51:49 +10:00
Nyall Dawson
5e37e82402 Apply clang-tidy modernization checks 2018-07-23 12:18:45 +10:00
Matthias Kuhn
d7b85c69f8
Merge pull request #7016 from m-kuhn/featureSourceEmpty
QgsFeatureSource::empty() method
2018-06-26 13:01:08 +02:00
Mathieu Pellerin
0a325f1eda
Avoid signalling repaint / data signals when a setSubsetString doesn't actually change (#7217)
Behavior across providers harmonized & test added.
2018-06-11 15:52:23 +07:00
Matthias Kuhn
48a796dc9c
Fix QgsVectorLayer::hasFeatures() crash when editable 2018-06-04 08:59:34 +02:00
Matthias Kuhn
8be4cc6079
Advanced logic for QgsVectorLayer::hasFeatures() 2018-06-04 08:59:31 +02:00
Matthias Kuhn
5fb9d14ce7
QgsFeatureSource::hasFeatures() -> Yes, No, Maybe
This method allows to determine if a feature source has content or not
(or maybe).

This method works for "generator" sources as well as for "collection"
sources.

Collection sources like QgsVectorDataProvider which allow to easily and
in a cheap way determine if features are available can return
FeaturesAvailable or NoFeaturesAvailable, generators will return
FeaturesMaybeAvailable.

QgsVectorDataProvider also implements an empty() method.
2018-06-04 08:59:30 +02:00
Matthias Kuhn
b568d6be55
Add optimized version of QgsPostgresProvider::empty() 2018-06-04 08:59:28 +02:00
nirvn
5ab3fe4ba0 Add subsetStringChanged signal 2018-05-29 17:10:17 +07:00
nirvn
f5c0a2c472 Project dirtying improvements
- Mark as dirty  when renaming a layer/group
- Better approach to mark as dirty when changing CRS
- Better approach to mark as dirty when changing subset string
2018-05-29 17:10:17 +07:00
Matthias Kuhn
b202d60672 const correctness QgsVectorLayer::deleteAttributes 2018-05-29 19:43:04 +10:00
Nyall Dawson
44630b47ed Add QgsDataProvider::ProviderOptions struct to constructors
for data providers

Allows a way to pass generic settings to providers, e.g.
passing a datum transform context for use in provider's
constructors.
2018-05-25 11:40:57 +10:00
Denis Rouzaud
d26f1e14fd replace with setEnumValue
and complete missing enumValue
2018-05-14 08:49:37 -04:00
Juergen E. Fischer
398fb1a7f6 Only apply f4d38d4f0 to Qt>=5.9 (followup f4d38d4f0; check cdash for
test results)
2018-05-04 12:30:38 +02:00
Juergen E. Fischer
357be79738 fix xenial build 2018-05-04 10:09:30 +02:00
Peter Petrik
12183e98db Fix reading/writing of mesh layer to a qgis project (fixes #18801) (PR #6869)
* fix guard header

* [bugfix] Fix reading/writing of mesh layer to a qgis project #18801

* fix copy-paste error

* fix copy-paste error

* extract decode source to derived classes

* remove raster providers from vector decode source

* reset testdata to master
2018-05-03 12:10:54 +02:00
Nyall Dawson
f4d38d4f09 Properly discard edit commands when calling QgsVectorLayer::destroyEditCommand()
Since it's not directly possible to pop the last command off
an QUndoStack (the command which is destroyed/discard by calling
this method), we add a dummy obsolete command to force this to occur.
Pushing the new command deletes the destroyed one, and since the new
command is obsolete it's automatically deleted by the undo stack.
2018-05-03 05:48:51 +10:00
Martin Dobias
49b02bf562 [FEATURE] Legend: optional text on top of symbols for vector layers
In some cases it is useful to add extra information to the symbols in the legend.
This work allows definition of additional labels in vector layer properties > Legend tab.
2018-04-18 21:52:56 +02:00
Salvatore Larosa
8aa7b56505 Fixes #18435: QGIS crash when deleting auxiliary layer 2018-03-14 14:52:51 +01:00
Nyall Dawson
678f65853a Allow QgsVectorDataProviders to create QgsFeatureRenderers
Implements https://github.com/qgis/QGIS-Enhancement-Proposals/issues/111

Adds support to QgsVectorDataProvider to create vector layer renderers
using provider-specific backend information.
2018-03-07 16:28:47 +11:00
Denis Rouzaud
05ee1b02c3 use MAYBE_UNUSED in the method declaration 2018-02-28 13:43:11 -04:00
Denis Rouzaud
8582517966 avoid required call to leaveCategory by adding a RAII private class 2018-02-28 13:43:11 -04:00
Denis Rouzaud
b95f5c1a15 QgsReadWriteContext: add a category stack to know where the error message comes from
also change the QPair in favor of a struct for a better API
2018-02-28 13:43:10 -04:00
Denis Rouzaud
47ab9b89e7 remove const for QgsReadWriteContext to allow bringing up error messages 2018-02-28 13:43:10 -04:00
Denis Rouzaud
03edc407b1 rename QgsSettings::enumSettingValue to enumValue
no python API break
2018-02-26 02:32:44 -09:00
Nyall Dawson
3d4f6f82bb Followup 0548f4, fixes to layer metadata and metadata widget
Address outstanding review requests so that this PR can be merged
2018-02-20 11:10:55 +10:00
mj10777
0548f4267e Added QgsLayerMetadata logic to QgsDataProvider. Added setMetadata in QgsVector/RasterLayer::setDataProvider. Corrections in QgsMetadataWidget with added get/setMetadata and hasChanged functions plus checking for set mLayer pointer before use. 2018-02-20 11:06:57 +10:00
Denis Rouzaud
1a1b197ced use Qgsettins::enumSettingValue where possible 2018-02-19 05:55:09 -09:00
Nyall Dawson
1014e5c7a1 Remove unused QgsVectorLayerInterruptionCheckerDuringCountSymbolFeatures class 2018-02-19 10:16:48 +10:00
nirvn
715677ee5d move getValues, getDoubleValues to vector layer utils source file 2018-02-07 13:27:39 +07:00
nirvn
8495e8be4d [stats] gather field/expression values in a thread to prevent long UI freeze 2018-02-07 13:27:39 +07:00
Nyall Dawson
0607f79f47 Ensure member QObjects for QgsMapLayer (and subclasses) are correctly
parented to their owner QgsMapLayer.

This ensures that if the layer is moved to a different thread with
QObject::moveToThread(), then those children are also considered
by QObject::moveToThread() and correctly also moved to the new
target thread. This fixes broken connections (and likely other
issues) caused when moving layers between threads (such as is
done when a background processing algorithm completes).

Fixes #18005
2018-02-05 12:19:13 +11:00
Blottiere Paul
c1fac42518 Update all attributes in a single transaction
Fixes #17869
2018-01-29 07:17:32 +00:00
Nyall Dawson
aa0d377164 Add separate bool for controlling whether vector layer labels
are enabled

Instead of clearing the labeling configuration in order to
disable labels, we need a way to disable them without
losing the configuration. Labels are oftern temporarily
switched on/off as an analysis tool, and we don't want the
settings to be lost as a result

Refs #17656
2018-01-20 06:10:51 +10:00
Nyall Dawson
fe2292c59a Fix default value 'apply on update' setting not correctly restored
Fixes #17712
2018-01-16 16:09:41 +10:00
Blottiere Paul
76c0a5ba82 Add a name to transaction command 2018-01-15 07:57:16 +00:00
Nyall Dawson
ded9b0978d Rename QgsVectorLayer::pkAttributeList to primaryKeyAttributes() for consistency 2018-01-15 11:27:22 +10:00
Nyall Dawson
068d51c3be Drop QgsVectorLayer::pendingFields()
Use QgsVectorLayer::fields() instead.
2018-01-15 11:27:22 +10:00
Nyall Dawson
2d43dac0b5 Refine behavior of QgsGeometry equals tests
Before we had two checks - equals() and isGeosEqual() which
performed the exact same check (since equals() called the geos
equality test)

Since the geos equality test is a slow, topological test, which
considers two geometries equal if their component edges overlap,
but disregards ordering of vertices this is not always what we
want. There's also the issue that geos cannot consider m values
when testing the geometries, so two geometries with different
m values would be reported equal.

So, now calling QgsGeometry::equals performs a very fast, strict
equality test where geometries are only equal if the have exactly
the same vertices, type, and order.

And swap most code which was calling the slow geos test to instead
use the fast strict native test.
2018-01-05 09:59:22 +10:00
Nyall Dawson
71cdb8cf8e Fix QgsVectorLayer::updateFeature cannot add geometry to feature
with no existing geometry

Fixes #17678
2018-01-04 12:27:38 +11:00
Nyall Dawson
5ecb5603df Fix QgsVectorLayer::updateFeature returns true when errors occur
Refs #17678
2018-01-04 12:27:38 +11:00
Mathieu Pellerin
df547e1231
Don't crash the projection selection widget when world_map.shp fails to load (#5977)
* initiate mExpressionFieldBuffer in the constructor
2018-01-03 17:51:38 +07:00
Etienne Trimaille
bf45d0b618 Crs (#5908)
* fix display of CRS if invalid CRS

* fix #17455 set an empty CRS if the read CRS from XML is wrong

* add warning about empty CRS node when reading XML
2017-12-20 10:46:00 +02:00
Martin Dobias
f8788b9185 [3d] Fix style copy/paste for 3D renderer (fixes #17540) 2017-12-02 09:32:23 +01: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
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