[vlmc-devel] commit: Clip: Adding a isChild method. ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Wed Apr 14 00:36:27 CEST 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Tue Apr 13 22:50:17 2010 +0200| [a7fa3cb2f57bb3dd1d65fd9217edc188f5522079] | committer: Hugo Beauzée-Luyssen
Clip: Adding a isChild method.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=a7fa3cb2f57bb3dd1d65fd9217edc188f5522079
---
src/Media/Clip.cpp | 14 ++++++++++++++
src/Media/Clip.h | 5 +++++
2 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/src/Media/Clip.cpp b/src/Media/Clip.cpp
index 1266f7e..bf06f2b 100644
--- a/src/Media/Clip.cpp
+++ b/src/Media/Clip.cpp
@@ -334,3 +334,17 @@ Clip::fullId() const
}
return id;
}
+
+bool
+Clip::isChild( const QUuid &uuid) const
+{
+ Clip* c = m_parent;
+
+ while ( c != NULL )
+ {
+ if ( c->m_uuid == uuid )
+ return true;
+ c = c->m_parent;
+ }
+ return false;
+}
diff --git a/src/Media/Clip.h b/src/Media/Clip.h
index a41caa6..d9d89c1 100644
--- a/src/Media/Clip.h
+++ b/src/Media/Clip.h
@@ -135,6 +135,11 @@ class Clip : public QObject
*/
QString fullId() const;
+ /**
+ * \return true if the clip is a child of the given clip uuid
+ */
+ bool isChild( const QUuid& uuid ) const;
+
private:
Media *m_media;
/**
More information about the Vlmc-devel
mailing list