Fix for P2_T2

This commit is contained in:
Maxime Gimeno 2016-02-03 16:03:11 +01:00
parent 8cee2ef1dd
commit e9e7ca0cf5
4 changed files with 11 additions and 6 deletions

View File

@ -126,7 +126,6 @@ MainWindow::MainWindow()
// and the input they generate is passed to the triangulation with
// the signal/slot mechanism
pt_pi = new CGAL::Qt::TriangulationPointInputAndConflictZone<Periodic_DT>(&scene, &triang, this );
QObject::connect(pt_pi, SIGNAL(generate(CGAL::Object)),
this, SLOT(processInput(CGAL::Object)));
@ -146,6 +145,7 @@ MainWindow::MainWindow()
this, SIGNAL(changed()));
pt_cc = new CGAL::Qt::TriangulationCircumcircle<Periodic_DT>(&scene, &triang, this);
pt_cc ->setPen(QPen(::Qt::black, .01));
QObject::connect(pt_cc, SIGNAL(modelChanged()),
this, SIGNAL(changed()));

View File

@ -3,6 +3,7 @@
#include <CGAL/Qt/GraphicsViewInput.h>
#include <CGAL/Qt/Converter.h>
#include <QGraphicsPolygonItem>
#include <QGraphicsSceneMouseEvent>
#include <QEvent>
#include <list>
@ -81,9 +82,10 @@ TriangulationConflictZone<T>::localize_and_insert_point(QPointF qt_point)
++it){
if(! m_tr->is_infinite(*it)){
QGraphicsPolygonItem *item = new QGraphicsPolygonItem(m_convert(m_tr->triangle(*it)));
QColor color(::Qt::blue);
QColor color = ::Qt::blue;
color.setAlpha(150);
item->setBrush(color);
item->setBrush(QBrush(color));
item->setPen(QPen(::Qt::black, .01));
m_scene->addItem(item);
qfaces.push_back(item);
}

View File

@ -5,6 +5,7 @@
#include <CGAL/Qt/GraphicsViewInput.h>
#include <CGAL/Qt/Converter.h>
#include <QGraphicsSceneMouseEvent>
#include <QGraphicsPolygonItem>
#include <QEvent>
#include <list>
@ -71,9 +72,10 @@ TriangulationPointInputAndConflictZone<T>::mousePressEvent(QGraphicsSceneMouseEv
it != faces.end();
++it) {
QGraphicsPolygonItem *item = new QGraphicsPolygonItem(convert(dt->triangle(*it)));
QColor color(::Qt::blue);
QColor color = ::Qt::blue;
color.setAlpha(150);
item->setBrush(color);
item->setBrush(QBrush(color));
item->setPen(QPen(::Qt::black, .01));
scene_->addItem(item);
qfaces.push_back(item);
}

View File

@ -154,9 +154,10 @@ namespace CGAL {
visible_edges(true), visible_vertices(true),
type(NONE)
{
setVerticesPen(QPen(::Qt::red, 1.));
setVerticesPen(QPen(::Qt::red, 1.));
setFacesPen(QPen(QColor(100,100,100)));
setDomainPen(QPen(::Qt::blue, .01));
setEdgesPen(QPen(::Qt::black, .01));
if(t->number_of_vertices() == 0){
this->hide();
}