2006-03-05 17:24:44 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file QCommandBuffer.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 QCOMMANDBUFFER_H
|
|
|
|
#define QCOMMANDBUFFER_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
|
|
class QListWidgetItem;
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
|
|
|
class QCommandEdit;
|
2006-06-20 09:33:01 +00:00
|
|
|
class GuiView;
|
2006-03-05 17:24:44 +00:00
|
|
|
class ControlCommandBuffer;
|
|
|
|
|
|
|
|
class QCommandBuffer : public QWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2006-10-22 14:37:32 +00:00
|
|
|
QCommandBuffer(GuiView * view, ControlCommandBuffer & control,
|
|
|
|
QWidget * parent=NULL);
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
/// focus the edit widget
|
|
|
|
void focus_command();
|
2006-06-30 14:37:33 +00:00
|
|
|
public Q_SLOTS:
|
2006-03-05 17:24:44 +00:00
|
|
|
/// cancel command compose
|
|
|
|
void cancel();
|
|
|
|
/// dispatch a command
|
|
|
|
void dispatch();
|
|
|
|
/// tab-complete
|
|
|
|
void complete();
|
|
|
|
/// select-complete
|
|
|
|
void complete_selected(QListWidgetItem *);
|
|
|
|
/// up
|
|
|
|
void up();
|
|
|
|
/// down
|
|
|
|
void down();
|
|
|
|
private:
|
|
|
|
/// owning view
|
2006-06-20 09:33:01 +00:00
|
|
|
GuiView * view_;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
/// controller
|
|
|
|
ControlCommandBuffer & controller_;
|
|
|
|
|
|
|
|
/// command widget
|
|
|
|
QCommandEdit * edit_;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
|
|
#endif // QCOMMANDBUFFER_H
|