Salome HOME
Issue #273: Add copyright string
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetLineEdit.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 /*
4  * ModuleBase_WidgetLineEdit.h
5  *
6  *  Created on: Oct 8, 2014
7  *      Author: sbh
8  */
9
10 #ifndef MODULEBASE_WIDGETLINEEDIT_H_
11 #define MODULEBASE_WIDGETLINEEDIT_H_
12
13 #include <ModuleBase.h>
14 #include <ModuleBase_ModelWidget.h>
15
16 #include <QList>
17 #include <QString>
18 #include <QStringList>
19
20 class QWidget;
21 class QLineEdit;
22
23 class MODULEBASE_EXPORT ModuleBase_WidgetLineEdit : public ModuleBase_ModelWidget
24 {
25   Q_OBJECT
26  public:
27   ModuleBase_WidgetLineEdit(QWidget* theParent,
28                                 const Config_WidgetAPI* theData,
29                                 const std::string& theParentId);
30   virtual ~ModuleBase_WidgetLineEdit();
31
32   /// Saves the internal parameters to the given feature
33   /// \param theObject a model feature to be changed
34   virtual bool storeValue() const;
35
36   virtual bool restoreValue();
37
38   /// Returns the internal parent wiget control, that can be shown anywhere
39   /// \returns the widget
40   QWidget* getControl() const;
41
42   /// Returns list of widget controls
43   /// \return a control list
44   virtual QList<QWidget*> getControls() const;
45
46  public slots:
47   void onTextChanged();
48
49  private:
50   QLineEdit* myLineEdit;
51   QWidget* myMainWidget;
52 };
53
54 #endif /* MODULEBASE_WIDGETFILESELECTOR_H_ */