activate wait cursor

This commit is contained in:
iyaz 2013-08-03 00:52:02 +03:00
parent dd4da3d2ac
commit d71c8e4f8c
3 changed files with 11 additions and 3 deletions

View File

@ -76,7 +76,7 @@ public slots:
if(selection_item->selected_vertices.empty()) {
print_message("Error: please select a region of vertices!");
}
QApplication::setOverrideCursor(Qt::WaitCursor);
int weight_index = ui_widget.weight_combo_box->currentIndex();
if(weight_index == 1)
@ -88,6 +88,7 @@ public slots:
selection_item->selected_vertices.end(),
CGAL::internal::Cotangent_weight_with_voronoi_area_fairing<Polyhedron>());
selection_item->changed_with_poly_item();
QApplication::restoreOverrideCursor();
}
void on_Refine_button_clicked() {
@ -97,7 +98,7 @@ public slots:
if(selection_item->selected_facets.empty()) {
print_message("Error: please select a region of facets!");
}
QApplication::setOverrideCursor(Qt::WaitCursor);
double alpha = ui_widget.Density_control_factor_spin_box->value();
std::vector<Polyhedron::Facet_handle> new_facets;
@ -108,6 +109,7 @@ public slots:
selection_item->selected_facets.insert(*it);
}
selection_item->changed_with_poly_item();
QApplication::restoreOverrideCursor();
}
private:

View File

@ -460,6 +460,7 @@ void Polyhedron_demo_hole_filling_plugin::on_Fill_selected_holes_button() {
return;
}
QApplication::setOverrideCursor(Qt::WaitCursor);
// fill selected holes
bool any_filled = false;
for(Scene_polylines_collection::Selected_holes_set::iterator it = polyline_item->selected_holes.begin();
@ -472,6 +473,7 @@ void Polyhedron_demo_hole_filling_plugin::on_Fill_selected_holes_button() {
last_active_item = polyline_item->poly_item;
accept_reject_toggle(true);
}
QApplication::restoreOverrideCursor();
};
// fills all holes and removes associated Scene_polylines_collection if any
void Polyhedron_demo_hole_filling_plugin::on_Fill_all_holes_button() {
@ -506,6 +508,7 @@ void Polyhedron_demo_hole_filling_plugin::on_Fill_all_holes_button() {
return;
}
QApplication::setOverrideCursor(Qt::WaitCursor);
bool any_filled = false;
for(std::vector<Halfedge_iterator>::iterator it = border_reps.begin(); it != border_reps.end(); ++it) {
any_filled |= fill(poly, *it);
@ -516,6 +519,7 @@ void Polyhedron_demo_hole_filling_plugin::on_Fill_all_holes_button() {
last_active_item = poly_item;
accept_reject_toggle(true);
}
QApplication::restoreOverrideCursor();
}
// Simply create polyline items and put them into scene - nothing related with other parts of the plugin
void Polyhedron_demo_hole_filling_plugin::on_Create_polyline_items_button(){

View File

@ -106,7 +106,8 @@ public slots:
bool use_DT =
QMessageBox::Yes == QMessageBox::question(
NULL, "Use Delaunay Triangulation", "Use Delaunay Triangulation ?", QMessageBox::Yes|QMessageBox::No);
QApplication::setOverrideCursor(Qt::WaitCursor);
std::size_t counter = 0;
for(Scene_polylines_item::Polylines_container::iterator it = polylines_item->polylines.begin();
it != polylines_item->polylines.end(); ++it, ++counter)
@ -147,6 +148,7 @@ public slots:
poly_item->setRenderingMode(FlatPlusEdges);
scene->setSelectedItem(scene->addItem(poly_item));
}
QApplication::restoreOverrideCursor();
}
private: