On Wed, 2010-08-11 at 12:02 +0200, Benoit de Cabissole wrote: > Hi all, > > Is it possible to change the "scale bar" (horizontal multicolour or grey > bar) displayed below the raster icon in the Legend pane using python? Can > that scale bar have arbitrary dimensions, e.g. grows or retracts like the > legend of a vector layer? > > I'm trying to find a reference to it in the API doc but I do not really know > what to look for: legend, icon, symbology, ...? >
Its managed in two places:
QgsRasterLayer and QgsLegendLayer:
void QgsLegendLayer::rasterLayerSymbology( QgsRasterLayer* layer )
{
SymbologyList itemList;
QPixmap legendpixmap = layer->legendAsPixmap( true ).scaled( 20, 20,
Qt::KeepAspectRatio );
itemList.append( qMakePair( QString(), legendpixmap ) );
changeSymbologySettings( layer, itemList );
}
I dont see any way to tweak this from python api though. Python users
please correct me if I missed something....
Regards
Tim
> Has someone do it before?
>
> Cheers,
> Benoit
>
> _______________________________________________
> Qgis-developer mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
