2002-09-24 13:57:09 +00:00
|
|
|
// -*- C++ -*-
|
2002-07-19 23:05:24 +00:00
|
|
|
/**
|
|
|
|
* \file QCommandBuffer.h
|
2002-09-24 13:57:09 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-07-19 23:05:24 +00:00
|
|
|
*
|
2002-09-24 13:57:09 +00:00
|
|
|
* \author John Levon
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2002-07-19 23:05:24 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef QCOMMANDBUFFER_H
|
|
|
|
#define QCOMMANDBUFFER_H
|
|
|
|
|
2003-04-15 01:06:13 +00:00
|
|
|
#include <qwidget.h>
|
2002-09-24 13:57:09 +00:00
|
|
|
|
2002-08-29 04:39:43 +00:00
|
|
|
class QListBoxItem;
|
2004-05-19 15:11:37 +00:00
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
|
|
|
class QCommandEdit;
|
|
|
|
class QtView;
|
2002-07-19 23:05:24 +00:00
|
|
|
class ControlCommandBuffer;
|
2002-09-24 13:57:09 +00:00
|
|
|
|
2003-04-15 01:06:13 +00:00
|
|
|
class QCommandBuffer : public QWidget {
|
2002-07-19 23:05:24 +00:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2003-04-15 01:06:13 +00:00
|
|
|
QCommandBuffer(QtView * view, QWidget * parent, ControlCommandBuffer & control);
|
2002-07-19 23:05:24 +00:00
|
|
|
|
|
|
|
/// focus the edit widget
|
|
|
|
void focus_command();
|
|
|
|
public slots:
|
|
|
|
/// cancel command compose
|
|
|
|
void cancel();
|
|
|
|
/// dispatch a command
|
|
|
|
void dispatch();
|
|
|
|
/// tab-complete
|
|
|
|
void complete();
|
|
|
|
/// select-complete
|
2002-10-20 01:48:28 +00:00
|
|
|
void complete_selected(QString const & str);
|
2002-07-19 23:05:24 +00:00
|
|
|
/// up
|
|
|
|
void up();
|
|
|
|
/// down
|
|
|
|
void down();
|
|
|
|
private:
|
|
|
|
/// owning view
|
|
|
|
QtView * view_;
|
|
|
|
|
|
|
|
/// controller
|
|
|
|
ControlCommandBuffer & controller_;
|
|
|
|
|
|
|
|
/// command widget
|
|
|
|
QCommandEdit * edit_;
|
|
|
|
};
|
|
|
|
|
2004-05-19 15:11:37 +00:00
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2002-07-19 23:05:24 +00:00
|
|
|
#endif // QCOMMANDBUFFER_H
|