KTextAddons

unicodeemoticonmanager.h
1/*
2 SPDX-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>
13namespace TextEmoticonsCore
14{
15class UnicodeEmoticonManagerPrivate;
16/**
17 * @brief The UnicodeEmoticonManager class
18 * @author Laurent Montel <montel@kde.org>
19 */
20class TEXTEMOTICONSCORE_EXPORT UnicodeEmoticonManager : public QObject
21{
22 Q_OBJECT
23
24 Q_PROPERTY(QList<EmoticonCategory> categories READ categories CONSTANT)
25
26public:
27 explicit UnicodeEmoticonManager(QObject *parent = nullptr);
28 ~UnicodeEmoticonManager() override;
29
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
39private:
40 std::unique_ptr<UnicodeEmoticonManagerPrivate> const d;
41};
42}
The UnicodeEmoticon class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:47:37 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.