matrixion/src/TypingDisplay.h

27 lines
556 B
C
Raw Normal View History

2017-10-04 11:33:34 +03:00
#pragma once
#include <QPaintEvent>
#include <QWidget>
class TypingDisplay : public QWidget
{
Q_OBJECT
Q_PROPERTY(QColor textColor WRITE setTextColor READ textColor)
2017-10-04 11:33:34 +03:00
public:
TypingDisplay(QWidget *parent = nullptr);
void setUsers(const QStringList &user_ids);
void setTextColor(const QColor &color) { textColor_ = color; };
QColor textColor() const { return textColor_; };
2017-10-04 11:33:34 +03:00
protected:
void paintEvent(QPaintEvent *event) override;
private:
QColor textColor_;
2017-10-04 11:33:34 +03:00
QString text_;
};