blob: c4e6c35755c6eda7b1aae690250d9e89b77767fd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#pragma once
#include "ui/OverlayWidget.h"
class QPaintEvent;
class TypingDisplay : public OverlayWidget
{
Q_OBJECT
Q_PROPERTY(QColor textColor WRITE setTextColor READ textColor)
public:
TypingDisplay(QWidget *parent = nullptr);
void setUsers(const QStringList &user_ids);
void setTextColor(const QColor &color) { textColor_ = color; };
QColor textColor() const { return textColor_; };
public slots:
void setOffset(int margin);
protected:
void paintEvent(QPaintEvent *event) override;
private:
int offset_;
QColor textColor_;
QString text_;
};
|