00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef AUDIO_CLIP_GROUP_H
00023 #define AUDIO_CLIP_GROUP_H
00024
00025 #include "defines.h"
00026
00027 #include "AudioClip.h"
00028
00029 class AudioClipGroup
00030 {
00031 public:
00032 AudioClipGroup(){};
00033 AudioClipGroup(QList<AudioClip*> clips);
00034
00035 void add_clip(AudioClip* clip);
00036 void set_clips(QList<AudioClip*> clips);
00037 void move_to(int trackIndex, TimeRef location);
00038
00039 void set_snappable(bool snap);
00040 void set_as_moving(bool move);
00041 void check_valid_track_index_delta(int& delta);
00042
00043 QList<AudioClip*> copy_clips();
00044 void add_all_clips_to_tracks();
00045 void remove_all_clips_from_tracks();
00046
00047 int get_size() const {return m_clips.size();}
00048 int get_track_index() const {return m_topTrackIndex;}
00049
00050 bool is_locked() const;
00051
00052 TimeRef get_track_start_location() const {return m_trackStartLocation;}
00053 TimeRef get_track_end_location() const {return m_trackEndLocation;}
00054 TimeRef get_length() const {return m_trackEndLocation - m_trackStartLocation;}
00055
00056 private:
00057 QList<AudioClip*> m_clips;
00058 TimeRef m_trackEndLocation;
00059 TimeRef m_trackStartLocation;
00060 int m_topTrackIndex;
00061 int m_bottomTrackIndex;
00062
00063 void update_state();
00064 };
00065
00066 #endif