1 #ifndef RS_ACTIONDRAWLINEPARALLEL_H
2 #define RS_ACTIONDRAWLINEPARALLEL_H
4 #include "rs_previewactioninterface.h"
8 * This action class can handle user events to draw parallel
9 * lines, arcs and circles.
11 * @author Andrew Mustun
13 class RS_ActionDrawLineParallel : public RS_PreviewActionInterface {
17 SetEntity, /**< Choose original entity. */
18 //SetDistance, /**< Setting distance in the command line. */
19 SetNumber /**< Setting number in the command line. */
20 //SetThrough /**< Setting a point for the parallel to go through. */
24 RS_ActionDrawLineParallel(RS_EntityContainer& container,
25 RS_GraphicView& graphicView);
26 ~RS_ActionDrawLineParallel() {}
28 static QAction* createGUIAction(RS2::ActionType type, QObject* /*parent*/);
30 virtual RS2::ActionType rtti() {
31 return RS2::ActionDrawLineParallel;
34 virtual void trigger();
36 virtual void mouseMoveEvent(QMouseEvent* e);
37 virtual void mouseReleaseEvent(QMouseEvent* e);
38 virtual void updateMouseButtonHints();
40 virtual void commandEvent(RS_CommandEvent* e);
41 virtual QStringList getAvailableCommands();
43 virtual void hideOptions();
44 virtual void showOptions();
46 virtual void updateMouseCursor();
47 virtual void updateToolBar();
49 double getDistance() {
53 void setDistance(double d) {
61 void setNumber(int n) {
66 /** Closest parallel. */
68 /** Data of new line */
70 /** Distance of the parallel. */
72 /** Number of parallels. */
74 /** Coordinate of the mouse. */
76 /** Original entity. */