| 1 | // Copyright (C) 2016 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 |
| 3 | |
| 4 | // |
| 5 | // W A R N I N G |
| 6 | // ------------- |
| 7 | // |
| 8 | // This file is not part of the Qt API. It exists for the convenience |
| 9 | // of Qt Designer. This header |
| 10 | // file may change from version to version without notice, or even be removed. |
| 11 | // |
| 12 | // We mean it. |
| 13 | // |
| 14 | |
| 15 | |
| 16 | #ifndef SHEET_DELEGATE_H |
| 17 | #define SHEET_DELEGATE_H |
| 18 | |
| 19 | #include "shared_global_p.h" |
| 20 | |
| 21 | #include <QtWidgets/qstyleditemdelegate.h> |
| 22 | #include <QtWidgets/qtreeview.h> |
| 23 | |
| 24 | QT_BEGIN_NAMESPACE |
| 25 | |
| 26 | class QTreeView; |
| 27 | |
| 28 | namespace qdesigner_internal { |
| 29 | |
| 30 | class QDESIGNER_SHARED_EXPORT SheetDelegate: public QStyledItemDelegate |
| 31 | { |
| 32 | Q_OBJECT |
| 33 | public: |
| 34 | SheetDelegate(QTreeView *view, QWidget *parent); |
| 35 | |
| 36 | void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override; |
| 37 | QSize sizeHint(const QStyleOptionViewItem &opt, const QModelIndex &index) const override; |
| 38 | |
| 39 | private: |
| 40 | QTreeView *m_view; |
| 41 | }; |
| 42 | |
| 43 | } // namespace qdesigner_internal |
| 44 | |
| 45 | QT_END_NAMESPACE |
| 46 | |
| 47 | #endif // SHEET_DELEGATE_H |
| 48 | |