QCAD Application Framework
CAD Application Development and Automation.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RCommandLine.h
Go to the documentation of this file.
1 #ifndef RCOMMANDLINE_H_
2 #define RCOMMANDLINE_H_
3 
4 #include <QEvent>
5 #include <QLineEdit>
6 #include <QMetaType>
7 #include <QStringList>
8 
12 class RCommandLine: public QLineEdit {
13 
14 Q_OBJECT
15 
16 signals:
17  void clearHistory();
18  void commandConfirmed(const QString& command);
19  void completeCommand(const QString& command);
20 
21 public:
22  RCommandLine(QWidget* parent = 0);
23  QString getLastCommand();
24 
25 protected:
26  virtual void keyPressEvent(QKeyEvent * event);
27  virtual bool event(QEvent* event);
28 
29 private:
30  QStringList history;
31  QStringList::iterator it;
32 };
33 
35 
36 #endif