X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetBoolValue.h;h=b100c4ffe4cd43b6886a42aeb93c75f12fb36372;hb=86c435d69e7b27d36c037ed028d79d8f32f021ac;hp=6f32ef3ef87183b2961ead0fb7389d444a4a77c9;hpb=79d1b40e0b4470fd0687077933d4b049c210400d;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetBoolValue.h b/src/ModuleBase/ModuleBase_WidgetBoolValue.h index 6f32ef3ef..b100c4ffe 100644 --- a/src/ModuleBase/ModuleBase_WidgetBoolValue.h +++ b/src/ModuleBase/ModuleBase_WidgetBoolValue.h @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: ModuleBase_WidgetBoolValue.h // Created: 04 June 2014 // Author: Vitaly Smetannikov @@ -12,33 +14,37 @@ class Config_WidgetAPI; class QWidget; class QCheckBox; -class MODULEBASE_EXPORT ModuleBase_WidgetBoolValue: public ModuleBase_ModelWidget +/** +* \ingroup GUI +* Implementation of widget for boolean input (check box) +*/ +class MODULEBASE_EXPORT ModuleBase_WidgetBoolValue : public ModuleBase_ModelWidget { - Q_OBJECT -public: +Q_OBJECT + public: /// Constructor - /// \theParent the parent object - /// \theData the widget configuation. The attribute of the model widget is obtained from - ModuleBase_WidgetBoolValue(QWidget* theParent, const Config_WidgetAPI* theData); + /// \param theParent the parent object + /// \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_WidgetBoolValue(QWidget* theParent, const Config_WidgetAPI* theData, + const std::string& theParentId); virtual ~ModuleBase_WidgetBoolValue(); - /// Saves the internal parameters to the given feature - /// \param theFeature a model feature to be changed - virtual bool storeValue(FeaturePtr theFeature) const; + virtual QList getControls() const; - virtual bool restoreValue(FeaturePtr theFeature); + virtual void setHighlighted(bool isHighlighted); - /// Returns list of widget controls - /// \return a control list - virtual QList getControls() const; +protected: + /// Saves the internal parameters to the given feature + /// \return True in success + virtual bool storeValueCustom() const; - /// Returns the internal parent wiget control, that can be shown anywhere - /// \returns the widget - QWidget* getControl() const; + virtual bool restoreValueCustom(); -private: + private: + /// The check box QCheckBox* myCheckBox; }; -#endif \ No newline at end of file +#endif