PrefabEditVisualModeWidget.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 <AzToolsFramework/Prefab/PrefabFocusNotificationBus.h>
  10. #include <AzQtComponents/Components/Widgets/ComboBox.h>
  11. #include <QComboBox>
  12. #include <QLabel>
  13. #include <QWidget>
  14. // Widget to select the Prefab Edit mode visualization.
  15. class PrefabEditVisualModeWidget
  16. : public QWidget
  17. {
  18. public:
  19. PrefabEditVisualModeWidget();
  20. ~PrefabEditVisualModeWidget();
  21. private:
  22. void OnComboBoxValueChanged(int index);
  23. void UpdatePrefabEditMode();
  24. //! The different prefab edit mode effects available in the Edit mode menu.
  25. //! These correspond to the indices in the ComboBox to streamline code.
  26. enum class PrefabEditModeUXSetting
  27. {
  28. Normal, //!< No effect.
  29. Monochromatic //!< Monochromatic effect.
  30. };
  31. //! The currently active edit mode effect.
  32. PrefabEditModeUXSetting m_prefabEditMode = PrefabEditModeUXSetting::Monochromatic;
  33. QLabel* m_label = nullptr;
  34. QComboBox* m_comboBox = nullptr;
  35. };