#NEWLINE# def __init__( self , connectionList ) : #NEWLINE# #INDENT# QtGui . QSplitter . __init__ ( self ) #NEWLINE# self . connectionList = connectionList #NEWLINE# self . conn = None #NEWLINE# self . config = None #NEWLINE# self . offset = 0 #NEWLINE# self . limit = 50 #NEWLINE# self . numRows = None #NEWLINE# self . vistrail = None #NEWLINE# self . version = None #NEWLINE# self . fromTime = None #NEWLINE# self . toTime = None #NEWLINE# self . user = None #NEWLINE# self . thumbs = None #NEWLINE# self . completed = None #NEWLINE# self . modules = [ ] #NEWLINE# self . setOrientation ( QtCore . Qt . Vertical ) #NEWLINE# self . searchLayout = QtGui . QGridLayout ( ) #NEWLINE# self . vistrailEditCheckBox = QtGui . QCheckBox ( ) #NEWLINE# self . vistrailEditCheckBox . setToolTip ( 'Check to enable this search option' ) #NEWLINE# self . vistrailEdit = QtGui . QLineEdit ( ) #NEWLINE# self . searchLayout . addWidget ( self . vistrailEditCheckBox , 0 , 0 ) #NEWLINE# self . searchLayout . addWidget ( QtGui . QLabel ( 'Vistrail:' ) , 0 , 1 ) #NEWLINE# self . searchLayout . addWidget ( self . vistrailEdit , 0 , 2 ) #NEWLINE# self . versionEditCheckBox = QtGui . QCheckBox ( ) #NEWLINE# self . versionEditCheckBox . setToolTip ( 'Check to enable this search option' ) #NEWLINE# self . versionEdit = QtGui . QLineEdit ( ) #NEWLINE# self . searchLayout . addWidget ( self . versionEditCheckBox , 0 , 3 ) #NEWLINE# self . searchLayout . addWidget ( QtGui . QLabel ( 'Version:' ) , 0 , 4 ) #NEWLINE# self . searchLayout . addWidget ( self . versionEdit , 0 , 5 ) #NEWLINE# self . fromTimeEditCheckBox = QtGui . QCheckBox ( ) #NEWLINE# self . fromTimeEditCheckBox . setToolTip ( 'Check to enable this search option' ) #NEWLINE# self . fromTimeEdit = QtGui . QDateTimeEdit ( QtCore . QDateTime . currentDateTime ( ) . addDays ( ( - 1 ) ) ) #NEWLINE# self . fromTimeEdit . setDisplayFormat ( 'yyyy-MM-d H:mm:ss' ) #NEWLINE# self . fromTimeEdit . setCalendarPopup ( True ) #NEWLINE# self . searchLayout . addWidget ( self . fromTimeEditCheckBox , 1 , 0 ) #NEWLINE# self . searchLayout . addWidget ( QtGui . QLabel ( 'From time:' ) , 1 , 1 ) #NEWLINE# self . searchLayout . addWidget ( self . fromTimeEdit , 1 , 2 ) #NEWLINE# self . toTimeEditCheckBox = QtGui . QCheckBox ( ) #NEWLINE# self . toTimeEditCheckBox . setToolTip ( 'Check to enable this search option' ) #NEWLINE# self . toTimeEdit = QtGui . QDateTimeEdit ( QtCore . QDateTime . currentDateTime ( ) ) #NEWLINE# self . toTimeEdit . setDisplayFormat ( 'yyyy-MM-d H:mm:ss' ) #NEWLINE# self . toTimeEdit . setCalendarPopup ( True ) #NEWLINE# self . searchLayout . addWidget ( self . toTimeEditCheckBox , 1 , 3 ) #NEWLINE# self . searchLayout . addWidget ( QtGui . QLabel ( 'To time:' ) , 1 , 4 ) #NEWLINE# self . searchLayout . addWidget ( self . toTimeEdit , 1 , 5 ) #NEWLINE# self . userEditCheckBox = QtGui . QCheckBox ( ) #NEWLINE# self . userEditCheckBox . setToolTip ( 'Check to enable this search option' ) #NEWLINE# self . userEdit = QtGui . QLineEdit ( ) #NEWLINE# self . searchLayout . addWidget ( self . userEditCheckBox , 2 , 0 ) #NEWLINE# self . searchLayout . addWidget ( QtGui . QLabel ( 'User:' ) , 2 , 1 ) #NEWLINE# self . searchLayout . addWidget ( self . userEdit , 2 , 2 ) #NEWLINE# self . completedEditCheckBox = QtGui . QCheckBox ( ) #NEWLINE# self . completedEditCheckBox . setToolTip ( 'Check to enable this search option' ) #NEWLINE# self . completedEdit = QtGui . QComboBox ( ) #NEWLINE# self . completedEdit . addItems ( [ 'Yes' , 'No' , 'Error' ] ) #NEWLINE# self . searchLayout . addWidget ( self . completedEditCheckBox , 2 , 3 ) #NEWLINE# self . searchLayout . addWidget ( QtGui . QLabel ( 'Completed:' ) , 2 , 4 ) #NEWLINE# self . searchLayout . addWidget ( connectionList . completedEdit , 2 , 5 ) #NEWLINE# self . moduleEditCheckBox = QtGui . QCheckBox ( ) #NEWLINE# self . moduleEditCheckBox . setToolTip ( 'Check to enable this search option' ) #NEWLINE# self . moduleEdit = QtGui . QLineEdit ( ) #NEWLINE# self . moduleEdit . setToolTip ( 'Add module names separated by ,\nResult type can be specified by using: ModuleName:Yes/No/Error' ) #NEWLINE# self . searchLayout . addWidget ( self . moduleEditCheckBox , 3 , 0 ) #NEWLINE# self . searchLayout . addWidget ( QtGui . QLabel ( 'Modules:' ) , 3 , 1 ) #NEWLINE# self . searchLayout . addWidget ( self . moduleEdit , 3 , 2 ) #NEWLINE# self . thumbsCheckBox = QtGui . QCheckBox ( ) #NEWLINE# self . thumbsCheckBox . setToolTip ( 'Check to view result thumbnails (may be slow)' ) #NEWLINE# self . searchLayout . addWidget ( self . thumbsCheckBox , 3 , 3 ) #NEWLINE# self . searchLayout . addWidget ( QtGui . QLabel ( 'View thumbs' ) , 3 , 4 ) #NEWLINE# self . searchButton = QtGui . QPushButton ( 'Search' ) #NEWLINE# self . searchButton . setStatusTip ( 'Search the database for executions' ) #NEWLINE# self . searchLayout . addWidget ( self . searchButton , 3 , 5 ) #NEWLINE# self . searchWidget = QtGui . QWidget ( ) #NEWLINE# self . searchWidget . setLayout ( self . searchLayout ) #NEWLINE# self . addWidget ( self . searchWidget ) #NEWLINE# self . itemView = QtGui . QTreeWidget ( self . parent ( ) ) #NEWLINE# self . addWidget ( self . itemView ) #NEWLINE# statusGrid = QtGui . QGridLayout ( ) #NEWLINE# statusGrid . setMargin ( 0 ) #NEWLINE# statusGrid . setSpacing ( 0 ) #NEWLINE# statusWidget = QtGui . QWidget ( ) #NEWLINE# statusWidget . setLayout ( statusGrid ) #NEWLINE# self . addWidget ( statusWidget ) #NEWLINE# self . setStretchFactor ( 0 , 0 ) #NEWLINE# self . setStretchFactor ( 1 , 1 ) #NEWLINE# self . setStretchFactor ( 2 , 0 ) #NEWLINE# statusLayout = QtGui . QHBoxLayout ( ) #NEWLINE# statusLayout . setSpacing ( 5 ) #NEWLINE# statusGrid . addLayout ( statusLayout , 2 , 1 , QtCore . Qt . AlignLeft ) #NEWLINE# self . prevButton = QtGui . QPushButton ( 'Previous' ) #NEWLINE# self . prevButton . setStatusTip ( 'Show previous results' ) #NEWLINE# self . prevButton . hide ( ) #NEWLINE# statusLayout . addWidget ( self . prevButton ) #NEWLINE# self . nextButton = QtGui . QPushButton ( 'Next' ) #NEWLINE# self . nextButton . setStatusTip ( 'Show next results' ) #NEWLINE# self . nextButton . hide ( ) #NEWLINE# statusLayout . addWidget ( self . nextButton ) #NEWLINE# self . statusText = QtGui . QLabel ( 'No query specified' ) #NEWLINE# statusLayout . addWidget ( self . statusText ) #NEWLINE# self . connect ( self . searchButton , QtCore . SIGNAL ( 'clicked()' ) , self . newQuery ) #NEWLINE# self . connect ( self . prevButton , QtCore . SIGNAL ( 'clicked()' ) , self . gotoPrevious ) #NEWLINE# self . connect ( self . nextButton , QtCore . SIGNAL ( 'clicked()' ) , self . gotoNext ) #NEWLINE# self . connect ( self . itemView , QtCore . SIGNAL ( 'itemDoubleClicked(QTreeWidgetItem *,int)' ) , self . showItem )