matrixion/src/TypingDisplay.h

32 lines
642 B
C
Raw Normal View History

2017-10-04 11:33:34 +03:00
#pragma once
#include "ui/OverlayWidget.h"
2017-10-04 11:33:34 +03:00
class QPaintEvent;
class TypingDisplay : public OverlayWidget
2017-10-04 11:33:34 +03:00
{
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_; };
public slots:
void setOffset(int margin);
2017-10-04 11:33:34 +03:00
protected:
void paintEvent(QPaintEvent *event) override;
private:
int offset_;
QColor textColor_;
2017-10-04 11:33:34 +03:00
QString text_;
};