]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiToc.h
Cleanup Toc dialog and GuiView interaction. The toc models are now part of GuiView...
[lyx.git] / src / frontends / qt4 / GuiToc.h
1 // -*- C++ -*-
2 /**
3  * \file GuiToc.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 Kalle Dalheimer
9  * \author Angus Leeming
10  * \author Abdelrazak Younes
11  *
12  * Full author contact details are available in file CREDITS.
13  */
14
15 #ifndef GUITOC_H
16 #define GUITOC_H
17
18 #include "DockView.h"
19
20 #include "insets/InsetCommandParams.h"
21
22 #include "TocBackend.h"
23
24 #include <QStandardItemModel>
25
26 #include <vector>
27
28 namespace lyx {
29 namespace frontend {
30
31 class TocModel;
32 class TocWidget;
33
34 class GuiToc : public DockView
35 {
36         Q_OBJECT
37
38 public:
39         ///
40         GuiToc(
41                 GuiView & parent, ///< the main window where to dock.
42                 Qt::DockWidgetArea area = Qt::LeftDockWidgetArea, ///< Position of the dock (and also drawer)
43                 Qt::WindowFlags flags = 0);
44
45         ~GuiToc();
46
47         ///
48         bool initialiseParams(std::string const & data);
49         void updateView();
50         void enableView(bool enable);
51
52 public:
53         /// clean-up on hide.
54         void clearParams() {}
55         ///
56         void dispatchParams();
57         ///
58         bool isBufferDependent() const { return true; }
59
60 private:
61         ///
62         TocWidget * widget_;
63 };
64
65 } // namespace frontend
66 } // namespace lyx
67
68 #endif // GUITOC_H