Salome HOME
Selection priority in Sketch, clear selection when sketch goes from entity to neutral...
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetLabel.h
index 3fbf7e883411325fe921c9279f0910e3f6023a26..4812f29b60adee8a41b051c92eae777d2f948836 100644 (file)
 
 class QLabel;
 
+/**
+* \ingroup GUI
+* Implementation of model widget for a label control
+*/
 class MODULEBASE_EXPORT ModuleBase_WidgetLabel : public ModuleBase_ModelWidget
 {
 Q_OBJECT
  public:
-  ModuleBase_WidgetLabel(QWidget* theParent, const Config_WidgetAPI* theData,
-                            const std::string& theParentId);
+  /// Constructor
+  /// \param theParent the parent object
+  /// \param theData the widget configuation. The attribute of the model widget is obtained from
+  ModuleBase_WidgetLabel(QWidget* theParent, const Config_WidgetAPI* theData);
 
   virtual ~ModuleBase_WidgetLabel();
 
   /// Defines if it is supported to set the value in this widget
   /// It returns false because this is an info widget
-  virtual bool canSetValue() const { return false; };
+  virtual bool canAcceptFocus() const { return false; };
 
-  virtual bool storeValue() const
-  {
-    return true;
-  }
-
-  virtual bool restoreValue()
-  {
-    return true;
-  }
+  virtual bool restoreValueCustom();
 
   virtual QList<QWidget*> getControls() const;
 
-  QWidget* getControl() const;
-
   /// This control doesn't accept focus
-  virtual bool focusTo() { return false; }
+  virtual bool focusTo();
+
+protected:
+  /// Saves the internal parameters to the given feature
+  /// \return True in success
+  virtual bool storeValueCustom()
+  {
+    return true;
+  }
 
-private:
+  /// A label control
   QLabel* myLabel;
 };
 
-#endif
\ No newline at end of file
+#endif