X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fabstractgroupitem.h;h=91792be7aca28620c99a48812d3454530a0cc4ef;hb=c3302003093710ee247ad84c0fe2ef3c579d417f;hp=45ed065667b3ebdc597519c9423ac9cba8aa9f25;hpb=6c43f987273f567fa7659d5a4ad3a5e73f6e5b73;p=kdenlive diff --git a/src/abstractgroupitem.h b/src/abstractgroupitem.h index 45ed0656..91792be7 100644 --- a/src/abstractgroupitem.h +++ b/src/abstractgroupitem.h @@ -38,13 +38,29 @@ public: virtual int type() const; CustomTrackScene* projectScene(); void addItem(QGraphicsItem * item); + void removeItem(QGraphicsItem * item); int track() const; - QPainterPath clipGroupShape(QPointF offset) const; - QPainterPath transitionGroupShape(QPointF offset) const; + QPainterPath clipGroupShape(const QPointF &offset) const; + QPainterPath clipGroupSpacerShape(const QPointF &offset) const; + QPainterPath transitionGroupShape(const 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,7 +71,10 @@ protected: private: void fixItemRect(); - QPainterPath groupShape(GRAPHICSRECTITEM type, QPointF offset) const; + QPainterPath groupShape(GRAPHICSRECTITEM type, const QPointF &offset) const; + QPainterPath spacerGroupShape(GRAPHICSRECTITEM type, const QPointF &offset) const; + /** Stores the original info of the items beeing resized. */ + QList m_resizeInfos; }; #endif