]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QCommandBuffer.h
* src/frontends/qt4/ui/TextLayoutUi.ui:
[lyx.git] / src / frontends / qt4 / 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 #include <QWidget>
16
17 class QListWidgetItem;
18
19 namespace lyx {
20 namespace frontend {
21
22 class QCommandEdit;
23 class GuiView;
24 class ControlCommandBuffer;
25
26 class QCommandBuffer : public QWidget {
27         Q_OBJECT
28 public:
29         QCommandBuffer(GuiView * view, ControlCommandBuffer & control);
30
31         /// focus the edit widget
32         void focus_command();
33 public Q_SLOTS:
34         /// cancel command compose
35         void cancel();
36         /// dispatch a command
37         void dispatch();
38         /// tab-complete
39         void complete();
40         /// select-complete
41         void complete_selected(QListWidgetItem *);
42         /// up
43         void up();
44         /// down
45         void down();
46         /// leave and hide the command buffer
47         void hideParent();
48 private:
49         /// owning view
50         GuiView * view_;
51
52         /// controller
53         ControlCommandBuffer & controller_;
54
55         /// command widget
56         QCommandEdit * edit_;
57 };
58
59 } // namespace frontend
60 } // namespace lyx
61
62 #endif // QCOMMANDBUFFER_H