# Path: friture/curve.py
# class Curve(QtCore.QObject):
#     data_changed = QtCore.pyqtSignal()
#     name_changed = QtCore.pyqtSignal(str)
# 
#     def __init__(self, parent=None):
#         super().__init__(parent)
# 
#         self._name = ""
#         self._x_array = numpy.array([0])
#         self._y_array = numpy.array([0])
# 
#     def setData(self, x_array, y_array):
#         self._x_array = x_array
#         self._y_array = y_array
#         self.data_changed.emit()
#     
#     def x_array(self):
#         return self._x_array
# 
#     def y_array(self):
#         return self._y_array
#     
#     @pyqtProperty(str, notify=name_changed)
#     def name(self):
#         return self._name
#     
#     @name.setter
#     def name(self, name):
#         if self._name != name:
#             self._name = name
#             self.name_changed.emit(name)


import numpy as np
from PyQt5.QtCore import pyqtSignal, pyqtProperty
from PyQt5.QtGui import QColor
from PyQt5.QtQuick import QQuickItem, QSGGeometryNode, QSGGeometry, QSGFlatColorMaterial, QSGNode
from friture.curve import Curve


class PlotCurve(QQuickItem):
    colorChanged = pyqtSignal()
    curveChanged = pyqtSignal()

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

        self.setFlag(QQuickItem.ItemHasContents, True)

        self._x_array = np.array([0])
        self._y_array = np.array([0])

        self._color = QColor("black")

# Path: friture/curve.py
# class Curve(QtCore.QObject):
#     data_changed = QtCore.pyqtSignal()
#     name_changed = QtCore.pyqtSignal(str)
# 
#     def __init__(self, parent=None):
#         super().__init__(parent)
# 
#         self._name = ""
#         self._x_array = numpy.array([0])
#         self._y_array = numpy.array([0])
# 
#     def setData(self, x_array, y_array):
#         self._x_array = x_array
#         self._y_array = y_array
#         self.data_changed.emit()
#     
#     def x_array(self):
#         return self._x_array
# 
#     def y_array(self):
#         return self._y_array
#     
#     @pyqtProperty(str, notify=name_changed)
#     def name(self):
#         return self._name
#     
#     @name.setter
#     def name(self, name):
#         if self._name != name:
#             self._name = name
#             self.name_changed.emit(name)


# Path: friture/plotCurve.py
import numpy as np
from PyQt5.QtCore import pyqtSignal, pyqtProperty
from PyQt5.QtGui import QColor
from PyQt5.QtQuick import QQuickItem, QSGGeometryNode, QSGGeometry, QSGFlatColorMaterial, QSGNode
from friture.curve import Curve



class PlotCurve(QQuickItem):
    colorChanged = pyqtSignal()
    curveChanged = pyqtSignal()

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

        self.setFlag(QQuickItem.ItemHasContents, True)

        self._x_array = np.array([0])
        self._y_array = np.array([0])

        self._color = QColor("black")

        self._curve = Curve()