Salome HOME
Updated copyright comment
[modules/shaper.git] / src / ModuleBase / ModuleBase_Tools.h
index d6e4c4c550ce7fb74d1510a9183f3d3e39e5ac96..69567cc0fa8b9b013eb751f81b0970977fee2dc8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2024  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -189,7 +189,7 @@ MODULEBASE_EXPORT bool isSubResult(ObjectPtr theObject);
 /// \param hasFolder will be set to true if one of folder is in the list
 MODULEBASE_EXPORT void checkObjects(const QObjectPtrList& theObjects, bool& hasResult,
                            bool& hasFeature, bool& hasParameter, bool& hasCompositeOwner,
-                           bool& hasResultInHistory, bool& hasFolder);
+                           bool& hasResultInHistory, bool& hasFolder, bool &hasGroupsOnly);
 
 /// Sets the default coeffient into the driver calculated accordingly the shape type.
 /// It provides 1.e-4 for results of construction type
@@ -339,6 +339,11 @@ bool MODULEBASE_EXPORT askToDelete(const std::set<FeaturePtr> aFeatures,
                                    std::set<FeaturePtr>& theReferencesToDelete,
                                    const std::string& thePrefixInfo = "");
 
+/// Shows a message box about conflicting constraints.
+/// \param theParent a parent widget for the message box
+/// \param theWarningText text describing the cause of the conflict
+bool MODULEBASE_EXPORT warningAboutConflict(QWidget* theParent, const std::string& theWarningText);
+
 /// Converts a list of objects to set of corresponded features. If object is result, it is ignored
 /// because the feature only might be removed. But if result is in a parameter group, the feature
 /// of this parameter is to be removed
@@ -370,7 +375,7 @@ QString MODULEBASE_EXPORT translate(const std::string& theContext, const std::st
 
 /// Set Highlighting of points as a Ball shape
 /// \param theAIS - the presentation
-void MODULEBASE_EXPORT setPointBallHighlighting(AIS_Shape* theAIS);
+void MODULEBASE_EXPORT setPointBallHighlighting(AIS_InteractiveObject* theAIS);
 
 /// Creates a parameter from a given string
 /// \theText a text wit equation
@@ -401,9 +406,16 @@ bool MODULEBASE_EXPORT isSameShape(const TopoDS_Shape& theShape1, const TopoDS_S
 /// \param theAttribute a model attribute
 /// \param theWorkshop a workshop class instance
 /// \return string value
-std::string MODULEBASE_EXPORT generateName(const AttributePtr& theAttribute,
+std::wstring MODULEBASE_EXPORT generateName(const AttributePtr& theAttribute,
   ModuleBase_IWorkshop* theWorkshop);
 
+/// Returns pixel ratio of a screen where main window is displayed
+qreal MODULEBASE_EXPORT currentPixelRatio();
+
+/// Set displaying status for elements from part depending on the settings
+/// \param thePart a pointer of part
+void MODULEBASE_EXPORT setDisplaying(std::shared_ptr<ModelAPI_ResultPart> thePart,
+                                     bool theDisplayFromScript = false);
 }
 
 #endif