- MessageFilter *filter = qobject_cast<MessageFilter*>(model);
- if(filter && filter->isSingleBufferFilter()) {
- _singleBufferId = filter->singleBufferId();
- }
-
- addItem(_markerLine);
- connect(this, SIGNAL(sceneRectChanged(const QRectF &)), _markerLine, SLOT(sceneRectChanged(const QRectF &)));
-
- ChatViewSettings defaultSettings;
- int defaultFirstColHandlePos = defaultSettings.value("FirstColumnHandlePos", 80).toInt();
- int defaultSecondColHandlePos = defaultSettings.value("SecondColumnHandlePos", 200).toInt();
-
- ChatViewSettings viewSettings(this);
- _firstColHandlePos = viewSettings.value("FirstColumnHandlePos", defaultFirstColHandlePos).toInt();
- _secondColHandlePos = viewSettings.value("SecondColumnHandlePos", defaultSecondColHandlePos).toInt();
-
- _firstColHandle = new ColumnHandleItem(QtUi::style()->firstColumnSeparator());
- addItem(_firstColHandle);
- _firstColHandle->setXPos(_firstColHandlePos);
- connect(_firstColHandle, SIGNAL(positionChanged(qreal)), this, SLOT(firstHandlePositionChanged(qreal)));
- connect(this, SIGNAL(sceneRectChanged(const QRectF &)), _firstColHandle, SLOT(sceneRectChanged(const QRectF &)));
-
- _secondColHandle = new ColumnHandleItem(QtUi::style()->secondColumnSeparator());
- addItem(_secondColHandle);
- _secondColHandle->setXPos(_secondColHandlePos);
- connect(_secondColHandle, SIGNAL(positionChanged(qreal)), this, SLOT(secondHandlePositionChanged(qreal)));
-
- connect(this, SIGNAL(sceneRectChanged(const QRectF &)), _secondColHandle, SLOT(sceneRectChanged(const QRectF &)));
-
- setHandleXLimits();
-
- if(model->rowCount() > 0)
- rowsInserted(QModelIndex(), 0, model->rowCount() - 1);
-
- connect(model, SIGNAL(rowsInserted(const QModelIndex &, int, int)),
- this, SLOT(rowsInserted(const QModelIndex &, int, int)));
- connect(model, SIGNAL(rowsAboutToBeRemoved(const QModelIndex &, int, int)),
- this, SLOT(rowsAboutToBeRemoved(const QModelIndex &, int, int)));
- connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
- this, SLOT(rowsRemoved()));
- connect(model, SIGNAL(dataChanged(QModelIndex, QModelIndex)), SLOT(dataChanged(QModelIndex, QModelIndex)));
-
-#ifdef HAVE_WEBKIT
- webPreview.timer.setSingleShot(true);
- connect(&webPreview.timer, SIGNAL(timeout()), this, SLOT(webPreviewNextStep()));
+ MessageFilter *filter = qobject_cast<MessageFilter *>(model);
+ if (filter && filter->isSingleBufferFilter()) {
+ _singleBufferId = filter->singleBufferId();
+ }
+
+ addItem(_markerLine);
+ connect(this, SIGNAL(sceneRectChanged(const QRectF &)), _markerLine, SLOT(sceneRectChanged(const QRectF &)));
+
+ ChatViewSettings defaultSettings;
+ _defaultFirstColHandlePos = defaultSettings.value("FirstColumnHandlePos", 80).toInt();
+ _defaultSecondColHandlePos = defaultSettings.value("SecondColumnHandlePos", 200).toInt();
+
+ ChatViewSettings viewSettings(this);
+ _firstColHandlePos = viewSettings.value("FirstColumnHandlePos", _defaultFirstColHandlePos).toInt();
+ _secondColHandlePos = viewSettings.value("SecondColumnHandlePos", _defaultSecondColHandlePos).toInt();
+
+ _firstColHandle = new ColumnHandleItem(QtUi::style()->firstColumnSeparator());
+ addItem(_firstColHandle);
+ _firstColHandle->setXPos(_firstColHandlePos);
+ connect(_firstColHandle, SIGNAL(positionChanged(qreal)), this, SLOT(firstHandlePositionChanged(qreal)));
+ connect(this, SIGNAL(sceneRectChanged(const QRectF &)), _firstColHandle, SLOT(sceneRectChanged(const QRectF &)));
+
+ _secondColHandle = new ColumnHandleItem(QtUi::style()->secondColumnSeparator());
+ addItem(_secondColHandle);
+ _secondColHandle->setXPos(_secondColHandlePos);
+ connect(_secondColHandle, SIGNAL(positionChanged(qreal)), this, SLOT(secondHandlePositionChanged(qreal)));
+
+ connect(this, SIGNAL(sceneRectChanged(const QRectF &)), _secondColHandle, SLOT(sceneRectChanged(const QRectF &)));
+
+ setHandleXLimits();
+
+ if (model->rowCount() > 0)
+ rowsInserted(QModelIndex(), 0, model->rowCount() - 1);
+
+ connect(model, SIGNAL(rowsInserted(const QModelIndex &, int, int)),
+ this, SLOT(rowsInserted(const QModelIndex &, int, int)));
+ connect(model, SIGNAL(rowsAboutToBeRemoved(const QModelIndex &, int, int)),
+ this, SLOT(rowsAboutToBeRemoved(const QModelIndex &, int, int)));
+ connect(model, SIGNAL(rowsRemoved(QModelIndex, int, int)),
+ this, SLOT(rowsRemoved()));
+ connect(model, SIGNAL(dataChanged(QModelIndex, QModelIndex)), SLOT(dataChanged(QModelIndex, QModelIndex)));
+
+#if defined HAVE_WEBKIT || defined HAVE_WEBENGINE
+ webPreview.timer.setSingleShot(true);
+ connect(&webPreview.timer, SIGNAL(timeout()), this, SLOT(webPreviewNextStep()));