TextGrammarCheck::GrammarError Class
Represents a grammar error found during checking. Author: Laurent Montel <montel@kde.org>. More...
| Header: | #include <TextGrammarCheck/GrammarError> |
| CMake: | find_package(KF6TextGrammarCheck REQUIRED)target_link_libraries(mytarget PRIVATE KF6::TextGrammarCheck) |
Public Functions
| GrammarError() | |
| GrammarError(const TextGrammarCheck::GrammarError &other) | |
| GrammarError(TextGrammarCheck::GrammarError &&other) | |
| virtual | ~GrammarError() |
| int | blockId() const |
| QColor | color() const |
| QString | error() const |
| bool | isValid() const |
| int | length() const |
| QString | option() const |
| virtual void | parse(const QJsonObject &obj, int blockindex) |
| QString | rule() const |
| void | setBlockId(int blockId) |
| void | setColor(const QColor &color) |
| void | setError(const QString &error) |
| void | setLength(int length) |
| void | setOption(const QString &option) |
| void | setRule(const QString &rule) |
| void | setStart(int start) |
| void | setSuggestions(const QStringList &suggestions) |
| void | setUrl(const QString &url) |
| int | start() const |
| QStringList | suggestions() const |
| QString | url() const |
| TextGrammarCheck::GrammarError & | operator=(TextGrammarCheck::GrammarError &&other) |
| TextGrammarCheck::GrammarError & | operator=(const TextGrammarCheck::GrammarError &other) |
| bool | operator==(const TextGrammarCheck::GrammarError &other) const |
Detailed Description
Member Function Documentation
GrammarError::GrammarError()
Constructs a new GrammarError.
[constexpr noexcept default] GrammarError::GrammarError(const TextGrammarCheck::GrammarError &other)
Copy-constructs an error object.
[constexpr noexcept default] GrammarError::GrammarError(TextGrammarCheck::GrammarError &&other)
Move-constructs an error object.
[virtual noexcept] GrammarError::~GrammarError()
Destroys the error object.
int GrammarError::blockId() const
Returns the block ID where the error occurred.
See also setBlockId().
QColor GrammarError::color() const
Returns the color associated with this error.
See also setColor().
QString GrammarError::error() const
Returns the error description.
See also setError().
bool GrammarError::isValid() const
Returns whether the error is valid.
int GrammarError::length() const
Returns the length of the error in the text.
See also setLength().
QString GrammarError::option() const
Returns the option this error is related to.
See also setOption().
[virtual] void GrammarError::parse(const QJsonObject &obj, int blockindex)
Parses error information from a JSON object.
QString GrammarError::rule() const
Returns the rule that was violated.
See also setRule().
void GrammarError::setBlockId(int blockId)
Sets the block ID where the error occurred.
See also blockId().
void GrammarError::setColor(const QColor &color)
Sets the color associated with this error.
See also color().
void GrammarError::setError(const QString &error)
Sets the error description.
See also error().
void GrammarError::setLength(int length)
Sets the length of the error in the text.
See also length().
void GrammarError::setOption(const QString &option)
Sets the option this error is related to.
See also option().
void GrammarError::setRule(const QString &rule)
Sets the rule that was violated.
See also rule().
void GrammarError::setStart(int start)
Sets the starting position of the error in the text.
See also start().
void GrammarError::setSuggestions(const QStringList &suggestions)
Sets the list of suggestions to fix the error.
See also suggestions().
void GrammarError::setUrl(const QString &url)
Sets the URL for more information about this error.
See also url().
int GrammarError::start() const
Returns the starting position of the error in the text.
See also setStart().
QStringList GrammarError::suggestions() const
Returns the list of suggestions to fix the error.
See also setSuggestions().
QString GrammarError::url() const
Returns the URL for more information about this error.
See also setUrl().
[noexcept default] TextGrammarCheck::GrammarError &GrammarError::operator=(TextGrammarCheck::GrammarError &&other)
Move-assigns an error object.
[noexcept default] TextGrammarCheck::GrammarError &GrammarError::operator=(const TextGrammarCheck::GrammarError &other)
Copy-assigns an error object.
bool GrammarError::operator==(const TextGrammarCheck::GrammarError &other) const
Compares two errors for equality.