add a menu to show/hide vertices

This commit is contained in:
Jane Tournois 2014-11-28 13:06:44 +01:00
parent 2b7d774c36
commit 150c52200a
2 changed files with 22 additions and 0 deletions

View File

@ -192,6 +192,8 @@ public slots:
void processInput(CGAL::Object o);
void on_actionShowVertices_toggled(bool checked);
void on_actionShowDelaunay_toggled(bool checked);
void on_actionShowTriangulationInDomain_toggled(bool checked);
@ -300,6 +302,7 @@ MainWindow::MainWindow()
// Check two actions
this->actionInsertPolyline->setChecked(true);
this->actionShowDelaunay->setChecked(true);
this->actionShowVertices->setChecked(true);
this->actionShowTriangulationInDomain->setChecked(false);
this->actionShow_faces_in_domain->setChecked(true);
this->actionShow_constrained_edges->setChecked(true);
@ -402,6 +405,13 @@ MainWindow::on_actionShowDelaunay_toggled(bool checked)
update();
}
void
MainWindow::on_actionShowVertices_toggled(bool checked)
{
dgi->setVisibleVertices(checked);
update();
}
void
MainWindow::on_actionShowTriangulationInDomain_toggled(bool checked)
{

View File

@ -108,6 +108,7 @@
<addaction name="actionInsertPolyline"/>
<addaction name="actionInsertSeeds_OnOff"/>
<addaction name="separator"/>
<addaction name="actionShowVertices"/>
<addaction name="actionShowDelaunay"/>
<addaction name="actionShowVoronoi"/>
<addaction name="actionShowTriangulationInDomain"/>
@ -377,6 +378,17 @@
<string>Show triangulation in domain only</string>
</property>
</action>
<action name="actionShowVertices">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="text">
<string>Show vertices</string>
</property>
</action>
</widget>
<resources>
<include location="Constrained_Delaunay_triangulation_2.qrc"/>