qgis/QGIS — pull request #1347 by m-kuhn (2014-05-12 23:32:45+00:00)
Title: Python snippets can be evaluated to return objects

This commit enables python snippets to return objects which can then be used in C++.

As an example, this can be useful to let the user implement an object that implements a virtual interface and use this from the main application. An example for this idea can be found here: http://nathanw.net/2011/09/05/qgis-tips-custom-feature-forms-with-python-logic/#comment-777590042

In particular, I plan to implement this for python form logic. Instead of disconnecting and reconnecting buttonbox signals and dialog slots, a method like `virtual bool acceptChanges()` can be reimplemented in python.

The code proposed in this PR is highly experimental.

* Only very basic error checking is done
* Ownership is always transferred to C++
* API documentation comments are missing

However, any comment on the idea is appreciated.