]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QToc.h
enable Font cache only for MacOSX and inline width() for other platform.
[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         ///
47         QModelIndex const getCurrentIndex();
48         ///
49         void goTo(QModelIndex const & index);
50
51 private:
52
53         std::vector<TocModel *> toc_models_;
54
55         QStringListModel type_model_;
56
57         int type_;
58         int outline_type_;
59 };
60
61 } // namespace frontend
62 } // namespace lyx
63
64 #endif // QTOC_H