An object of type Qt_widget_get_line<T> creates a CGAL line in this way: one left click on the mouse will be the first point and the second point that generate the line will be considered at the coordinates where the left mouse button is pressed for the second time. You can always cancel the creation process by pressing the ESC key. The use of Qt_widget_get_line<T> requires that the mouse tracking is enabled for widgets attaching it.

#include <CGAL/IO/Qt_widget_get_line.h>


The full template declaration of Qt_widget_get_line states one parameter:

template < class T >
class Qt_widget_get_line;

If T is one of the CGAL kernels you don't need additional types. If not, the parameter T has to provide this types:


typedef T::Point_2 Point_2; This should be a Point type

typedef T::Line_2 Line_2; This should be a Line type

typedef T::FT FT; This should be a Field type

Inherits From



Qt_widget_get_line<T> getline ( 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.