X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fabstractgroupitem.h;h=2c8c90f7a715bd9be193cc9f6ba661bf67d597ab;hb=096fad7b4c5b991e1146ca2ea5b6540f55095341;hp=c6c5952167d6eace483128a5e7d62409af360866;hpb=3d3f2a6ba8826e70f65d65b4090456be50e4a690;p=kdenlive diff --git a/src/abstractgroupitem.h b/src/abstractgroupitem.h index c6c59521..2c8c90f7 100644 --- a/src/abstractgroupitem.h +++ b/src/abstractgroupitem.h @@ -39,12 +39,26 @@ public: CustomTrackScene* projectScene(); void addItem(QGraphicsItem * item); int track() const; - QPainterPath clipGroupShape(QPointF) const; - QPainterPath transitionGroupShape(QPointF) const; + QPainterPath clipGroupShape(QPointF offset) const; + QPainterPath transitionGroupShape(QPointF offset) const; void setItemLocked(bool locked); bool isItemLocked() const; // ItemInfo info() const; + /** @brief Resizes all clips in this group from start. + *@param diff Difference to startPos stored in m_resizeInfos */ + void resizeStart(int diff); + /** @brief Resizes all clips in this group from end. + * @param diff Difference to endPos stored in m_resizeInfos */ + void resizeEnd(int diff); + /** @brief Gets m_resizeInfos */ + QList resizeInfos(); + /** @brief Clears m_resizeInfos */ + void clearResizeInfos(); + + /** @brief Gets the duration (length) of the group. */ + GenTime duration(); + protected: virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value); virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); @@ -55,6 +69,9 @@ protected: private: void fixItemRect(); + QPainterPath groupShape(GRAPHICSRECTITEM type, QPointF offset) const; + /** Stores the original info of the items beeing resized. */ + QList m_resizeInfos; }; #endif