00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef AUDIOCLIPMANAGER_H
00023 #define AUDIOCLIPMANAGER_H
00024
00025 #include "ContextItem.h"
00026 #include "defines.h"
00027
00028 #include <QDomNode>
00029 #include <QList>
00030
00031 class AudioClip;
00032 class Sheet;
00033
00034 class AudioClipManager : public ContextItem
00035 {
00036 Q_OBJECT
00037 Q_CLASSINFO("select_all_clips", tr("Select all"))
00038 Q_CLASSINFO("invert_clip_selection", tr("Invert"))
00039
00040 public:
00041 AudioClipManager(Sheet* sheet);
00042 ~AudioClipManager();
00043
00044 QDomNode get_state(QDomDocument doc, bool istemplate=false);
00045 int set_state( const QDomNode & node );
00046
00047
00048 bool is_clip_in_selection(AudioClip* clip);
00049
00050 void get_selected_clips(QList<AudioClip*> & list);
00051
00052 QList<AudioClip* > get_clip_list() const;
00053
00054 TimeRef get_last_location() const;
00055
00056 private:
00057 QList<AudioClip* > m_clips;
00058 QList<AudioClip* > m_clipselection;
00059 Sheet* m_sheet;
00060
00061 TimeRef m_lastLocation;
00062
00063 public slots:
00064 void add_clip(AudioClip* clip);
00065 void remove_clip(AudioClip* clip);
00066 void select_clip(AudioClip* clip);
00067 void toggle_selected(AudioClip* clip);
00068
00069 void remove_from_selection(AudioClip* clip);
00070 void add_to_selection(AudioClip* clip);
00071 void update_last_frame();
00072
00073 Command* select_all_clips();
00074 Command* invert_clip_selection();
00075 };
00076
00077 #endif
00078
00079