| 1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
|---|---|
| 2 | // |
| 3 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 4 | |
| 5 | #ifndef SYMBOLTREEVIEW_H |
| 6 | #define SYMBOLTREEVIEW_H |
| 7 | |
| 8 | #include "services/project/projectservice.h" |
| 9 | |
| 10 | #include <QTreeView> |
| 11 | |
| 12 | class QStandardItem; |
| 13 | class SymbolTreeViewPrivate; |
| 14 | class SymbolTreeView : public QTreeView |
| 15 | { |
| 16 | Q_OBJECT |
| 17 | SymbolTreeViewPrivate *const d; |
| 18 | public: |
| 19 | explicit SymbolTreeView(QWidget *parent = nullptr); |
| 20 | virtual ~SymbolTreeView(); |
| 21 | void setRootPath(const QString &filePath); |
| 22 | |
| 23 | signals: |
| 24 | void jumpToLine(const QString &filePath, const QString &line); |
| 25 | |
| 26 | private slots: |
| 27 | void doDoubleClieked(const QModelIndex &index); |
| 28 | void doContextMenu(const QPoint &point); |
| 29 | }; |
| 30 | |
| 31 | #endif // SYMBOLTREEVIEW_H |
| 32 |