PropertiesWrapper.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 <QWidget>
  11. #endif
  12. class EditorWindow;
  13. class PropertiesWidget;
  14. class HierarchyWidget;
  15. class QMimeData;
  16. class PropertiesWrapper
  17. : public QWidget
  18. {
  19. Q_OBJECT
  20. public:
  21. PropertiesWrapper(HierarchyWidget* hierarchy,
  22. EditorWindow* parent);
  23. PropertiesWidget* GetProperties();
  24. void ActiveCanvasChanged();
  25. private:
  26. void dragEnterEvent(QDragEnterEvent* event) override;
  27. void dropEvent(QDropEvent* event) override;
  28. // Drag/drop assets from asset browser
  29. bool AcceptsMimeData(const QMimeData* mimeData) const;
  30. void DropMimeDataAssets(const QMimeData* mimeData);
  31. PropertiesWidget* m_properties;
  32. ComponentButton* m_componentButton;
  33. EditorWindow* m_editorWindow;
  34. QCheckBox* m_editorOnlyCheckbox = nullptr;
  35. };