#NEWLINE# def build_widget( self ) : #NEWLINE# #INDENT# layout = QtGui . QVBoxLayout ( ) #NEWLINE# layout . setMargin ( 4 ) #NEWLINE# layout . setSpacing ( 2 ) #NEWLINE# self . searchBox = QSearchBox ( True , False , self ) #NEWLINE# layout . addWidget ( self . searchBox ) #NEWLINE# options_layout = QtGui . QHBoxLayout ( ) #NEWLINE# options_layout . setSpacing ( 5 ) #NEWLINE# options_layout . setAlignment ( QtCore . Qt . AlignLeft ) #NEWLINE# options_layout . addWidget ( QtGui . QLabel ( 'Search:' ) ) #NEWLINE# searchAll = QtGui . QRadioButton ( 'Open Vistrails' ) #NEWLINE# searchCurrent = QtGui . QRadioButton ( 'Current Vistrail' ) #NEWLINE# searchWorkflow = QtGui . QRadioButton ( 'Current Workflow' ) #NEWLINE# useRegex = QtGui . QCheckBox ( 'Regular expression' ) #NEWLINE# self . level_group = QtGui . QButtonGroup ( ) #NEWLINE# self . level_group . addButton ( searchAll ) #NEWLINE# self . level_group . addButton ( searchCurrent ) #NEWLINE# self . level_group . addButton ( searchWorkflow ) #NEWLINE# self . level_map = Bidict ( [ ( QueryController . LEVEL_ALL , searchAll ) , ( QueryController . LEVEL_VISTRAIL , searchCurrent ) , ( QueryController . LEVEL_WORKFLOW , searchWorkflow ) ] ) #NEWLINE# options_layout . addWidget ( searchAll ) #NEWLINE# options_layout . addWidget ( searchCurrent ) #NEWLINE# options_layout . addWidget ( searchWorkflow ) #NEWLINE# options_layout . addWidget ( useRegex ) #NEWLINE# searchCurrent . setChecked ( True ) #NEWLINE# self . editButton = QtGui . QPushButton ( 'Edit' ) #NEWLINE# self . editButton . setEnabled ( False ) #NEWLINE# self . backButton = QtGui . QPushButton ( 'Back to Search' ) #NEWLINE# self . backButton . setEnabled ( False ) #NEWLINE# options_layout . addStretch ( 1 ) #NEWLINE# options_layout . addWidget ( self . editButton , 0 , QtCore . Qt . AlignRight ) #NEWLINE# options_layout . addWidget ( self . backButton , 0 , QtCore . Qt . AlignRight ) #NEWLINE# layout . addLayout ( options_layout ) #NEWLINE# self . setLayout ( layout ) #NEWLINE# self . connect ( self . searchBox , QtCore . SIGNAL ( 'resetSearch()' ) , self . resetSearch ) #NEWLINE# self . connect ( self . searchBox , QtCore . SIGNAL ( 'executeSearch(QString)' ) , self . executeSearch ) #NEWLINE# self . connect ( self . searchBox , QtCore . SIGNAL ( 'refineMode(bool)' ) , self . refineMode ) #NEWLINE# self . connect ( self . backButton , QtCore . SIGNAL ( 'clicked()' ) , self . backToSearch ) #NEWLINE# self . connect ( self . editButton , QtCore . SIGNAL ( 'clicked()' ) , self . doEdit ) #NEWLINE# self . connect ( self . level_group , QtCore . SIGNAL ( 'buttonClicked(QAbstractButton*)' ) , self . levelChanged ) #NEWLINE# self . connect ( useRegex , QtCore . SIGNAL ( 'stateChanged(int)' ) , self . useRegexChanged )