rough adaptation of the plugin to sip API 2.0. Tested it's not enough to work with QGIS 2.0