#NEWLINE# def build_gui( self , container ) : #NEWLINE# #INDENT# if ( not has_webkit ) : #NEWLINE# #INDENT# self . browser = QtGui . QLabel ( 'Please install the python-webkit package to enable this plugin' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . browser = QWebView ( ) #NEWLINE# #UNINDENT# sw = QtGui . QScrollArea ( ) #NEWLINE# sw . setWidgetResizable ( True ) #NEWLINE# sw . setWidget ( self . browser ) #NEWLINE# cw = container . get_widget ( ) #NEWLINE# cw . layout ( ) . addWidget ( sw , stretch = 1 ) #NEWLINE# sw . show ( ) #NEWLINE# self . entry = QtGui . QLineEdit ( ) #NEWLINE# cw . layout ( ) . addWidget ( layout . entry , stretch = 0 ) #NEWLINE# self . entry . returnPressed . connect ( self . browse_cb ) #NEWLINE# btns = QtHelp . HBox ( ) #NEWLINE# layout = btns . layout ( ) #NEWLINE# layout . setSpacing ( 3 ) #NEWLINE# btn = QtGui . QPushButton ( 'Close' ) #NEWLINE# btn . clicked . connect ( self . close ) #NEWLINE# layout . addWidget ( btn , stretch = 0 , alignment = QtCore . Qt . AlignLeft ) #NEWLINE# cw . layout ( ) . addWidget ( btns , stretch = 0 , alignment = QtCore . Qt . AlignLeft ) #NEWLINE# if has_webkit : #NEWLINE# #INDENT# helpfile = os . path . abspath ( os . path . join ( packageHome , 'doc' , 'help.html' ) ) #NEWLINE# helpurl = ( 'file://%s' % helpfile ) #NEWLINE# self . browse ( helpurl )