KTextAddons

autocorrectiontextedit.h
1/*
2 SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "textautocorrectionwidgets_export.h"
10#include <QTextEdit>
11namespace TextAutoCorrectionCore
12{
13class AutoCorrection;
14}
15namespace TextAutoCorrectionWidgets
16{
17class AutoCorrectionTextEditPrivate;
18/**
19 * @brief The AutoCorrectionTextEdit class
20 * @author Laurent Montel <montel@kde.org>
21 */
22class TEXTAUTOCORRECTIONWIDGETS_EXPORT AutoCorrectionTextEdit : public QTextEdit
23{
24 Q_OBJECT
25public:
26 explicit AutoCorrectionTextEdit(QWidget *parent = nullptr);
27 ~AutoCorrectionTextEdit() override;
28
29 [[nodiscard]] TextAutoCorrectionCore::AutoCorrection *autocorrection() const;
30
31 void setAutocorrection(TextAutoCorrectionCore::AutoCorrection *autocorrect);
32
33 void setAutocorrectionLanguage(const QString &language);
34
35protected:
36 void keyPressEvent(QKeyEvent *e) override;
37
38private:
39 std::unique_ptr<AutoCorrectionTextEditPrivate> const d;
40};
41}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:47:37 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.