]> SALOME platform Git repositories - modules/shaper.git/blob - src/PartSet/PartSet_EditLine.h
Salome HOME
refs #80 - Sketch base GUI: create/draw point, circle and arc
[modules/shaper.git] / src / PartSet / PartSet_EditLine.h
1 // File:        PartSet_EditLine.h
2 // Created:     02 Jun 2014
3 // Author:      Natalia ERMOLAEVA
4
5 #ifndef PartSet_EditLine_H
6 #define PartSet_EditLine_H
7
8 #include "PartSet.h"
9
10 #include <QObject>
11 #include <QPoint>
12
13 class QLineEdit;
14 class QWidget;
15
16 /*!
17  \class PartSet_EditLine
18  * \brief The class to give an editor to modify a real value
19 */
20 class PARTSET_EXPORT PartSet_EditLine : public QObject
21 {
22   Q_OBJECT
23 public:
24   /// Constructor
25   PartSet_EditLine(QWidget* theParent);
26   /// Destructor
27   virtual ~PartSet_EditLine() {};
28
29   /// Show the editor in the given global position
30   /// \param thePoint a position
31   /// \param theValue a value for the editor
32   void start(const QPoint& thePoint, double theValue);
33
34   /// Returns the editor value
35   /// \return the real value
36   double getValue() const;
37
38 signals:
39   /// Signals about the editing stop
40   /// \param theValue the editor value
41   void stopped(double theValue);
42
43 protected slots:
44   /// Slot to check the editing stop
45   void onStopEditing();
46
47 protected:
48   QLineEdit* myEditor; /// the value editor
49 };
50
51 #endif