Text this: PyQGIS programmer's guide : extending QGIS 2.x with Python / Gary Sherman.