EditorPreferencesTreeWidgetItemDelegate.h 733 B

1234567891011121314151617181920212223242526272829
  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 <QStyledItemDelegate>
  10. class EditorPreferencesTreeWidgetItemDelegate
  11. : public QStyledItemDelegate
  12. {
  13. Q_OBJECT
  14. public:
  15. explicit EditorPreferencesTreeWidgetItemDelegate(QWidget* parent = nullptr);
  16. void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
  17. QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const override;
  18. private:
  19. QBrush m_selectedBrush;
  20. QBrush m_mouseOverBrush;
  21. };