Salome HOME
merge with master
[tools/sat.git] / data / templates / PythonComponent8 / src / View / GraphicsRectItem.py
diff --git a/data/templates/PythonComponent8/src/View/GraphicsRectItem.py b/data/templates/PythonComponent8/src/View/GraphicsRectItem.py
new file mode 100755 (executable)
index 0000000..9d89516
--- /dev/null
@@ -0,0 +1,15 @@
+from qtsalome import *
+
+class GraphicsRectItem( QGraphicsRectItem ) :
+
+   def __init__( self, x, y, w, h, index ) :
+       QGraphicsRectItem.__init__( self, x, y, w, h )
+       self._index = index
+       self.setFlag( self.ItemIsMovable, True )
+       self.setFlag( self.ItemIsSelectable, True )
+       pass
+
+   def getIndex( self ) :
+       return self._index
+
+pass