La suite pour savoir comment faire un simple plugin dans QGIS avec Python. Le code source est ici: https://github.com/geocot/PluginPythonQGIS
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.