3
0

InspectorPanel.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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 <ATLControlsModel.h>
  11. #include <AudioControl.h>
  12. #include <IAudioSystemEditor.h>
  13. #include <QConnectionsWidget.h>
  14. #include <QWidget>
  15. #include <QMenu>
  16. #include <QListWidget>
  17. #include <Source/Editor/ui_InspectorPanel.h>
  18. #endif
  19. namespace AudioControls
  20. {
  21. class CATLControl;
  22. //-------------------------------------------------------------------------------------------//
  23. class CInspectorPanel
  24. : public QWidget
  25. , public Ui::InspectorPanel
  26. , public IATLControlModelListener
  27. {
  28. Q_OBJECT
  29. public:
  30. explicit CInspectorPanel(CATLControlsModel* atlControlsModel);
  31. ~CInspectorPanel();
  32. void Reload();
  33. public slots:
  34. void SetSelectedControls(const ControlList& selectedControls);
  35. void UpdateInspector();
  36. private slots:
  37. void SetControlName(QString name);
  38. void SetControlScope(QString scope);
  39. void SetAutoLoadForCurrentControl(bool isAutoLoad);
  40. void FinishedEditingName();
  41. private:
  42. void UpdateNameControl();
  43. void UpdateScopeControl();
  44. void UpdateAutoLoadControl();
  45. void UpdateConnectionListControl();
  46. void UpdateConnectionData();
  47. void UpdateScopeData();
  48. void HideScope(bool hide);
  49. void HideAutoLoad(bool hide);
  50. //////////////////////////////////////////////////////////
  51. // IATLControlModelListener implementation
  52. void OnControlModified(CATLControl* control) override;
  53. //////////////////////////////////////////////////////////
  54. CATLControlsModel* m_atlControlsModel;
  55. EACEControlType m_selectedType;
  56. AZStd::vector<CATLControl*> m_selectedControls;
  57. bool m_allControlsSameType;
  58. QColor m_notFoundColor;
  59. };
  60. } // namespace AudioControls