Commit 09d27c79 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

GraphicsItem: Adding signals/slot to watch effect container movements

parent 437bb914
......@@ -185,6 +185,9 @@ class AbstractGraphicsItem : public QObject, public QGraphicsItem
*/
void adjustLength();
signals:
void moved( qint64 pos );
friend class TracksView;
};
......
......@@ -311,3 +311,10 @@ AbstractGraphicsMediaItem::zNotSelected() const
{
return 50;
}
void
AbstractGraphicsMediaItem::setStartPos( qint64 position )
{
emit moved( position );
AbstractGraphicsItem::setStartPos( position );
}
......@@ -63,6 +63,7 @@ public:
virtual qint64 itemHeight() const;
virtual qint32 zSelected() const;
virtual qint32 zNotSelected() const;
virtual void setStartPos( qint64 position );
protected:
virtual void contextMenuEvent( QGraphicsSceneContextMenuEvent* event );
......
......@@ -276,3 +276,8 @@ GraphicsEffectItem::zNotSelected() const
return 200;
}
void
GraphicsEffectItem::containerMoved( qint64 pos )
{
setStartPos( m_effectHelper->begin() + pos );
}
......@@ -70,6 +70,8 @@ class GraphicsEffectItem : public AbstractGraphicsItem
* \param option Painting options.
*/
void paintTitle( QPainter* painter, const QStyleOptionGraphicsItem* option );
private slots:
void containerMoved( qint64 pos );
private:
Effect *m_effect;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment