Salome HOME
Merge branch 'master' of newgeom:newgeom.git
[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 class PartSet_OperationSketch;
15
16 class PARTSET_EXPORT PartSet_WidgetSketchLabel : public ModuleBase_ModelWidget
17 {
18   Q_OBJECT
19 public:
20   PartSet_WidgetSketchLabel(QWidget* theParent, 
21     const Config_WidgetAPI* theData, 
22     const std::string& theParentId);
23
24   virtual ~PartSet_WidgetSketchLabel() {};
25
26   /// Saves the internal parameters to the given feature
27   /// \param theFeature a model feature to be changed
28   virtual bool storeValue(ObjectPtr theFeature) const { return true;}
29
30   virtual bool restoreValue(ObjectPtr theFeature) { return true;}
31
32   /// Returns list of widget controls
33   /// \return a control list
34   virtual QList<QWidget*> getControls() const;
35
36   QWidget* getControl() const;
37
38   void setOperationsMgr(XGUI_OperationMgr* theMgr);
39
40 private slots:
41   void onPlaneSelected();
42
43 private:
44   void updateLabel(PartSet_OperationSketch* theSketchOpe);
45
46   QLabel* myLabel;
47   QString myText;
48   QString myTooltip;
49 };
50
51 #endif