QConnectionsWidget.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 <AudioControl.h>
  11. #include <QWidget>
  12. #include <QListWidget>
  13. #include <QColor>
  14. #include <Source/Editor/ui_ConnectionsWidget.h>
  15. #endif
  16. namespace AudioControls
  17. {
  18. class CATLControl;
  19. class IAudioConnectionInspectorPanel;
  20. //-------------------------------------------------------------------------------------------//
  21. class QConnectionsWidget
  22. : public QWidget
  23. , public Ui::ConnectionsWidget
  24. {
  25. Q_OBJECT
  26. public:
  27. QConnectionsWidget(QWidget* parent = nullptr);
  28. public slots:
  29. void SetControl(CATLControl* control);
  30. private slots:
  31. void ShowConnectionContextMenu(const QPoint& pos);
  32. void CurrentConnectionModified();
  33. void RemoveSelectedConnection();
  34. void SelectedConnectionChanged();
  35. private:
  36. bool eventFilter(QObject* object, QEvent* event) override;
  37. void MakeConnectionTo(IAudioSystemControl* middlewareControl);
  38. void UpdateConnections();
  39. void CreateItemFromConnection(IAudioSystemControl* middlewareControl);
  40. CATLControl* m_control;
  41. QColor m_notFoundColor;
  42. QColor m_localizedColor;
  43. QWidget* m_connectionPropertiesWidget = nullptr;
  44. };
  45. } // namespace AudioControls