I have a vector layer (lines) with a numeric (integer) attribute, let's call it Status
. This layer is styled according to the attribute using a categorized style:
So far, so good. Now I'm trying to figure out a way to get the visibility status (i.e., I click the checkbox on the left) of a feature in this layer using pyqgis. Here's what I have so far:
It's possible to get the individual
QgsRendererCategoryV2
instances by usinglayer.rendererV2().categories()
. This categories, however, don't seem to contain the visibility information, but only the values and colors (or I'm missing something).The individiual symbols (e.g. with
layer.rendererV2().symbols()
) don't help me either.
Ideally I would like a solution like feature.isCurrentlyVisible()
, but I'm prepared to having to look up the attribute in the table myself.
No comments:
Post a Comment