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