5 #include "indexstate.h"
17 void ClipEDLs::clear()
19 for( int i=0; i<size(); ++i ) get(i)->remove_user();
23 void ClipEDLs::add_clip(EDL *edl)
29 void ClipEDLs::remove_clip(EDL *clip)
34 while( --n >= 0 ) clip->remove_user();
38 EDL* ClipEDLs::get_nested(EDL *src)
41 for( int i=0; i<size(); ++i ) {
43 if( src == dst || src->id == dst->id ) return dst;
45 for( int i=0; i<size(); ++i ) {
47 if( !strcmp(dst->path, src->path) ) return dst;
51 dst->create_objects();
57 EDL* ClipEDLs::load(char *path)
59 for( int i=0; i<size(); ++i ) {
61 if( !strcmp(dst->path, path) ) return dst;
65 dst->create_objects();
68 xml_file.read_from_file(path);
69 dst->load_xml(&xml_file, LOAD_ALL);
71 // Override path EDL was saved to with the path it was loaded from.
77 void ClipEDLs::copy_nested(ClipEDLs &nested)
80 for( int i=0; i<nested.size(); ++i ) {
81 EDL *new_edl = new EDL;
82 new_edl->create_objects();
83 new_edl->copy_all(nested[i]);
88 void ClipEDLs::update_index(EDL *clip_edl)
90 for( int i=0; i<size(); ++i ) {
91 EDL *current = get(i);
92 if( !strcmp(current->path, clip_edl->path) ) {
93 current->update_index(clip_edl);