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