from PySide2.QtCore import QObject, Signal

from ru_rubtsov_axioma_topo_tools.toolprocessing.snapPointsNew import SnapPoints


class RunnerSnapNodes(QObject):
    change_progress=Signal(int)
    def __init__(self,name_table,tollerance):
        super().__init__()
        self.__name_table=name_table
        self.__tollerance=tollerance
        self.__isCancel=False
    def run(self):
        self.change_progress.emit(0)
        cls_snap_nodes=SnapPoints(self.__name_table,self.__tollerance)
        cls_snap_nodes.run(self.cnagre_progress_call_back)
    def setCancel(self):
        self.__isCancel=True
    def cnagre_progress_call_back(self,value):
        self.change_progress.emit(value)
        return self.__isCancel


