X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_Tools.h;h=69567cc0fa8b9b013eb751f81b0970977fee2dc8;hb=77ce6d35ac8d2f0fdaecb4f23e0870bf74e36103;hp=ea4e0a9295fa074600ae40cdfe75846e66a0c2a4;hpb=50a8df0c6a66da8067b16155e5ae39f8f26a7ebc;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_Tools.h b/src/ModuleBase/ModuleBase_Tools.h index ea4e0a929..69567cc0f 100644 --- a/src/ModuleBase/ModuleBase_Tools.h +++ b/src/ModuleBase/ModuleBase_Tools.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2020 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 aFeatures, std::set& 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,11 +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 thePart, + bool theDisplayFromScript = false); } #endif