Salome HOME
Merge branch 'master' of salome:modules/shaper
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetBoolValue.h
index 9d0246c1156fa3b3043c85001e6706ca6b9d8ad2..237460ec7fc38390a528b7fb942bdf717dae70ca 100644 (file)
@@ -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,36 @@ class Config_WidgetAPI;
 class QWidget;
 class QCheckBox;
 
+/**
+* \ingroup GUI
+* Implementation of widget for boolean input (check box)
+*/ 
 class MODULEBASE_EXPORT ModuleBase_WidgetBoolValue : public ModuleBase_ModelWidget
 {
 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,
-                             const std::string& theParentId);
+  /// \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() const;
-
-  virtual bool restoreValue();
+  virtual bool canAcceptFocus() const { return false; };
 
-  /// Returns list of widget controls
-  /// \return a control list
   virtual QList<QWidget*> 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:
+   /// The check box
   QCheckBox* myCheckBox;
 };