diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementDemoWindow.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementDemoWindow.cpp index af1cfdb11d9..01a646b0348 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementDemoWindow.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementDemoWindow.cpp @@ -794,6 +794,10 @@ on_actionOverlay_triggered( ) Conic_arr* conic_arr2; Lin_arr* lin_arr; Lin_arr* lin_arr2; + Arc_arr* arc_arr; + Arc_arr* arc_arr2; + Alg_seg_arr* alg_arr; + Alg_seg_arr* alg_arr2; if ( CGAL::assign( seg_arr, arrs[ 0 ] ) && CGAL::assign( seg_arr2, arrs[ 1 ] ) ) { this->makeOverlayTab( seg_arr, seg_arr2 ); @@ -810,7 +814,14 @@ on_actionOverlay_triggered( ) { this->makeOverlayTab( lin_arr, lin_arr2 ); } - + if ( CGAL::assign( arc_arr, arrs[ 0 ] ) && CGAL::assign( arc_arr2, arrs[ 1 ] ) ) + { + this->makeOverlayTab( arc_arr, arc_arr2 ); + } + if ( CGAL::assign( alg_arr, arrs[ 0 ] ) && CGAL::assign( alg_arr2, arrs[ 1 ] ) ) + { + this->makeOverlayTab( alg_arr, alg_arr2 ); + } #if 0 if ( CGAL::assign( conic_arr, arrs[ 0 ] ) || CGAL::assign( conic_arr, arrs[ 1 ] ) ) diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/OverlayDialog.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/OverlayDialog.cpp index 938dd1daec8..2776c1295cf 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/OverlayDialog.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/OverlayDialog.cpp @@ -33,6 +33,8 @@ OverlayDialog( ArrangementDemoWindow* parent, Qt::WindowFlags f ): Pol_arr* pol; Conic_arr* conic; Lin_arr* lin; + Arc_arr* arc; + Alg_seg_arr* alg; if ( CGAL::assign( seg, arrangements[ i ] ) ) { icon.addFile(QString::fromUtf8(":/icons/green_icon.xpm"), QSize(), QIcon::Normal, QIcon::Off); @@ -49,6 +51,14 @@ OverlayDialog( ArrangementDemoWindow* parent, Qt::WindowFlags f ): { icon.addFile(QString::fromUtf8(":/icons/blue_icon.xpm"), QSize(), QIcon::Normal, QIcon::Off); } + else if ( CGAL::assign( arc, arrangements[ i ] ) ) + { + icon.addFile(QString::fromUtf8(":/icons/green_icon.xpm"), QSize(), QIcon::Normal, QIcon::Off); + } + else if ( CGAL::assign( alg, arrangements[ i ] ) ) + { + icon.addFile(QString::fromUtf8(":/icons/yellow_icon.xpm"), QSize(), QIcon::Normal, QIcon::Off); + } item->setIcon( icon ); } } @@ -128,6 +138,8 @@ restrictSelection( QListWidgetItem* item ) Pol_arr* pol; Conic_arr* conic; Lin_arr* lin; + Arc_arr* arc; + Alg_seg_arr* alg; if ( CGAL::assign( seg, o ) ) { for ( int i = 0; i < this->ui->arrangementsListWidget->count( ); ++i ) @@ -204,6 +216,44 @@ restrictSelection( QListWidgetItem* item ) otherItem->setFlags( flags ); } } + else if ( CGAL::assign( arc, o ) ) + { + for ( int i = 0; i < this->ui->arrangementsListWidget->count( ); ++i ) + { + QListWidgetItem* otherItem = this->ui->arrangementsListWidget->item( i ); + CGAL::Object o2 = otherItem->data( ARRANGEMENT ).value< CGAL::Object >( ); + bool enabled = CGAL::assign( arc, o2 ); + Qt::ItemFlags flags = otherItem->flags( ); + if ( ! enabled ) + { + flags &= ~( Qt::ItemIsEnabled ); + } + else + { + flags |= Qt::ItemIsEnabled; + } + otherItem->setFlags( flags ); + } + } + else if ( CGAL::assign( alg, o ) ) + { + for ( int i = 0; i < this->ui->arrangementsListWidget->count( ); ++i ) + { + QListWidgetItem* otherItem = this->ui->arrangementsListWidget->item( i ); + CGAL::Object o2 = otherItem->data( ARRANGEMENT ).value< CGAL::Object >( ); + bool enabled = CGAL::assign( alg, o2 ); + Qt::ItemFlags flags = otherItem->flags( ); + if ( ! enabled ) + { + flags &= ~( Qt::ItemIsEnabled ); + } + else + { + flags |= Qt::ItemIsEnabled; + } + otherItem->setFlags( flags ); + } + } } void