X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatscene.h;h=f3c3d6e5212cff3dd9c3728eaee7dba55cd405b1;hp=aa741cbfb4670c770d568e71c32ba0878fc0872e;hb=8c171717381424c896b9f720db203ddb815c76e1;hpb=7cef35ccdcb26ad547383537d3615644df703c9a diff --git a/src/qtui/chatscene.h b/src/qtui/chatscene.h index aa741cbf..f3c3d6e5 100644 --- a/src/qtui/chatscene.h +++ b/src/qtui/chatscene.h @@ -76,6 +76,7 @@ protected: virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent); virtual void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent); virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent); + virtual void customEvent(QEvent *event); protected slots: void rowsInserted(const QModelIndex &, int, int); @@ -83,6 +84,8 @@ protected slots: private slots: void handlePositionChanged(qreal xpos); + void showWebPreview(); + void clearWebPreviewEvent(); private: void setHandleXLimits(); @@ -97,6 +100,9 @@ private: // calls to QChatScene::sceneRect() are very expensive. As we manage the scenerect ourselves // we store the size in a member variable. QRectF _sceneRect; + int _firstLineRow; // the first row to display (aka: not a daychange msg) + void updateSceneRect(); + void updateSceneRect(qreal width); void updateSceneRect(const QRectF &rect); qreal _viewportHeight; @@ -117,6 +123,7 @@ private: WebPreviewItem *previewItem; QString url; QRectF urlRect; + QTimer delayTimer; WebPreview() : parentItem(0), previewItem(0) {} }; WebPreview webPreview;