KTextAddons

grammaraction.cpp
1/*
2 SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "grammaraction.h"
8
9using namespace TextGrammarCheck;
10
11GrammarAction::GrammarAction() = default;
12
13QString GrammarAction::replacement() const
14{
15 return mReplacement;
16}
17
18void GrammarAction::setReplacement(const QString &replacement)
19{
20 mReplacement = replacement;
21}
22
23int GrammarAction::start() const
24{
25 return mStart;
26}
27
28void GrammarAction::setStart(int start)
29{
30 mStart = start;
31}
32
33int GrammarAction::length() const
34{
35 return mLength;
36}
37
38void GrammarAction::setLength(int end)
39{
40 mLength = end;
41}
42
43QStringList GrammarAction::suggestions() const
44{
45 return mSuggestions;
46}
47
48void GrammarAction::setSuggestions(const QStringList &suggestions)
49{
50 mSuggestions = suggestions;
51}
52
53int GrammarAction::blockId() const
54{
55 return mBlockId;
56}
57
58void GrammarAction::setBlockId(int blockId)
59{
60 mBlockId = blockId;
61}
62
63QStringList GrammarAction::infoUrls() const
64{
65 return mInfoUrls;
66}
67
68void GrammarAction::setInfoUrls(const QStringList &urls)
69{
70 mInfoUrls = urls;
71}
72
73QDebug operator<<(QDebug d, const GrammarAction &t)
74{
75 d << "start " << t.start();
76 d << "length " << t.length();
77 d << "blockId " << t.blockId();
78 d << "suggestion " << t.suggestions();
79 d << "replacement " << t.replacement();
80 d << "urls " << t.infoUrls();
81 return d;
82}
Q_SCRIPTABLE QString start(QString train="")
Q_SCRIPTABLE Q_NOREPLY void start()
const QList< QKeySequence > & end()
KTEXTEDITOR_EXPORT QDebug operator<<(QDebug s, const MovingCursor &cursor)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:49:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.