-class RS_ActionDrawLinePolygon : public RS_PreviewActionInterface {
- //Q_OBJECT
-private:
- enum Status {
- SetCenter, /**< Setting center. */
- SetCorner, /**< Setting corner. */
- SetNumber /**< Setting number in the command line. */
- };
-
-public:
- RS_ActionDrawLinePolygon(RS_EntityContainer& container,
- RS_GraphicView& graphicView);
- ~RS_ActionDrawLinePolygon() {}
-
- static QAction* createGUIAction(RS2::ActionType /*type*/, QObject* /*parent*/);
-
- virtual RS2::ActionType rtti() {
- return RS2::ActionDrawLinePolygon;
- }
-
- virtual void trigger();
-
- virtual void mouseMoveEvent(QMouseEvent* e);
- virtual void mouseReleaseEvent(QMouseEvent* e);
- virtual void updateMouseButtonHints();
-
- virtual void coordinateEvent(RS_CoordinateEvent* e);
- virtual void commandEvent(RS_CommandEvent* e);
- virtual QStringList getAvailableCommands();
-
- virtual void hideOptions();
- virtual void showOptions();
-
- virtual void updateMouseCursor();
- virtual void updateToolBar();
-
- int getNumber() {
- return number;
- }
-
- void setNumber(int n) {
- number = n;
- }
-
-private:
- /** Center of polygon */
- Vector center;
- /** Edge */
- Vector corner;
- /** Number of edges. */
- int number;
- /** Last status before entering text. */
- Status lastStatus;
+class RS_ActionDrawLinePolygon: public RS_PreviewActionInterface
+{
+ private:
+ enum Status {
+ SetCenter, /**< Setting center. */
+ SetCorner, /**< Setting corner. */
+ SetNumber /**< Setting number in the command line. */
+ };
+
+ public:
+ RS_ActionDrawLinePolygon(RS_EntityContainer & container, GraphicView & graphicView);
+ ~RS_ActionDrawLinePolygon();
+
+ virtual RS2::ActionType rtti();
+ virtual void trigger();
+ virtual void mouseMoveEvent(QMouseEvent * e);
+ virtual void mouseReleaseEvent(QMouseEvent * e);
+ virtual void updateMouseButtonHints();
+ virtual void coordinateEvent(Vector * e);
+ virtual void commandEvent(RS_CommandEvent * e);
+ virtual QStringList getAvailableCommands();
+ virtual void hideOptions();
+ virtual void showOptions();
+ virtual void updateMouseCursor();
+ virtual void updateToolBar();
+ int getNumber();
+ void setNumber(int n);
+
+ private:
+ /** Center of polygon */
+ Vector center;
+ /** Edge */
+ Vector corner;
+ /** Number of edges. */
+ int number;
+ /** Last status before entering text. */
+ Status lastStatus;