]> Shamusworld >> Repos - architektonas/blob - src/actions/rs_actiondrawimage.h
Refactoring: Moved RS_GraphicView to GraphicView.
[architektonas] / src / actions / rs_actiondrawimage.h
1 #ifndef RS_ACTIONDRAWIMAGE_H
2 #define RS_ACTIONDRAWIMAGE_H
3
4 #include <QtGui>
5 #include "rs_image.h"
6 #include "rs_previewactioninterface.h"
7
8 /**
9  * This action class can handle user events for inserting bitmaps into the
10  * current drawing.
11  *
12  * @author Andrew Mustun
13  */
14 class RS_ActionDrawImage: public RS_PreviewActionInterface
15 {
16         public:
17                 /**
18                  * Action States.
19                  */
20                 enum Status {
21                         ShowDialog,        /**< Dialog. */
22                         SetTargetPoint,    /**< Setting the reference point. */
23                         SetAngle,          /**< Setting angle in the command line. */
24                         SetFactor          /**< Setting factor in the command line. */
25                         //SetColumns,        /**< Setting columns in the command line. */
26                         //SetRows,           /**< Setting rows in the command line. */
27                         //SetColumnSpacing,  /**< Setting column spacing in the command line. */
28                         //SetRowSpacing      /**< Setting row spacing in the command line. */
29                 };
30
31         public:
32                 RS_ActionDrawImage(RS_EntityContainer & container, GraphicView & graphicView);
33                 ~RS_ActionDrawImage();
34
35                 virtual RS2::ActionType rtti();
36                 virtual void init(int status = 0);
37                 void reset();
38                 virtual void trigger();
39                 virtual void mouseMoveEvent(QMouseEvent * e);
40                 virtual void mouseReleaseEvent(QMouseEvent * e);
41                 virtual void coordinateEvent(Vector * e);
42                 virtual void commandEvent(RS_CommandEvent * e);
43                 virtual QStringList getAvailableCommands();
44                 virtual void showOptions();
45                 virtual void hideOptions();
46                 virtual void updateMouseButtonHints();
47                 virtual void updateMouseCursor();
48                 virtual void updateToolBar();
49                 double getAngle();
50                 void setAngle(double a);
51                 double getFactor();
52                 void setFactor(double f);
53
54         protected:
55                 RS_ImageData data;
56                 QImage img;
57
58                 /** Last status before entering option. */
59                 Status lastStatus;
60 };
61
62 #endif