2016-12-29 17:31:07 +01:00
|
|
|
#include "chatwidget.h"
|
|
|
|
#include "QPainter"
|
|
|
|
#include "QFont"
|
|
|
|
#include "QFontDatabase"
|
2017-01-01 02:30:42 +01:00
|
|
|
#include "QVBoxLayout"
|
|
|
|
#include "colorscheme.h"
|
2016-12-29 17:31:07 +01:00
|
|
|
|
|
|
|
ChatWidget::ChatWidget(QWidget *parent)
|
2017-01-01 02:30:42 +01:00
|
|
|
: QWidget(parent),
|
|
|
|
vbox(this)
|
2016-12-29 17:31:07 +01:00
|
|
|
{
|
2017-01-01 02:30:42 +01:00
|
|
|
vbox.setSpacing(0);
|
|
|
|
vbox.setMargin(1);
|
|
|
|
|
|
|
|
vbox.addWidget(&header);
|
|
|
|
vbox.addWidget(&view);
|
|
|
|
vbox.addWidget(&input);
|
|
|
|
}
|
|
|
|
|
|
|
|
ChatWidget::~ChatWidget()
|
|
|
|
{
|
|
|
|
|
2016-12-29 17:31:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void ChatWidget::paintEvent(QPaintEvent *)
|
|
|
|
{
|
|
|
|
QPainter painter (this);
|
|
|
|
|
2017-01-06 23:28:48 +01:00
|
|
|
painter.fillRect(rect(), ColorScheme::instance().ChatBackground);
|
2016-12-29 17:31:07 +01:00
|
|
|
}
|