X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FModelAPI%2FModelAPI_ResultConstruction.h;h=75593bdeac3b1d5dde129e10ee406584c6e051a2;hb=0fdfafcdf2500a8e7e895fca953d7ebfb9126f16;hp=9f43462469d891c99d4bce7c90dac69c759d902d;hpb=1e06d55e5ca7dd930512a9ae565497f81ddb6b72;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_ResultConstruction.h b/src/ModelAPI/ModelAPI_ResultConstruction.h index 9f4346246..75593bdea 100644 --- a/src/ModelAPI/ModelAPI_ResultConstruction.h +++ b/src/ModelAPI/ModelAPI_ResultConstruction.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2020 CEA/DEN, EDF R&D +// Copyright (C) 2014-2023 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -33,11 +33,9 @@ * Provides a shape that may be displayed in the viewer. * Intermediate, light result that in many cases produces a result on the fly. */ -MODELAPI_EXPORT class ModelAPI_ResultConstruction : public ModelAPI_Result +class ModelAPI_ResultConstruction : public ModelAPI_Result { public: - MODELAPI_EXPORT ModelAPI_ResultConstruction(); - /// Returns the group identifier of this result MODELAPI_EXPORT virtual std::string groupName(); @@ -55,6 +53,13 @@ MODELAPI_EXPORT class ModelAPI_ResultConstruction : public ModelAPI_Result return RESULT_CONSTRUCTION_COLOR; } + /// default color for a result construction + inline static const std::string& RESULT_COLOR_NAME() + { + static const std::string COLOR_NAME("result_construction_color"); + return COLOR_NAME; + } + /// default deflection for a result construction inline static const std::string DEFAULT_DEFLECTION() { @@ -83,56 +88,6 @@ MODELAPI_EXPORT class ModelAPI_ResultConstruction : public ModelAPI_Result virtual bool isInfinite() = 0; /// Sets the flag that it is infinite virtual void setInfinite(const bool theInfinite) = 0; - - /*************************************************************************/ - /// Changes for custom point color - - inline static const std::string& DEFAULT_COLOR_CONFIG_NAME() - { - static const std::string RESULT_CONSTRUCTION_COLOR_CONFIG_NAME("result_construction_color"); - return RESULT_CONSTRUCTION_COLOR_CONFIG_NAME; - } - - inline void setColor(const std::string myColor, const std::string & myColorConfigName) - { - color = myColor; - colorConfigName = myColorConfigName; - } - - inline const std::string & getColor() const - { - return color; - } - - inline const std::string & getColorConfigName() const - { - return colorConfigName; - } - -private: - std::string color; - std::string colorConfigName; - -public: - - /// Specific properties for point - class ModelApi_PointColor - { - public: - /// default color for a point construction - inline static const std::string& DEFAULT_COLOR() - { - static const std::string POINT_CONSTRUCTION_COLOR("85,85,0"); - return POINT_CONSTRUCTION_COLOR; - } - - inline static const std::string COLOR_CONFIG_NAME() - { - static const std::string POINT_CONFIG_COLOR_NAME("result_point_color"); - return POINT_CONFIG_COLOR_NAME; - } - }; - /*************************************************************************/ }; //! Pointer on feature object