[vlmc-devel] commit: Timeline: Save the link between items ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Thu Apr 22 22:00:10 CEST 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Thu Apr 22 21:51:46 2010 +0200| [0d0ab3155971571fb1515de900451a2b2f4d5ed2] | committer: Hugo Beauzée-Luyssen
Timeline: Save the link between items
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=0d0ab3155971571fb1515de900451a2b2f4d5ed2
---
src/Gui/timeline/AbstractGraphicsMediaItem.h | 13 +++++++------
src/Gui/timeline/Timeline.cpp | 8 ++++++++
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/src/Gui/timeline/AbstractGraphicsMediaItem.h b/src/Gui/timeline/AbstractGraphicsMediaItem.h
index 303af41..c71d52a 100644
--- a/src/Gui/timeline/AbstractGraphicsMediaItem.h
+++ b/src/Gui/timeline/AbstractGraphicsMediaItem.h
@@ -110,6 +110,13 @@ public:
QColor itemColor();
void setColor( const QColor& color );
+ /**
+ * \brief Return a pointer to the linked item.
+ * \details This method will return NULL if there is no linked item.
+ */
+ AbstractGraphicsMediaItem* groupItem();
+
+
protected:
/**
* \details Returns a pointer to the tracksView which contains the item,
@@ -129,12 +136,6 @@ protected:
ClipHelper* m_clipHelper;
/**
- * \brief Return a pointer to the linked item.
- * \details This method will return NULL if there is no linked item.
- */
- AbstractGraphicsMediaItem* groupItem();
-
- /**
* \brief Set the width of the item.
* \param width Width in frames.
*/
diff --git a/src/Gui/timeline/Timeline.cpp b/src/Gui/timeline/Timeline.cpp
index 8b579e4..5ec0af3 100644
--- a/src/Gui/timeline/Timeline.cpp
+++ b/src/Gui/timeline/Timeline.cpp
@@ -194,6 +194,14 @@ Timeline::save( QXmlStreamWriter &project ) const
project.writeStartElement( "item" );
project.writeAttribute( "uuid", item->clipHelper()->uuid().toString() );
project.writeAttribute( "color", item->itemColor().name() );
+ if ( item->groupItem() != NULL )
+ {
+ project.writeStartElement( "linkedTo" );
+ project.writeStartElement( "item" );
+ project.writeAttribute( "uuid", item->groupItem()->uuid() );
+ project.writeEndElement();
+ project.writeEndElement();
+ }
project.writeEndElement();
}
project.writeEndDocument();
More information about the Vlmc-devel
mailing list