KTextAddons

unicodeemoticonmanager.h
1/*
2SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "emoticoncategory.h"
10#include "textemoticonscore_export.h"
11#include "unicodeemoticon.h"
12#include <QObject>
13
14class UnicodeEmoticonManagerTest;
15
16namespace TextEmoticonsCore
17{
18class UnicodeEmoticonManagerPrivate;
19/**
20 * @brief The UnicodeEmoticonManager class
21 * @author Laurent Montel <montel@kde.org>
22 */
23class TEXTEMOTICONSCORE_EXPORT UnicodeEmoticonManager : public QObject
24{
25 Q_OBJECT
26
27 Q_PROPERTY(QList<EmoticonCategory> categories READ categories CONSTANT)
28
29public:
30 static UnicodeEmoticonManager *self();
31
32 [[nodiscard]] QList<UnicodeEmoticon> unicodeEmojiList() const;
33
34 [[nodiscard]] QList<UnicodeEmoticon> emojisForCategory(const QString &category) const;
35 [[nodiscard]] QList<EmoticonCategory> categories() const;
36 [[nodiscard]] UnicodeEmoticon unicodeEmoticonForEmoji(const QString &emojiIdentifier) const;
37 [[nodiscard]] int count() const;
38
39protected:
40 explicit UnicodeEmoticonManager(QObject *parent = nullptr);
41 ~UnicodeEmoticonManager() override;
42
43 friend UnicodeEmoticonManagerTest;
44
45private:
46 std::unique_ptr<UnicodeEmoticonManagerPrivate> const d;
47};
48}
The UnicodeEmoticon class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:02 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.