]> git.lyx.org Git - lyx.git/blob - src/frontends/qt3/QToc.h
Extracted from r14281
[lyx.git] / src / frontends / qt3 / 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  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef QTOC_H
14 #define QTOC_H
15
16 #include "QDialogView.h"
17 #include "toc.h"
18
19 namespace lyx {
20 namespace frontend {
21
22 class ControlToc;
23 class QTocDialog;
24
25 class QToc :
26         public QController<ControlToc, QView<QTocDialog> >
27 {
28 public:
29         friend class QTocDialog;
30
31         QToc(Dialog &);
32 private:
33         /// update the listview
34         void updateToc(int newdepth);
35
36         ///
37         bool canOutline();
38
39         /// update the float types
40         void updateType();
41
42         /// select an entry
43         void select(std::string const & text);
44
45         /// set the depth
46         void set_depth(int depth);
47
48         /// Move header up/down/in/out in list (outlining)
49         void moveup();
50         ///
51         void movedn();
52         ///
53         void movein();
54         ///
55         void moveout();
56
57         virtual void apply() {}
58
59         /// update dialog
60         virtual void update_contents();
61
62         /// build dialog
63         virtual void build_dialog();
64
65         /// the toc list
66         lyx::toc::Toc toclist;
67
68         /// depth of list shown
69         int depth_;
70
71         /// Store selected item's string
72         std::string text_;
73
74         /// Store ToC list type
75         std::string type_;
76 };
77
78 } // namespace frontend
79 } // namespace lyx
80
81 #endif // QTOC_H