diff --git a/Polyhedron/demo/Polyhedron/Io_implicit_function_plugin.cpp b/Polyhedron/demo/Polyhedron/Io_implicit_function_plugin.cpp index 7843cee826f..eed51138917 100644 --- a/Polyhedron/demo/Polyhedron/Io_implicit_function_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Io_implicit_function_plugin.cpp @@ -54,7 +54,7 @@ public: Io_implicit_function_plugin(); virtual ~Io_implicit_function_plugin() {} - bool applicable() const { return true; } + bool applicable(QAction*) const { return true; } QString name() const { return "implicit functions"; } // QString nameFilters() const { return ""; } diff --git a/Polyhedron/demo/Polyhedron/MainWindow.cpp b/Polyhedron/demo/Polyhedron/MainWindow.cpp index 4e9406d2366..9da72a7519a 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.cpp +++ b/Polyhedron/demo/Polyhedron/MainWindow.cpp @@ -340,14 +340,8 @@ MainWindow::MainWindow(QWidget* parent) void MainWindow::filterOperations() { Q_FOREACH(const PluginNamePair& p, plugins) { - if(p.first->applicable()) { - Q_FOREACH(QAction* action, p.first->actions()) { - action->setVisible(true); - } - } else { - Q_FOREACH(QAction* action, p.first->actions()) { - action->setVisible(false); - } + Q_FOREACH(QAction* action, p.first->actions()) { + action->setVisible( p.first->applicable(action) ); } } diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_camera_positions_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_camera_positions_plugin.cpp index c1a41e8e354..d78b5079c8f 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_camera_positions_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_camera_positions_plugin.cpp @@ -26,7 +26,7 @@ public: bool canSave(const Scene_item*) { return false; } bool save(const Scene_item*, QFileInfo ) {return false; } - bool applicable() const {return false;} + bool applicable(QAction*) const {return false;} private: Camera_positions_list* cpl; }; diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_convex_hull_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_convex_hull_plugin.cpp index 07fc6cb5012..c0f91fcd42d 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_convex_hull_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_convex_hull_plugin.cpp @@ -29,7 +29,7 @@ public: return QStringList() << "actionConvexHull"; } - bool applicable() const { + bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())) || qobject_cast(scene->item(scene->mainSelectionIndex())) || diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_corefinement_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_corefinement_plugin.cpp index 7c73d4ec92d..242d113d898 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_corefinement_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_corefinement_plugin.cpp @@ -28,7 +28,7 @@ class Polyhedron_demo_corefinement_plugin : public: - bool applicable() const { + bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())); } diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_cut_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_cut_plugin.cpp index 62dc22469e3..ec98cb56588 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_cut_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_cut_plugin.cpp @@ -172,7 +172,7 @@ public: virtual ~Polyhedron_demo_cut_plugin(); - bool applicable() const { + bool applicable(QAction*) const { // returns true if one polyhedron is in the entries for (int i=0; i< scene->numberOfEntries(); ++i) { diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_edit_polyhedron_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_edit_polyhedron_plugin.cpp index d27c8efa5ee..9a256f53a9f 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_edit_polyhedron_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_edit_polyhedron_plugin.cpp @@ -26,7 +26,7 @@ public: void init(QMainWindow* mainWindow, Scene_interface* scene_interface); QList actions() const; - bool applicable() const; + bool applicable(QAction*) const; public slots: void on_actionDeformation_triggered(); @@ -69,7 +69,7 @@ private: QList Polyhedron_demo_edit_polyhedron_plugin::actions() const { return QList() << actionDeformation; } -bool Polyhedron_demo_edit_polyhedron_plugin::applicable() const { +bool Polyhedron_demo_edit_polyhedron_plugin::applicable(QAction*) const { Q_FOREACH(Scene_interface::Item_id i, scene->selectionIndices()) { if(qobject_cast(scene->item(i)) diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_inside_out_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_inside_out_plugin.cpp index 25469ebef8a..ef86455fa47 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_inside_out_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_inside_out_plugin.cpp @@ -22,7 +22,7 @@ public: return QStringList() << "actionInsideOut"; } - bool applicable() const { + bool applicable(QAction*) const { const Scene_interface::Item_id index = scene->mainSelectionIndex(); return qobject_cast(scene->item(index)) || qobject_cast(scene->item(index)); diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_intersection_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_intersection_plugin.cpp index 42d952df9bb..79c04e5259b 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_intersection_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_intersection_plugin.cpp @@ -33,7 +33,7 @@ class Polyhedron_demo_intersection_plugin : public: - bool applicable() const { + bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())); } diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_jet_fitting_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_jet_fitting_plugin.cpp index a985d8a937a..24dbe6bb254 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_jet_fitting_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_jet_fitting_plugin.cpp @@ -25,7 +25,7 @@ public: return QStringList() << "actionEstimateCurvature"; } - bool applicable() const { + bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())); } diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_join_and_split_polyhedra_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_join_and_split_polyhedra_plugin.cpp index 68fb6316288..ec4d38cd559 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_join_and_split_polyhedra_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_join_and_split_polyhedra_plugin.cpp @@ -37,7 +37,7 @@ public: Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface); } - bool applicable() const { + bool applicable(QAction*) const { Q_FOREACH(int index, scene->selectionIndices()) { if ( qobject_cast(scene->item(index)) ) diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_kernel_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_kernel_plugin.cpp index eacc0d2b8a0..e5bf8357450 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_kernel_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_kernel_plugin.cpp @@ -37,7 +37,7 @@ public: return QStringList() << "actionKernel"; } - bool applicable() const { + bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())); } diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin.cpp index c37865a9bc1..fb36761e628 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin.cpp @@ -47,7 +47,7 @@ public: return QList() << actionMesh_3; } - bool applicable() const { + bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())); } public slots: diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_mesh_segmentation_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_mesh_segmentation_plugin.cpp index 9f1ea88fba1..2a03de8c432 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_mesh_segmentation_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_mesh_segmentation_plugin.cpp @@ -57,7 +57,7 @@ public: return QList() << actionSegmentation; } - bool applicable() const { + bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())); } diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_mesh_simplification_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_mesh_simplification_plugin.cpp index e6881669c49..a5c6e67d293 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_mesh_simplification_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_mesh_simplification_plugin.cpp @@ -26,7 +26,7 @@ public: return QStringList() << "actionSimplify"; } - bool applicable() const { + bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())); } public slots: diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_nef_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_nef_plugin.cpp index c2da2c8f1e4..d67bd490d98 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_nef_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_nef_plugin.cpp @@ -30,7 +30,7 @@ public: << "actionMinkowskiSum"; } - bool applicable() const { + bool applicable(QAction*) const { const int indexA = scene->selectionAindex(); const int indexB = scene->selectionBindex(); diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_normal_estimation_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_normal_estimation_plugin.cpp index 48ccec330e8..dc5b2502fa6 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_normal_estimation_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_normal_estimation_plugin.cpp @@ -50,7 +50,7 @@ public: return QList() << actionNormalEstimation << actionNormalInversion; } - bool applicable() const { + bool applicable(QAction*) const { #if CGAL_DISABLE_NORMAL_ESTIMATION_PLUGIN return false; #else diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp index 7ce9e84c45a..f84cc31aae8 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp @@ -23,10 +23,14 @@ public: Scene_interface* scene_interface, Messages_interface* m); - bool applicable() const { + bool applicable(QAction* action) const { Q_FOREACH(Scene_interface::Item_id index, scene->selectionIndices()) { if(qobject_cast(scene->item(index))) return true; + else + if (action==actionShuffle && + qobject_cast(scene->item(index))) + return true; } return false; } diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_parameterization_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_parameterization_plugin.cpp index 8a3855285b5..8b3d53e2718 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_parameterization_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_parameterization_plugin.cpp @@ -37,7 +37,7 @@ public: << "actionDCP"; } - bool applicable() const { + bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())); } diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_pca_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_pca_plugin.cpp index b7af60450a6..751bf7d6453 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_pca_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_pca_plugin.cpp @@ -38,7 +38,7 @@ public: << "actionFitLine"; } - bool applicable() const { + bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())); } diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_plugin_interface.h b/Polyhedron/demo/Polyhedron/Polyhedron_demo_plugin_interface.h index 8f0bd1b553d..1e2628ba97c 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_plugin_interface.h +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_plugin_interface.h @@ -26,7 +26,7 @@ public: //! //! @returns \c true, if the plugin is applicable, \c false //! otherwise - virtual bool applicable() const = 0; + virtual bool applicable(QAction*) const = 0; virtual QList actions() const = 0; }; diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_inside_polyhedron_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_inside_polyhedron_plugin.cpp index e5e32426cdf..3da1a232839 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_inside_polyhedron_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_inside_polyhedron_plugin.cpp @@ -36,7 +36,7 @@ class Polyhedron_demo_point_inside_polyhedron_plugin : Q_INTERFACES(Polyhedron_demo_plugin_interface) public: - bool applicable() const + bool applicable(QAction*) const { bool poly_item_exists = false; bool point_item_exists = false; diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_average_spacing_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_average_spacing_plugin.cpp index 1473fd0fa62..1faac876543 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_average_spacing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_average_spacing_plugin.cpp @@ -39,7 +39,7 @@ public: //! Applicable if the currently selected item is a //! points_with_normal_item. - bool applicable() const { + bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())); } diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_outliers_removal_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_outliers_removal_plugin.cpp index e827a4776d1..1a8130fb553 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_outliers_removal_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_outliers_removal_plugin.cpp @@ -36,7 +36,7 @@ public: } //! Applicate for Point_sets with normals. - bool applicable() const { + bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())); } diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_simplification_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_simplification_plugin.cpp index 38aed1a8f79..81619adce96 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_simplification_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_simplification_plugin.cpp @@ -34,7 +34,7 @@ public: Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface); } - bool applicable() const { + bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())); } diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_smoothing_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_smoothing_plugin.cpp index b88a73e59f2..bb6001e6390 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_smoothing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_smoothing_plugin.cpp @@ -32,7 +32,7 @@ public: return QList() << actionJetSmoothing; } - bool applicable() const { + bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())); } diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_poisson_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_poisson_plugin.cpp index 5fcd45ddeda..9f0926a4b32 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_poisson_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_poisson_plugin.cpp @@ -40,7 +40,7 @@ public: } //! Applicate for Point_sets with normals. - bool applicable() const { + bool applicable(QAction*) const { Scene_points_with_normal_item* item = qobject_cast(scene->item(scene->mainSelectionIndex())); return item && item->has_normals(); diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_polyhedron_slicer_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_polyhedron_slicer_plugin.cpp index 6697ab9a5e8..4a139ee8ef3 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_polyhedron_slicer_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_polyhedron_slicer_plugin.cpp @@ -35,7 +35,7 @@ class Polyhedron_demo_polyhedron_slicer_plugin : Q_INTERFACES(Polyhedron_demo_plugin_interface) public: - bool applicable() const { return qobject_cast(scene->item(scene->mainSelectionIndex())); } + bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())); } void print_message(QString message) { messages->information(message);} void init(QMainWindow* mainWindow, Scene_interface* scene_interface, Messages_interface* m); diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_polyhedron_stitching_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_polyhedron_stitching_plugin.cpp index 553520e4528..c6b90c21a39 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_polyhedron_stitching_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_polyhedron_stitching_plugin.cpp @@ -50,7 +50,7 @@ public: Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface); } - bool applicable() const { + bool applicable(QAction*) const { Q_FOREACH(int index, scene->selectionIndices()) { if ( qobject_cast(scene->item(index)) ) diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_remeshing_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_remeshing_plugin.cpp index 88b1172f1bb..03e903f8efe 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_remeshing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_remeshing_plugin.cpp @@ -39,7 +39,7 @@ public: } } - bool applicable() const { + bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())); } diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_scale_space_reconstruction_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_scale_space_reconstruction_plugin.cpp index a824fe690f3..34c2ed33518 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_scale_space_reconstruction_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_scale_space_reconstruction_plugin.cpp @@ -50,7 +50,7 @@ public: } //! Applicate for Point_sets with normals. - bool applicable() const { + bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())); } diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_selection_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_selection_plugin.cpp index 6993b50d879..320871dd063 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_selection_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_selection_plugin.cpp @@ -24,7 +24,7 @@ class Polyhedron_demo_selection_plugin : Q_INTERFACES(Polyhedron_demo_plugin_interface) public: - bool applicable() const { + bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())) || qobject_cast(scene->item(scene->mainSelectionIndex())); } diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_self_intersection_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_self_intersection_plugin.cpp index e69beea7897..a9edbb6413f 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_self_intersection_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_self_intersection_plugin.cpp @@ -30,7 +30,7 @@ public: return QStringList() << "actionSelfIntersection"; } - bool applicable() const { + bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())); } diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_subdivision_methods_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_subdivision_methods_plugin.cpp index b5a3b4eac6c..4bf357255f6 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_subdivision_methods_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_subdivision_methods_plugin.cpp @@ -23,7 +23,7 @@ public: << "actionSqrt3"; } - bool applicable() const { + bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())); } public slots: diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_transform_polyhedron_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_transform_polyhedron_plugin.cpp index a2585d5080c..408ef6c9859 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_transform_polyhedron_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_transform_polyhedron_plugin.cpp @@ -30,7 +30,7 @@ public: return QList() << actionTransformPolyhedron; } - bool applicable() const { + bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())) || qobject_cast(scene->item(scene->mainSelectionIndex())); } diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_triangulate_facets_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_triangulate_facets_plugin.cpp index 89833af3130..e84e76730f3 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_triangulate_facets_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_triangulate_facets_plugin.cpp @@ -44,7 +44,7 @@ public: << actionUnTriangulateFacets; } - bool applicable() const { + bool applicable(QAction*) const { Q_FOREACH(Scene_interface::Item_id index, scene->selectionIndices()) { Scene_polyhedron_item* item = qobject_cast(scene->item(index)); if(!item) return false; diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_trivial_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_trivial_plugin.cpp index 03b4c6de85d..8bed5d1ad8e 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_trivial_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_trivial_plugin.cpp @@ -103,7 +103,7 @@ public: return QList() << actionBbox; } - bool applicable() const { + bool applicable(QAction*) const { return true; } public slots: