#NEWLINE# def __init__( self , parent = None ) : #NEWLINE# #INDENT# QtGui . QWidget . __init__ ( self , parent ) #NEWLINE# self . layout = QtGui . QVBoxLayout ( ) #NEWLINE# self . layout . setContentsMargins ( 0 , 0 , 0 , 0 ) #NEWLINE# self . splitter = QtGui . QSplitter ( ) #NEWLINE# self . splitter . setContentsMargins ( 0 , 0 , 0 , 0 ) #NEWLINE# self . layout . addWidget ( self . splitter ) #NEWLINE# self . connectionList = QDBConnectionList ( self ) #NEWLINE# dbGrid = QtGui . QGridLayout ( self ) #NEWLINE# dbGrid . setMargin ( 0 ) #NEWLINE# dbGrid . setSpacing ( 0 ) #NEWLINE# dbGrid . addWidget ( self . connectionList , 2 , 1 , QtCore . Qt . AlignLeft ) #NEWLINE# self . addAct = QtGui . QAction ( 'Add Database' , self ) #NEWLINE# self . removeAct = QtGui . QAction ( 'Remove Database' , self ) #NEWLINE# self . addButton = QtGui . QToolButton ( ) #NEWLINE# self . addButton . setToolTip ( 'Create a new database connection' ) #NEWLINE# self . addButton . setDefaultAction ( self . addAct ) #NEWLINE# self . addButton . setAutoRaise ( True ) #NEWLINE# self . removeButton = QtGui . QToolButton ( ) #NEWLINE# self . removeButton . setToolTip ( 'Remove the selected connection from list' ) #NEWLINE# self . removeButton . setDefaultAction ( self . removeAct ) #NEWLINE# self . removeButton . setAutoRaise ( True ) #NEWLINE# self . removeButton . setEnabled ( False ) #NEWLINE# panelButtonsLayout = QtGui . QHBoxLayout ( ) #NEWLINE# panelButtonsLayout . setMargin ( 0 ) #NEWLINE# panelButtonsLayout . setSpacing ( 0 ) #NEWLINE# panelButtonsLayout . addWidget ( self . addButton ) #NEWLINE# panelButtonsLayout . addWidget ( self . removeButton ) #NEWLINE# dbGrid . addLayout ( panelButtonsLayout , 1 , 1 , QtCore . Qt . AlignLeft ) #NEWLINE# dbWidget = QDBWidget ( parent , self . connectionList ) #NEWLINE# dbWidget . setLayout ( dbGrid ) #NEWLINE# self . splitter . addWidget ( dbWidget ) #NEWLINE# self . connect ( self . addAct , QtCore . SIGNAL ( 'triggered()' ) , self . showConnConfig ) #NEWLINE# self . connect ( self . removeAct , QtCore . SIGNAL ( 'triggered()' ) , self . connectionList . removeConnection ) #NEWLINE# self . connect ( self . connectionList , QtCore . SIGNAL ( 'itemSelectionChanged()' ) , self . updateEditButtons ) #NEWLINE# self . connect ( self . connectionList , QtCore . SIGNAL ( 'itemSelectionChanged()' ) , self . checkConnection ) #NEWLINE# self . tabView = QtGui . QTabWidget ( ) #NEWLINE# self . tabView . setContentsMargins ( 0 , 0 , 0 , 0 ) #NEWLINE# self . splitter . addWidget ( self . tabView ) #NEWLINE# self . executionSearch = ExecutionSearchWidget ( self . connectionList ) #NEWLINE# self . tabView . addTab ( self . executionSearch , 'Search for Workflow Executions' ) #NEWLINE# self . setLayout ( self . layout ) #NEWLINE# self . setWindowTitle ( 'Provenance Browser' ) #NEWLINE# self . resize ( QtCore . QSize ( 800 , 600 ) ) #NEWLINE# self . executionSearch . setup_results ( )