Salome HOME
NRI : Update in order to search MODULES documentation and open active MODULE document...
[modules/kernel.git] / src / SALOMEGUI / QAD_PyEditor.h
1 //  File      : QAD_PyEditor.h
2 //  Created   : Thu Jun 14 16:05:46 2001
3 //  Author    : Nicolas REJNERI
4 //  Project   : SALOME
5 //  Module    : SALOMEGUI
6 //  Copyright : Open CASCADE
7 //  $Header$
8
9 #ifndef QAD_PyEditor_H
10 #define QAD_PyEditor_H
11
12 #include <qmultilineedit.h>
13
14 class QAD_PyInterp;
15
16 class QAD_PyEditor : public QMultiLineEdit
17 {
18   Q_OBJECT
19
20 public:
21   QAD_PyEditor(QAD_PyInterp* interp, QWidget *parent=0, const char *name=0);
22   ~QAD_PyEditor();
23   
24   void setText(QString s); 
25   bool isCommand(const QString& str) const;
26   
27 protected:
28   void keyPressEvent (QKeyEvent * e);
29   void mousePressEvent (QMouseEvent * e);
30   void mouseReleaseEvent (QMouseEvent * e);
31   void dropEvent (QDropEvent *e);
32   
33 public slots:
34   void handleReturn();
35   
36 private:
37   QAD_PyInterp * _interp;
38   QString        _buf;
39   QString        _currentCommand;
40   QString        _currentPrompt;
41   bool           _isInHistory;
42 };
43
44 #endif
45