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
45private:
46 void resizeColumnsSlot();
47
48protected:
49 void currentChanged(const QModelIndex &current, const QModelIndex &previous) override; /// Not available as a signal in this way
50 void scrollContentsBy(int dx, int dy) override;
51 void initViewItemOption(QStyleOptionViewItem *option) const override;
52
53private:
54 bool m_scrollingEnabled;
55 QTimer *m_resizeTimer;
56};
57
58#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 Sat Feb 24 2024 20:00:58 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.