CGAL::Qt_widget_get_polygon<Polygon>

Definition

An object of type Qt_widget_get_polygon<Polygon> creates a CGAL polygon. A new vertex is inserted every time the left mouse button is pressed. The polygon is returned on a right click. You can use the Escape key if you want to remove your last entered point in the polygon. The use of Qt_widget_get_polygon<Polygon> requires that the mouse tracking is enabled for widgets attaching it.

#include <CGAL/IO/Qt_widget_get_polygon.h>

Parameters

The full template declaration of Qt_widget_get_polygon states one parameter:

template < class Polygon >
class Qt_widget_get_polygon;

Polygon should be a CGAL Polygon, or should provide the following types:

Types

typedef Polygon::Point_2
Point_2;

typedef Polygon::Segment_2
Segment2;

typedef Polygon::Edge_const_iterator
ECI;

typedef Polygon::Vertex_iterator
VI;

typedef Polygon::FT
FT;

Inherits From

Qt_widget_tool

Creation

Qt_widget_get_polygon<Polygon> getpoly ( const QCursor c=QCursor(Qt::crossCursor),
QObject* parent = 0,
const char* name = 0);
c is the cursor that this layer will use when is active. parent is the parent widget and name is the name you give to this layer.