KTextAddons

grammarresultwidget.h
1/*
2 SPDX-FileCopyrightText: 2019-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "grammarerror.h"
10#include "textgrammarcheck_export.h"
11#include <QWidget>
12class QHBoxLayout;
13namespace TextGrammarCheck
14{
15class GrammarAction;
16class GrammarResultTextEdit;
17class TEXTGRAMMARCHECK_EXPORT GrammarResultWidget : public QWidget
18{
19 Q_OBJECT
20public:
21 explicit GrammarResultWidget(QWidget *parent = nullptr);
22 ~GrammarResultWidget() override;
23 void setText(const QString &str);
24 virtual void checkGrammar() = 0;
25 void applyGrammarResult(const QVector<TextGrammarCheck::GrammarError> &infos);
26Q_SIGNALS:
27 void replaceText(const TextGrammarCheck::GrammarAction &act);
28 void checkAgain();
29 void closeChecker();
30 void configure();
31
32protected:
33 virtual void addExtraWidget();
34 GrammarResultTextEdit *const mResult;
35 QHBoxLayout *mExtraWidgetLayout = nullptr;
36
37private:
38 Q_DISABLE_COPY(GrammarResultWidget)
39};
40}
KGuiItem configure()
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.