blob: 69e6fcceec449bd8de591df7fa04f8260b14503f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#pragma once
#include "cppoutlinemodel.h"
#include <QModelIndex>
#include <QObject>
#include <memory>
QT_BEGIN_NAMESPACE
class QAction;
class QSortFilterProxyModel;
class QTimer;
QT_END_NAMESPACE
namespace TextEditor { class TextEditorWidget; }
namespace Utils { class TreeViewComboBox; }
namespace CppEditor {
class CppEditorWidget;
namespace Internal {
class CppEditorOutline : public QObject
{
Q_OBJECT
public:
explicit CppEditorOutline(CppEditorWidget *editorWidget);
QWidget *widget() const; // Must be deleted by client.
public slots:
void updateIndex();
private:
void updateNow();
void updateIndexNow();
void updateToolTip();
void gotoSymbolInEditor();
CppEditorOutline();
bool isSorted() const;
OutlineModel *m_model = nullptr; // Not owned
CppEditorWidget *m_editorWidget = nullptr;
Utils::TreeViewComboBox *m_combo = nullptr; // Not owned
QSortFilterProxyModel *m_proxyModel = nullptr;
QAction *m_sortAction = nullptr;
QTimer *m_updateIndexTimer = nullptr;
};
} // namespace Internal
} // namespace CppEditor
|