lyx_mirror/src/frontends/qt4/GuiCommandEdit.h
Jean-Marc Lasgouttes fdcff02a31 Auto feature for minibuffer toolbar
Now the minibuffer toolbar is "auto" by default. It is opened by
command-execute (M-x) and closed when the command is executed without error.

* make lyx::dispatch return a DispatchResult struct

* there is a new MINIBUFFER type of toolbar, that can be used for this use.

* remove special handling of M-x in minnibuffer; Escape can be used instead. Fix focus in this case.

* when minibuffer toolbar is "auto", make the toolbar close itself after
  - a command has been executed without error
  - an empty command has been executed
  - the Escape key has been used
2015-06-29 09:21:15 +02:00

50 lines
821 B
C++

// -*- C++ -*-
/**
* \file GuiCommandEdit.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 GUICOMMANDEDIT_H
#define GUICOMMANDEDIT_H
#include <QLineEdit>
#include <QKeyEvent>
#include <QEvent>
namespace lyx {
namespace frontend {
class GuiCommandEdit : public QLineEdit
{
Q_OBJECT
public:
GuiCommandEdit(QWidget * parent);
Q_SIGNALS:
/// cancel
void escapePressed();
/// up history
void upPressed();
/// down history
void downPressed();
/// complete
void tabPressed();
protected:
///
virtual bool event(QEvent * e);
///
virtual void keyPressEvent(QKeyEvent * e);
};
} // namespace frontend
} // namespace lyx
#endif // GUICOMMANDEDIT_H