#!D:/IDE/anaconda3/envs python
# -*- coding: UTF-8 -*-
"""
 @Author: Administrator
 @FileName：HitBotOperationView.py\n
 @DateTime: 2025/7/25 16:06\n
 @Author  ：xsh
"""
from abc import abstractmethod
from PyQt5 import Qt
from AppInterfaces.UiInterface import UiInterface, AppConvert, AppUtils
from AppCore.Contexts import *
from AppCore.DBModels import *
from AppCore.Levels import *
from AppUtils.UiUtils import UiUtils
from AppHeadEnd.Commons.HitBotViews.SelectChamberView   import SelectChamberView
from AppHeadEnd.Commons.HitBotViews.HitBotPositionView  import HitBotPositionView
class HitBotOperationView(Qt.QWidget, UiInterface):
    InitHitBotButton                : Qt.QPushButton       #
    SafeHitBotButton                : Qt.QPushButton       #
    QuitHitBotButton                : Qt.QPushButton       #
    SelectChamber                   : SelectChamberView    #
    HitBotPosition                  : HitBotPositionView   #
    CheckChamberButton              : Qt.QPushButton       #
    CodeChamberSlideButton          : Qt.QPushButton       #
    PickChamberSlideButton          : Qt.QPushButton       #
    DropChamberSlideButton          : Qt.QPushButton       #
    DropTraySlideButton             : Qt.QPushButton       #
    PickTraySlideButton             : Qt.QPushButton       #
    CheckChamberActionButton        : Qt.QPushButton       #
    CheckChamberLSlideActionButton  : Qt.QPushButton       #
    CheckChamberRSlideActionButton  : Qt.QPushButton       #
    CodeChamberSlideActionButton    : Qt.QPushButton       #
    PickChamberSlideActionButton    : Qt.QPushButton       #
    DropChamberSlideActionButton    : Qt.QPushButton       #
    DropTraySlideActionButton       : Qt.QPushButton       #
    PickTraySlideActionButton       : Qt.QPushButton       #
    SafeHitBotActionButton          : Qt.QPushButton       #
    BrokenDropActionButton          : Qt.QPushButton       #
    ChamberToTrayActionButton       : Qt.QPushButton       #
    TrayToChamberActionButton       : Qt.QPushButton       #
    DrawCheckStatusButton           : Qt.QPushButton       #
    GetHitBotPositionButton         : Qt.QPushButton       #
    SetHitBotPositionButton         : Qt.QPushButton       #
    EmptyHitBotButton               : Qt.QPushButton       #
    InitHitBotXButton               : Qt.QPushButton
    InitHitBotYButton               : Qt.QPushButton
    InitHitBotZButton               : Qt.QPushButton
    InitHitBotRButton               : Qt.QPushButton
    GripperGrabButton               : Qt.QPushButton
    GroupSlideMoveButton            : Qt.QPushButton
    ChamberSlideMoveButton          : Qt.QPushButton
    GroupSlideTableMoveButton       : Qt.QPushButton
    ChamberSlideTableMoveButton     : Qt.QPushButton
    GroupSlideScanningButton        : Qt.QPushButton
    ChamberSlideScanningButton      : Qt.QPushButton
    AsyncChamberSlideScanningButton : Qt.QPushButton
    CheckChamberMoveButton          : Qt.QPushButton
    def __init__(self, parent: Qt.QWidget = None):
        super(HitBotOperationView, self).__init__(parent=parent)
        self.Initialization('HitBotOperationView', self, parent)
        self.initWidgetStyle()

    def getChamberNumber(self) -> (int, int):
        self.initSelectChamber()
        return self.SelectChamber.getChamberNumber()

    def setChamberNumber(self, chamber_number: int, row_number: int):
        self.initSelectChamber()
        self.SelectChamber.setChamberNumber(chamber_number, row_number)

    def flushFrame(self):
        super(HitBotOperationView, self).flushFrame()
        self.SelectChamber .flushFrame()
        self.HitBotPosition.flushFrame()

    def setModel(self, model: HitBotModelInterface):
        if not model:
            return
        self.initHitBotPosition()
        self.HitBotPosition.setModel(model)

    def getModel(self) -> HitBotModelInterface:
        self.initHitBotPosition()
        return self.HitBotPosition.getModel()

    def initWidgetStyle(self):
        self.setStyleSheet(UiUtils.getWidgetStyle())

    def initValue(self):
        super(HitBotOperationView, self).initValue()
        self.initWindows()

    def initLayouts(self):
        if self.hasWindowLayouts:
            return
        layout: Qt.QVBoxLayout = Qt.QVBoxLayout()
        layout.setSpacing(0)
        layout.setContentsMargins(0, 0, 0, 0)
        layouts: list[Qt.QHBoxLayout] = [
            Qt.QHBoxLayout(),
            Qt.QHBoxLayout(),
            Qt.QHBoxLayout(),
            Qt.QHBoxLayout(),
            Qt.QHBoxLayout(),
            Qt.QHBoxLayout(),
            Qt.QHBoxLayout(),
            Qt.QHBoxLayout(),
            Qt.QHBoxLayout(),
            Qt.QHBoxLayout(),
        ]
        for _layout in layouts:
            _layout.setSpacing(0)
            _layout.setContentsMargins(0, 0, 0, 0)

        layouts[0].addWidget(self.HitBotPosition                  )
        layouts[1].addWidget(self.InitHitBotButton                )
        layouts[1].addWidget(self.QuitHitBotButton                )
        layouts[1].addWidget(self.SafeHitBotButton                )
        layouts[1].addWidget(self.GetHitBotPositionButton         )
        layouts[1].addWidget(self.GripperGrabButton               )
        layouts[1].addWidget(self.SetHitBotPositionButton         )
        layouts[2].addWidget(self.SelectChamber                   )
        layouts[3].addWidget(self.CheckChamberButton              )
        layouts[3].addWidget(self.CodeChamberSlideButton          )
        layouts[3].addWidget(self.PickChamberSlideButton          )
        layouts[3].addWidget(self.DropChamberSlideButton          )
        layouts[3].addWidget(self.DropTraySlideButton             )
        layouts[3].addWidget(self.PickTraySlideButton             )
        layouts[4].addWidget(self.DrawCheckStatusButton           )
        layouts[4].addWidget(self.ChamberToTrayActionButton       )
        layouts[4].addWidget(self.TrayToChamberActionButton       )
        layouts[4].addWidget(self.DropTraySlideActionButton       )
        layouts[4].addWidget(self.PickTraySlideActionButton       )
        layouts[4].addWidget(self.CheckChamberActionButton        )
        layouts[5].addWidget(self.CheckChamberLSlideActionButton  )
        layouts[5].addWidget(self.CheckChamberRSlideActionButton  )
        layouts[5].addWidget(self.CodeChamberSlideActionButton    )
        layouts[5].addWidget(self.PickChamberSlideActionButton    )
        layouts[5].addWidget(self.DropChamberSlideActionButton    )
        layouts[5].addWidget(self.SafeHitBotActionButton          )
        layouts[6].addWidget(self.InitHitBotXButton               )
        layouts[6].addWidget(self.InitHitBotYButton               )
        layouts[6].addWidget(self.InitHitBotZButton               )
        layouts[6].addWidget(self.InitHitBotRButton               )
        layouts[6].addWidget(self.BrokenDropActionButton          )
        layouts[6].addWidget(self.EmptyHitBotButton               )

        layouts[7].addWidget(self.GroupSlideMoveButton            )
        layouts[7].addWidget(self.ChamberSlideMoveButton          )
        layouts[7].addWidget(self.GroupSlideTableMoveButton       )
        layouts[7].addWidget(self.ChamberSlideTableMoveButton     )
        layouts[8].addWidget(self.GroupSlideScanningButton        )
        layouts[8].addWidget(self.ChamberSlideScanningButton      )
        layouts[8].addWidget(self.AsyncChamberSlideScanningButton )
        layouts[8].addWidget(self.CheckChamberMoveButton          )







        for _layout in layouts:
            layout.addLayout(_layout, 1)

        self.setLayout(layout)
























    def initProperty(self):
        super(HitBotOperationView, self).initProperty()
        self.InitHitBotButton                .setText('　初始机械臂　')
        self.SafeHitBotButton                .setText('　安全位置　　')
        self.QuitHitBotButton                .setText('　卸载机械臂　')
        self.CheckChamberButton              .setText('　检测片仓　　')
        self.CodeChamberSlideButton          .setText('　玻片扫码　　')
        self.PickChamberSlideButton          .setText('　片仓取片　　')
        self.DropChamberSlideButton          .setText('　片仓放片　　')
        self.DropTraySlideButton             .setText('　托盘放片　　')
        self.PickTraySlideButton             .setText('　托盘取片　　')
        self.CheckChamberActionButton        .setText('检测片仓动作　')
        self.CheckChamberLSlideActionButton  .setText('检测玻片动作　')
        self.CheckChamberRSlideActionButton  .setText('检测玻片动作　')
        self.CodeChamberSlideActionButton    .setText('玻片扫码动作　')
        self.PickChamberSlideActionButton    .setText('片仓取片动作　')
        self.DropChamberSlideActionButton    .setText('片仓放片动作　')
        self.DropTraySlideActionButton       .setText('托盘放片动作　')
        self.PickTraySlideActionButton       .setText('托盘取片动作　')
        self.SafeHitBotActionButton          .setText('安全位置动作　')
        self.BrokenDropActionButton          .setText('取片扫码动作　')
        self.ChamberToTrayActionButton       .setText('片仓到托盘动作')
        self.TrayToChamberActionButton       .setText('托盘到片仓动作')
        self.DrawCheckStatusButton           .setText('片仓玻片状态　')
        self.GetHitBotPositionButton         .setText('获取机械臂位置')
        self.SetHitBotPositionButton         .setText('只初始化机械臂')
        self.EmptyHitBotButton               .setText('检测玻片间距　')
        self.CheckChamberMoveButton          .setText('检测玻片间距　')
        self.InitHitBotXButton               .setText('初始机械臂Ｘ轴')
        self.InitHitBotYButton               .setText('初始机械臂Ｙ轴')
        self.InitHitBotZButton               .setText('初始机械臂Ｚ轴')
        self.InitHitBotRButton               .setText('初始机械臂Ｒ轴')
        self.GripperGrabButton               .setText('夹爪夹片状态　')
        self.GroupSlideMoveButton            .setText('指定片仓取放片动作')
        self.ChamberSlideMoveButton          .setText('所有片仓取放片动作')
        self.GroupSlideTableMoveButton       .setText('指定片仓载玻台动作')
        self.ChamberSlideTableMoveButton     .setText('片仓载玻台玻片动作')
        self.GroupSlideScanningButton        .setText('指定片仓扫片动作　')
        self.ChamberSlideScanningButton      .setText('所有片仓扫片动作　')
        self.AsyncChamberSlideScanningButton .setText('协程片仓扫片动作　')

        self.InitHitBotButton                .setStyleSheet(UiUtils.getButtonStyle())
        self.SafeHitBotButton                .setStyleSheet(UiUtils.getButtonStyle())
        self.QuitHitBotButton                .setStyleSheet(UiUtils.getButtonStyle())
        self.CheckChamberButton              .setStyleSheet(UiUtils.getButtonStyle())
        self.CodeChamberSlideButton          .setStyleSheet(UiUtils.getButtonStyle())
        self.PickChamberSlideButton          .setStyleSheet(UiUtils.getButtonStyle())
        self.DropChamberSlideButton          .setStyleSheet(UiUtils.getButtonStyle())
        self.DropTraySlideButton             .setStyleSheet(UiUtils.getButtonStyle())
        self.PickTraySlideButton             .setStyleSheet(UiUtils.getButtonStyle())
        self.CheckChamberActionButton        .setStyleSheet(UiUtils.getButtonStyle())
        self.CheckChamberLSlideActionButton  .setStyleSheet(UiUtils.getButtonStyle())
        self.CheckChamberRSlideActionButton  .setStyleSheet(UiUtils.getButtonStyle())
        self.CodeChamberSlideActionButton    .setStyleSheet(UiUtils.getButtonStyle())
        self.PickChamberSlideActionButton    .setStyleSheet(UiUtils.getButtonStyle())
        self.DropChamberSlideActionButton    .setStyleSheet(UiUtils.getButtonStyle())
        self.DropTraySlideActionButton       .setStyleSheet(UiUtils.getButtonStyle())
        self.PickTraySlideActionButton       .setStyleSheet(UiUtils.getButtonStyle())
        self.SafeHitBotActionButton          .setStyleSheet(UiUtils.getButtonStyle())
        self.BrokenDropActionButton          .setStyleSheet(UiUtils.getButtonStyle())
        self.ChamberToTrayActionButton       .setStyleSheet(UiUtils.getButtonStyle())
        self.TrayToChamberActionButton       .setStyleSheet(UiUtils.getButtonStyle())
        self.DrawCheckStatusButton           .setStyleSheet(UiUtils.getButtonStyle())
        self.GetHitBotPositionButton         .setStyleSheet(UiUtils.getButtonStyle())
        self.SetHitBotPositionButton         .setStyleSheet(UiUtils.getButtonStyle())
        self.EmptyHitBotButton               .setStyleSheet(UiUtils.getButtonStyle())
        self.InitHitBotXButton               .setStyleSheet(UiUtils.getButtonStyle())
        self.InitHitBotYButton               .setStyleSheet(UiUtils.getButtonStyle())
        self.InitHitBotZButton               .setStyleSheet(UiUtils.getButtonStyle())
        self.InitHitBotRButton               .setStyleSheet(UiUtils.getButtonStyle())
        self.GripperGrabButton               .setStyleSheet(UiUtils.getButtonStyle())
        self.CheckChamberMoveButton          .setStyleSheet(UiUtils.getButtonStyle())

        self.GroupSlideMoveButton            .setStyleSheet(UiUtils.getButtonStyle())
        self.ChamberSlideMoveButton          .setStyleSheet(UiUtils.getButtonStyle())
        self.GroupSlideTableMoveButton       .setStyleSheet(UiUtils.getButtonStyle())
        self.ChamberSlideTableMoveButton     .setStyleSheet(UiUtils.getButtonStyle())
        self.GroupSlideScanningButton        .setStyleSheet(UiUtils.getButtonStyle())
        self.ChamberSlideScanningButton      .setStyleSheet(UiUtils.getButtonStyle())
        self.AsyncChamberSlideScanningButton .setStyleSheet(UiUtils.getButtonStyle())

    def initWindows(self):
        self.initInitHitBotButton                ()
        self.initSafeHitBotButton                ()
        self.initQuitHitBotButton                ()
        self.initSelectChamber                   ()
        self.initHitBotPosition                  ()
        self.initCheckChamberButton              ()
        self.initCodeChamberSlideButton          ()
        self.initPickChamberSlideButton          ()
        self.initDropChamberSlideButton          ()
        self.initDropTraySlideButton             ()
        self.initPickTraySlideButton             ()
        self.initCheckChamberActionButton        ()
        self.initCheckChamberLSlideActionButton  ()
        self.initCheckChamberRSlideActionButton  ()
        self.initCodeChamberSlideActionButton    ()
        self.initPickChamberSlideActionButton    ()
        self.initDropChamberSlideActionButton    ()
        self.initDropTraySlideActionButton       ()
        self.initPickTraySlideActionButton       ()
        self.initSafeHitBotActionButton          ()
        self.initBrokenDropActionButton          ()
        self.initChamberToTrayActionButton       ()
        self.initTrayToChamberActionButton       ()
        self.initDrawCheckStatusButton           ()
        self.initGetHitBotPositionButton         ()
        self.initSetHitBotPositionButton         ()
        self.initEmptyHitBotButton               ()
        self.initInitHitBotXButton               ()
        self.initInitHitBotYButton               ()
        self.initInitHitBotZButton               ()
        self.initInitHitBotRButton               ()
        self.initGripperGrabButton               ()
        self.initCheckChamberMoveButton          ()
        self.initGroupSlideMoveButton            ()
        self.initChamberSlideMoveButton          ()
        self.initGroupSlideTableMoveButton       ()
        self.initChamberSlideTableMoveButton     ()
        self.initGroupSlideScanningButton        ()
        self.initChamberSlideScanningButton      ()
        self.initAsyncChamberSlideScanningButton ()


    def initInitHitBotButton                (self):
        if not self.hasInitHitBotButton                :
            self.InitHitBotButton                 = Qt.QPushButton       (self)

    def initSafeHitBotButton                (self):
        if not self.hasSafeHitBotButton                :
            self.SafeHitBotButton                 = Qt.QPushButton       (self)

    def initQuitHitBotButton                (self):
        if not self.hasQuitHitBotButton                :
            self.QuitHitBotButton                 = Qt.QPushButton       (self)

    def initSelectChamber                   (self):
        if not self.hasSelectChamber                   :
            self.SelectChamber                    = SelectChamberView    (self)

    def initHitBotPosition                  (self):
        if not self.hasHitBotPosition                  :
            self.HitBotPosition                   = HitBotPositionView   (self)

    def initCheckChamberButton              (self):
        if not self.hasCheckChamberButton              :
            self.CheckChamberButton               = Qt.QPushButton       (self)



    def initCodeChamberSlideButton          (self):
        if not self.hasCodeChamberSlideButton          :
            self.CodeChamberSlideButton           = Qt.QPushButton       (self)

    def initPickChamberSlideButton          (self):
        if not self.hasPickChamberSlideButton          :
            self.PickChamberSlideButton           = Qt.QPushButton       (self)

    def initDropChamberSlideButton          (self):
        if not self.hasDropChamberSlideButton          :
            self.DropChamberSlideButton           = Qt.QPushButton       (self)

    def initDropTraySlideButton             (self):
        if not self.hasDropTraySlideButton             :
            self.DropTraySlideButton              = Qt.QPushButton       (self)

    def initPickTraySlideButton             (self):
        if not self.hasPickTraySlideButton             :
            self.PickTraySlideButton              = Qt.QPushButton       (self)

    def initCheckChamberActionButton        (self):
        if not self.hasCheckChamberActionButton        :
            self.CheckChamberActionButton         = Qt.QPushButton       (self)

    def initCheckChamberLSlideActionButton  (self):
        if not self.hasCheckChamberLSlideActionButton  :
            self.CheckChamberLSlideActionButton   = Qt.QPushButton       (self)

    def initCheckChamberRSlideActionButton  (self):
        if not self.hasCheckChamberRSlideActionButton  :
            self.CheckChamberRSlideActionButton   = Qt.QPushButton       (self)

    def initCodeChamberSlideActionButton    (self):
        if not self.hasCodeChamberSlideActionButton    :
            self.CodeChamberSlideActionButton     = Qt.QPushButton       (self)

    def initPickChamberSlideActionButton    (self):
        if not self.hasPickChamberSlideActionButton    :
            self.PickChamberSlideActionButton     = Qt.QPushButton       (self)

    def initDropChamberSlideActionButton    (self):
        if not self.hasDropChamberSlideActionButton    :
            self.DropChamberSlideActionButton     = Qt.QPushButton       (self)

    def initDropTraySlideActionButton       (self):
        if not self.hasDropTraySlideActionButton       :
            self.DropTraySlideActionButton        = Qt.QPushButton       (self)

    def initPickTraySlideActionButton       (self):
        if not self.hasPickTraySlideActionButton       :
            self.PickTraySlideActionButton        = Qt.QPushButton       (self)

    def initSafeHitBotActionButton          (self):
        if not self.hasSafeHitBotActionButton          :
            self.SafeHitBotActionButton           = Qt.QPushButton       (self)

    def initBrokenDropActionButton          (self):
        if not self.hasBrokenDropActionButton          :
            self.BrokenDropActionButton           = Qt.QPushButton       (self)

    def initChamberToTrayActionButton       (self):
        if not self.hasChamberToTrayActionButton       :
            self.ChamberToTrayActionButton        = Qt.QPushButton       (self)

    def initTrayToChamberActionButton       (self):
        if not self.hasTrayToChamberActionButton       :
            self.TrayToChamberActionButton        = Qt.QPushButton       (self)

    def initDrawCheckStatusButton           (self):
        if not self.hasDrawCheckStatusButton           :
            self.DrawCheckStatusButton           = Qt.QPushButton(self)

    def initGetHitBotPositionButton         (self):
        if not self.hasGetHitBotPositionButton         :
            self.GetHitBotPositionButton         = Qt.QPushButton(self)

    def initSetHitBotPositionButton         (self):
        if not self.hasSetHitBotPositionButton         :
            self.SetHitBotPositionButton         = Qt.QPushButton(self)

    def initEmptyHitBotButton               (self):
        if not self.hasEmptyHitBotButton               :
            self.EmptyHitBotButton               = Qt.QPushButton(self)

    def initInitHitBotXButton(self):
        if not self.hasInitHitBotXButton:
            self.InitHitBotXButton = Qt.QPushButton(self)

    def initInitHitBotYButton(self):
        if not self.hasInitHitBotYButton:
            self.InitHitBotYButton = Qt.QPushButton(self)

    def initInitHitBotZButton(self):
        if not self.hasInitHitBotZButton:
            self.InitHitBotZButton = Qt.QPushButton(self)

    def initInitHitBotRButton(self):
        if not self.hasInitHitBotRButton:
            self.InitHitBotRButton = Qt.QPushButton(self)

    def initGripperGrabButton(self):
        if not self.hasGripperGrabButton:
            self.GripperGrabButton = Qt.QPushButton(self)

    def initGroupSlideMoveButton            (self):
        if not self.hasGroupSlideMoveButton            :
            self.GroupSlideMoveButton             = Qt.QPushButton(self)

    def initChamberSlideMoveButton          (self):
        if not self.hasChamberSlideMoveButton          :
            self.ChamberSlideMoveButton           = Qt.QPushButton(self)

    def initGroupSlideTableMoveButton       (self):
        if not self.hasGroupSlideTableMoveButton       :
            self.GroupSlideTableMoveButton        = Qt.QPushButton(self)

    def initChamberSlideTableMoveButton     (self):
        if not self.hasChamberSlideTableMoveButton     :
            self.ChamberSlideTableMoveButton      = Qt.QPushButton(self)

    def initGroupSlideScanningButton        (self):
        if not self.hasGroupSlideScanningButton        :
            self.GroupSlideScanningButton         = Qt.QPushButton(self)

    def initChamberSlideScanningButton      (self):
        if not self.hasChamberSlideScanningButton      :
            self.ChamberSlideScanningButton       = Qt.QPushButton(self)

    def initAsyncChamberSlideScanningButton (self):
        if not self.hasAsyncChamberSlideScanningButton :
            self.AsyncChamberSlideScanningButton  = Qt.QPushButton(self)

    def initCheckChamberMoveButton          (self):
        if not self.hasCheckChamberMoveButton          :
            self.CheckChamberMoveButton           = Qt.QPushButton(self)



    @property
    def hasCheckChamberMoveButton(self) -> bool:
        return hasattr(self, 'CheckChamberMoveButton') and isinstance(self.CheckChamberMoveButton, Qt.QPushButton)

    @property
    def hasInitHitBotButton                (self) -> bool:
        return hasattr(self, 'InitHitBotButton'                 ) and isinstance(self.InitHitBotButton                , Qt.QPushButton    )

    @property
    def hasSafeHitBotButton                (self) -> bool:
        return hasattr(self, 'SafeHitBotButton'                 ) and isinstance(self.SafeHitBotButton                , Qt.QPushButton    )

    @property
    def hasQuitHitBotButton                (self) -> bool:
        return hasattr(self, 'QuitHitBotButton'                 ) and isinstance(self.QuitHitBotButton                , Qt.QPushButton    )

    @property
    def hasSelectChamber                   (self) -> bool:
        return hasattr(self, 'SelectChamber'                    ) and isinstance(self.SelectChamber                   , SelectChamberView )

    @property
    def hasHitBotPosition                  (self) -> bool:
        return hasattr(self, 'HitBotPosition'                   ) and isinstance(self.HitBotPosition                  , HitBotPositionView)

    @property
    def hasCheckChamberButton              (self) -> bool:
        return hasattr(self, 'CheckChamberButton'               ) and isinstance(self.CheckChamberButton              , Qt.QPushButton    )


    @property
    def hasCodeChamberSlideButton          (self) -> bool:
        return hasattr(self, 'CodeChamberSlideButton'           ) and isinstance(self.CodeChamberSlideButton          , Qt.QPushButton    )

    @property
    def hasPickChamberSlideButton          (self) -> bool:
        return hasattr(self, 'PickChamberSlideButton'           ) and isinstance(self.PickChamberSlideButton          , Qt.QPushButton    )

    @property
    def hasDropChamberSlideButton          (self) -> bool:
        return hasattr(self, 'DropChamberSlideButton'           ) and isinstance(self.DropChamberSlideButton          , Qt.QPushButton    )

    @property
    def hasDropTraySlideButton             (self) -> bool:
        return hasattr(self, 'DropTraySlideButton'              ) and isinstance(self.DropTraySlideButton             , Qt.QPushButton    )

    @property
    def hasPickTraySlideButton             (self) -> bool:
        return hasattr(self, 'PickTraySlideButton'              ) and isinstance(self.PickTraySlideButton             , Qt.QPushButton    )

    @property
    def hasCheckChamberActionButton        (self) -> bool:
        return hasattr(self, 'CheckChamberActionButton'         ) and isinstance(self.CheckChamberActionButton        , Qt.QPushButton    )

    @property
    def hasCheckChamberLSlideActionButton  (self) -> bool:
        return hasattr(self, 'CheckChamberLSlideActionButton'   ) and isinstance(self.CheckChamberLSlideActionButton  , Qt.QPushButton    )

    @property
    def hasCheckChamberRSlideActionButton  (self) -> bool:
        return hasattr(self, 'CheckChamberRSlideActionButton'   ) and isinstance(self.CheckChamberRSlideActionButton  , Qt.QPushButton    )

    @property
    def hasCodeChamberSlideActionButton    (self) -> bool:
        return hasattr(self, 'CodeChamberSlideActionButton'     ) and isinstance(self.CodeChamberSlideActionButton    , Qt.QPushButton    )

    @property
    def hasPickChamberSlideActionButton    (self) -> bool:
        return hasattr(self, 'PickChamberSlideActionButton'     ) and isinstance(self.PickChamberSlideActionButton    , Qt.QPushButton    )

    @property
    def hasDropChamberSlideActionButton    (self) -> bool:
        return hasattr(self, 'DropChamberSlideActionButton'     ) and isinstance(self.DropChamberSlideActionButton    , Qt.QPushButton    )

    @property
    def hasDropTraySlideActionButton       (self) -> bool:
        return hasattr(self, 'DropTraySlideActionButton'        ) and isinstance(self.DropTraySlideActionButton       , Qt.QPushButton    )

    @property
    def hasPickTraySlideActionButton       (self) -> bool:
        return hasattr(self, 'PickTraySlideActionButton'        ) and isinstance(self.PickTraySlideActionButton       , Qt.QPushButton    )

    @property
    def hasSafeHitBotActionButton          (self) -> bool:
        return hasattr(self, 'SafeHitBotActionButton'           ) and isinstance(self.SafeHitBotActionButton          , Qt.QPushButton    )

    @property
    def hasBrokenDropActionButton          (self) -> bool:
        return hasattr(self, 'BrokenDropActionButton'           ) and isinstance(self.BrokenDropActionButton          , Qt.QPushButton    )

    @property
    def hasChamberToTrayActionButton       (self) -> bool:
        return hasattr(self, 'ChamberToTrayActionButton'        ) and isinstance(self.ChamberToTrayActionButton       , Qt.QPushButton    )

    @property
    def hasTrayToChamberActionButton       (self) -> bool:
        return hasattr(self, 'TrayToChamberActionButton'        ) and isinstance(self.TrayToChamberActionButton       , Qt.QPushButton    )

    @property
    def hasDrawCheckStatusButton(self) -> bool:
        return hasattr(self, 'DrawCheckStatusButton') and isinstance(self.DrawCheckStatusButton, Qt.QPushButton)

    @property
    def hasGetHitBotPositionButton(self) -> bool:
        return hasattr(self, 'GetHitBotPositionButton') and isinstance(self.GetHitBotPositionButton, Qt.QPushButton)

    @property
    def hasSetHitBotPositionButton(self) -> bool:
        return hasattr(self, 'SetHitBotPositionButton') and isinstance(self.SetHitBotPositionButton, Qt.QPushButton)

    @property
    def hasEmptyHitBotButton(self) -> bool:
        return hasattr(self, 'EmptyHitBotButton') and isinstance(self.EmptyHitBotButton, Qt.QPushButton)

    @property
    def hasInitHitBotXButton(self) -> bool:
        return hasattr(self, 'InitHitBotXButton') and isinstance(self.InitHitBotXButton, Qt.QPushButton)

    @property
    def hasInitHitBotYButton(self) -> bool:
        return hasattr(self, 'InitHitBotYButton') and isinstance(self.InitHitBotYButton, Qt.QPushButton)

    @property
    def hasInitHitBotZButton(self) -> bool:
        return hasattr(self, 'InitHitBotZButton') and isinstance(self.InitHitBotZButton, Qt.QPushButton)

    @property
    def hasInitHitBotRButton(self) -> bool:
        return hasattr(self, 'InitHitBotRButton') and isinstance(self.InitHitBotRButton, Qt.QPushButton)



    @property
    def hasInitHitBotXButton(self) -> bool:
        return hasattr(self, 'InitHitBotXButton') and isinstance(self.InitHitBotXButton, Qt.QPushButton)

    @property
    def hasInitHitBotYButton(self) -> bool:
        return hasattr(self, 'InitHitBotYButton') and isinstance(self.InitHitBotYButton, Qt.QPushButton)

    @property
    def hasInitHitBotZButton(self) -> bool:
        return hasattr(self, 'InitHitBotZButton') and isinstance(self.InitHitBotZButton, Qt.QPushButton)

    @property
    def hasInitHitBotRButton(self) -> bool:
        return hasattr(self, 'InitHitBotRButton') and isinstance(self.InitHitBotRButton, Qt.QPushButton)

    @property
    def hasGripperGrabButton(self) -> bool:
        return hasattr(self, 'GripperGrabButton') and isinstance(self.GripperGrabButton, Qt.QPushButton)
    @property
    def hasGroupSlideMoveButton            (self) -> bool:
        return hasattr(self, 'GroupSlideMoveButton'            ) and isinstance(self.GroupSlideMoveButton            , Qt.QPushButton)

    @property
    def hasChamberSlideMoveButton          (self) -> bool:
        return hasattr(self, 'ChamberSlideMoveButton'          ) and isinstance(self.ChamberSlideMoveButton          , Qt.QPushButton)

    @property
    def hasGroupSlideTableMoveButton       (self) -> bool:
        return hasattr(self, 'GroupSlideTableMoveButton'       ) and isinstance(self.GroupSlideTableMoveButton       , Qt.QPushButton)

    @property
    def hasChamberSlideTableMoveButton     (self) -> bool:
        return hasattr(self, 'ChamberSlideTableMoveButton'     ) and isinstance(self.ChamberSlideTableMoveButton     , Qt.QPushButton)

    @property
    def hasGroupSlideScanningButton        (self) -> bool:
        return hasattr(self, 'GroupSlideScanningButton'        ) and isinstance(self.GroupSlideScanningButton        , Qt.QPushButton)

    @property
    def hasChamberSlideScanningButton      (self) -> bool:
        return hasattr(self, 'ChamberSlideScanningButton'      ) and isinstance(self.ChamberSlideScanningButton      , Qt.QPushButton)

    @property
    def hasAsyncChamberSlideScanningButton (self) -> bool:
        return hasattr(self, 'AsyncChamberSlideScanningButton' ) and isinstance(self.AsyncChamberSlideScanningButton , Qt.QPushButton)

    @property
    def hasCheckChamberMoveButton          (self) -> bool:
        return hasattr(self, 'CheckChamberMoveButton'          ) and isinstance(self.CheckChamberMoveButton          , Qt.QPushButton)







