X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_ConstraintDistance.h;h=c2dc3ee409e95ec77131d4488abee32c29f2cdb4;hb=5f280e7dc45a1f3345fe0f3a9080ac10265219e5;hp=cbd6ccf37f6ac2a5773f443744972c64149720ad;hpb=3ada52ad6bce1f69571d9dea97f6631f155681d7;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_ConstraintDistance.h b/src/SketchPlugin/SketchPlugin_ConstraintDistance.h index cbd6ccf37..c2dc3ee40 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintDistance.h +++ b/src/SketchPlugin/SketchPlugin_ConstraintDistance.h @@ -1,8 +1,22 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> - -// File: SketchPlugin_ConstraintDistance.h -// Created: 23 May 2014 -// Author: Artem ZHIDKOV +// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or +// email : webmaster.salome@opencascade.com +// #ifndef SketchPlugin_ConstraintDistance_H_ #define SketchPlugin_ConstraintDistance_H_ @@ -47,14 +61,13 @@ class SketchPlugin_ConstraintDistance : public SketchPlugin_ConstraintBase /// \brief Creates a new part document if needed SKETCHPLUGIN_EXPORT virtual void execute(); - /// Computes the attribute value on the base of other attributes if the value can be computed - /// \param theAttributeId an attribute index to be computed - /// \return a boolean value about it is computed - SKETCHPLUGIN_EXPORT virtual bool compute(const std::string& theAttributeId); - /// \brief Request for initialization of data model of the feature: adding all attributes SKETCHPLUGIN_EXPORT virtual void initAttributes(); + /// Retuns the parameters of color definition in the resources config manager + SKETCHPLUGIN_EXPORT virtual void colorConfigInfo(std::string& theSection, std::string& theName, + std::string& theDefault); + /// Returns the AIS preview SKETCHPLUGIN_EXPORT virtual AISObjectPtr getAISObject(AISObjectPtr thePrevious); @@ -72,7 +85,10 @@ class SketchPlugin_ConstraintDistance : public SketchPlugin_ConstraintBase protected: /// Returns the current distance between the feature attributes - double calculateCurrentDistance(); + virtual double calculateCurrentDistance(); + + /// Check the attributes related to distanced points/features are initialized + bool areAttributesInitialized(); private: bool myFlyoutUpdate; ///< to avoid cyclic dependencies on automatic updates of flyout point