00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef IMPORT_H
00024 #define IMPORT_H
00025
00026 #include "Command.h"
00027
00028 class QString;
00029 class AudioClip;
00030 class ReadSource;
00031
00032 class Import : public Command
00033 {
00034 public :
00035 Import(const QString& fileName);
00036 Import(Track* track, const TimeRef& length, bool silent = false);
00037 Import(Track* track, const QString& fileName);
00038 Import(Track* track, const QString& fileName, const TimeRef& position);
00039 ~Import();
00040
00041 int prepare_actions();
00042 int do_action();
00043 int undo_action();
00044
00045 int create_readsource();
00046 void create_audioclip();
00047 void set_track(Track* track);
00048 void set_position(const TimeRef& position);
00049 ReadSource* readsource() {return m_source;};
00050
00051 private :
00052 Track* m_track;
00053 AudioClip* m_clip;
00054 ReadSource* m_source;
00055 QString m_fileName;
00056 QString m_name;
00057 bool m_silent;
00058 TimeRef m_initialLength;
00059 bool m_hasPosition;
00060 TimeRef m_position;
00061
00062 void init(Track* track, const QString& filename);
00063 };
00064
00065 #endif
00066