]> Shamusworld >> Repos - architektonas/commitdiff
Phase 3 of polyline functionality added: Create polyline somewhat working...
authorShamus Hammons <jlhamm@acm.org>
Tue, 14 Sep 2010 17:53:36 +0000 (17:53 +0000)
committerShamus Hammons <jlhamm@acm.org>
Tue, 14 Sep 2010 17:53:36 +0000 (17:53 +0000)
src/actions/actiondrawpolyline.cpp
src/actions/actiondrawpolyline.h
src/forms/polylineoptions.cpp
src/forms/polylineoptions.h

index f4f81a4c3bebb7d5b2bb7902e3e78abb8648307e..03925ab8439e53609338b5ba5b7150d10a80ace8 100644 (file)
@@ -33,6 +33,11 @@ ActionDrawPolyline::~ActionDrawPolyline()
                delete polyline;
 }
 
+/*virtual*/ RS2::ActionType ActionDrawPolyline::rtti()
+{
+       return RS2::ActionDrawPolyline;
+}
+
 void ActionDrawPolyline::trigger()
 {
        if (polyline)
@@ -129,6 +134,20 @@ void ActionDrawPolyline::updateToolBar()
                DIALOGFACTORY->requestToolBar(RS2::ToolBarPolylines);
 }
 
+void ActionDrawPolyline::showOptions()
+{
+       DEBUG->print("ActionDrawPolyline::showOptions");
+       ActionInterface::showOptions();
+       DIALOGFACTORY->requestOptions(this, true);
+       DEBUG->print("ActionDrawPolyline::showOptions: OK");
+}
+
+void ActionDrawPolyline::hideOptions()
+{
+       ActionInterface::hideOptions();
+       DIALOGFACTORY->requestOptions(this, false);
+}
+
 void ActionDrawPolyline::close()
 {
 #if 0
index 6902f40d3d29fdcd6ff8abd16175044e77e7433c..171e5ea7a8cde99b42833494aba6442720daeda5 100644 (file)
@@ -25,6 +25,7 @@ class ActionDrawPolyline: public ActionInterface
                ActionDrawPolyline(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawPolyline();
 
+               virtual RS2::ActionType rtti();
                virtual void trigger();
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mousePressEvent(QMouseEvent * e);
@@ -32,6 +33,8 @@ class ActionDrawPolyline: public ActionInterface
                virtual void updateMouseButtonHints();
                virtual void updateMouseCursor();
                virtual void updateToolBar();
+               virtual void showOptions();
+               virtual void hideOptions();
                void close();
                void undo();
 
index 5c185aed093d163e91cd06c71f2b078cae150289..bdc194e1e9a83f214939d4b35187ac08fb7cc875 100644 (file)
@@ -49,7 +49,7 @@ PolylineOptions::~PolylineOptions()
 {
 }
 
-void PolylineOptions::setAction(ActionInterface * a, bool & /*unknown*/)
+void PolylineOptions::setAction(ActionInterface * a, bool /*update*/)
 {
        if (a && a->rtti() == RS2::ActionDrawPolyline)
        {
index ba224cffeaafd0078f25f1e4da29ef50ddd354a6..fa4ecfd3a7eded4e58f5e4133659f596ec60eed2 100644 (file)
@@ -15,7 +15,7 @@ class PolylineOptions: public QWidget
                ~PolylineOptions();
 
        public slots:
-               void setAction(ActionInterface * a, bool &);
+               void setAction(ActionInterface * a, bool);
                void close();
                void undo();