47 Commits

Author SHA1 Message Date
Matthias Kuhn
61812648a3 Add API to hook into resolveReferences 2019-09-18 09:32:02 +02:00
Julien Cabieces
5b71e21613 [FEATURE] [needs-docs] Add circular data dependencies (#30947)
* [FEATURE] [needs-docs] Add circular data dependencies
2019-08-26 08:36:07 +02:00
Denis Rouzaud
e4faaf4988
add __repr__ for QgsMapLayer (#31108) 2019-08-06 13:36:14 +02:00
Nyall Dawson
51ed8c95b2 Dox++ 2019-07-10 08:10:49 +10:00
Nyall Dawson
0cdad2307b Add api to allow reading a QgsProject file without loading any layers
This causes the project to be read, but no data providers created for
layers (i.e. the same result as loading a project in the app and
choosing to leave bad layers in the project).

It's intended for occasions when you want to efficiently access properties
of a project without the (often very expensive) cost of actually
loading layers. E.g. to just read project metadata, parse the
layer tree structure, extract print layouts or renderer properties, etc.
2019-07-10 08:10:49 +10:00
Nyall Dawson
590d1aae9d [FEATURE][API] Visitor API for style entities
Adds a new visitor pattern API for creation of visitors which visit
all the style entities (symbols, color ramps, text formats, and
label styles) associated with different objects. Can be used on a
renderer, map layer, or project wide level.

E.g. on a project wide level, allows collection of ALL the style
symbols/color ramps/text settings inside a project, including those
in layouts or annotations!
2019-07-06 12:36:54 +10:00
Alessandro Pasotti
103ef762ca Factor out generateId for layers and fix QLR mutiple layers id import 2019-06-10 17:58:22 +02:00
Alessandro Pasotti
394a189682 Fix class documentation 2019-04-17 10:06:41 +10:00
Alessandro Pasotti
5f3dc50ccc Remove deprecated QgsCoordinateTransform ctor ...
... and add a getter for coordinateTransform to QgsMapLayer

The reason is that I think we should reduce the dataProvider API
usage and rely on the higher level QgsMapLayer API whenever it
is possible, QgsMapLayer checks for data provider validity
and returns a default constructed QgsCoordinateTransform instead
of crashing.
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
Denis Rouzaud
375a0aa253 create scope based enum for QgsMapLayer::LayerType >> QgsMapLayerType
the enum is moved out of the class
this will allow forward declaration more easily since the enum is not nested in the class
2019-03-24 21:40:33 -05: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
b6d66becab Sipify 2019-02-27 09:41:11 +10:00
Nyall Dawson
384d310233 Minor improvements to PyQGIS returns for SIP_OUT params 2019-02-05 04:55:34 +11:00
Denis Rouzaud
166e952c33 run sipify 2018-12-19 08:04:27 -04:00
Denis Rouzaud
32e844f9f8 fix multiline comments on out params 2018-12-18 17:29:04 -04:00
Denis Rouzaud
edfb7e1465 run sipify 2018-12-18 17:17:25 -04:00
Alessandro Pasotti
f02345bd8b Remove unnecessary project from test data 2018-11-05 10:27:02 +01:00
Alessandro Pasotti
eb02004b60 Store original style as QDomDocument instead of an XML string 2018-11-05 10:27:02 +01:00
Alessandro Pasotti
a4182c1e04 Remove unnecessary project from test data 2018-11-05 10:26:39 +01:00
Alessandro Pasotti
bc424d09c1 Store original style as QDomDocument instead of an XML string 2018-11-05 10:26:39 +01:00
Alessandro Pasotti
3fe7848c16 Noted in the method documentation that dataProvider() may return null 2018-11-05 10:24:35 +01:00
Alessandro Pasotti
f856b4c8e3 Renamed originalXmlProperties methods and variables 2018-11-05 10:24:35 +01:00
Alessandro Pasotti
c32d542be5 Move setDataSource to QgsMapLayer
also setter and getter for providerType
2018-11-05 10:24:35 +01:00
Matthias Kuhn
1c359f8acd
Add a new QML category "Geometry Options"
And rename QgsGeometryFixes to QgsGeometryOptions
2018-09-19 13:51:00 +02:00
Denis Rouzaud
3724f9e9e2
use a model for select map layer style categories (#7907)
this avoids cluttering QgsMapLayer and reduces a bit code redundancy
2018-09-14 09:38:52 -08: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
5e6c382328 single dialog to save all types (QML, SLD, DataBase) 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
0df5b9e593 better API doc, own category for 3D, fix leak 2018-09-14 16:35:30 +10:00
Denis Rouzaud
e91a42def6 categories in paste style 2018-09-14 16:35:30 +10:00
Denis Rouzaud
26ad2cbf98 add icons and export only selected category 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
Martin Dobias
602b3e9dff Add QgsMapLayer::flagsChanged() signal 2018-09-11 15:48:46 +02: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
Denis Rouzaud
6e7ff283ed
add missing SIP_OUT (#7831) 2018-09-07 12:29:09 -04:00
Nyall Dawson
2ed144ac59 Apply clang-tidy readability-avoid-const-params-in-decls fixit
Checks whether a function declaration has parameters that are
top level const.

const values in declarations do not affect the signature of a
function, so they should not be put there.
2018-06-05 10:19:13 +10:00
Denis Rouzaud
65bb60e96c run sipify 2018-05-28 10:39:34 -08:00
Nyall Dawson
38850bdb94 [pyqgis] Ensure that multiline param tags are indented for additional lines 2018-05-27 18:54:09 +10:00
Nyall Dawson
c864d22d1f Add "get ..." to doxygen compliance blacklist
Should be "gets ..." for consistent tense, or better yet
"returns ..." for consistency.
2018-05-27 14:05:06 +10:00
Nyall Dawson
1c615c15cc More documentation compliance
Use Qt style "returns .." tense instead of "return ..", and lock
this in with a documentation compliance unit test
2018-05-25 15:09:00 +10:00
Nyall Dawson
2cb8a33884 Fix broken see also links 2018-05-25 11:16:18 +10:00
Denis Rouzaud
7df2593caf move auto generated sip file in dedicated folder 2018-05-14 10:23:37 -04:00