CGAL 4.7 - CGAL and the Qt Graphics View Framework: CGAL::Qt::GraphicsViewPolylineInput< K > Class Template Reference

\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)

CGAL 4.7 - CGAL and the Qt Graphics View Framework

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
List of all members
CGAL::Qt::GraphicsViewPolylineInput< K > Class Template Reference
Input Classes

`#include <CGAL/Qt/GraphicsViewPolylineInput.h>`

## Inherits from

CGAL::Qt::GraphicsViewInput.

## Definition

An object of type `GraphicsViewPolylineInput` creates a list of points.

A new vertex is inserted every time the left mouse button is pressed. The list of points is emitted on a right click or when the number of points specified in the constructor is reached. You can use the 'Del' or 'Backspace' key if you want to remove your last entered point in the polygon, and the 'Esc' key if you want to remove all points.

The tool can serve at the same time for entering a single point, a polyline with a given number of points, and for open as well as closed polylines.

For polylines the segment between the last entered point and the current mouse position is only drawn correctly when mouse tracking is enabled in the graphics view. The same holds for closed polygons.

Template Parameters

  K | must be a model of `Kernel`.

## Creation

| GraphicsViewPolylineInput (QObject *p, QGraphicsScene *s, int n=0, bool closed=true)

## Signals

void | generate (CGAL::Object o)
| The object `o` contains a `std:list<K::Point_2>`.

## Additional Inherited Members

Public Member Functions inherited from CGAL::Qt::GraphicsViewInput
void | generate (Object)
| A signal that emits a `CGAL::Object`.

## Constructor & Destructor Documentation

template<typename K >

CGAL::Qt::GraphicsViewPolylineInput< K >::GraphicsViewPolylineInput | ( | QObject * | p,
|  | QGraphicsScene * | s,
|  | int | n = `0`,
|  | bool | closed = `true`
| ) |  |

Parameters

  p | is a parent object.
  s | is the scene where the polyline is generated.
  n | is the number of points of the polyline to be generated. If `n = 0`, that is the default value, the number of points of the polyline is not limited.
  closed | determines if a closed polygon is drawn during the input.