8#include "autocorrectionutils.h"
9#include "textautocorrectioncore_export.h"
12namespace TextAutoCorrectionCore
14class AutoCorrectionSettingsPrivate;
15class TEXTAUTOCORRECTIONCORE_EXPORT AutoCorrectionSettings
18 AutoCorrectionSettings();
19 ~AutoCorrectionSettings();
21 [[nodiscard]]
bool isEnabledAutoCorrection()
const;
22 [[nodiscard]]
bool isUppercaseFirstCharOfSentence()
const;
23 [[nodiscard]]
bool isFixTwoUppercaseChars()
const;
24 [[nodiscard]]
bool isSingleSpaces()
const;
25 [[nodiscard]]
bool isAutoFractions()
const;
26 [[nodiscard]]
bool isCapitalizeWeekDays()
const;
27 [[nodiscard]]
bool isReplaceDoubleQuotes()
const;
28 [[nodiscard]]
bool isReplaceSingleQuotes()
const;
29 [[nodiscard]]
bool isAdvancedAutocorrect()
const;
30 [[nodiscard]]
bool isAutoFormatUrl()
const;
31 [[nodiscard]]
bool isAutoBoldUnderline()
const;
32 [[nodiscard]]
bool isSuperScript()
const;
34 [[nodiscard]]
bool isAddNonBreakingSpace()
const;
35 [[nodiscard]]
bool isReplaceDoubleQuotesByFrenchQuotes()
const;
37 [[nodiscard]] TextAutoCorrectionCore::AutoCorrectionUtils::TypographicQuotes typographicSingleQuotes()
const;
38 [[nodiscard]] TextAutoCorrectionCore::AutoCorrectionUtils::TypographicQuotes typographicDoubleQuotes()
const;
39 void setTypographicSingleQuotes(TextAutoCorrectionCore::AutoCorrectionUtils::TypographicQuotes singleQuote);
40 void setTypographicDoubleQuotes(TextAutoCorrectionCore::AutoCorrectionUtils::TypographicQuotes doubleQuote);
42 void setAutoFormatUrl(
bool b);
43 void setAutoBoldUnderline(
bool b);
44 void setSuperScript(
bool b);
45 void setAddNonBreakingSpace(
bool b);
46 void setCapitalizeWeekDays(
bool b);
47 void setReplaceDoubleQuotes(
bool b);
48 void setReplaceSingleQuotes(
bool b);
49 void setAdvancedAutocorrect(
bool b);
50 void setEnabledAutoCorrection(
bool b);
51 void setReplaceDoubleQuotesByFrenchQuotes(
bool b);
57 void setAutoFractions(
bool newAutoFractions);
59 void setSingleSpaces(
bool newSingleSpaces);
61 void setFixTwoUppercaseChars(
bool newFixTwoUppercaseChars);
63 void setUppercaseFirstCharOfSentence(
bool newUppercaseFirstCharOfSentence);
66 void setTwoUpperLetterExceptions(
const QSet<QString> &exceptions);
70 void setLanguage(
const QString &lang,
bool forceGlobal =
false);
71 [[nodiscard]]
QString language()
const;
73 [[nodiscard]]
bool isFrenchLanguage()
const;
77 [[nodiscard]]
bool addAutoCorrect(
const QString ¤tWord,
const QString &replaceWord);
79 [[nodiscard]]
QChar nonBreakingSpace()
const;
80 void setNonBreakingSpace(
const QChar &newNonBreakingSpace);
86 [[nodiscard]]
int maxFindStringLength()
const;
88 [[nodiscard]]
int minFindStringLength()
const;
90 void loadLocalFileName(
const QString &localFileName,
const QString &fname);
91 void loadGlobalFileName(
const QString &fname);
93 [[nodiscard]] AutoCorrectionUtils::TypographicQuotes doubleFrenchQuotes()
const;
94 void setDoubleFrenchQuotes(
const AutoCorrectionUtils::TypographicQuotes &newDoubleFrenchQuotes);
96 [[nodiscard]]
QString customWritablePath()
const;
97 void setCustomWritablePath(
const QString &path);
99 [[nodiscard]]
QString customSystemPath()
const;
100 void setCustomSystemPath(
const QString &path);
103 TEXTAUTOCORRECTIONCORE_NO_EXPORT
void migrateKMailXmlFile();
104 TEXTAUTOCORRECTIONCORE_NO_EXPORT
void readAutoCorrectionFile(
bool forceGlobal =
false);
105 [[nodiscard]] TEXTAUTOCORRECTIONCORE_NO_EXPORT
QString containsAutoCorrectionFile(
const QString &fileName);
107 friend class AutoCorrectionSettingsPrivate;
108 std::unique_ptr<AutoCorrectionSettingsPrivate>
const d;
111TEXTAUTOCORRECTIONCORE_EXPORT
QDebug operator<<(
QDebug d,
const TextAutoCorrectionCore::AutoCorrectionSettings &t);
KCALENDARCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalendarCore::Alarm::Ptr &)