KPimTextEdit

texteditorcompleter.h
1 /*
2  * SPDX-FileCopyrightText: 2015-2022 Laurent Montel <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.1-or-later
5  */
6 
7 #pragma once
8 
9 #include "kpimtextedit_export.h"
10 #include <QObject>
11 #include <memory>
12 class QCompleter;
13 class QTextEdit;
14 class QPlainTextEdit;
15 
16 namespace KPIMTextEdit
17 {
18 /**
19  * @brief The TextEditorCompleter class
20  * @author Laurent Montel <[email protected]>
21  */
22 class KPIMTEXTEDIT_EXPORT TextEditorCompleter : public QObject
23 {
24  Q_OBJECT
25 public:
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  Q_REQUIRED_RESULT QCompleter *completer() const;
33 
34  void completeText();
35 
36  void setExcludeOfCharacters(const QString &excludes);
37 
38 private:
39  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-2022 The KDE developers.
Generated on Sat May 28 2022 04:16:18 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.