TextAutoCorrectionCore::ImportAbstractAutocorrection Class

Abstract base class for importing autocorrection data from various formats. More...

Header: #include <TextAutoCorrectionCore/ImportAbstractAutocorrection>
CMake: find_package(KF6TextAutoCorrectionCore REQUIRED)
target_link_libraries(mytarget PRIVATE KF6::TextAutoCorrectionCore)
Inherited By:

TextAutoCorrectionCore::ImportKMailAutocorrection and TextAutoCorrectionCore::ImportLibreOfficeAutocorrection

Public Functions

ImportAbstractAutocorrection()
virtual ~ImportAbstractAutocorrection()
QHash<QString, QString> autocorrectEntries() const
virtual bool import(const QString &fileName, QString &errorMessage, TextAutoCorrectionCore::ImportAbstractAutocorrection::LoadAttribute loadAttribute = All) = 0
int maxFindStringLenght() const
int minFindStringLenght() const
QHash<QString, QString> superScriptEntries() const
QSet<QString> twoUpperLetterExceptions() const
TextAutoCorrectionCore::AutoCorrectionUtils::TypographicQuotes typographicDoubleQuotes() const
TextAutoCorrectionCore::AutoCorrectionUtils::TypographicQuotes typographicSingleQuotes() const
QSet<QString> upperCaseExceptions() const

Detailed Description

This class provides an interface for importing autocorrection rules, exceptions, and typographic quote settings from different file formats.

Member Function Documentation

ImportAbstractAutocorrection::ImportAbstractAutocorrection()

Constructs an ImportAbstractAutocorrection instance

[virtual noexcept] ImportAbstractAutocorrection::~ImportAbstractAutocorrection()

Destroys the ImportAbstractAutocorrection instance

QHash<QString, QString> ImportAbstractAutocorrection::autocorrectEntries() const

Returns the autocorrection entries Returns A hash of autocorrection replacements

[pure virtual] bool ImportAbstractAutocorrection::import(const QString &fileName, QString &errorMessage, TextAutoCorrectionCore::ImportAbstractAutocorrection::LoadAttribute loadAttribute = All)

Imports autocorrection data from a file fileName The path to the file to import from errorMessage Will be set to an error message if import fails loadAttribute Specifies what data to load Returns true if import was successful, false otherwise

int ImportAbstractAutocorrection::maxFindStringLenght() const

Returns the maximum length of strings to find for replacement Returns The maximum find string length

int ImportAbstractAutocorrection::minFindStringLenght() const

Returns the minimum length of strings to find for replacement Returns The minimum find string length

QHash<QString, QString> ImportAbstractAutocorrection::superScriptEntries() const

Returns the superscript entries Returns A hash of superscript replacements

QSet<QString> ImportAbstractAutocorrection::twoUpperLetterExceptions() const

Returns the list of two-upper-letter exceptions Returns The set of words that should not be changed from two uppercase letters

TextAutoCorrectionCore::AutoCorrectionUtils::TypographicQuotes ImportAbstractAutocorrection::typographicDoubleQuotes() const

Returns the typographic double quote characters Returns The typographic double quotes

TextAutoCorrectionCore::AutoCorrectionUtils::TypographicQuotes ImportAbstractAutocorrection::typographicSingleQuotes() const

Returns the typographic single quote characters Returns The typographic single quotes

QSet<QString> ImportAbstractAutocorrection::upperCaseExceptions() const

Returns the list of uppercase exceptions Returns The set of words that should not have their first character uppercased