2006-03-05 17:24:44 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file QCommandEdit.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author John Levon
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef QCOMMANDEDIT_H
|
|
|
|
#define QCOMMANDEDIT_H
|
|
|
|
|
|
|
|
#include <QLineEdit>
|
|
|
|
#include <QKeyEvent>
|
|
|
|
#include <QEvent>
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
|
|
|
class QCommandEdit : public QLineEdit {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
QCommandEdit(QWidget * parent);
|
2006-06-30 14:37:33 +00:00
|
|
|
Q_SIGNALS:
|
2006-03-05 17:24:44 +00:00
|
|
|
/// cancel
|
|
|
|
void escapePressed();
|
|
|
|
/// up history
|
|
|
|
void upPressed();
|
|
|
|
/// down history
|
|
|
|
void downPressed();
|
|
|
|
/// complete
|
|
|
|
void tabPressed();
|
2007-04-29 08:58:09 +00:00
|
|
|
/// leave and hide command buffer
|
|
|
|
void hidePressed();
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
protected:
|
2006-10-22 14:37:32 +00:00
|
|
|
///
|
2006-03-05 17:24:44 +00:00
|
|
|
virtual bool event(QEvent * e);
|
2006-10-22 14:37:32 +00:00
|
|
|
///
|
2006-03-05 17:24:44 +00:00
|
|
|
virtual void keyPressEvent(QKeyEvent * e);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
|
|
#endif // QCOMMANDEDIT_H
|