mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-12-01 14:58:47 +03:00
96f791daf1
See also: https://daniel.haxx.se/blog/2023/01/08/copyright-without-years/ https://hynek.me/til/copyright-years/
30 lines
859 B
C++
30 lines
859 B
C++
// SPDX-FileCopyrightText: Nheko Contributors
|
|
//
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QString>
|
|
|
|
struct Reaction
|
|
{
|
|
Q_GADGET
|
|
Q_PROPERTY(QString key READ key CONSTANT)
|
|
Q_PROPERTY(QString displayKey READ displayKey CONSTANT)
|
|
Q_PROPERTY(QString users READ users CONSTANT)
|
|
Q_PROPERTY(QString selfReactedEvent READ selfReactedEvent CONSTANT)
|
|
Q_PROPERTY(int count READ count CONSTANT)
|
|
|
|
public:
|
|
QString key() const { return key_; }
|
|
QString displayKey() const { return key_.toHtmlEscaped().remove(QStringLiteral(u"\ufe0f")); }
|
|
QString users() const { return users_.toHtmlEscaped(); }
|
|
QString selfReactedEvent() const { return selfReactedEvent_; }
|
|
int count() const { return count_; }
|
|
|
|
QString key_;
|
|
QString users_;
|
|
QString selfReactedEvent_;
|
|
int count_;
|
|
};
|