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