#NEWLINE# def __init__( self , text = '' , image = None , hasFrame = True , highlightOnOver = True , parenting = None ) : #NEWLINE# #INDENT# GafferUI . Widget . __init__ ( parenting , QtGui . QPushButton ( ) , parenting = parenting ) #NEWLINE# self . _qtWidget ( ) . setAttribute ( QtCore . Qt . WA_LayoutUsesWidgetRect ) #NEWLINE# self . _qtWidget ( ) . setAutoDefault ( True ) #NEWLINE# self . setText ( text ) #NEWLINE# self . setImage ( image ) #NEWLINE# self . setHasFrame ( hasFrame ) #NEWLINE# self . _qtWidget ( ) . clicked . connect ( Gaffer . WeakMethod ( self . __clicked ) ) #NEWLINE# self . __clickedSignal = GafferUI . WidgetSignal ( ) #NEWLINE# if ( Button . __palette is None ) : #NEWLINE# #INDENT# Button . __palette = QtGui . QPalette ( QtGui . QApplication . instance ( ) . palette ( ) ) #NEWLINE# Button . __palette . setColor ( QtGui . QPalette . Disabled , QtGui . QPalette . Light , QtGui . QColor ( 0 , 0 , 0 , 0 ) ) #NEWLINE# #UNINDENT# self . _qtWidget ( ) . setPalette ( Button . __palette ) #NEWLINE# if highlightOnOver : #NEWLINE# #INDENT# self . __enterConnection = self . enterSignal ( ) . connect ( Gaffer . WeakMethod ( self . __enter ) ) #NEWLINE# self . __leaveConnection = self . leaveSignal ( ) . connect ( Gaffer . WeakMethod ( self . __leave ) )