]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QCommandBuffer.h
Lots and lots of little trivial bits.
[lyx.git] / src / frontends / qt2 / QCommandBuffer.h
1 // -*- C++ -*-
2 /**
3  * \file QCommandBuffer.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef QCOMMANDBUFFER_H
13 #define QCOMMANDBUFFER_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include <qtoolbar.h>
20
21 class QtView;
22 class QCommandEdit;
23 class QListBoxItem;
24 class ControlCommandBuffer;
25
26 class QCommandBuffer : public QToolBar {
27         Q_OBJECT
28 public:
29
30         QCommandBuffer(QtView * view, ControlCommandBuffer & control);
31
32         /// focus the edit widget
33         void focus_command();
34
35 public slots:
36         /// cancel command compose
37         void cancel();
38         /// dispatch a command
39         void dispatch();
40         /// tab-complete
41         void complete();
42         /// select-complete
43         void complete_selected(const QString & str);
44         /// up
45         void up();
46         /// down
47         void down();
48
49 private:
50         /// owning view
51         QtView * view_;
52
53         /// controller
54         ControlCommandBuffer & controller_;
55
56         /// command widget
57         QCommandEdit * edit_;
58 };
59
60 #endif // QCOMMANDBUFFER_H