See also: https://github.com/quotient-im/libQuotient/wiki/User-color-coding-standard-draft-proposal
40 lines
674 B
C++
40 lines
674 B
C++
/**
|
|
* SPDX-FileCopyrightText: 2018-2019 Black Hat <bhat@encom.eu.org>
|
|
*
|
|
* SPDX-License-Identifier: GPL-3.0-only
|
|
*/
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
|
|
#include "room.h"
|
|
#include "user.h"
|
|
|
|
namespace Kirigami
|
|
{
|
|
class PlatformTheme;
|
|
}
|
|
|
|
using namespace Quotient;
|
|
|
|
class NeoChatUser : public User
|
|
{
|
|
Q_OBJECT
|
|
Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
|
|
public:
|
|
NeoChatUser(QString userId, Connection *connection);
|
|
|
|
public Q_SLOTS:
|
|
QColor color();
|
|
void setColor(QColor color);
|
|
|
|
Q_SIGNALS:
|
|
void colorChanged(QColor color);
|
|
|
|
private:
|
|
Kirigami::PlatformTheme *m_theme = nullptr;
|
|
QColor m_color;
|
|
|
|
void polishColor();
|
|
};
|