Skip to content
Snippets Groups Projects
Commit bcd7b0aa authored by Marco Biasini's avatar Marco Biasini
Browse files

added support for selection in TrajWidget

parent 0fecfca9
No related branches found
No related tags found
No related merge requests found
......@@ -21,12 +21,13 @@ from PyQt4.QtGui import *
from ost import *
class TrajWidget(QWidget):
def __init__(self, traj=None, render_mode=gfx.SIMPLE, parent=None):
def __init__(self, traj=None, render_mode=gfx.SIMPLE, sel='', parent=None):
QWidget.__init__(self, parent, Qt.Tool)
self.render_mode=render_mode
vb=QVBoxLayout()
hb=QHBoxLayout()
hb2=QHBoxLayout()
self.selection=sel
self.callback=None
self._slider=QSlider(self)
self._slider.setOrientation(Qt.Horizontal)
......@@ -116,7 +117,8 @@ class TrajWidget(QWidget):
self._traj=traj
if self._traj:
ev=traj.GetEntity()
self.gfx_entity=gfx.Entity("mol",self.render_mode, ev)
self.gfx_entity=gfx.Entity("mol",self.render_mode,
ev.Select(self.selection))
gfx.Scene().Add(self.gfx_entity)
gfx.Scene().CenterOn(self.gfx_entity)
# enable the blur effect
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment