X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetBoolValue.h;h=237460ec7fc38390a528b7fb942bdf717dae70ca;hb=fa2d6e0932a9ef3d391ba4fb99b2608de8fdab33;hp=3969e643e47a3dde01d7deac7fb1a6d0b40fc3d0;hpb=3985b767e74385e51d1b503d2c97d3bb1e3f6faa;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetBoolValue.h b/src/ModuleBase/ModuleBase_WidgetBoolValue.h index 3969e643e..237460ec7 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 + /// \param theParent the parent object + /// \param theData the widget configuation. The attribute of the model widget is obtained from ModuleBase_WidgetBoolValue(QWidget* theParent, const Config_WidgetAPI* theData); virtual ~ModuleBase_WidgetBoolValue(); - /// Saves the internal parameters to the given feature - /// \param theObject a model feature to be changed - virtual bool storeValue(ObjectPtr theObject) const; - - virtual bool restoreValue(ObjectPtr theObject); + virtual bool canAcceptFocus() const { return false; }; - /// Returns list of widget controls - /// \return a control list virtual QList getControls() const; - /// Returns the internal parent wiget control, that can be shown anywhere - /// \returns the widget - QWidget* getControl() const; + virtual void setHighlighted(bool isHighlighted); + +protected: + /// Saves the internal parameters to the given feature + /// \return True in success + virtual bool storeValueCustom(); + + virtual bool restoreValueCustom(); -private: + private: + /// The check box QCheckBox* myCheckBox; }; -#endif \ No newline at end of file +#endif