]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiToc.h
GuiWrap.cpp: disconnect the widgets that are by default disabled from readonly
[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 Abdelrazak Younes
10  *
11  * Full author contact details are available in file CREDITS.
12  */
13
14 #ifndef GUITOC_H
15 #define GUITOC_H
16
17 #include "ControlToc.h"
18
19 #include <QObject>
20 #include <QStandardItemModel>
21 #include <QStringListModel>
22
23 namespace lyx {
24 namespace frontend {
25
26 class TocModel;
27
28 class GuiToc : public QObject, public ControlToc
29 {
30         Q_OBJECT
31
32 public:
33         ///
34         GuiToc(Dialog &);
35
36         /// \c ControlToc inherited method.
37         virtual bool initialiseParams(std::string const & data);
38         ///
39         void updateView();
40         ///
41         bool canOutline(int type) const;
42
43         QStandardItemModel * tocModel(int type);
44         ///
45         QModelIndex const getCurrentIndex(int type) const;
46         ///
47         void goTo(int type, QModelIndex const & index);
48         ///
49         int getType();
50         ///
51         int getTocDepth(int type);
52
53 Q_SIGNALS:
54         /// Signal that the internal toc_models_ has been reset.
55         void modelReset();
56
57 private:
58         ///
59         std::vector<TocModel *> toc_models_;
60 };
61
62 } // namespace frontend
63 } // namespace lyx
64
65 #endif // GUITOC_H