2021-03-05 02:35:15 +03:00
|
|
|
// SPDX-FileCopyrightText: 2021 Nheko Contributors
|
2022-01-01 06:57:53 +03:00
|
|
|
// SPDX-FileCopyrightText: 2022 Nheko Contributors
|
2023-01-02 06:25:33 +03:00
|
|
|
// SPDX-FileCopyrightText: 2023 Nheko Contributors
|
2021-03-05 02:35:15 +03:00
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2020-07-19 13:22:54 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
struct Reaction
|
|
|
|
{
|
2021-09-18 01:22:33 +03:00
|
|
|
Q_GADGET
|
2022-01-01 08:37:15 +03:00
|
|
|
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)
|
2020-07-19 13:22:54 +03:00
|
|
|
|
|
|
|
public:
|
2022-01-01 08:37:15 +03:00
|
|
|
QString key() const { return key_; }
|
|
|
|
QString displayKey() const { return key_.toHtmlEscaped().remove(QStringLiteral(u"\ufe0f")); }
|
2021-09-18 01:22:33 +03:00
|
|
|
QString users() const { return users_.toHtmlEscaped(); }
|
|
|
|
QString selfReactedEvent() const { return selfReactedEvent_; }
|
|
|
|
int count() const { return count_; }
|
2020-07-19 13:22:54 +03:00
|
|
|
|
2021-09-18 01:22:33 +03:00
|
|
|
QString key_;
|
|
|
|
QString users_;
|
|
|
|
QString selfReactedEvent_;
|
|
|
|
int count_;
|
2020-07-19 13:22:54 +03:00
|
|
|
};
|