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, const Config_WidgetAPI* theData);
21
22   virtual ~PartSet_WidgetSketchLabel() {};
23
24   /// Saves the internal parameters to the given feature
25   /// \param theFeature a model feature to be changed
26   virtual bool storeValue(FeaturePtr theFeature) const { return true;}
27
28   virtual bool restoreValue(FeaturePtr theFeature) { return true;}
29
30   /// Returns list of widget controls
31   /// \return a control list
32   virtual QList<QWidget*> getControls() const;
33
34   QWidget* getControl() const;
35
36   void setOperationsMgr(XGUI_OperationMgr* theMgr);
37
38 private slots:
39   void onPlaneSelected();
40
41 private:
42   void updateLabel(PartSet_OperationSketch* theSketchOpe);
43
44   QLabel* myLabel;
45   QString myText;
46   QString myTooltip;
47 };
48
49 #endif