Salome HOME
Removed not used function SimpleAISobject
[modules/shaper.git] / src / PartSet / PartSet_EditLine.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        PartSet_EditLine.h
4 // Created:     02 Jun 2014
5 // Author:      Natalia ERMOLAEVA
6
7 #ifndef PartSet_EditLine_H
8 #define PartSet_EditLine_H
9
10 #include "PartSet.h"
11
12 #include <QObject>
13 #include <QPoint>
14
15 class QLineEdit;
16 class QWidget;
17
18 /*!
19  \class PartSet_EditLine
20  * \brief The class to give an editor to modify a real value
21  */
22 class PARTSET_EXPORT PartSet_EditLine : public QObject
23 {
24 Q_OBJECT
25  public:
26   /// Constructor
27   PartSet_EditLine(QWidget* theParent);
28   /// Destructor
29   virtual ~PartSet_EditLine()
30   {
31   }
32   ;
33
34   /// Show the editor in the given global position
35   /// \param thePoint a position
36   /// \param theValue a value for the editor
37   void start(const QPoint& thePoint, double theValue);
38
39   /// Checks whether the editor is started
40   /// \returns true if the editor is activated
41   bool isStarted() const;
42
43   /// Stop the editor, in other words hide it
44   void stop();
45
46 signals:
47   /// Signals about the editing stop
48   /// \param theValue the editor value
49   void stopped(double theValue);
50
51  protected:
52   /// Returns the editor value
53   /// \return the real value
54   double getValue() const;
55
56  protected slots:
57   /// Slot to check the editing stop
58   void onStopEditing();
59
60  protected:
61   QLineEdit* myEditor;  /// the value editor
62 };
63
64 #endif