-ChatView::ChatView(Buffer *buf, QWidget *parent) : QGraphicsView(parent) {
- _scene = new ChatScene(buf, this);
+ChatView::ChatView(Buffer *buf, QWidget *parent) : QGraphicsView(parent), AbstractChatView() {
+ setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ setOptimizationFlags(QGraphicsView::DontClipPainter
+ |QGraphicsView::DontSavePainterState
+ |QGraphicsView::DontAdjustForAntialiasing);
+ _scene = new ChatScene(Client::messageModel(), this);
+ connect(_scene, SIGNAL(heightChanged(int)), this, SLOT(sceneHeightChanged(int)));
+ //_scene->setWidth(width());