#NEWLINE# def mouseDoubleClickEvent( self , event ) : #NEWLINE# #INDENT# p = event . scenePos ( ) #NEWLINE# c_left = self . _point_left . _color #NEWLINE# c_right = self . _point_right . _color #NEWLINE# u = ( ( p . x ( ) - self . _point_left . _point . x ( ) ) / ( self . _point_right . _point . x ( ) - self . _point_left . _point . x ( ) ) ) #NEWLINE# new_c = ( ( ( u * c_right . redF ( ) ) + ( ( 1 - u ) * c_left . redF ( ) ) ) , ( ( u * c_right . greenF ( ) ) + ( ( 1 - u ) * c_left . greenF ( ) ) ) , ( ( u * c_right . blueF ( ) ) + ( ( 1 - u ) * c_left . blueF ( ) ) ) ) #NEWLINE# new_point = TransferFunctionPoint ( p . x ( ) , p . y ( ) , new_c ) #NEWLINE# new_line = TransferFunctionLine ( new_point , self . _point_right ) #NEWLINE# new_point . _left_line = self #NEWLINE# self . _point_right = new_point #NEWLINE# self . scene ( ) . addItem ( new_line ) #NEWLINE# self . scene ( ) . addItem ( new_point ) #NEWLINE# new_line . update_scale ( self . _point_left . _sx , self . _point_left . _sy ) #NEWLINE# new_point . update_scale ( self . _point_left . _sx , self . _point_left . _sy ) #NEWLINE# new_point . refresh ( ) #NEWLINE# self . refresh ( )