/* exampleutility.h SPDX-FileCopyrightText: 2022 Han Young SPDX-License-Identifier: GPL-2.0-or-later */ #pragma once #include #include #include #include #include #include #include #include #include #include class Utility { friend class ExampleUtilityTest; #ifdef LC_ADDRESS static QString resolveFieldDescriptors(const QHash &map, int langInfoFormat, int lcFormat, const QLocale &locale); static QString getLocaleInfo(int langInfoFormat, int lcFormat, const QLocale &locale); static QString parseLocaleFile(const QString &localeName, int langInfoFormat); static QFileInfo findLocaleInFolder(const QString &localeName, const QString &localeDirectory); static QString getFormatToFetch(int langInfoFormat); static QStringList getLangCodeFromLocale(const QLocale &locale); static QString replaceASCIIUnicodeSymbol(const QString &string); #endif public: static QString numericExample(const QLocale &locale); static QString timeExample(const QLocale &locale); static QString shortTimeExample(const QLocale &locale); static QString measurementExample(const QLocale &locale); static QString monetaryExample(const QLocale &locale); static QString paperSizeExample(const QLocale &locale); #ifdef LC_ADDRESS static QString addressExample(const QLocale &locale); static QString nameStyleExample(const QLocale &locale); static QString phoneNumbersExample(const QLocale &locale); #endif };