HierarchyHeader.h 790 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 <QHeaderView>
  11. #endif
  12. class HierarchyWidget;
  13. class QSize;
  14. class QPainter;
  15. class QRect;
  16. class QEvent;
  17. class QIcon;
  18. class HierarchyHeader
  19. : public QHeaderView
  20. {
  21. Q_OBJECT
  22. public:
  23. HierarchyHeader(HierarchyWidget* parent);
  24. QSize sizeHint() const override;
  25. protected:
  26. void paintSection(QPainter* painter, const QRect& rect, int logicalIndex) const override;
  27. void enterEvent(QEvent* ev) override;
  28. private:
  29. HierarchyWidget* m_hierarchy;
  30. QIcon m_visibleIcon;
  31. QIcon m_selectableIcon;
  32. };