1 #ifndef RS_ACTIONDRAWLINERELANGLE_H
2 #define RS_ACTIONDRAWLINERELANGLE_H
4 #include "rs_previewactioninterface.h"
8 * This action class can handle user events to draw lines with a given angle
11 * @author Andrew Mustun
13 class RS_ActionDrawLineRelAngle : public RS_PreviewActionInterface {
17 SetEntity, /**< Choose entity. */
18 SetPos, /**< Choose position. */
19 SetAngle, /**< Set angle in console. */
20 SetLength /**< Set length in console. */
24 RS_ActionDrawLineRelAngle(RS_EntityContainer& container,
25 RS_GraphicView& graphicView,
27 bool fixedAngle=false);
28 ~RS_ActionDrawLineRelAngle() {}
30 static QAction* createGUIAction(RS2::ActionType /*type*/, QObject* /*parent*/);
32 virtual RS2::ActionType rtti() {
33 return RS2::ActionDrawLineRelAngle;
36 virtual void trigger();
38 virtual void mouseMoveEvent(QMouseEvent* e);
39 virtual void mouseReleaseEvent(QMouseEvent* e);
41 virtual void coordinateEvent(RS_CoordinateEvent* e);
42 virtual void commandEvent(RS_CommandEvent* e);
43 virtual QStringList getAvailableCommands();
45 virtual void hideOptions();
46 virtual void showOptions();
48 virtual void updateMouseButtonHints();
49 virtual void updateMouseCursor();
50 virtual void updateToolBar();
52 void setAngle(double a) {
60 void setLength(double l) {
68 bool hasFixedAngle() {
77 /** Chosen position */
79 /** Data of new line */