File indexing completed on 2024-12-22 04:28:07

0001 /*
0002   SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org>
0003 
0004   SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QHash>
0010 #include <QSet>
0011 #include <QString>
0012 
0013 #include "textautocorrectioncore_private_export.h"
0014 namespace TextAutoCorrectionCore
0015 {
0016 class TEXTAUTOCORRECTIONCORE_TESTS_EXPORT ExportAbstractAutocorrection
0017 {
0018 public:
0019     ExportAbstractAutocorrection();
0020     virtual ~ExportAbstractAutocorrection();
0021     virtual bool exportData(const QString &language, const QString &fileName, QString &errorMessage, const QString &writablePath) = 0;
0022 
0023     void setUpperCaseExceptions(const QSet<QString> &newUpperCaseExceptions);
0024     void setTwoUpperLetterExceptions(const QSet<QString> &newTwoUpperLetterExceptions);
0025     void setAutocorrectEntries(const QHash<QString, QString> &newAutocorrectEntries);
0026 
0027 protected:
0028     QSet<QString> mUpperCaseExceptions;
0029     QSet<QString> mTwoUpperLetterExceptions;
0030     QHash<QString, QString> mAutocorrectEntries;
0031 };
0032 }