ActionManagerFixture.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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/UnitTest/TestTypes.h>
  11. #include <AzCore/UserSettings/UserSettingsComponent.h>
  12. #include <AzTest/AzTest.h>
  13. #include <AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.h>
  14. #include <AzToolsFramework/ActionManager/Action/ActionManager.h>
  15. #include <AzToolsFramework/ActionManager/HotKey/HotKeyManager.h>
  16. #include <AzToolsFramework/ActionManager/Menu/MenuManager.h>
  17. #include <AzToolsFramework/ActionManager/ToolBar/ToolBarManager.h>
  18. #include <QMainWindow>
  19. #include <QWidget>
  20. namespace UnitTest
  21. {
  22. class ActionManagerFixture : public LeakDetectionFixture
  23. {
  24. protected:
  25. void SetUp() override;
  26. void TearDown() override;
  27. public:
  28. AzToolsFramework::ActionManagerInterface* m_actionManagerInterface = nullptr;
  29. AzToolsFramework::ActionManagerInternalInterface* m_actionManagerInternalInterface = nullptr;
  30. AzToolsFramework::HotKeyManagerInterface* m_hotKeyManagerInterface = nullptr;
  31. AzToolsFramework::MenuManagerInterface* m_menuManagerInterface = nullptr;
  32. AzToolsFramework::MenuManagerInternalInterface* m_menuManagerInternalInterface = nullptr;
  33. AzToolsFramework::ToolBarManagerInterface* m_toolBarManagerInterface = nullptr;
  34. AzToolsFramework::ToolBarManagerInternalInterface* m_toolBarManagerInternalInterface = nullptr;
  35. QMainWindow* m_mainWindow = nullptr;
  36. QWidget* m_widget = nullptr;
  37. QWidget* m_defaultParentWidget = nullptr;
  38. private:
  39. AZStd::unique_ptr<AzToolsFramework::ActionManager> m_actionManager;
  40. AZStd::unique_ptr<AzToolsFramework::HotKeyManager> m_hotKeyManager;
  41. AZStd::unique_ptr<AzToolsFramework::MenuManager> m_menuManager;
  42. AZStd::unique_ptr<AzToolsFramework::ToolBarManager> m_toolBarManager;
  43. };
  44. } // namespace UnitTest