aboutsummaryrefslogtreecommitdiff
path: root/include/aotextboxwidgets.h
blob: 39bf4062ae09d29219d0cd7e0063532a6859e04f (plain)
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
32
#ifndef AOTEXTBOXWIDGETS_H
#define AOTEXTBOXWIDGETS_H

#include <QAbstractTextDocumentLayout>
#include <QDebug>
#include <QLabel>
#include <QPaintEvent>
#include <QPainter>
#include <QPainterPath>
#include <QTextEdit>

class AOChatboxLabel : public QLabel {
  Q_OBJECT

public:
  AOChatboxLabel(QWidget *parent);
  void paintEvent(QPaintEvent *event);

  void setOutlineColor(QColor color) { outline_color = color; };
  void setOutlineWidth(int width) { outline_width = width; };
  void setTextColor(QColor color) { text_color = color; };
  void setIsOutlined(bool outlined) { is_outlined = outlined; };

protected:
private:
  QColor outline_color;
  QColor text_color;
  int outline_width = 1;
  bool is_outlined = false;
};

#endif // AOTEXTBOXWIDGETS_H