#NEWLINE# def build_widget( self ) : #NEWLINE# #INDENT# layout = QtGui . QVBoxLayout ( ) #NEWLINE# layout . setMargin ( 0 ) #NEWLINE# layout . setSpacing ( 0 ) #NEWLINE# self . query_controller = QueryController ( self ) #NEWLINE# self . vt_controller = VistrailController ( auto_save = False ) #NEWLINE# self . p_controller = VistrailController ( Vistrail ( ) , auto_save = False ) #NEWLINE# self . connect ( self . p_controller , QtCore . SIGNAL ( 'vistrailChanged()' ) , self . vistrailChanged ) #NEWLINE# self . query_box = QQueryBox ( ) #NEWLINE# self . query_box . set_controller ( self . query_controller ) #NEWLINE# layout . addWidget ( self . query_box ) #NEWLINE# self . stacked_widget = QtGui . QStackedWidget ( ) #NEWLINE# self . pipeline_view = QQueryPipelineView ( ) #NEWLINE# self . p_controller . current_pipeline_view = self . pipeline_view #NEWLINE# self . pipeline_view . set_controller ( self . p_controller ) #NEWLINE# self . pipeline_view . set_query_controller ( layout . query_controller ) #NEWLINE# QQueryView . VISUAL_SEARCH_VIEW = self . stacked_widget . addWidget ( self . pipeline_view ) #NEWLINE# self . global_result_view = QQueryResultGlobalView ( ) #NEWLINE# QQueryView . GLOBAL_RESULT_VIEW = self . stacked_widget . addWidget ( self . global_result_view ) #NEWLINE# self . version_result_view = QQueryResultVersionView ( ) #NEWLINE# self . connect ( self . version_result_view . scene ( ) , QtCore . SIGNAL ( 'versionSelected(int,bool,bool,bool,bool)' ) , self . result_version_selected ) #NEWLINE# QQueryView . VERSION_RESULT_VIEW = self . stacked_widget . addWidget ( self . version_result_view ) #NEWLINE# self . workflow_result_view = QQueryResultWorkflowView ( ) #NEWLINE# QQueryView . WORKFLOW_RESULT_VIEW = self . stacked_widget . addWidget ( self . workflow_result_view ) #NEWLINE# self . stacked_widget . setCurrentWidget ( self . pipeline_view ) #NEWLINE# layout . addWidget ( self . stacked_widget ) #NEWLINE# self . setLayout ( layout ) #NEWLINE# self . current_display = QQueryView . VISUAL_SEARCH_VIEW #NEWLINE# self . current_result_view = QQueryView . VERSION_RESULT_VIEW