Hi bold developers of QGIS.

I've recently begun digging into utilizing the event (signal) model of QGIS 
(3.4).

And I've encountered a number of frustrations, as the events don't work the way 
they're supposed to, at least according to the available documentation 
(https://qgis.org/pyqgis/master/core/index.html).

E.g., the event "layerLoaded" on the project instance with the description 
"Emitted when a layer from a projects (sic) was read", which to me indicates, 
that the loading is done (due to the use of "loaded" and "was").

But the event is emitted before the loading of the layer is done, and you are 
therefore unable to find the layer it concerns.

Another example is the event "metadataChanged" on a loaded layer, which again 
to me indicates a past/done action (due to the use of "changed"). But again, 
it's emitted before the change actually takes place, and the changed metadata 
isn't available.

If the two events are indeed preload events, their names should instead be 
something like "layerLoading" and "metadataChanging", or even "layerPreLoad" 
and "metadataPreChange".

Is there a guide somewhere to tell how the event system is envisioned, and 
which events are emitted pre-action and which are emitted post-action ?

Or must I (hopefully not) take a deep look into the QGIS source code itself for 
this kind of information ?

In general, pre-action events are of limited use, except when it comes to 
deletions and destructions. For loading and changing stuff, post-action events 
are almost always what you need.



Med venlig hilsen

Lars I. Nielsen, LIFA A/S
GIS-konsulent, FME Certified Professional
Geoinformatik
[Beskrivelse: 
C:\Users\lin\AppData\Roaming\Microsoft\signatures\284x82-3741133837051347070]
T

6313 6800

@

[email protected]

D

6313 6849

W

www.lifa.dk<http://www.lifa.dk>

M

2492 4866

CVR

20937289


[Beskrivelse: 
C:\Users\lin\AppData\Roaming\Microsoft\signatures\21x21-3019966288736195652]<https://www.linkedin.com/company/lifa-a-s/>
Følg os på LinkedIn og læs de seneste nyheder fra LIFA A/S
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to