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)
25 edl->folder_no = AW_CLIP_FOLDER;
30 void ClipEDLs::remove_clip(EDL *clip)
35 while( --n >= 0 ) clip->remove_user();
39 EDL* ClipEDLs::get_nested(EDL *src)
42 for( int i=0; i<size(); ++i ) {
44 if( src == dst || src->id == dst->id ) return dst;
46 for( int i=0; i<size(); ++i ) {
48 if( !strcmp(dst->path, src->path) ) return dst;
52 dst->create_objects();
58 EDL* ClipEDLs::load(char *path)
60 for( int i=0; i<size(); ++i ) {
62 if( !strcmp(dst->path, path) ) return dst;
66 dst->create_objects();
69 xml_file.read_from_file(path);
70 dst->load_xml(&xml_file, LOAD_ALL);
72 // Override path EDL was saved to with the path it was loaded from.
78 void ClipEDLs::copy_nested(ClipEDLs &nested)
81 for( int i=0; i<nested.size(); ++i ) {
82 EDL *new_edl = new EDL;
83 new_edl->create_objects();
84 new_edl->copy_all(nested[i]);
89 void ClipEDLs::update_index(EDL *clip_edl)
91 for( int i=0; i<size(); ++i ) {
92 EDL *current = get(i);
93 if( !strcmp(current->path, clip_edl->path) ) {
94 current->update_index(clip_edl);