From ea3f79c52c20eedcd8f53cd5bdb14a354e2fd8c5 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 2 Oct 2001 18:06:08 +0000 Subject: [PATCH] Polishing --- .../include/CGAL/IO/Qt_Window_Get_polygon.h | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Packages/Qt_widget/include/CGAL/IO/Qt_Window_Get_polygon.h b/Packages/Qt_widget/include/CGAL/IO/Qt_Window_Get_polygon.h index 96740522a5e..eb71e90faa8 100644 --- a/Packages/Qt_widget/include/CGAL/IO/Qt_Window_Get_polygon.h +++ b/Packages/Qt_widget/include/CGAL/IO/Qt_Window_Get_polygon.h @@ -38,7 +38,6 @@ public: Qt_widget_get_polygon() : active(false), lastx(0), lasty(0), num_points(0), points(), qpoints(0), qpoints_old(0) {}; -private: void mousePressEvent(QMouseEvent *e) { QPainter painter(widget); @@ -52,6 +51,7 @@ private: qpoints_old.putPoints(num_points,1,e->x(),e->y()); ++num_points; active=true; + widget->setMouseTracking(TRUE); return; }; if(e->button() == Qt::RightButton) @@ -70,6 +70,7 @@ private: qpoints_old.resize(0); num_points=0; active=false; + widget->setMouseTracking(FALSE); }; }; }; @@ -97,22 +98,13 @@ private: } }; +protected: bool active; int lastx, lasty; int num_points; std::list points; QPointArray qpoints; QPointArray qpoints_old; - - void attaching() - { - widget->setMouseTracking(TRUE); - }; - - void dettaching() - { - widget->setMouseTracking(FALSE); - }; }; } // namespace CGAL