23 from PyQt4
import QtGui
26 VISIBLE_ATTRIBUTE_NAME =
"Visible"
27 FLAGS_ATTRIBUTE_NAME =
"Flags"
29 def __init__(self, selection, flags, visible=False):
35 return "Visible: %s"%str(self.
IsVisible())
56 if (entity
is not None)
and isinstance(entity,
gfx.Entity):
60 group.SetAttribute(VisibilityOp.VISIBLE_ATTRIBUTE_NAME, str(int(self.
IsVisible())))
61 group.SetAttribute(VisibilityOp.FLAGS_ATTRIBUTE_NAME, str(self.
GetSelectionFlags()))
67 if group.HasAttribute(VisibilityOp.VISIBLE_ATTRIBUTE_NAME):
68 visible = bool(int(group.GetAttribute(VisibilityOp.VISIBLE_ATTRIBUTE_NAME)))
70 if group.HasAttribute(VisibilityOp.FLAGS_ATTRIBUTE_NAME):
71 flags = int(group.GetAttribute(VisibilityOp.FLAGS_ATTRIBUTE_NAME))
72 selection = group.GetTextData()
graphical rendering of mol::EntityHandle entites