X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatscene.h;h=f3c3d6e5212cff3dd9c3728eaee7dba55cd405b1;hp=dbd80fe7f43751bd7e46bf7583b755c600ad18c0;hb=8c171717381424c896b9f720db203ddb815c76e1;hpb=1c0eb65f8545bb444f5fb9e792b8d9587ce8cefa diff --git a/src/qtui/chatscene.h b/src/qtui/chatscene.h index dbd80fe7..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,7 @@ 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); @@ -119,6 +123,7 @@ private: WebPreviewItem *previewItem; QString url; QRectF urlRect; + QTimer delayTimer; WebPreview() : parentItem(0), previewItem(0) {} }; WebPreview webPreview;