#!D:/IDE/anaconda3/envs python
# -*- coding: UTF-8 -*-
"""
 @Author: Administrator
 @FileName：DrawHitBotDataView.py\n
 @DateTime: 2025/7/18 18:35\n
 @Author  ：xsh
"""
from abc import abstractmethod
from PyQt5 import Qt
from AppInterfaces.UiInterface import UiInterface, AppConvert, AppUtils
from AppInterfaces.globalSlot import globalSlot, AppSlot
from AppCore.Contexts import *
from AppCore.DBModels import *
from AppCore.Levels import *
class DrawHitBotDataView(Qt.QWidget, UiInterface):
    currentDataChanged: Qt.pyqtSignal = Qt.pyqtSignal(object)
    Model                       : HitBotData
    Info_CardNumber             : Qt.QLabel
    Info_xPosition              : Qt.QLabel
    Info_yPosition              : Qt.QLabel
    Info_zPosition              : Qt.QLabel
    Info_rPosition              : Qt.QLabel
    Info_angle1                 : Qt.QLabel
    Info_angle2                 : Qt.QLabel
    Info_efg_distance           : Qt.QLabel
    Info_efg_travel_length      : Qt.QLabel
    Info_efg_type               : Qt.QLabel
    Info_communicate_success    : Qt.QLabel
    Info_initial_finish         : Qt.QLabel
    Info_move_flag              : Qt.QLabel
    Info_isScanning             : Qt.QLabel
    Edit_CardNumber             : Qt.QLabel
    Edit_xPosition              : Qt.QLabel
    Edit_yPosition              : Qt.QLabel
    Edit_zPosition              : Qt.QLabel
    Edit_rPosition              : Qt.QLabel
    Edit_angle1                 : Qt.QLabel
    Edit_angle2                 : Qt.QLabel
    Edit_efg_distance           : Qt.QLabel
    Edit_efg_travel_length      : Qt.QLabel
    Edit_efg_type               : Qt.QLabel
    Edit_communicate_success    : Qt.QLabel
    Edit_initial_finish         : Qt.QLabel
    Edit_move_flag              : Qt.QLabel
    Edit_isScanning             : Qt.QLabel
    def __init__(self, parent: Qt.QWidget = None):
        super(DrawHitBotDataView, self).__init__(parent=parent)
        self.Initialization('DrawHitBotDataView', self, parent)
        self.initStyleSheet ()
        self.flushFrame     ()

    def initStyleSheet(self):
        from AppUtils.UiUtils import UiUtils
        self.setStyleSheet(UiUtils.getDrawDataStyle())

    def initValue(self):
        super(DrawHitBotDataView, self).initValue()
        self.initModel                       ()
        self.initInfo_CardNumber             ()
        self.initInfo_xPosition              ()
        self.initInfo_yPosition              ()
        self.initInfo_zPosition              ()
        self.initInfo_rPosition              ()
        self.initInfo_angle1                 ()
        self.initInfo_angle2                 ()
        self.initInfo_efg_distance           ()
        self.initInfo_efg_travel_length      ()
        self.initInfo_efg_type               ()
        self.initInfo_communicate_success    ()
        self.initInfo_initial_finish         ()
        self.initInfo_move_flag              ()
        self.initInfo_isScanning             ()
        self.initEdit_CardNumber             ()
        self.initEdit_xPosition              ()
        self.initEdit_yPosition              ()
        self.initEdit_zPosition              ()
        self.initEdit_rPosition              ()
        self.initEdit_angle1                 ()
        self.initEdit_angle2                 ()
        self.initEdit_efg_distance           ()
        self.initEdit_efg_travel_length      ()
        self.initEdit_efg_type               ()
        self.initEdit_communicate_success    ()
        self.initEdit_initial_finish         ()
        self.initEdit_move_flag              ()
        self.initEdit_isScanning             ()

    def initProperty(self):
        super(DrawHitBotDataView, self).initProperty()
        self.Info_CardNumber             .setAlignment(Qt.Qt.AlignRight | Qt.Qt.AlignVCenter)
        self.Info_xPosition              .setAlignment(Qt.Qt.AlignRight | Qt.Qt.AlignVCenter)
        self.Info_yPosition              .setAlignment(Qt.Qt.AlignRight | Qt.Qt.AlignVCenter)
        self.Info_zPosition              .setAlignment(Qt.Qt.AlignRight | Qt.Qt.AlignVCenter)
        self.Info_rPosition              .setAlignment(Qt.Qt.AlignRight | Qt.Qt.AlignVCenter)
        self.Info_angle1                 .setAlignment(Qt.Qt.AlignRight | Qt.Qt.AlignVCenter)
        self.Info_angle2                 .setAlignment(Qt.Qt.AlignRight | Qt.Qt.AlignVCenter)
        self.Info_efg_distance           .setAlignment(Qt.Qt.AlignRight | Qt.Qt.AlignVCenter)
        self.Info_efg_travel_length      .setAlignment(Qt.Qt.AlignRight | Qt.Qt.AlignVCenter)
        self.Info_efg_type               .setAlignment(Qt.Qt.AlignRight | Qt.Qt.AlignVCenter)
        self.Info_communicate_success    .setAlignment(Qt.Qt.AlignRight | Qt.Qt.AlignVCenter)
        self.Info_initial_finish         .setAlignment(Qt.Qt.AlignRight | Qt.Qt.AlignVCenter)
        self.Info_move_flag              .setAlignment(Qt.Qt.AlignRight | Qt.Qt.AlignVCenter)
        self.Info_isScanning             .setAlignment(Qt.Qt.AlignRight | Qt.Qt.AlignVCenter)
        self.Edit_CardNumber             .setAlignment(Qt.Qt.AlignLeft  | Qt.Qt.AlignVCenter)
        self.Edit_xPosition              .setAlignment(Qt.Qt.AlignLeft  | Qt.Qt.AlignVCenter)
        self.Edit_yPosition              .setAlignment(Qt.Qt.AlignLeft  | Qt.Qt.AlignVCenter)
        self.Edit_zPosition              .setAlignment(Qt.Qt.AlignLeft  | Qt.Qt.AlignVCenter)
        self.Edit_rPosition              .setAlignment(Qt.Qt.AlignLeft  | Qt.Qt.AlignVCenter)
        self.Edit_angle1                 .setAlignment(Qt.Qt.AlignLeft  | Qt.Qt.AlignVCenter)
        self.Edit_angle2                 .setAlignment(Qt.Qt.AlignLeft  | Qt.Qt.AlignVCenter)
        self.Edit_efg_distance           .setAlignment(Qt.Qt.AlignLeft  | Qt.Qt.AlignVCenter)
        self.Edit_efg_travel_length      .setAlignment(Qt.Qt.AlignLeft  | Qt.Qt.AlignVCenter)
        self.Edit_efg_type               .setAlignment(Qt.Qt.AlignLeft  | Qt.Qt.AlignVCenter)
        self.Edit_communicate_success    .setAlignment(Qt.Qt.AlignLeft  | Qt.Qt.AlignVCenter)
        self.Edit_initial_finish         .setAlignment(Qt.Qt.AlignLeft  | Qt.Qt.AlignVCenter)
        self.Edit_move_flag              .setAlignment(Qt.Qt.AlignLeft  | Qt.Qt.AlignVCenter)
        self.Edit_isScanning             .setAlignment(Qt.Qt.AlignLeft  | Qt.Qt.AlignVCenter)
        self.Info_CardNumber             .setMinimumSize(100, 30)
        self.Info_xPosition              .setMinimumSize(100, 30)
        self.Info_yPosition              .setMinimumSize(100, 30)
        self.Info_zPosition              .setMinimumSize(100, 30)
        self.Info_rPosition              .setMinimumSize(100, 30)
        self.Info_angle1                 .setMinimumSize(100, 30)
        self.Info_angle2                 .setMinimumSize(100, 30)
        self.Info_efg_distance           .setMinimumSize(100, 30)
        self.Info_efg_travel_length      .setMinimumSize(100, 30)
        self.Info_efg_type               .setMinimumSize(100, 30)
        self.Info_communicate_success    .setMinimumSize(100, 30)
        self.Info_initial_finish         .setMinimumSize(100, 30)
        self.Info_move_flag              .setMinimumSize(100, 30)
        self.Info_isScanning             .setMinimumSize(100, 30)
        self.Edit_CardNumber             .setMinimumSize(100, 30)
        self.Edit_xPosition              .setMinimumSize(100, 30)
        self.Edit_yPosition              .setMinimumSize(100, 30)
        self.Edit_zPosition              .setMinimumSize(100, 30)
        self.Edit_rPosition              .setMinimumSize(100, 30)
        self.Edit_angle1                 .setMinimumSize(100, 30)
        self.Edit_angle2                 .setMinimumSize(100, 30)
        self.Edit_efg_distance           .setMinimumSize(100, 30)
        self.Edit_efg_travel_length      .setMinimumSize(100, 30)
        self.Edit_efg_type               .setMinimumSize(100, 30)
        self.Edit_communicate_success    .setMinimumSize(100, 30)
        self.Edit_initial_finish         .setMinimumSize(100, 30)
        self.Edit_move_flag              .setMinimumSize(100, 30)
        self.Edit_isScanning             .setMinimumSize(100, 30)
        self.Info_CardNumber             .setText('设备编号　　:')
        self.Info_xPosition              .setText('Ｘ轴位置　　:')
        self.Info_yPosition              .setText('Ｙ轴位置　　:')
        self.Info_zPosition              .setText('Ｚ轴位置　　:')
        self.Info_rPosition              .setText('Ｒ轴位置　　:')
        self.Info_angle1                 .setText('角度１　　　:')
        self.Info_angle2                 .setText('角度２　　　:')
        self.Info_efg_distance           .setText('夹爪开关　　:')
        self.Info_efg_travel_length      .setText('夹爪位置　　:')
        self.Info_efg_type               .setText('夹爪类型　　:')
        self.Info_communicate_success    .setText('连接状态　　:')
        self.Info_initial_finish         .setText('初始状态　　:')
        self.Info_move_flag              .setText('移动状态　　:')
        self.Info_isScanning             .setText('扫码状态　　:')
        self.Edit_CardNumber             .setContentsMargins(5, 1, 1, 1)
        self.Edit_xPosition              .setContentsMargins(5, 1, 1, 1)
        self.Edit_yPosition              .setContentsMargins(5, 1, 1, 1)
        self.Edit_zPosition              .setContentsMargins(5, 1, 1, 1)
        self.Edit_rPosition              .setContentsMargins(5, 1, 1, 1)
        self.Edit_angle1                 .setContentsMargins(5, 1, 1, 1)
        self.Edit_angle2                 .setContentsMargins(5, 1, 1, 1)
        self.Edit_efg_distance           .setContentsMargins(5, 1, 1, 1)
        self.Edit_efg_travel_length      .setContentsMargins(5, 1, 1, 1)
        self.Edit_efg_type               .setContentsMargins(5, 1, 1, 1)
        self.Edit_communicate_success    .setContentsMargins(5, 1, 1, 1)
        self.Edit_initial_finish         .setContentsMargins(5, 1, 1, 1)
        self.Edit_move_flag              .setContentsMargins(5, 1, 1, 1)
        self.Edit_isScanning             .setContentsMargins(5, 1, 1, 1)
        self.setFixedWidth(300)
    def initConnect(self):
        super(DrawHitBotDataView, self).initConnect()
        TYPE: Qt.Qt.ConnectionType = Qt.Qt.ConnectionType(Qt.Qt.AutoConnection | Qt.Qt.UniqueConnection)
        self.currentDataChanged.connect(slot=self.currentDataChangedSlot,type=TYPE)
        AppSlot.currentHitBotDataChanged.connect(slot=self.SlotCurrentHitBotDataChanged, type=TYPE)

    def SlotCurrentHitBotDataChanged(self, data, model):
        if isinstance(data, HitBotData):
            self.setModel(data)
        elif isinstance(model, HitBotData):
            self.setModel(model)

    def currentDataChangedSlot(self, data: object):
        self.setModel   (data)

    def initLayouts(self):
        self.init_widgets()

    def flushFrame(self):
        if not self.hasModel:
            return
        self.Edit_CardNumber             .setText(f'{self.Model   .CardNumber          }')
        self.Edit_xPosition              .setText(f'{self.Model   .xPosition           }')
        self.Edit_yPosition              .setText(f'{self.Model   .yPosition           }')
        self.Edit_zPosition              .setText(f'{self.Model   .zPosition           }')
        self.Edit_rPosition              .setText(f'{self.Model   .rPosition           }')
        self.Edit_angle1                 .setText(f'{self.Model   .angle1              }')
        self.Edit_angle2                 .setText(f'{self.Model   .angle2              }')
        self.Edit_efg_distance           .setText(f'{self.Model   .efg_distance        }')
        self.Edit_efg_travel_length      .setText(f'{self.Model   .efg_travel_length   }')
        self.Edit_efg_type               .setText(f'{self.Model   .efg_type            }')
        self.Edit_communicate_success    .setText(f'{self.Model   .communicate_success }')
        self.Edit_initial_finish         .setText(f'{self.Model   .initial_finish      }')
        self.Edit_move_flag              .setText(f'{self.Model   .move_flag           }')
        self.Edit_isScanning             .setText(f'{self.Model   .isScanning          }')


















    def setModel   (self, data: (HitBotData, HitBotModelInterface)):
        self.initModel   ()
        if isinstance(data, HitBotData):
            self.Model.as_field(data.to_field())
        elif isinstance(data, HitBotModelInterface):
            self.Model.as_field(data.to_field())
        self.flushFrame()


    @staticmethod
    def HitDataCopy(src: HitBotData, dst: HitBotData):
        if not isinstance(src, HitBotData) or not isinstance(dst, HitBotData):
            return
        for _property in src.fields:
            setattr(dst, _property, getattr(src, _property, None))

            pass

    @staticmethod
    def HitBotRequestCopy(src: HitBotModelInterface, dst: HitBotData):
        if not isinstance(src, HitBotModelInterface) or not isinstance(dst, HitBotData):
            return
        for _property in dst.__slots__:
            setattr(dst, _property, getattr(src, _property, None))

            pass
    def init_widgets(self):
        if not self.hasControl or self.m_Control.layout() is not None:
            return

        layout: Qt.QVBoxLayout = Qt.QVBoxLayout()
        layout.setSpacing(2)
        layout.setContentsMargins(20, 20, 20, 20)

        group_box_layout: Qt.QVBoxLayout = Qt.QVBoxLayout()
        group_box_layout.setSpacing(2)
        group_box_layout.setContentsMargins(5, 5, 5, 5)
        self.draw_group_box: Qt.QGroupBox = Qt.QGroupBox(self)

        layouts: list[Qt.QHBoxLayout] = [
            Qt.QHBoxLayout(),
            Qt.QHBoxLayout(),
            Qt.QHBoxLayout(),
            Qt.QHBoxLayout(),
            Qt.QHBoxLayout(),
            Qt.QHBoxLayout(),
            Qt.QHBoxLayout(),
            Qt.QHBoxLayout(),
            Qt.QHBoxLayout(),
            Qt.QHBoxLayout(),
            Qt.QHBoxLayout(),
            Qt.QHBoxLayout(),
            Qt.QHBoxLayout(),
            Qt.QHBoxLayout(),
        ]
        widget: Qt.QLabel
        group_layout: Qt.QHBoxLayout
        for group_layout in layouts:
            group_layout.setSpacing(2)
            group_layout.setContentsMargins(1, 1, 1, 1)

        layouts[0 ].addWidget(self.Info_CardNumber             )
        layouts[1 ].addWidget(self.Info_xPosition              )
        layouts[2 ].addWidget(self.Info_yPosition              )
        layouts[3 ].addWidget(self.Info_zPosition              )
        layouts[4 ].addWidget(self.Info_rPosition              )
        layouts[5 ].addWidget(self.Info_angle1                 )
        layouts[6 ].addWidget(self.Info_angle2                 )
        layouts[7 ].addWidget(self.Info_efg_distance           )
        layouts[8 ].addWidget(self.Info_efg_travel_length      )
        layouts[9 ].addWidget(self.Info_efg_type               )
        layouts[10].addWidget(self.Info_communicate_success    )
        layouts[11].addWidget(self.Info_initial_finish         )
        layouts[12].addWidget(self.Info_move_flag              )
        layouts[13].addWidget(self.Info_isScanning             )
        layouts[0 ].addWidget(self.Edit_CardNumber             )
        layouts[1 ].addWidget(self.Edit_xPosition              )
        layouts[2 ].addWidget(self.Edit_yPosition              )
        layouts[3 ].addWidget(self.Edit_zPosition              )
        layouts[4 ].addWidget(self.Edit_rPosition              )
        layouts[5 ].addWidget(self.Edit_angle1                 )
        layouts[6 ].addWidget(self.Edit_angle2                 )
        layouts[7 ].addWidget(self.Edit_efg_distance           )
        layouts[8 ].addWidget(self.Edit_efg_travel_length      )
        layouts[9 ].addWidget(self.Edit_efg_type               )
        layouts[10].addWidget(self.Edit_communicate_success    )
        layouts[11].addWidget(self.Edit_initial_finish         )
        layouts[12].addWidget(self.Edit_move_flag              )
        layouts[13].addWidget(self.Edit_isScanning             )

        group_box_layout.addLayout(layouts[0 ])
        group_box_layout.addLayout(layouts[1 ])
        group_box_layout.addLayout(layouts[2 ])
        group_box_layout.addLayout(layouts[3 ])
        group_box_layout.addLayout(layouts[4 ])
        group_box_layout.addLayout(layouts[5 ])
        group_box_layout.addLayout(layouts[6 ])
        group_box_layout.addLayout(layouts[7 ])
        group_box_layout.addLayout(layouts[8 ])
        group_box_layout.addLayout(layouts[9 ])
        group_box_layout.addLayout(layouts[10])
        group_box_layout.addLayout(layouts[11])
        group_box_layout.addLayout(layouts[12])
        group_box_layout.addLayout(layouts[13])

        self.draw_group_box.setLayout(group_box_layout)
        layout.addWidget(self.draw_group_box)
        self.m_Control.setLayout(layout)
        pass

    def initModel                       (self):
        if not self.hasModel                       :
            self.Model                        = HitBotData(   )

    def initInfo_CardNumber             (self):
        if not self.hasInfo_CardNumber             :
            self.Info_CardNumber              = Qt.QLabel(self)

    def initInfo_xPosition              (self):
        if not self.hasInfo_xPosition              :
            self.Info_xPosition               = Qt.QLabel(self)

    def initInfo_yPosition              (self):
        if not self.hasInfo_yPosition              :
            self.Info_yPosition               = Qt.QLabel(self)

    def initInfo_zPosition              (self):
        if not self.hasInfo_zPosition              :
            self.Info_zPosition               = Qt.QLabel(self)

    def initInfo_rPosition              (self):
        if not self.hasInfo_rPosition              :
            self.Info_rPosition               = Qt.QLabel(self)

    def initInfo_angle1                 (self):
        if not self.hasInfo_angle1                 :
            self.Info_angle1                  = Qt.QLabel(self)

    def initInfo_angle2                 (self):
        if not self.hasInfo_angle2                 :
            self.Info_angle2                  = Qt.QLabel(self)

    def initInfo_efg_distance           (self):
        if not self.hasInfo_efg_distance           :
            self.Info_efg_distance            = Qt.QLabel(self)

    def initInfo_efg_travel_length      (self):
        if not self.hasInfo_efg_travel_length      :
            self.Info_efg_travel_length       = Qt.QLabel(self)

    def initInfo_efg_type               (self):
        if not self.hasInfo_efg_type               :
            self.Info_efg_type                = Qt.QLabel(self)

    def initInfo_communicate_success    (self):
        if not self.hasInfo_communicate_success    :
            self.Info_communicate_success     = Qt.QLabel(self)

    def initInfo_initial_finish         (self):
        if not self.hasInfo_initial_finish         :
            self.Info_initial_finish          = Qt.QLabel(self)

    def initInfo_move_flag              (self):
        if not self.hasInfo_move_flag              :
            self.Info_move_flag               = Qt.QLabel(self)

    def initInfo_isScanning             (self):
        if not self.hasInfo_isScanning             :
            self.Info_isScanning              = Qt.QLabel(self)

    def initEdit_CardNumber             (self):
        if not self.hasEdit_CardNumber             :
            self.Edit_CardNumber              = Qt.QLabel(self)

    def initEdit_xPosition              (self):
        if not self.hasEdit_xPosition              :
            self.Edit_xPosition               = Qt.QLabel(self)

    def initEdit_yPosition              (self):
        if not self.hasEdit_yPosition              :
            self.Edit_yPosition               = Qt.QLabel(self)

    def initEdit_zPosition              (self):
        if not self.hasEdit_zPosition              :
            self.Edit_zPosition               = Qt.QLabel(self)

    def initEdit_rPosition              (self):
        if not self.hasEdit_rPosition              :
            self.Edit_rPosition               = Qt.QLabel(self)

    def initEdit_angle1                 (self):
        if not self.hasEdit_angle1                 :
            self.Edit_angle1                  = Qt.QLabel(self)

    def initEdit_angle2                 (self):
        if not self.hasEdit_angle2                 :
            self.Edit_angle2                  = Qt.QLabel(self)

    def initEdit_efg_distance           (self):
        if not self.hasEdit_efg_distance           :
            self.Edit_efg_distance            = Qt.QLabel(self)

    def initEdit_efg_travel_length      (self):
        if not self.hasEdit_efg_travel_length      :
            self.Edit_efg_travel_length       = Qt.QLabel(self)

    def initEdit_efg_type               (self):
        if not self.hasEdit_efg_type               :
            self.Edit_efg_type                = Qt.QLabel(self)

    def initEdit_communicate_success    (self):
        if not self.hasEdit_communicate_success    :
            self.Edit_communicate_success     = Qt.QLabel(self)

    def initEdit_initial_finish         (self):
        if not self.hasEdit_initial_finish         :
            self.Edit_initial_finish          = Qt.QLabel(self)

    def initEdit_move_flag              (self):
        if not self.hasEdit_move_flag              :
            self.Edit_move_flag               = Qt.QLabel(self)

    def initEdit_isScanning             (self):
        if not self.hasEdit_isScanning             :
            self.Edit_isScanning              = Qt.QLabel(self)

    @property
    def hasModel                       (self) -> bool:
        return hasattr(self, 'Model'                 ) and isinstance(self.Model                       , HitBotData  )

    @property
    def hasInfo_CardNumber             (self) -> bool:
        return hasattr(self, 'Info_CardNumber'          ) and isinstance(self.Info_CardNumber             , Qt.QLabel   )

    @property
    def hasInfo_xPosition              (self) -> bool:
        return hasattr(self, 'Info_xPosition'           ) and isinstance(self.Info_xPosition              , Qt.QLabel   )

    @property
    def hasInfo_yPosition              (self) -> bool:
        return hasattr(self, 'Info_yPosition'           ) and isinstance(self.Info_yPosition              , Qt.QLabel   )

    @property
    def hasInfo_zPosition              (self) -> bool:
        return hasattr(self, 'Info_zPosition'           ) and isinstance(self.Info_zPosition              , Qt.QLabel   )

    @property
    def hasInfo_rPosition              (self) -> bool:
        return hasattr(self, 'Info_rPosition'           ) and isinstance(self.Info_rPosition              , Qt.QLabel   )

    @property
    def hasInfo_angle1                 (self) -> bool:
        return hasattr(self, 'Info_angle1'              ) and isinstance(self.Info_angle1                 , Qt.QLabel   )

    @property
    def hasInfo_angle2                 (self) -> bool:
        return hasattr(self, 'Info_angle2'              ) and isinstance(self.Info_angle2                 , Qt.QLabel   )

    @property
    def hasInfo_efg_distance           (self) -> bool:
        return hasattr(self, 'Info_efg_distance'        ) and isinstance(self.Info_efg_distance           , Qt.QLabel   )

    @property
    def hasInfo_efg_travel_length      (self) -> bool:
        return hasattr(self, 'Info_efg_travel_length'   ) and isinstance(self.Info_efg_travel_length      , Qt.QLabel   )

    @property
    def hasInfo_efg_type               (self) -> bool:
        return hasattr(self, 'Info_efg_type'            ) and isinstance(self.Info_efg_type               , Qt.QLabel   )

    @property
    def hasInfo_communicate_success    (self) -> bool:
        return hasattr(self, 'Info_communicate_success' ) and isinstance(self.Info_communicate_success    , Qt.QLabel   )

    @property
    def hasInfo_initial_finish         (self) -> bool:
        return hasattr(self, 'Info_initial_finish'      ) and isinstance(self.Info_initial_finish         , Qt.QLabel   )

    @property
    def hasInfo_move_flag              (self) -> bool:
        return hasattr(self, 'Info_move_flag'           ) and isinstance(self.Info_move_flag              , Qt.QLabel   )

    @property
    def hasInfo_isScanning             (self) -> bool:
        return hasattr(self, 'Info_isScanning'          ) and isinstance(self.Info_isScanning             , Qt.QLabel   )

    @property
    def hasEdit_CardNumber             (self) -> bool:
        return hasattr(self, 'Edit_CardNumber'          ) and isinstance(self.Edit_CardNumber             , Qt.QLabel   )

    @property
    def hasEdit_xPosition              (self) -> bool:
        return hasattr(self, 'Edit_xPosition'           ) and isinstance(self.Edit_xPosition              , Qt.QLabel   )

    @property
    def hasEdit_yPosition              (self) -> bool:
        return hasattr(self, 'Edit_yPosition'           ) and isinstance(self.Edit_yPosition              , Qt.QLabel   )

    @property
    def hasEdit_zPosition              (self) -> bool:
        return hasattr(self, 'Edit_zPosition'           ) and isinstance(self.Edit_zPosition              , Qt.QLabel   )

    @property
    def hasEdit_rPosition              (self) -> bool:
        return hasattr(self, 'Edit_rPosition'           ) and isinstance(self.Edit_rPosition              , Qt.QLabel   )

    @property
    def hasEdit_angle1                 (self) -> bool:
        return hasattr(self, 'Edit_angle1'              ) and isinstance(self.Edit_angle1                 , Qt.QLabel   )

    @property
    def hasEdit_angle2                 (self) -> bool:
        return hasattr(self, 'Edit_angle2'              ) and isinstance(self.Edit_angle2                 , Qt.QLabel   )

    @property
    def hasEdit_efg_distance           (self) -> bool:
        return hasattr(self, 'Edit_efg_distance'        ) and isinstance(self.Edit_efg_distance           , Qt.QLabel   )

    @property
    def hasEdit_efg_travel_length      (self) -> bool:
        return hasattr(self, 'Edit_efg_travel_length'   ) and isinstance(self.Edit_efg_travel_length      , Qt.QLabel   )

    @property
    def hasEdit_efg_type               (self) -> bool:
        return hasattr(self, 'Edit_efg_type'            ) and isinstance(self.Edit_efg_type               , Qt.QLabel   )

    @property
    def hasEdit_communicate_success    (self) -> bool:
        return hasattr(self, 'Edit_communicate_success' ) and isinstance(self.Edit_communicate_success    , Qt.QLabel   )

    @property
    def hasEdit_initial_finish         (self) -> bool:
        return hasattr(self, 'Edit_initial_finish'      ) and isinstance(self.Edit_initial_finish         , Qt.QLabel   )

    @property
    def hasEdit_move_flag              (self) -> bool:
        return hasattr(self, 'Edit_move_flag'           ) and isinstance(self.Edit_move_flag              , Qt.QLabel   )

    @property
    def hasEdit_isScanning             (self) -> bool:
        return hasattr(self, 'Edit_isScanning'          ) and isinstance(self.Edit_isScanning             , Qt.QLabel   )
