ObjectEditorCardPool.h 783 B

12345678910111213141516171819202122232425262728293031
  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. #include <AzCore/std/smart_ptr/unique_ptr.h>
  10. #include <AzCore/std/containers/stack.h>
  11. #include <QVector>
  12. #include <Editor/ObjectEditorCard.h>
  13. QT_FORWARD_DECLARE_CLASS(QWidget);
  14. namespace EMStudio
  15. {
  16. class ObjectEditorCardPool
  17. {
  18. public:
  19. ObjectEditorCard* GetFree(AZ::SerializeContext* serializeContext, QWidget* parent);
  20. void ReturnAllCards();
  21. private:
  22. AZStd::stack<AZStd::unique_ptr<ObjectEditorCard>> m_availableRpeCards;
  23. QVector<ObjectEditorCard*> m_usedRpeCards;
  24. };
  25. } // namespace EMStudio