blob: 07b6375f7212bcd512df7f0906bc57b5a9abb6b7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
// SPDX-FileCopyrightText: 2017 Konstantinos Sideris <siderisk@auth.gr>
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <QObject>
#include <array>
namespace emoji {
Q_NAMESPACE
struct Emoji
{
Q_GADGET
public:
enum class Category
{
People,
Nature,
Food,
Activity,
Travel,
Objects,
Symbols,
Flags,
Search
};
Q_ENUM(Category)
Q_PROPERTY(const QString &unicode MEMBER unicode)
Q_PROPERTY(const QString &shortName MEMBER shortName)
Q_PROPERTY(const QString &unicodeName MEMBER unicodeName)
Q_PROPERTY(emoji::Emoji::Category category MEMBER category)
public:
QString unicode;
QString shortName;
QString unicodeName;
Category category;
};
class Provider
{
public:
// all emoji for QML purposes
static const std::array<Emoji, 3655> emoji;
};
} // namespace emoji
Q_DECLARE_METATYPE(emoji::Emoji)
|