Hi Tom
On Thu, Aug 18, 2016 at 7:48 PM, Tom Chadwin <[email protected]> wrote:
> For plot, see title. How do I find out whether a canvas has a scale bar,
> enabled by the user via View > Decorations > Scale Bar > Enable scale bar?
> I've done my usual ineffective search through the API docs, and can't find
> it.
Your search through API docs was effective, there indeed isn't a
dedicated API call for that :-) The information is stored within
project properties and you can read the enabled state like this:
QgsProject.instance().readBoolEntry("ScaleBar", "/Enabled", False)
This will return a tuple (is_enabled, success) where the first value
is the value you are looking for, the second one just tells whether
the reading of the project property was successful.
Hope that helps!
Cheers
Martin
_______________________________________________
Qgis-developer mailing list
[email protected]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer