DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
navigationdelegate.h
1// SPDX-FileCopyrightText: 2016 - 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#pragma once
6
7#include <QScopedPointer>
8
9#include <DStyle>
10#include <DStyledItemDelegate>
11
12DWIDGET_BEGIN_NAMESPACE
13
14class NavigationDelegatePrivate;
16{
17 Q_OBJECT
18public:
19 NavigationDelegate(QAbstractItemView *parent);
21
22
23 enum DataRole {
24 NavLevelRole = Dtk::UserRole + 100,
25 NavKeyRole,
26 };
27
28 enum NavLevel {
29 Split = 1001,
30 Level1,
31 Level2,
32 Level3
33 };
34
35protected:
36 void paint(QPainter *painter, const QStyleOptionViewItem &option,
37 const QModelIndex &index) const override;
38 void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const override;
39};
40
41DWIDGET_END_NAMESPACE
Definition dstyleditemdelegate.h:65
Definition navigationdelegate.h:16