]> Shamusworld >> Repos - architektonas/blob - src/widgets/commandedit.h
Sanity check stage II: rename classes...
[architektonas] / src / widgets / commandedit.h
1 #ifndef __COMMANDEDIT_H__
2 #define __COMMANDEDIT_H__
3
4 #include <QtGui>
5
6 /**
7  * A command line edit with some typical console features
8  * (uparrow for the history, tab, ..).
9  */
10 class CommandEdit: public QLineEdit
11 {
12         Q_OBJECT
13
14         public:
15                 CommandEdit(QWidget * parent = 0, const char * name = 0);
16                 virtual ~CommandEdit();
17
18         protected:
19                 virtual bool event(QEvent * e);
20                 virtual void keyPressEvent(QKeyEvent * e);
21                 virtual void focusInEvent(QFocusEvent * e);
22                 virtual void focusOutEvent(QFocusEvent * e);
23
24         signals:
25                 void tabPressed();
26                 void escape();
27                 void focusIn();
28                 void focusOut();
29
30         private:
31                 QStringList historyList;
32                 QStringList::Iterator it;
33                 bool acceptCoordinates;
34 };
35
36 #endif  // __COMMANDEDIT_H__