KTextAddons

autocorrectionlineedit.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
11#include <QPlainTextEdit>
12namespace TextAutoCorrectionCore
13{
14class AutoCorrection;
15}
16namespace TextAutoCorrectionWidgets
17{
18class AutoCorrectionLineEditPrivate;
19/**
20 * @brief The AutoCorrectionLineEdit class
21 * @author Laurent Montel <montel@kde.org>
22 */
23class TEXTAUTOCORRECTIONWIDGETS_EXPORT AutoCorrectionLineEdit : public QPlainTextEdit
24{
25 Q_OBJECT
26public:
27 explicit AutoCorrectionLineEdit(QWidget *parent = nullptr);
28 ~AutoCorrectionLineEdit() override;
29
30 [[nodiscard]] TextAutoCorrectionCore::AutoCorrection *autocorrection() const;
31
32 void setAutocorrection(TextAutoCorrectionCore::AutoCorrection *autocorrect);
33 void setAutocorrectionLanguage(const QString &language);
34
35protected:
36 void keyPressEvent(QKeyEvent *e) override;
37
38private:
39 std::unique_ptr<AutoCorrectionLineEditPrivate> const d;
40};
41}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 26 2024 11:51:28 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.