#!D:\IDE\Anaconda3\envs\Microscope_Scan python
# -*- coding: UTF-8 -*-
"""
 @Author: Administrator
 @FileName: AlgorithmInterface.py
 @DateTime: 2025/5/29 9:01
 @SoftWare: PyCharm
 @Author  ：xsh
"""
from PyQt5 import Qt
from abc import abstractmethod
from AppInterfaces.GlobalInterface import GlobalInterface
class AlgorithmInterface(GlobalInterface):
    IsInitialize: bool
    IsAvailable: bool
    @abstractmethod
    def isValid(self) -> bool:
        return False


    @property
    def _hasIsInitialize(self) -> bool:
        return hasattr(self, 'IsInitialize') and isinstance(self.IsInitialize, bool)

    @property
    def _hasIsAvailable(self) -> bool:
        return hasattr(self, 'IsAvailable') and isinstance(self.IsAvailable, bool)

    @property
    def isInitialize(self) -> bool:
        return False if not self._hasIsInitialize else self.IsInitialize

    @property
    def isAvailable(self) -> bool:
        return False if not self._hasIsAvailable else self.IsAvailable