![]() |
#include <CGAL/IO/Qt_widget_layer.h>
|
| |
|
The default constructor. The parameters parent and name
are passed to the QObject constructor.
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
| These virtual functions can be overloaded in the derived class. They are called by the Qt_widget to which the layer is attached. | ||
|
|
| Returns true if this layer is active. |
|
|
| The widget a layer is attached to or 0 otherwise. |
|
|
| |
| You should overload this function if you want to have initializing code for your layer. This function is called every time the layer is activated. | ||
|
|
| |
| You should overload this function if you want to write clean up code for your layer. This function is called every time the layer is deactivated. | ||
|
|
| |
| This signal is emitted every time this layer is activated. | ||
|
|
| |
| This signal is emitted every time this layer is deactivated. | ||
#include <CGAL/IO/Qt_widget_layer.h>
namespace CGAL {
template <class T>
class Qt_layer_show_points : public Qt_widget_layer {
public:
typedef typename T::Point Point;
typedef typename T::Segment Segment;
typedef typename T::Vertex Vertex;
typedef typename T::Vertex_iterator Vertex_iterator;
Qt_layer_show_points(T &t) : tr(t){};
void draw()
{
Vertex_iterator it = tr.vertices_begin(),
beyond = tr.vertices_end();
*widget << CGAL::GREEN << CGAL::PointSize (3)
<< CGAL::PointStyle (CGAL::DISC);
while(it != beyond) {
*widget << (*it).point();
++it;
}
};
private:
T &tr;
};//end class
} // namespace CGAL