Salome HOME
Create custom widgets
[modules/shaper.git] / src / PartSet / PartSet_WidgetSketchLabel.h
1 // File:        PartSet_WidgetSketchLabel.h
2 // Created:     07 July 2014
3 // Author:      Vitaly SMETANNIKOV
4
5 #ifndef PartSet_WidgetSketchLabel_H
6 #define PartSet_WidgetSketchLabel_H
7
8 #include "PartSet.h"
9
10 #include <ModuleBase_ModelWidget.h>
11
12 class QLabel;
13 class XGUI_OperationMgr; 
14
15 class PARTSET_EXPORT PartSet_WidgetSketchLabel : public ModuleBase_ModelWidget
16 {
17   Q_OBJECT
18 public:
19   PartSet_WidgetSketchLabel(QWidget* theParent, const Config_WidgetAPI* theData);
20
21   virtual ~PartSet_WidgetSketchLabel() {};
22
23   /// Saves the internal parameters to the given feature
24   /// \param theFeature a model feature to be changed
25   virtual bool storeValue(FeaturePtr theFeature) const { return true;}
26
27   virtual bool restoreValue(FeaturePtr theFeature) { return true;}
28
29   /// Returns list of widget controls
30   /// \return a control list
31   virtual QList<QWidget*> getControls() const;
32
33   QWidget* getControl() const;
34
35   void setOperationsMgr(XGUI_OperationMgr* theMgr);
36
37 private slots:
38   void onPlaneSelected();
39
40 private:
41   QLabel* myLabel;
42   QString myText;
43   QString myTooltip;
44 };
45
46 #endif