<s> from pyface . tasks . i_task_pane import ITaskPane , MTaskPane <EOL> from traits . api import provides <EOL> from pyface . qt import QtGui <EOL> from . util import set_focus <EOL> @ provides ( ITaskPane ) <EOL> class TaskPane ( MTaskPane ) : <EOL> """<STR_LIT>""" <EOL> def create ( self , parent ) : <EOL> """<STR_LIT>""" <EOL> self . control = QtGui . QWidget ( parent ) <EOL> def destroy ( self ) : <EOL> """<STR_LIT>""" <EOL> if self . control is not None : <EOL> self . control . hide ( ) <EOL> self . control . setParent ( None ) <EOL> self . control = None <EOL> def set_focus ( self ) : <EOL> """<STR_LIT>""" <EOL> if self . control is not None : <EOL> set_focus ( self . control ) </s>
