X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fchatview.h;h=c2aa6040aae4e822fb7b18f4b93cadb62ca2ee80;hb=894e2dd800e90ab52618fa620b1c995545506574;hp=4fb3661e2a6b84cb7fae7ac414176615db5a1b75;hpb=57982f5802c957e768ce842888591115694fcbef;p=quassel.git diff --git a/src/qtui/chatview.h b/src/qtui/chatview.h index 4fb3661e..c2aa6040 100644 --- a/src/qtui/chatview.h +++ b/src/qtui/chatview.h @@ -69,7 +69,14 @@ public: virtual void addActionsToMenu(QMenu *, const QPointF &pos); - virtual bool event(QEvent *event); + //! Tell the view that this ChatLine has cached data + /** ChatLines cache some layout data that should be cleared as soon as it's no + * longer visible. A ChatLine caching data registers itself with this method to + * tell the view about it. The view will call ChatLine::clearCache() when + * appropriate. + * \param line The ChatLine having cached data + */ + void setHasCache(ChatLine *line, bool hasCache = true); public slots: inline virtual void clear() {} @@ -77,8 +84,13 @@ public slots: void zoomOut(); void zoomOriginal(); + void setMarkerLineVisible(bool visible = true); + void setMarkerLine(MsgId msgId); + protected: + virtual bool event(QEvent *event); virtual void resizeEvent(QResizeEvent *event); + virtual void scrollContentsBy(int dx, int dy); protected slots: virtual void verticalScrollbarChanged(int); @@ -86,9 +98,11 @@ protected slots: private slots: void lastLineChanged(QGraphicsItem *chatLine, qreal offset); void adjustSceneRect(); + void checkChatLineCaches(); void mouseMoveWhileSelecting(const QPointF &scenePos); void scrollTimerTimeout(); void invalidateFilter(); + void markerLineSet(BufferId buffer, MsgId msg); private: void init(MessageFilter *filter); @@ -100,6 +114,7 @@ private: QTimer _scrollTimer; int _scrollOffset; bool _invalidateFilter; + QSet _linesWithCache; };