Salome HOME
Merge branch 'Dev_0.6.1' of newgeom:newgeom into Dev_0.6.1
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetLabel.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ModuleBase_WidgetLabel.h
4 // Created:     03 Dec 2014
5 // Author:      Vitaly SMETANNIKOV
6
7 #ifndef ModuleBase_WidgetLabel_H
8 #define ModuleBase_WidgetLabel_H
9
10 #include "ModuleBase.h"
11 #include "ModuleBase_ModelWidget.h"
12
13 class QLabel;
14
15 class MODULEBASE_EXPORT ModuleBase_WidgetLabel : public ModuleBase_ModelWidget
16 {
17 Q_OBJECT
18  public:
19   ModuleBase_WidgetLabel(QWidget* theParent, const Config_WidgetAPI* theData,
20                             const std::string& theParentId);
21
22   virtual ~ModuleBase_WidgetLabel();
23
24   /// Defines if it is supported to set the value in this widget
25   /// It returns false because this is an info widget
26   virtual bool canSetValue() const { return false; };
27
28   virtual bool storeValue() const
29   {
30     return true;
31   }
32
33   virtual bool restoreValue()
34   {
35     return true;
36   }
37
38   virtual QList<QWidget*> getControls() const;
39
40   QWidget* getControl() const;
41
42   /// This control doesn't accept focus
43   virtual bool focusTo() { return false; }
44
45 private:
46   QLabel* myLabel;
47 };
48
49 #endif