Q_OBJECT
public:
+ enum MyEventTypes {
+ ClearWebPreviewEventType = QEvent::User
+ };
+ class ClearWebPreviewEvent;
+
ChatScene(QAbstractItemModel *model, const QString &idString, qreal width, QObject *parent);
virtual ~ChatScene();
inline ColumnHandleItem *firstColumnHandle() const { return firstColHandle; }
inline ColumnHandleItem *secondColumnHandle() const { return secondColHandle; }
+ virtual bool eventFilter(QObject *watched, QEvent *event);
+
public slots:
void updateForViewport(qreal width, qreal height);
void setWidth(qreal, bool forceReposition = false);
void clearWebPreview(ChatItem *parentItem = 0);
signals:
- void lastLineChanged(QGraphicsItem *);
+ void lastLineChanged(QGraphicsItem *item, qreal offset);
protected:
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent);
private slots:
void handlePositionChanged(qreal xpos);
void showWebPreview();
- void clearWebPreviewEvent();
+ void clearWebPreviewEvent(ClearWebPreviewEvent *event);
private:
void setHandleXLimits();