ClothOutlinerNotificationHandler.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #if !defined(Q_MOC_RUN)
  10. #include <Editor/Plugins/SkeletonOutliner/SkeletonOutlinerBus.h>
  11. #include <QObject>
  12. #endif
  13. QT_FORWARD_DECLARE_CLASS(QVBoxLayout)
  14. namespace EMotionFX
  15. {
  16. class Node;
  17. class ClothJointWidget;
  18. class ClothOutlinerNotificationHandler
  19. : public QObject
  20. , private EMotionFX::SkeletonOutlinerNotificationBus::Handler
  21. {
  22. Q_OBJECT //AUTOMOC
  23. public:
  24. ClothOutlinerNotificationHandler(ClothJointWidget* m_colliderWidget);
  25. ~ClothOutlinerNotificationHandler();
  26. // SkeletonOutlinerNotificationBus overrides
  27. void OnContextMenu(QMenu* menu, const QModelIndexList& selectedRowIndices) override;
  28. static bool IsJointInCloth(const QModelIndex& index);
  29. public slots:
  30. void OnAddCollider();
  31. void OnClearColliders();
  32. private:
  33. bool IsNvClothGemAvailable() const;
  34. ClothJointWidget* m_colliderWidget = nullptr;
  35. };
  36. } // namespace EMotionFX