#NEWLINE# def paint( self , painter , option , widget ) : #NEWLINE# #INDENT# painter . setPen ( QtCore . Qt . NoPen ) #NEWLINE# painter . setBrush ( QtGui . QColor ( QtCore . Qt . darkGray ) . light ( 25 ) ) #NEWLINE# painter . drawRect ( ( - 9 ) , ( - 9 ) , 15 , 15 ) #NEWLINE# gradient = QtGui . QRadialGradient ( ( - 3 ) , ( - 3 ) , 10 ) #NEWLINE# color = QtGui . QColor ( QtCore . Qt . yellow ) #NEWLINE# if ( option . state & QtGui . QStyle . State_Sunken ) : #NEWLINE# #INDENT# gradient . setCenter ( 3 , 3 ) #NEWLINE# gradient . setFocalPoint ( 3 , 3 ) #NEWLINE# gradient . setColorAt ( 1 , color . light ( 100 ) ) #NEWLINE# gradient . setColorAt ( 0 , color . light ( 30 ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# gradient . setColorAt ( 0 , color . light ( 85 ) ) #NEWLINE# gradient . setColorAt ( 1 , color . light ( 25 ) ) #NEWLINE# #UNINDENT# painter . setBrush ( QtGui . QBrush ( gradient ) ) #NEWLINE# painter . setPen ( QtGui . QPen ( QtCore . Qt . black , 0 ) ) #NEWLINE# painter . drawRect ( ( - 10 ) , ( - 10 ) , 15 , 15 ) #NEWLINE# text_rect = self . boundingRect ( ) #NEWLINE# message = str ( self . id ) #NEWLINE# font = painter . font ( ) #NEWLINE# font . setBold ( True ) #NEWLINE# painter . setFont ( font ) #NEWLINE# painter . setPen ( QtCore . Qt . gray ) #NEWLINE# painter . drawText ( text_rect . translated ( 0.1 , 0.1 ) , message ) #NEWLINE# painter . setPen ( QtGui . QColor ( QtCore . Qt . gray ) . light ( 130 ) ) #NEWLINE# painter . drawText ( text_rect . translated ( 0 , 0 ) , message )