KTextAddons

emoticoncategory.h
1/*
2 SPDX-FileCopyrightText: 2019-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "textemoticonscore_export.h"
10#include <QDebug>
11#include <QString>
12namespace TextEmoticonsCore
13{
14/**
15 * @brief The EmoticonCategory class
16 * @author Laurent Montel <montel@kde.org>
17 */
18class TEXTEMOTICONSCORE_EXPORT EmoticonCategory
19{
20 Q_GADGET
21
22 Q_PROPERTY(QString name MEMBER mName CONSTANT)
23 Q_PROPERTY(QString category MEMBER mCategory CONSTANT)
24 Q_PROPERTY(QString i18nName MEMBER mI18nName CONSTANT)
25
26public:
28 [[nodiscard]] QString name() const;
29 void setName(const QString &name);
30
31 [[nodiscard]] QString category() const;
32 void setCategory(const QString &category);
33
34 [[nodiscard]] const QString &i18nName() const;
35
36 void setI18nName(const QString &newI18nName);
37
38 [[nodiscard]] bool operator<(const EmoticonCategory &other) const;
39
40 [[nodiscard]] int order() const;
41 void setOrder(int newOrder);
42
43private:
44 QString mName;
45 QString mCategory;
46 QString mI18nName;
47 int mOrder = 20;
48};
49}
51Q_DECLARE_TYPEINFO(TextEmoticonsCore::EmoticonCategory, Q_MOVABLE_TYPE);
52TEXTEMOTICONSCORE_EXPORT QDebug operator<<(QDebug d, const TextEmoticonsCore::EmoticonCategory &t);
The EmoticonCategory class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.