def __init__(self, filter_path, type_list, menu=None,
                 title='Filter', parent=None):
        QDockWidget.__init__(self, title, parent)
        self.setupUi()

        self.filter_path = filter_path
        self.menuFilter = menu
        self.filter_managers = {}
        self.type_list = type_list

        self.reload_filters(filter_path)

        self.filterTreeWidget.dragMoveEvent = self._filter_drag_move
        self.filterTreeWidget.dropEvent = self._filter_drag_end
        self.filterTreeWidget.keyReleaseEvent = self._filter_key_released
        self.filterTreeWidget.mouseReleaseEvent = \
            self._filter_mouse_released
        self.filterTreeWidget.setItemDelegate(
            CheckableItemDelegate(self.filterTreeWidget))
        self.filterTreeWidget.currentItemChanged.connect(
            self._current_filter_changed)
        self.filterTreeWidget.customContextMenuRequested.connect(
            self._context_menu)
Create a new filter dock.
dataset/ETHPy150Open rproepp/spykeviewer/spykeviewer/ui/filter_dock.py/FilterDock.__init__