My question is somehow related to the problem of finding the id of the last added feature: I am looking for a way to supply the feature id and another attribute of each added feature through a signal. The user can change many layers, but only in case of changing a special layer this signal should be emitted/evaluated.
The solution to the question mentioned above is to connect to the
featureAdded signal of the layer being edited.
Instead of editing layers I am going to add features to the
dataProvider. In this case the signal is not emitted through the layer.
I see three ideas to prove:
Adding an appropriate signal to dataProvider objects (my preferred solution)
featureAddedsignal to include feature id and the other attribute (second best solution), and fire it manually.
Define an application specific signal and emit this whenever a feature is added to any provider (the easiest way, but filtering signals by this special layer is required)
In all cases one question is: how can I get the feature id of the feature being added to a dataProvider? According to the first and second idea: is it possible to extend the contents of a signal, or to bind one more signal to mapLayer/dataProvider objects?