qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.62k stars 3.01k forks source link

Make QgsAppScreenshot class accessible in Python #30327

Open DelazJ opened 5 years ago

DelazJ commented 5 years ago

When the automatic appscreenshot feature is operational (see #30326), it would be nice to have it accessible though Python, allowing the community to extend its features. Quoting @SrNetoChan from an earlier discussion with much more in it.

Making the screenshot mechanism part of the API (and exposed to python) would be great. We could then create a Python plugin or a script to help us manage the screenshots creation based on screenshots "recipes". These recipes, being outside the QGIS code, could be managed by the documentation team directly, which could add, tweak, and update them according to our Documentation needs.

Also, now that in docs we can directly link features to pyqgis classes and methods, this will bring more visibility to this feature we need for docs update. Currently we'd need to rely on a movable code line in github.

ThomasG77 commented 3 years ago

You may use the recipe using pyscreenshot I've posted at https://gis.stackexchange.com/a/392667/638 to do what you want. Native solution with PyQGIS would be better but at least not stuck.