diff options
Diffstat (limited to 'include/aotextboxwidgets.h')
| -rw-r--r-- | include/aotextboxwidgets.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/aotextboxwidgets.h b/include/aotextboxwidgets.h new file mode 100644 index 00000000..39bf4062 --- /dev/null +++ b/include/aotextboxwidgets.h @@ -0,0 +1,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 |
