]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiImplementation.h
The BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas:
[lyx.git] / src / frontends / qt4 / GuiImplementation.h
1 // -*- C++ -*-
2 /**
3  * \file GuiImplementation.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  * \author Abdelrazak Younes
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef GUI_H
14 #define GUI_H
15
16 #include "frontends/Gui.h"
17
18 #include <QObject>
19
20 #include <map>
21
22 namespace lyx {
23 namespace frontend {
24
25 class GuiView;
26 class LyXView;
27
28 /**
29  * The GuiImplementation class is the interface to all Qt4 components.
30  */
31 class GuiImplementation: public QObject, public Gui
32 {
33         Q_OBJECT
34
35 public:
36         GuiImplementation();
37         virtual ~GuiImplementation() {}
38
39
40         virtual LyXView& createRegisteredView();
41         virtual bool closeAllViews();
42         virtual bool unregisterView(int id);
43
44         virtual LyXView& view(int id) const;
45
46 private:
47
48         /// Multiple views container.
49         /**
50         * Warning: This must not be a smart pointer as the destruction of the
51         * object is handled by Qt when the view is closed
52         * \sa Qt::WA_DeleteOnClose attribute.
53         */
54         std::map<int, GuiView *> views_;
55 };
56
57 } // namespace frontend
58 } // namespace lyx
59
60 #endif // GUI_H