# Path: flexlay/util/signal.py
# class Signal:
#     def __init__(self):
#         self.subscribers = []
# 
#     def connect(self, callback, ignore_repeats=True):
#         if not ignore_repeats and callback in self.subscribers:
#             return
#         self.subscribers.append(callback)
# 
#     def disconnect(self, callback):
#         self.subscribers.remove(callback)
# 
#     def clear(self):
#         self.subscribers = []
# 
#     def __call__(self, *args):
#         for sub in self.subscribers:
#             sub(*args)


from PyQt5.QtCore import Qt
from PyQt5.QtGui import QIcon, QStandardItem
from PyQt5.QtWidgets import (
    QFileSystemModel,
    QFormLayout,
    QLabel,
    QMenu,
    QToolBar,
    QTreeView,
    QVBoxLayout,
    QWidget,
)
from flexlay.util import Signal

        self.tree_view = QTreeView()
        self.vbox.addWidget(self.toolbar)
        self.model = QFileSystemModel()
        # self.data = [
        #      ("SuperTux addon", [
        #          ("levels", []),
        #          ("images", []),
        #          ("sounds", []),
        #          ("music", []),
        #          ("scripts", []),
        #          ("metadata", [])
        #      ])]
        # self.model = QStandardItemModel()
        # self.add_items(self.model, self.data)
        self.tree_view.setModel(self.model)
        self.tree_view.doubleClicked.connect(self.on_tree_view_double_click)
        self.tree_view.setContextMenuPolicy(Qt.CustomContextMenu)
        self.tree_view.customContextMenuRequested.connect(self.on_context_menu)
        self.vbox.addWidget(self.tree_view)

        self.layout = QFormLayout()
        self.vbox.addLayout(self.layout)

        self.setLayout(self.vbox)
        self.setMinimumWidth(300)

        # Called in many cases. This should have functions connected
        # which cause the changes in the widget to be applied
        # Called by hitting "Apply", "Ok" or "Finish"

# Path: flexlay/util/signal.py
# class Signal:
#     def __init__(self):
#         self.subscribers = []
# 
#     def connect(self, callback, ignore_repeats=True):
#         if not ignore_repeats and callback in self.subscribers:
#             return
#         self.subscribers.append(callback)
# 
#     def disconnect(self, callback):
#         self.subscribers.remove(callback)
# 
#     def clear(self):
#         self.subscribers = []
# 
#     def __call__(self, *args):
#         for sub in self.subscribers:
#             sub(*args)


# Path: flexlay/gui/project_widget.py
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QIcon, QStandardItem
from PyQt5.QtWidgets import (
    QFileSystemModel,
    QFormLayout,
    QLabel,
    QMenu,
    QToolBar,
    QTreeView,
    QVBoxLayout,
    QWidget,
)
from flexlay.util import Signal


        self.tree_view = QTreeView()
        self.vbox.addWidget(self.toolbar)
        self.model = QFileSystemModel()
        # self.data = [
        #      ("SuperTux addon", [
        #          ("levels", []),
        #          ("images", []),
        #          ("sounds", []),
        #          ("music", []),
        #          ("scripts", []),
        #          ("metadata", [])
        #      ])]
        # self.model = QStandardItemModel()
        # self.add_items(self.model, self.data)
        self.tree_view.setModel(self.model)
        self.tree_view.doubleClicked.connect(self.on_tree_view_double_click)
        self.tree_view.setContextMenuPolicy(Qt.CustomContextMenu)
        self.tree_view.customContextMenuRequested.connect(self.on_context_menu)
        self.vbox.addWidget(self.tree_view)

        self.layout = QFormLayout()
        self.vbox.addLayout(self.layout)

        self.setLayout(self.vbox)
        self.setMinimumWidth(300)

        # Called in many cases. This should have functions connected
        # which cause the changes in the widget to be applied
        # Called by hitting "Apply", "Ok" or "Finish"

        self.call_signal = Signal()