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
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
2002-07-19 23:05:24 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef QCOMMANDBUFFER_H
|
|
|
|
#define QCOMMANDBUFFER_H
|
|
|
|
|
2002-09-24 13:57:09 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
2002-07-19 23:05:24 +00:00
|
|
|
#include <qtoolbar.h>
|
2002-09-24 13:57:09 +00:00
|
|
|
|
2002-07-19 23:05:24 +00:00
|
|
|
class QtView;
|
|
|
|
class QCommandEdit;
|
2002-08-29 04:39:43 +00:00
|
|
|
class QListBoxItem;
|
2002-07-19 23:05:24 +00:00
|
|
|
class ControlCommandBuffer;
|
2002-09-24 13:57:09 +00:00
|
|
|
|
2002-07-19 23:05:24 +00:00
|
|
|
class QCommandBuffer : public QToolBar {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
QCommandBuffer(QtView * view, ControlCommandBuffer & control);
|
|
|
|
|
|
|
|
/// 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_;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // QCOMMANDBUFFER_H
|