00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef GAIN_H
00024 #define GAIN_H
00025
00026 #include "Command.h"
00027 #include <QPoint>
00028
00029 class ContextItem;
00030 class SheetView;
00031
00032
00033 class Gain : public Command
00034 {
00035 Q_OBJECT
00036 Q_CLASSINFO("increase_gain", tr("Increase"));
00037 Q_CLASSINFO("decrease_gain", tr("Decrease"));
00038
00039 public :
00040 Gain(ContextItem* context, SheetView* sv, QVariantList args);
00041 ~Gain();
00042
00043 int begin_hold();
00044 int finish_hold();
00045 int prepare_actions();
00046 int do_action();
00047 int undo_action();
00048 void cancel_action();
00049 void set_collected_number(const QString & collected);
00050
00051 int jog();
00052
00053 void set_cursor_shape(int useX, int useY);
00054
00055 private :
00056 ContextItem* gainObject;
00057 SheetView* m_sv;
00058 float origGain;
00059 float newGain;
00060 QPoint origPos;
00061 QPoint mousePos;
00062 bool horiz;
00063
00064 int get_gain_from_object(float& gain);
00065
00066 public slots:
00067 void increase_gain(bool autorepeat);
00068 void decrease_gain(bool autorepeat);
00069 };
00070
00071 #endif
00072