File indexing completed on 2024-12-22 04:28:17
0001 /* 0002 SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "emoticoncategory.h" 0010 #include "textemoticonscore_export.h" 0011 #include "unicodeemoticon.h" 0012 #include <QObject> 0013 namespace TextEmoticonsCore 0014 { 0015 class UnicodeEmoticonManagerPrivate; 0016 /** 0017 * @brief The UnicodeEmoticonManager class 0018 * @author Laurent Montel <montel@kde.org> 0019 */ 0020 class TEXTEMOTICONSCORE_EXPORT UnicodeEmoticonManager : public QObject 0021 { 0022 Q_OBJECT 0023 public: 0024 explicit UnicodeEmoticonManager(QObject *parent = nullptr); 0025 ~UnicodeEmoticonManager() override; 0026 0027 static UnicodeEmoticonManager *self(); 0028 0029 [[nodiscard]] QList<UnicodeEmoticon> unicodeEmojiList() const; 0030 0031 [[nodiscard]] QList<UnicodeEmoticon> emojisForCategory(const QString &category) const; 0032 [[nodiscard]] QList<EmoticonCategory> categories() const; 0033 [[nodiscard]] UnicodeEmoticon unicodeEmoticonForEmoji(const QString &emojiIdentifier) const; 0034 [[nodiscard]] int count() const; 0035 0036 private: 0037 std::unique_ptr<UnicodeEmoticonManagerPrivate> const d; 0038 }; 0039 }