00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef FADE_H
00024 #define FADE_H
00025
00026 #include "Command.h"
00027
00028 class Curve;
00029 class AudioClip;
00030 class FadeCurve;
00031 class FadeView;
00032 class SheetView;
00033
00034 class FadeRange : public Command
00035 {
00036 public :
00037 FadeRange(AudioClip* clip, FadeCurve* curve, qint64 scalefactor);
00038 FadeRange(AudioClip* clip, FadeCurve* curve, double newVal);
00039 ~FadeRange();
00040
00041 int begin_hold();
00042 int finish_hold();
00043 int prepare_actions();
00044 int do_action();
00045 int undo_action();
00046 void cancel_action();
00047
00048 int jog();
00049
00050 void set_cursor_shape(int useX, int useY);
00051
00052 private :
00053 FadeCurve* m_curve;
00054 double m_origRange;
00055 double m_newRange;
00056 class Private {
00057 public:
00058 int origX;
00059 int direction;
00060 QPoint mousePos;
00061 qint64 scalefactor;
00062 };
00063 Private* d;
00064 };
00065
00066
00067 class FadeStrength : public Command
00068 {
00069 public :
00070 FadeStrength(FadeView* fadeview);
00071 FadeStrength(FadeCurve* fade, double val);
00072 ~FadeStrength(){};
00073
00074 int begin_hold();
00075 int finish_hold();
00076 int prepare_actions();
00077 int do_action();
00078 int undo_action();
00079 void cancel_action();
00080
00081 int jog();
00082
00083 void set_cursor_shape(int useX, int useY);
00084
00085 private :
00086 float oldValue;
00087 int origY;
00088 double origStrength;
00089 double newStrength;
00090 FadeCurve* m_fade;
00091 FadeView* m_fv;
00092 QPoint mousePos;
00093 };
00094
00095
00096 class FadeBend : public Command
00097 {
00098 public :
00099 FadeBend(FadeView* fadeview);
00100 FadeBend(FadeCurve* fade, double val);
00101 ~FadeBend(){};
00102
00103 int begin_hold();
00104 int finish_hold();
00105 int prepare_actions();
00106 int do_action();
00107 int undo_action();
00108 void cancel_action();
00109
00110 int jog();
00111
00112 void set_cursor_shape(int useX, int useY);
00113
00114 private :
00115 float oldValue;
00116 int origY;
00117 double origBend;
00118 double newBend;
00119 FadeCurve* m_fade;
00120 FadeView* m_fv;
00121 QPoint mousePos;
00122 };
00123
00124
00125 class FadeMode : public Command
00126 {
00127 public :
00128 FadeMode(FadeCurve* fade, int oldMode, int newMode);
00129 ~FadeMode(){};
00130
00131 int prepare_actions();
00132 int do_action();
00133 int undo_action();
00134
00135 private :
00136 int m_oldMode;
00137 int m_newMode;
00138 FadeCurve* m_fade;
00139 };
00140
00141
00142 #endif
00143
00144