# Path: pcloudpy/gui/components/toolboxTreeWidgetItem.py
# class ToolBoxTreeWidgetItem(QTreeWidgetItem):
#     def __init__(self, parent=None,  type=QTreeWidgetItem.UserType + 2):
#         super(ToolBoxTreeWidgetItem, self).__init__(parent, type)
# 
#         self.setIcon(0,QIcon(":/Toolbox-50.png"))
#         self._objectName = None
#         self._metadata = None
# 
#     def setText(self, column, text):
#         super(ToolBoxTreeWidgetItem, self).setText(column, text)
#         self.setObjectName(text.replace(" ","-"))
# 
#     def setMetadata(self, metadata):
#         self._metadata = metadata
# 
#     def metadata(self):
#         return self._metadata
# 
# 
#     def setObjectName(self, name):
#         self._objectName = name
# 
#     def objectName(self):
#         return self._objectName
# 
# Path: pcloudpy/gui/components/toolboxStandardItem.py
# class ToolboxStandardItem(QStandardItem):
#     def __init__(self, *args, **kwargs):
#         super(ToolboxStandardItem, self).__init__(*args, **kwargs)
# 
#         self._metadata = None
#         self.setFlags(self.flags() & ~Qt.ItemIsEditable)
#         self.setIcon(QIcon(":/Toolbox-50.png"))
#         self._objectName = None
#         self._metadata = None
# 
#     def setText(self, text):
#         super(ToolboxStandardItem, self).setText(text)
#         self.setObjectName(text.replace(" ","-"))
# 
#     def setMetadata(self, metadata):
#         self._metadata = metadata
# 
#     def metadata(self):
#         return self._metadata
# 
#     def setObjectName(self, name):
#         self._objectName = name
# 
#     def objectName(self):
#         return self._objectName


from PyQt5.QtCore import  *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import pyqtSignal as Signal
from ..resources_rc import *
from .toolboxTreeWidgetItem import ToolBoxTreeWidgetItem
from .toolboxStandardItem import ToolboxStandardItem
#Author: Miguel Molero <miguel.molero@gmail.com>




class ToolBoxesWidget(QWidget):
    def __init__(self, parent = None):
        super(ToolBoxesWidget, self).__init__(parent)

        self._current_item = None

        layout = QVBoxLayout()
        self.tree = QTreeView()
        self.tree.setHeaderHidden(True)
        self.tree.setObjectName("Toolbox-Tree")
        layout.addWidget(self.tree)
        self.setLayout(layout)

        self.tree.clicked.connect(self.click_item)


# Path: pcloudpy/gui/components/toolboxTreeWidgetItem.py
# class ToolBoxTreeWidgetItem(QTreeWidgetItem):
#     def __init__(self, parent=None,  type=QTreeWidgetItem.UserType + 2):
#         super(ToolBoxTreeWidgetItem, self).__init__(parent, type)
# 
#         self.setIcon(0,QIcon(":/Toolbox-50.png"))
#         self._objectName = None
#         self._metadata = None
# 
#     def setText(self, column, text):
#         super(ToolBoxTreeWidgetItem, self).setText(column, text)
#         self.setObjectName(text.replace(" ","-"))
# 
#     def setMetadata(self, metadata):
#         self._metadata = metadata
# 
#     def metadata(self):
#         return self._metadata
# 
# 
#     def setObjectName(self, name):
#         self._objectName = name
# 
#     def objectName(self):
#         return self._objectName
# 
# Path: pcloudpy/gui/components/toolboxStandardItem.py
# class ToolboxStandardItem(QStandardItem):
#     def __init__(self, *args, **kwargs):
#         super(ToolboxStandardItem, self).__init__(*args, **kwargs)
# 
#         self._metadata = None
#         self.setFlags(self.flags() & ~Qt.ItemIsEditable)
#         self.setIcon(QIcon(":/Toolbox-50.png"))
#         self._objectName = None
#         self._metadata = None
# 
#     def setText(self, text):
#         super(ToolboxStandardItem, self).setText(text)
#         self.setObjectName(text.replace(" ","-"))
# 
#     def setMetadata(self, metadata):
#         self._metadata = metadata
# 
#     def metadata(self):
#         return self._metadata
# 
#     def setObjectName(self, name):
#         self._objectName = name
# 
#     def objectName(self):
#         return self._objectName


# Path: pcloudpy/gui/components/ToolboxesWidget.py
from PyQt5.QtCore import  *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import pyqtSignal as Signal
from ..resources_rc import *
from .toolboxTreeWidgetItem import ToolBoxTreeWidgetItem
from .toolboxStandardItem import ToolboxStandardItem

#Author: Miguel Molero <miguel.molero@gmail.com>




class ToolBoxesWidget(QWidget):
    def __init__(self, parent = None):
        super(ToolBoxesWidget, self).__init__(parent)

        self._current_item = None

        layout = QVBoxLayout()
        self.tree = QTreeView()
        self.tree.setHeaderHidden(True)
        self.tree.setObjectName("Toolbox-Tree")
        layout.addWidget(self.tree)
        self.setLayout(layout)

        self.tree.clicked.connect(self.click_item)


    currentItemClicked = Signal()