def __init__(self, refine=True, incremental=True, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.setWindowTitle('Search')
        
        hLayout = QtGui.QHBoxLayout(self)
        hLayout.setMargin(0)
        hLayout.setSpacing(2)
        self.setLayout(hLayout)

        self.searchEdit = QSearchEditBox(incremental, self)
        #TODO: Add separator!
        self.searchEdit.clearEditText()

        if refine:
            self.actionGroup = QtGui.QActionGroup(self)
            self.searchAction = QtGui.QAction('Search', self)
            self.searchAction.setCheckable(True)
            self.actionGroup.addAction(self.searchAction)
            self.refineAction = QtGui.QAction('Refine', self)
            self.refineAction.setCheckable(True)
            self.actionGroup.addAction(self.refineAction)
            self.searchAction.setChecked(True)

            self.searchMenu = QtGui.QMenu()
            self.searchMenu.addAction(self.searchAction)
            self.searchMenu.addAction(self.refineAction)

            self.searchButton = QtGui.QToolButton(self)
            self.searchButton.setIcon(CurrentTheme.QUERY_ARROW_ICON)
            self.searchButton.setAutoRaise(True)
            self.searchButton.setPopupMode(QtGui.QToolButton.InstantPopup)
            self.searchButton.setMenu(self.searchMenu)
            hLayout.addWidget(self.searchButton)
            self.connect(self.searchAction, QtCore.SIGNAL('triggered()'),
                         self.searchMode)
            self.connect(self.refineAction, QtCore.SIGNAL('triggered()'),
                         self.refineMode)
        else:
            self.searchLabel = QtGui.QLabel(self)
            pix = CurrentTheme.QUERY_VIEW_ICON.pixmap(QtCore.QSize(16,16))
            self.searchLabel.setPixmap(pix)
            self.searchLabel.setAlignment(QtCore.Qt.AlignCenter)
            self.searchLabel.setMargin(4)
            hLayout.addWidget(self.searchLabel)
        
        hLayout.addWidget(self.searchEdit)

        self.resetButton = QtGui.QToolButton(self)
        self.resetButton.setIcon(QtGui.QIcon(
                self.style().standardPixmap(QtGui.QStyle.SP_DialogCloseButton)))
        self.resetButton.setIconSize(QtCore.QSize(12,12))
        self.resetButton.setAutoRaise(True)
        self.resetButton.setEnabled(False)
        hLayout.addWidget(self.resetButton)
        self.manualResetEnabled = False

        self.connect(self.resetButton, QtCore.SIGNAL('clicked()'),
                     self.resetSearch)
        self.connect(self.searchEdit, QtCore.SIGNAL('activated(int)'),
                     self.executeSearch)
        self.connect(self.searchEdit, QtCore.SIGNAL('resetText'),
                     self.resetSearch)
        self.connect(self.searchEdit, QtCore.SIGNAL('executeSearch(QString)'),
                     self.executeTextSearch)
        if incremental:
            self.connect(self.searchEdit, 
                         QtCore.SIGNAL('editTextChanged(QString)'),
                         self.executeIncrementalSearch)
        else:
            self.connect(self.searchEdit,
                         QtCore.SIGNAL('editTextChanged(QString)'),
                         self.resetToggle)
QSearchBox(parent: QWidget) -> QSearchBox
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/gui/common_widgets.py/QSearchBox.__init__