1 // -*- C++ -*- 2 /** 3 * \file GuiCommandEdit.h 4 * This file is part of LyX, the document processor. 5 * Licence details can be found in the file COPYING. 6 * 7 * \author John Levon 8 * 9 * Full author contact details are available in file CREDITS. 10 */ 11 12 #ifndef GUICOMMANDEDIT_H 13 #define GUICOMMANDEDIT_H 14 15 #include <QLineEdit> 16 #include <QKeyEvent> 17 #include <QEvent> 18 19 namespace lyx { 20 namespace frontend { 21 22 class GuiCommandEdit : public QLineEdit 23 { 24 Q_OBJECT 25 26 public: 27 GuiCommandEdit(QWidget * parent); 28 29 Q_SIGNALS: 30 /// cancel 31 void escapePressed(); 32 /// up history 33 void upPressed(); 34 /// down history 35 void downPressed(); 36 /// complete 37 void tabPressed(); 38 39 protected: 40 /// 41 virtual bool event(QEvent * e); 42 /// 43 virtual void keyPressEvent(QKeyEvent * e); 44 }; 45 46 } // namespace frontend 47 } // namespace lyx 48 49 #endif // GUICOMMANDEDIT_H 50