KTextAddons

texteditorcompleter.h
1/*
2 * SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-or-later
5 */
6
7#pragma once
8
9#include "textcustomeditor_export.h"
10#include <QObject>
11#include <memory>
12class QCompleter;
13class QTextEdit;
14class QPlainTextEdit;
15
16namespace TextCustomEditor
17{
18/**
19 * @brief The TextEditorCompleter class
20 * @author Laurent Montel <montel@kde.org>
21 */
22class TEXTCUSTOMEDITOR_EXPORT TextEditorCompleter : public QObject
23{
24 Q_OBJECT
25public:
26 explicit TextEditorCompleter(QTextEdit *editor, QObject *parent);
27 explicit TextEditorCompleter(QPlainTextEdit *editor, QObject *parent);
28 ~TextEditorCompleter() override;
29
30 void setCompleterStringList(const QStringList &list);
31
32 [[nodiscard]] QCompleter *completer() const;
33
34 void completeText();
35
36 void setExcludeOfCharacters(const QString &excludes);
37
38private:
39 TEXTCUSTOMEDITOR_NO_EXPORT void slotCompletion(const QString &text);
40 class TextEditorCompleterPrivate;
41 std::unique_ptr<TextEditorCompleterPrivate> const d;
42};
43}
The TextEditorCompleter class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:29:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.