]> Shamusworld >> Repos - architektonas/blob - src/actions/actionlibraryinsert.h
Fixed problem with MDI activation.
[architektonas] / src / actions / actionlibraryinsert.h
1 #ifndef __ACTIONLIBRARYINSERT_H__
2 #define __ACTIONLIBRARYINSERT_H__
3
4 #include "creation.h"
5 #include "drawing.h"
6 #include "actioninterface.h"
7
8 /**
9  * This action class can handle user events for inserting library items
10  * (or any other DXF files) into the current drawing (as block/insert).
11  *
12  * @author James Hammons
13  * @author Andrew Mustun
14  */
15 class ActionLibraryInsert: public ActionInterface
16 {
17         public:
18                 /**
19                  * Action States.
20                  */
21                 enum Status {
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                 ActionLibraryInsert(EntityContainer & container, GraphicView & graphicView);
33                 virtual ~ActionLibraryInsert();
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(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                 void setFile(const QString & file);
50                 double getAngle();
51                 void setAngle(double a);
52                 double getFactor();
53                 void setFactor(double f);
54
55         protected:
56                 Drawing prev;
57                 LibraryInsertData data;
58
59                 /** Last status before entering option. */
60                 Status lastStatus;
61 };
62
63 #endif  // __ACTIONLIBRARYINSERT_H__