diff --git a/GraphicsView/demo/Triangulation_2/CMakeLists.txt b/GraphicsView/demo/Triangulation_2/CMakeLists.txt index b8ea163bfcc..3b31bfe8d7d 100644 --- a/GraphicsView/demo/Triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Triangulation_2/CMakeLists.txt @@ -24,7 +24,9 @@ set( QT_USE_QTOPENGL TRUE ) find_package(Qt4) include_directories (BEFORE ../../include) include_directories (BEFORE ./include) - +include_directories (BEFORE ../../../Triangulation_2/include) +include_directories (BEFORE ../../../Kernel_23/include) +include_directories (BEFORE ../../../Cartesian_kernel/include) if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) @@ -96,6 +98,9 @@ target_link_libraries( Regular_triangulation_2 ${QT_LIBRARIES} ) # Link with CGAL target_link_libraries( Regular_triangulation_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) +add_executable( poly poly.cpp ) +target_link_libraries( poly ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) + else() message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.") diff --git a/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp b/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp index 5bef930986f..907f5069107 100644 --- a/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp +++ b/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp @@ -6,7 +6,7 @@ // CGAL headers #include #include -#include +#include #include #include #include @@ -102,7 +102,7 @@ typedef CGAL::Delaunay_mesh_size_criteria_2 Criteria; typedef CGAL::Lipschitz_sizing_field_2 Lipschitz_sizing_field; typedef CGAL::Lipschitz_sizing_field_criteria_2 Lipschitz_criteria; -typedef CGAL::Delaunay_mesher_2 Lipschitz_mesher; +typedef CGAL::Delaunay_mesher_no_edge_refinement_2 Lipschitz_mesher; typedef CDT::Vertex_handle Vertex_handle; typedef CDT::Face_handle Face_handle; @@ -353,7 +353,7 @@ MainWindow::dropEvent(QDropEvent *event) void MainWindow::processInput(CGAL::Object o) { - + std::cerr << "Object " << o.type().name() << std::endl; std::list points; if(CGAL::assign(points, o)){ if(points.size() == 1) { @@ -612,7 +612,7 @@ MainWindow::on_actionMakeDelaunayMesh_triggered() discoverComponents(cdt); int nv = cdt.number_of_vertices(); - CGAL::refine_Delaunay_mesh_2(cdt, Criteria(0.125, edge_length), true); + CGAL::refine_Delaunay_mesh_2_without_edge_refinement(cdt, Criteria(0.125, edge_length), true); timer.stop(); nv = cdt.number_of_vertices() - nv; initializeID(cdt); diff --git a/GraphicsView/demo/resources/about_CGAL.html b/GraphicsView/demo/resources/about_CGAL.html index 1faa30fe8c9..d87503a3469 100644 --- a/GraphicsView/demo/resources/about_CGAL.html +++ b/GraphicsView/demo/resources/about_CGAL.html @@ -1,7 +1,7 @@

-

Computational Geometry Algorithms Library

+

Computational Geometry Algorithms Library

CGAL provides efficient and reliable geometric algorithms in the form of a C++ library.

For more information visit www.cgal.org

diff --git a/GraphicsView/include/CGAL/Qt/GraphicsViewPolylineInput.h b/GraphicsView/include/CGAL/Qt/GraphicsViewPolylineInput.h index 5ec85826447..2f5d2653016 100644 --- a/GraphicsView/include/CGAL/Qt/GraphicsViewPolylineInput.h +++ b/GraphicsView/include/CGAL/Qt/GraphicsViewPolylineInput.h @@ -88,6 +88,7 @@ public: GraphicsViewPolylineInput(QObject* parent, QGraphicsScene* s, int n = 0, bool closed = true) : GraphicsViewPolylineInput_non_templated_base(parent, s, n, closed) { + std::cerr << "GraphicsViewPolylineInput\n"; } protected: @@ -98,6 +99,7 @@ protected: if(closed_){ points.push_back(points.front()); } + std::cerr << "emit\n"; emit(generate(CGAL::make_object(points))); } }; // end class GraphicsViewPolylineInput diff --git a/GraphicsView/src/CGALQt4/DemosMainWindow.cpp b/GraphicsView/src/CGALQt4/DemosMainWindow.cpp index e2f6fe86cf7..6c813d8d851 100644 --- a/GraphicsView/src/CGALQt4/DemosMainWindow.cpp +++ b/GraphicsView/src/CGALQt4/DemosMainWindow.cpp @@ -182,11 +182,28 @@ DemosMainWindow::popupAboutBox(QString title, QString html_resource_name) { QFile about_CGAL(html_resource_name); about_CGAL.open(QIODevice::ReadOnly); + QString about_CGAL_txt = QTextStream(&about_CGAL).readAll(); +#ifdef CGAL_VERSION_STR + about_CGAL_txt.replace("", + QString(" (version %1, svn r%2)") + .arg(CGAL_VERSION_STR).arg(CGAL_SVN_REVISION)); +#endif QMessageBox mb(QMessageBox::NoIcon, title, - QTextStream(&about_CGAL).readAll(), + about_CGAL_txt, QMessageBox::Ok, this); + + QLabel* mb_label = mb.findChild("qt_msgbox_label"); + if(mb_label) { + mb_label->setTextInteractionFlags(mb_label->textInteractionFlags() | + ::Qt::LinksAccessibleByMouse | + ::Qt::LinksAccessibleByKeyboard); + } + else { + std::cerr << "Cannot find child \"qt_msgbox_label\" in QMessageBox\n" + << " with Qt version " << QT_VERSION_STR << "!\n"; + } mb.exec(); }