X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatscene.h;h=e0aaa500df894e79ffa1acead874652e1d144437;hp=fa441023c8be96bcb99296a13fe4c906c57024b5;hb=176d22d49934223b9279719ac5d9e7c03e530d40;hpb=7f586ab22eee4c914901c608304d1da144bc3789 diff --git a/src/qtui/chatscene.h b/src/qtui/chatscene.h index fa441023..e0aaa500 100644 --- a/src/qtui/chatscene.h +++ b/src/qtui/chatscene.h @@ -54,6 +54,7 @@ public: inline ColumnHandleItem *secondColumnHandle() const { return secondColHandle; } public slots: + void updateForViewport(qreal width, qreal height); void setWidth(qreal, bool forceReposition = false); // these are used by the chatitems to notify the scene and manage selections @@ -65,7 +66,7 @@ public slots: void requestBacklog(); signals: - void sceneHeightChanged(qreal dh); + void lastLineChanged(QGraphicsItem *); protected: virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent); @@ -93,6 +94,7 @@ private: // we store the size in a member variable. QRectF _sceneRect; void updateSceneRect(const QRectF &rect); + qreal _viewportHeight; ColumnHandleItem *firstColHandle, *secondColHandle; qreal firstColHandlePos, secondColHandlePos; @@ -108,7 +110,11 @@ private: }; bool ChatScene::containsBuffer(const BufferId &id) const { - return qobject_cast(model()) ? qobject_cast(model())->containsBuffer(id) : false; + MessageFilter *filter = qobject_cast(model()); + if(filter) + return filter->containsBuffer(id); + else + return false; } #endif