78 Commits

Author SHA1 Message Date
Nyall Dawson
9da6a03b50 Add API for specifying fallback CRS and layer WKB type to use
for QgsVectorLayer, when constructing a layer with a URI which
may be invalid

These may be used for layers where the geometry type/CRS is
known in advance, and where the layer path may not be
initially resolvable. (E.g. layers with a URI pointing to a
non-existant file). It is only ever used if the layer cannot
be resolved, otherwise the actual layer geometry type will be
detected and used for the layer.
2019-04-19 06:07:13 +10:00
Alessandro Pasotti
b3a448a2b2 Do not store context in layer (but in provider) ...
... also use transform context in raster projector
and deprecate setCrs without context
2019-04-17 10:06:41 +10:00
Alessandro Pasotti
7f52e2938a doxy 2019-04-17 10:06:41 +10:00
Alessandro Pasotti
7b6f9c0dbc Restore default ctor for options and layer 2019-04-17 10:06:41 +10:00
Alessandro Pasotti
e930bee9e2 Add mandatory options to QgsVectorLayer ctor
... and deprecate the rest.

In QGIS 4 we'll have to get rid of the deprecated default ctor and
create a new one which takes no arguments.
2019-04-17 10:06:41 +10:00
Alessandro Pasotti
6813a55fce Deprecate vector layer ctor with default constructed options
replaced by QgsVectorLayer( const QgsVectorLayer::LayerOptions &options,
...
2019-04-17 10:06:41 +10:00
Alessandro Pasotti
470759833e coordinateTransformContext -> transformContext for consistency
I like "coordinateTransformContext" more btw.
2019-04-17 10:06:41 +10:00
Alessandro Pasotti
df2bdf9c1a Handle the coordinate tranform context in the layer ctor
Also use the context when read/write XML by passing it
in the R/W context
2019-04-17 10:06:41 +10:00
Nyall Dawson
1dc447e1f2 Dox++ 2019-03-21 12:44:16 +10:00
Harrissou Sant-anna
4b9f4da929 Use Qt style "returns .." tense instead of "return .." 2019-03-12 14:42:36 +10:00
Nyall Dawson
107b48a430 Add NULLPTR macro for use in doxygen comments
For the c++ api dox this expands to "\c nullptr" (the
\c directive indicates a code literal value), and for sipify/Python
it expands to ``None`` (`` is sphinx annotation for literal values)

Makes for nicer dox for both c++ and Python!
2019-02-27 09:41:11 +10:00
Nyall Dawson
a7ca08784c Nullptr consistency in dox 2019-02-27 09:41:11 +10:00
Nyall Dawson
eed9852fb9 Add TRUE and FALSE macros for use in doxygen comments
For the c++ api dox these expand to "\c true" and "\c false" (the
\c directive indicates a code literal value), and for sipify/Python
they expand to ``True`` and ``False`` (`` is sphinx annotation
for literal values)

Makes for nicer dox for both c++ and Python!
2019-02-27 09:41:11 +10:00
Nyall Dawson
519a30f10c Standardise dox for signals 2019-02-26 03:24:31 +10:00
Nyall Dawson
7eab74f803 Fix use of trailing */ in dox, which messes with sipify Python documentation output 2019-02-25 19:02:12 +10:00
Matthias Kuhn
8ea09b61c8
Run sipify 2019-02-20 12:01:56 +01:00
Nyall Dawson
384d310233 Minor improvements to PyQGIS returns for SIP_OUT params 2019-02-05 04:55:34 +11:00
Mathieu Pellerin
8ac762e5e1
[ui] Fix tiny vertex marker on hidpi 2019-02-04 16:43:04 +07:00
Denis Rouzaud
166e952c33 run sipify 2018-12-19 08:04:27 -04:00
Denis Rouzaud
6bb0720bb7
Merge pull request #8708 from 3nids/sipify_sip_out
[sipify] handles SIP_OUT arguments
2018-12-18 22:08:42 -04:00
Denis Rouzaud
edfb7e1465 run sipify 2018-12-18 17:17:25 -04:00
Matthias Kuhn
69298527d9
Run sipify 2018-12-17 09:43:11 +01:00
Alessandro Pasotti
326640d881 Implement setDataSource for rasters 2018-11-05 10:24:35 +01:00
Martin Dobias
f437a7e02b Added docs 2018-10-18 16:56:27 +02:00
Denis Rouzaud
574c672a1e
add QgsVectorLayer::getGeometry(fid) (#8174)
* add QgsVectorLayer::getGeometry(fid)

* update docs to say geom is invalid
2018-10-15 03:31:14 -08:00
Alessandro Pasotti
07b31287ba Fix rollback on large tables when attr table is opened 2018-10-14 00:44:25 +02:00
Matthias Kuhn
3522518bec
Do not add allowCommit to Python bindings 2018-10-05 08:43:13 +02:00
Matthias Kuhn
c3066c2c46
Cleanup 2018-09-26 19:47:26 +02:00
Matthias Kuhn
0e3280768c
Change canCommitChanges to allowCommit flag 2018-09-26 18:31:03 +02:00
Matthias Kuhn
cda4950dd8
Change canCommitChanges to allowCommit flag 2018-09-26 17:35:53 +02:00
Matthias Kuhn
d2bb3d606b
Fix python signature? 2018-09-26 17:15:53 +02:00
Matthias Kuhn
a56deacf54
Add QgsVectorLayer::canCommitChanges
to control if changes can be saved or not. This signal is emitted before a layer is being saved and if a connected slot marks the canCommit variable as False, the layer will not be saved
2018-09-26 16:17:24 +02:00
Matthias Kuhn
68dc6984da Fix build with sip pre 4.19 2018-09-21 01:22:19 +02:00
Matthias Kuhn
fde813ca82
Merge pull request #7948 from m-kuhn/final
It's the `final` countdown
2018-09-19 16:34:54 +02:00
Matthias Kuhn
1c359f8acd
Add a new QML category "Geometry Options"
And rename QgsGeometryFixes to QgsGeometryOptions
2018-09-19 13:51:00 +02:00
Matthias Kuhn
8d9c96c911
Add final for sip >= 4.19 2018-09-19 07:47:02 +02:00
Matthias Kuhn
ddaa8ea4af
inline and virtual are no good friends 2018-09-18 18:53:48 +02:00
Matthias Kuhn
9f407d0b41
Make methods in QgsVectorLayer finally final 2018-09-18 18:04:50 +02:00
Denis Rouzaud
05f35f2e19 [sipify] fix annotations in multiline virtual methods 2018-09-14 16:35:30 +10:00
Denis Rouzaud
4cdf0a2851 fixes: HIG guidelines, sipify, initialize, doxygen warnings
fix doxygen warning + docs

sipify

fix doxygen warning

initialize
2018-09-14 16:35:30 +10:00
Denis Rouzaud
97376b8217 single dialog to load style (QML, SLD, DB) 2018-09-14 16:35:30 +10:00
Denis Rouzaud
0cfa77db7f fix documentation 2018-09-14 16:35:30 +10:00
Denis Rouzaud
cb9774022f create dialog for saving different styles 2018-09-14 16:35:30 +10:00
Denis Rouzaud
15e0d873d9 select categories in copy style in legend menu entry
not working yet, just set the menu entries
QgsMapLayerStyle::StyleCategory has moved to QgsMapLayer to avoid making QgsMapLayerStyle a QObject and they are mostly used in QgsMapLayer
2018-09-14 16:35:30 +10:00
Denis Rouzaud
51e9be0575 add API to select section of layer style when reading/writing 2018-09-14 16:35:30 +10:00
Denis Rouzaud
89830f614e
create QgsMapLayer::LayerFlags for Searchable, Identifiable and Removable (#7815)
* create QgsMapLayer::LayerFlags for Searchable, Identifiable and Removable

this brings back the information previously saved in the project node back to the layer node
this will allow to embed this information in layer styles

* skip unexisting flag node to avoid setting wrong value for flag

* mark QgsProject::(set)requiredLayers as deprecated

* better API docs

* use new API in current code

* more docs and more old API fixes

* fix bad conversion

* more old API fix

* add missing SIP_OUT

* s/testFlags/testFlag

* fix var name

* adapt project test to test flags

* remove debug calls

* fixeS
2018-09-08 07:54:21 -04:00
Juergen E. Fischer
a823046b5f followup spelling fixes 2018-09-07 00:33:13 +02:00
Alessandro Pasotti
aae41c068f Fix documentation for editFormConfig
It returns a copy: you need to change
it and use setEditFormConfig to make
modifications.
2018-09-04 07:57:57 +02:00
Denis Rouzaud
6b66b2048a switch to legend tree for Identify Layers tab in project properties
also add a 'searchable' option for vector layers (they won't be searched in the locator)
2018-08-31 14:14:14 +03:00
Matthias Kuhn
063ccf4283 Move geometry fixes to separate class 2018-08-23 18:38:09 +02:00