7#include "grammarerror.h"
9using namespace TextGrammarCheck;
10GrammarError::GrammarError() =
default;
12GrammarError::~GrammarError() =
default;
14QColor GrammarError::color()
const
19void GrammarError::setColor(
const QColor &color)
24QString GrammarError::error()
const
29void GrammarError::setError(
const QString &error)
34int GrammarError::blockId()
const
39void GrammarError::setBlockId(
int blockId)
44int GrammarError::start()
const
49void GrammarError::setStart(
int begin)
54int GrammarError::length()
const
59void GrammarError::setLength(
int length)
69void GrammarError::setSuggestions(
const QStringList &suggestions)
71 mSuggestions = suggestions;
74bool GrammarError::isValid()
const
76 if ((mLength != -1) && (mStart != -1) && (!mError.
isEmpty())) {
82void GrammarError::parse(
const QJsonObject &obj,
int blockindex)
88bool GrammarError::operator==(
const GrammarError &other)
const
90 return (mBlockId == other.blockId()) && (mLength == other.length()) && (mStart == other.start()) && (mColor == other.color())
91 && (mSuggestions == other.suggestions()) && (mError == other.error()) && (mOption == other.option()) && (mRule == other.rule())
92 && (mUrl == other.url());
95QString GrammarError::url()
const
100void GrammarError::setUrl(
const QString &url)
105QString GrammarError::rule()
const
110void GrammarError::setRule(
const QString &rule)
115QString GrammarError::option()
const
120void GrammarError::setOption(
const QString &option)
127 d <<
"mError: " << t.error();
128 d <<
"Start: " << t.start();
129 d <<
"Length: " << t.length();
130 d <<
"BlockId: " << t.blockId();
131 d <<
"Color: " << t.color().
name();
132 d <<
"Suggestion: " << t.suggestions();
133 d <<
"Option: " << t.option();
134 d <<
"Rule: " << t.rule();
135 d <<
"Url: " << t.url();
void error(QWidget *parent, const QString &text, const QString &title, const KGuiItem &buttonOk, Options options=Notify)
const QList< QKeySequence > & begin()
QDebug operator<<(QDebug dbg, const PerceptualColor::MultiSpinBoxSection &value)
QString name(NameFormat format) const const
bool isEmpty() const const
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.