On 12 August 2014 01:25, Matthias Kuhn <[email protected]> wrote: > While working on this, I stumbled upon the class QgsMapLayerAction which > I am having a hard time to understand the purpose of. > > Some comments in qgsdualview.cpp suggest that it is related to user > defined actions vs standard actions [1]. I wondered also if it is > related to vector layer vs raster layer (as QgsMapLayer is a common base > class of the two and QgsMapLayerAction therefore might be interpreted as > "also valid for raster layers").
I can help you out here - QgsMapLayerActions are built-in c++ actions, or actions which are defined by a python plugin. Unlike the standard vector layer actions, these are not editable by users, and are not listed in the vector layer properties dialog. As far as I'm aware, there's only a single implementation currently in QGIS: https://github.com/qgis/QGIS/blob/master/src/app/composer/qgscomposer.cpp#L3566 This action allows users to jump directly to a specific atlas feature, and is only shown for vector layers which are set as the coverage layer for a composition. There's also some useful sample python code on how these actions can be used here: http://gis.stackexchange.com/a/94665/28443 Nyall _______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
