mirror of https://github.com/CGAL/cgal
Add the information to the item's tooltip.
This commit is contained in:
parent
c951fe0fca
commit
4bacb4bd3f
|
|
@ -71,6 +71,20 @@ Meshing_thread* cgal_code_mesh_3(const Polyhedron* pMesh,
|
|||
Scene_c3t3_item* p_new_item = new Scene_c3t3_item;
|
||||
p_new_item->setScene(scene);
|
||||
|
||||
QString tooltip = QString(
|
||||
"Angle: %1 \n"
|
||||
"Edge size bound: %2 \n"
|
||||
"Facets size bound: %3 \n"
|
||||
"Approximation bound: %4 \n" )
|
||||
.arg(facet_angle)
|
||||
.arg(edge_size)
|
||||
.arg(facet_sizing)
|
||||
.arg(facet_approx);
|
||||
if (pMesh->is_closed())
|
||||
tooltip += QString("Tetrahedra size bound: %1 \n" )
|
||||
.arg(tet_sizing);
|
||||
|
||||
p_new_item->setProperty("toolTip",tooltip);
|
||||
Mesh_parameters param;
|
||||
param.facet_angle = facet_angle;
|
||||
param.facet_sizing = facet_sizing;
|
||||
|
|
|
|||
|
|
@ -743,13 +743,15 @@ void Scene_c3t3_item::compute_bbox() const {
|
|||
}
|
||||
|
||||
QString Scene_c3t3_item::toolTip() const {
|
||||
return tr("<p><b>3D complex in a 3D triangulation</b></p>"
|
||||
"<p>Number of vertices: %1<br />"
|
||||
"Number of surface facets: %2<br />"
|
||||
"Number of volume tetrahedra: %3</p>")
|
||||
|
||||
QString tooltip = property("toolTip").toString() +=QString("3D complex in a 3D triangulation \n"
|
||||
"Number of vertices: %1 \n"
|
||||
"Number of surface facets: %2 \n"
|
||||
"Number of volume tetrahedra: %3 \n")
|
||||
.arg(c3t3().triangulation().number_of_vertices())
|
||||
.arg(c3t3().number_of_facets_in_complex())
|
||||
.arg(c3t3().number_of_cells_in_complex());
|
||||
return tooltip;
|
||||
}
|
||||
|
||||
void Scene_c3t3_item::draw(CGAL::Three::Viewer_interface* viewer) const {
|
||||
|
|
|
|||
Loading…
Reference in New Issue