]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QToc.h
* ControlToc.[Ch]
[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(int type);
37
38         bool canOutline();
39         
40         QStandardItemModel * tocModel();
41         QStandardItemModel * setTocModel(int type);
42
43         QStringListModel * typeModel()
44         { return &type_model_; }
45
46         void goTo(QModelIndex const & index);
47
48         void move(toc::OutlineOp const operation, QModelIndex & index);
49
50 private:
51
52         std::vector<TocModel *> toc_models_;
53
54         QStringListModel type_model_;
55
56         int type_;
57         int outline_type_;
58 };
59
60 } // namespace frontend
61 } // namespace lyx
62
63 #endif // QTOC_H