File indexing completed on 2024-12-22 04:28:17
0001 /* 0002 SPDX-FileCopyrightText: 2019-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "textemoticonscore_export.h" 0010 #include <QDebug> 0011 #include <QString> 0012 namespace TextEmoticonsCore 0013 { 0014 /** 0015 * @brief The EmoticonCategory class 0016 * @author Laurent Montel <montel@kde.org> 0017 */ 0018 class TEXTEMOTICONSCORE_EXPORT EmoticonCategory 0019 { 0020 public: 0021 EmoticonCategory(); 0022 [[nodiscard]] QString name() const; 0023 void setName(const QString &name); 0024 0025 [[nodiscard]] QString category() const; 0026 void setCategory(const QString &category); 0027 0028 [[nodiscard]] const QString &i18nName() const; 0029 0030 void setI18nName(const QString &newI18nName); 0031 0032 [[nodiscard]] bool operator<(const EmoticonCategory &other) const; 0033 0034 [[nodiscard]] int order() const; 0035 void setOrder(int newOrder); 0036 0037 private: 0038 QString mName; 0039 QString mCategory; 0040 QString mI18nName; 0041 int mOrder = 20; 0042 }; 0043 } 0044 Q_DECLARE_METATYPE(TextEmoticonsCore::EmoticonCategory) 0045 Q_DECLARE_TYPEINFO(TextEmoticonsCore::EmoticonCategory, Q_MOVABLE_TYPE); 0046 TEXTEMOTICONSCORE_EXPORT QDebug operator<<(QDebug d, const TextEmoticonsCore::EmoticonCategory &t);