KTextEditor

katecompletiontree.h
1/*
2 SPDX-FileCopyrightText: 2006 Hamish Rodda <rodda@kde.org>
3 SPDX-FileCopyrightText: 2007-2008 David Nolden <david.nolden.kdevelop@art-master.de>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef KATECOMPLETIONTREE_H
9#define KATECOMPLETIONTREE_H
10
11#include <QTreeView>
12
15
16class QTimer;
17
18class KateCompletionTree final : public QTreeView
19{
20public:
21 explicit KateCompletionTree(KateCompletionWidget *parent);
22
23 KateCompletionWidget *widget() const;
24 KateCompletionModel *kateModel() const;
25
26 void resizeColumns(bool firstShow = false, bool forceResize = false);
27
28 int sizeHintForColumn(int column) const override
29 {
30 return columnWidth(column);
31 }
32
33 // Navigation
34 bool nextCompletion();
35 bool previousCompletion();
36 bool pageDown();
37 bool pageUp();
38 void top();
39 void bottom();
40
41 void scheduleUpdate();
42
43 void setScrollingEnabled(bool);
44
45 int textColumnOffset() const;
46
47private:
48 void resizeColumnsSlot();
49
50protected:
51 void currentChanged(const QModelIndex &current, const QModelIndex &previous) override; /// Not available as a signal in this way
52 void scrollContentsBy(int dx, int dy) override;
53 void initViewItemOption(QStyleOptionViewItem *option) const override;
54
55private:
56 bool m_scrollingEnabled;
57 QTimer *m_resizeTimer;
58};
59
60#endif
This class has the responsibility for filtering, sorting, and manipulating code completion data provi...
This is the code completion's main widget, and also contains the core interface logic.
QObject * parent() const const
int columnWidth(int column) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:11:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.