# Path: src/model/properties.py
# class PropertyHolder(object):
#     def __init__(self):
#         self._properties = {}
# 
#     @property
#     def properties(self):
#         return self._properties
# 
#     def property(self, name):
#         return self._properties[name]
# 
#     def has_property(self, name):
#         return name in self._properties.keys()
# 
#     def property_value(self, name):
#         return self._properties[name].value
# 
#     def add_property(self, prop_name, prop_value, prop_description=None):
# 
#         if type(prop_value) is int:
#             self._properties[prop_name] = NumberProperty(prop_name, prop_description, prop_value)
#         elif type(prop_value) is bool:
#             self._properties[prop_name] = BooleanProperty(prop_name, prop_description, prop_value)
# 
#     def add_ranged_property(self, prop_name, prop_min, prop_max, prop_value=None,
#                             prop_description=None):
#         self._properties[prop_name] = RangedProperty(prop_name, prop_min, prop_max,
#                                                      prop_description, prop_value, )


from PyQt5.QtCore import Qt, QPoint, QRect
from PyQt5.QtGui import QPen, QColor, QIcon, QPixmap, QPainter
from src.model.properties import PropertyHolder
import src.helpers.quickpixler as quickpixler
import src.helpers.drawing as drawing
import src.helpers.utils as utils
# --------------------------------------------------------------------------------------------------
# Purpose:          Defines default set of Canvas Tools
#
# Author:           Rafael Vasco
# Date:             31/03/13
# License:          
# --------------------------------------------------------------------------------------------------




class Tool(PropertyHolder):
    def __init__(self, canvas):
        super(Tool, self).__init__()

        self._canvas = canvas

        self._name = ''
        self._drawPen = QPen()
        self._drawPen.setColor(Qt.white)
        self._drawPen.setJoinStyle(Qt.MiterJoin)
        self._drawPen.setWidth(0)

# Path: src/model/properties.py
# class PropertyHolder(object):
#     def __init__(self):
#         self._properties = {}
# 
#     @property
#     def properties(self):
#         return self._properties
# 
#     def property(self, name):
#         return self._properties[name]
# 
#     def has_property(self, name):
#         return name in self._properties.keys()
# 
#     def property_value(self, name):
#         return self._properties[name].value
# 
#     def add_property(self, prop_name, prop_value, prop_description=None):
# 
#         if type(prop_value) is int:
#             self._properties[prop_name] = NumberProperty(prop_name, prop_description, prop_value)
#         elif type(prop_value) is bool:
#             self._properties[prop_name] = BooleanProperty(prop_name, prop_description, prop_value)
# 
#     def add_ranged_property(self, prop_name, prop_min, prop_max, prop_value=None,
#                             prop_description=None):
#         self._properties[prop_name] = RangedProperty(prop_name, prop_min, prop_max,
#                                                      prop_description, prop_value, )


# Path: src/model/tools.py
from PyQt5.QtCore import Qt, QPoint, QRect
from PyQt5.QtGui import QPen, QColor, QIcon, QPixmap, QPainter
from src.model.properties import PropertyHolder
import src.helpers.quickpixler as quickpixler
import src.helpers.drawing as drawing
import src.helpers.utils as utils

# --------------------------------------------------------------------------------------------------
# Purpose:          Defines default set of Canvas Tools
#
# Author:           Rafael Vasco
# Date:             31/03/13
# License:          
# --------------------------------------------------------------------------------------------------




class Tool(PropertyHolder):
    def __init__(self, canvas):
        super(Tool, self).__init__()

        self._canvas = canvas

        self._name = ''
        self._drawPen = QPen()
        self._drawPen.setColor(Qt.white)
        self._drawPen.setJoinStyle(Qt.MiterJoin)
        self._drawPen.setWidth(0)

        self._drawPen.setCapStyle(Qt.SquareCap)