1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
2 | // |
3 | // SPDX-License-Identifier: GPL-3.0-or-later |
4 | |
5 | #include "stackframeview.h" |
6 | #include "interface/stackframemodel.h" |
7 | |
8 | #include <QDebug> |
9 | #include <QFontMetrics> |
10 | #include <QHeaderView> |
11 | #include <QItemDelegate> |
12 | #include <QLabel> |
13 | #include <QMap> |
14 | #include <QMenu> |
15 | #include <QMouseEvent> |
16 | |
17 | StackFrameView::StackFrameView(QWidget *parent) |
18 | : QTreeView(parent) |
19 | { |
20 | connect(this, &QAbstractItemView::activated, |
21 | this, &StackFrameView::rowActivated); |
22 | connect(this, &QAbstractItemView::clicked, |
23 | this, &StackFrameView::rowClicked); |
24 | } |
25 | |
26 | StackFrameView::~StackFrameView() |
27 | { |
28 | } |
29 | |
30 | void StackFrameView::rowActivated(const QModelIndex &index) |
31 | { |
32 | model()->setData(index, QVariant(), ItemActivatedRole); |
33 | } |
34 | |
35 | void StackFrameView::rowClicked(const QModelIndex &index) |
36 | { |
37 | model()->setData(index, QVariant(), ItemClickedRole); |
38 | } |
39 | |