]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QCommandBuffer.h
* Painter.h:
[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                 QWidget * parent=NULL);
31
32         /// focus the edit widget
33         void focus_command();
34 public Q_SLOTS:
35         /// cancel command compose
36         void cancel();
37         /// dispatch a command
38         void dispatch();
39         /// tab-complete
40         void complete();
41         /// select-complete
42         void complete_selected(QListWidgetItem *);
43         /// up
44         void up();
45         /// down
46         void down();
47 private:
48         /// owning view
49         GuiView * view_;
50
51         /// controller
52         ControlCommandBuffer & controller_;
53
54         /// command widget
55         QCommandEdit * edit_;
56 };
57
58 } // namespace frontend
59 } // namespace lyx
60
61 #endif // QCOMMANDBUFFER_H