00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef ZOOM_H
00024 #define ZOOM_H
00025
00026 #include "Command.h"
00027
00028 class SheetView;
00029 class QPoint;
00030
00031 class Zoom : public Command
00032 {
00033 Q_OBJECT
00034 Q_CLASSINFO("vzoom_in", tr("Zoom Vertical In"));
00035 Q_CLASSINFO("vzoom_out", tr("Zoom Vertical Out"));
00036 Q_CLASSINFO("toggle_vertical_horizontal_jog_zoom", tr("Toggle Vertical / Horizontal"));
00037
00038 public :
00039 Zoom(SheetView* sv, QVariantList args);
00040 ~Zoom() {};
00041
00042 int begin_hold();
00043 int finish_hold();
00044 int prepare_actions();
00045 int do_action();
00046 int undo_action();
00047
00048 int jog();
00049
00050 void set_cursor_shape(int useX, int useY);
00051
00052 private :
00053 int horizontalJogZoomLastX;
00054 int verticalJogZoomLastY;
00055 bool m_jogVertical;
00056 bool m_jogHorizontal;
00057 qreal m_xScalefactor;
00058 qreal m_yScalefactor;
00059 QPoint mousePos;
00060 QPoint origPos;
00061
00062 SheetView* m_sv;
00063
00064 public slots:
00065 void vzoom_in(bool autorepeat);
00066 void vzoom_out(bool autorepeat);
00067 void toggle_vertical_horizontal_jog_zoom(bool autorepeat);
00068 };
00069
00070 #endif
00071