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