KTextAddons

grammaraction.h
1/*
2 SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6#pragma once
7#include "textgrammarcheck_export.h"
8#include <QDebug>
9#include <QString>
10#include <QStringList>
11
12namespace TextGrammarCheck
13{
14class TEXTGRAMMARCHECK_EXPORT GrammarAction
15{
16public:
17 GrammarAction();
18
19 [[nodiscard]] QString replacement() const;
20 void setReplacement(const QString &replacement);
21
22 [[nodiscard]] int start() const;
23 void setStart(int start);
24
25 [[nodiscard]] int length() const;
26 void setLength(int length);
27
28 [[nodiscard]] QStringList suggestions() const;
29 void setSuggestions(const QStringList &suggestions);
30
31 [[nodiscard]] int blockId() const;
32 void setBlockId(int blockId);
33
34 [[nodiscard]] QStringList infoUrls() const;
35 void setInfoUrls(const QStringList &urls);
36
37private:
38 QStringList mSuggestions;
39 QStringList mInfoUrls;
40 QString mReplacement;
41 int mStart = -1;
42 int mLength = -1;
43 int mBlockId = -1;
44};
45}
46Q_DECLARE_METATYPE(TextGrammarCheck::GrammarAction)
47TEXTGRAMMARCHECK_EXPORT QDebug operator<<(QDebug d, const TextGrammarCheck::GrammarAction &t);
Q_SCRIPTABLE Q_NOREPLY void start()
QDebug operator<<(QDebug dbg, const PerceptualColor::MultiSpinBoxSection &value)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.