Salome HOME
Issue #662 Warning on remove or rename of (may be) used object in PartSet
[modules/shaper.git] / src / XGUI / XGUI_Tools.h
index 1a5c7b05f2b2103dc91e33dcc25025ef9a47742f..a3fba88c90fdebba52e6216ab9ef44de3cab117c 100644 (file)
@@ -9,8 +9,12 @@
 
 #include <ModelAPI_Feature.h>
 
+#include <ModuleBase_Definitions.h>
+
 #include <memory>
 
+class QWidget;
+
 /*!
  \ingroup GUI
  \brief Return directory part of the file path.
@@ -64,7 +68,21 @@ bool XGUI_EXPORT isModelObject(FeaturePtr theFeature);
  */
 std::string XGUI_EXPORT featureInfo(FeaturePtr theFeature);
 
+/*!
+ Returns true if there are no parts in the document, which are not activated or
+ all objects in the list are not PartSet document.
+ It shows the warning control if the result is false.
+ \param theParent a parent for the warning control
+ \param theList a list of object
+ \return a boolean value
+ */
+bool XGUI_EXPORT canRemoveOrRename(QWidget* theParent, const QObjectPtrList& aList);
 
+/*!
+ Returns true if there are no parts in the document, which are not activated
+ \return a boolean value
+ */
+bool XGUI_EXPORT allDocumentsActivated(QString& theNotActivatedNames);
 };
 
 #endif