code: def DeactivateCard(self, card):
          
          if hasattr(card, 'connection'):
              card.connection.disconnect()
              if None != self.parent.apdutracerpanel:
                  card.connection.deleteObserver(self.parent.apdutracerpanel)
              delattr(card, 'connection')
          self.dialogpanel.OnDeactivateCard(card)
docs: Deactivate a card.