]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiToc.h
move our stuff off the Q* namespace
[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 QTOC_H
15 #define QTOC_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 ControlToc;
27 class TocModel;
28
29 class GuiToc : public QObject, public ControlToc
30 {
31         Q_OBJECT
32 public:
33
34         GuiToc(Dialog &, QObject * parent = 0);
35         virtual ~GuiToc() {}
36
37         /// \c ControlToc inherited method.
38         virtual bool initialiseParams(std::string const & data);
39         ///
40         void update();
41         ///
42         bool canOutline(int type) const;
43
44         QStandardItemModel * tocModel(int type);
45         ///
46         QModelIndex const getCurrentIndex(int type) const;
47         ///
48         void goTo(int type, QModelIndex const & index);
49         ///
50         int getType();
51         ///
52         int getTocDepth(int type);
53
54 Q_SIGNALS:
55         /// Signal that the internal toc_models_ has been reset.
56         void modelReset();
57
58 private:
59         ///
60         std::vector<TocModel *> toc_models_;
61 };
62
63 } // namespace frontend
64 } // namespace lyx
65
66 #endif // QTOC_H