X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetSelector.h;h=2a41f711449980ddc0f0d5169eabed0d0fb8a487;hb=01a8a031b214d727e075a90ccdba0667a24db853;hp=cb7d76e42ab1ada09ee8def3cacde5cd607ecadc;hpb=70122a4400ec112e9c2c071724d444fa40282076;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetSelector.h b/src/ModuleBase/ModuleBase_WidgetSelector.h index cb7d76e42..2a41f7114 100755 --- a/src/ModuleBase/ModuleBase_WidgetSelector.h +++ b/src/ModuleBase/ModuleBase_WidgetSelector.h @@ -13,6 +13,7 @@ #include "ModuleBase_Definitions.h" #include +#include #include class Config_WidgetAPI; @@ -33,9 +34,8 @@ Q_OBJECT /// \param theParent the parent object /// \param theWorkshop instance of workshop interface /// \param theData the widget configuation. The attribute of the model widget is obtained from - /// \param theParentId is Id of a parent of the current attribute ModuleBase_WidgetSelector(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop, - const Config_WidgetAPI* theData, const std::string& theParentId); + const Config_WidgetAPI* theData); virtual ~ModuleBase_WidgetSelector(); @@ -43,7 +43,8 @@ Q_OBJECT virtual bool isViewerSelector() { return true; } /// Activate or deactivate selection and selection filters - void activateSelectionAndFilters(bool toActivate); + /// \return true if the selection filter of the widget is activated in viewer context + virtual bool activateSelectionAndFilters(bool toActivate); /// Checks the widget validity. By default, it returns true. /// \param thePrs a selected presentation in the view @@ -62,9 +63,6 @@ Q_OBJECT void onSelectionChanged(); protected: - /// Set an empty value to attribute - virtual void clearAttribute() = 0; - /// Update focus after the attribute value change virtual void updateFocus() = 0; @@ -87,7 +85,7 @@ Q_OBJECT /// \return true if it is succeed virtual void setObject(ObjectPtr theSelectedObject, GeomShapePtr theShape) = 0; - /// The methiod called when widget is activated + /// The methiod called when widget is activated virtual void activateCustom(); /// Returns true if selected shape corresponds to requested shape types. @@ -107,6 +105,11 @@ Q_OBJECT GeomShapePtr& theShape); //----------- Class members ------------- + /// Returns a name in the next form: attribute_feature_name/attribute_id + /// \param theAttribute a model attribute + /// \return string value + static std::string generateName(const AttributePtr& theAttribite, + ModuleBase_IWorkshop* theWorkshop); }; #endif