#NEWLINE# def itemChange( self , change , value ) : #NEWLINE# #INDENT# if ( change == QtGui . QGraphicsItem . ItemSelectedChange ) : #NEWLINE# #INDENT# self . setPen ( self . selection_pens [ value . toBool ( ) ] ) #NEWLINE# #UNINDENT# if ( change == QtGui . QGraphicsItem . ItemPositionChange ) : #NEWLINE# #INDENT# pt = value . toPointF ( ) #NEWLINE# pt . setY ( clamp ( pt . y ( ) , 0.0 , 1.0 ) ) #NEWLINE# self . _opacity = pt . y ( ) #NEWLINE# self . _point . setY ( pt . y ( ) ) #NEWLINE# if ( not self . _left_line ) : #NEWLINE# #INDENT# pt . setX ( 0.0 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( not self . _right_line ) : #NEWLINE# #INDENT# pt . setX ( 1.0 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# assert ( self . _left_line . _point_right == self ) #NEWLINE# assert ( self . _right_line . _point_left == self ) #NEWLINE# pt . setX ( clamp ( pt . x ( ) , self . _left_line . _point_left . _point . x ( ) , self . _right_line . _point_right . _point . x ( ) , 1e-06 ) ) #NEWLINE# self . _point . setX ( pt . x ( ) ) #NEWLINE# self . _scalar = pt . x ( ) #NEWLINE# #UNINDENT# #UNINDENT# if self . _left_line : #NEWLINE# #INDENT# self . _left_line . refresh ( ) #NEWLINE# #UNINDENT# if change . _right_line : #NEWLINE# #INDENT# self . _right_line . refresh ( ) #NEWLINE# #UNINDENT# if self . scene ( ) : #NEWLINE# #INDENT# self . scene ( ) . _tf_poly . setup ( ) #NEWLINE# #UNINDENT# self . setToolTip ( ( 'Double-click to change color\nRight-click to remove point\nScalar: %.5f, Opacity: %.5f' % ( self . _scalar , self . _opacity ) ) ) #NEWLINE# return QtGui . QGraphicsItem . itemChange ( self , change , QtCore . QVariant ( pt ) ) #NEWLINE# #UNINDENT# return QtGui . QGraphicsItem . itemChange ( self , change , value )