]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QToc.h
* qt_helpers.h:
[lyx.git] / src / frontends / qt4 / QToc.h
1 // -*- C++ -*-
2 /**
3  * \file QToc.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 QTOC_H
15 #define QTOC_H
16
17 #include "ControlToc.h"
18
19 #include <QStandardItemModel>
20 #include <QStringListModel>
21
22 namespace lyx {
23 namespace frontend {
24
25 class ControlToc;
26 class TocModel;
27
28 class QToc : public ControlToc
29 {
30 public:
31
32         QToc(Dialog &);
33
34         void update();
35         ///
36         void updateToc();
37         ///
38         void updateType();
39
40         bool canOutline();
41         
42         QStandardItemModel * tocModel();
43         QStandardItemModel * setTocModel(int type);
44
45         QStringListModel * typeModel()
46         { return &type_model_; }
47
48         ///
49         QModelIndex const getCurrentIndex();
50         ///
51         void goTo(QModelIndex const & index);
52         ///
53         int getType();
54         ///
55         int getTocDepth();
56
57 private:
58
59         std::vector<TocModel *> toc_models_;
60
61         QStringListModel type_model_;
62
63         int type_;
64         int outline_type_;
65 };
66
67 } // namespace frontend
68 } // namespace lyx
69
70 #endif // QTOC_H