]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QToc.h
TOC dialog is back
[lyx.git] / src / frontends / qt2 / QToc.h
1 // -*- C++ -*-
2 /**
3  * \file QToc.h
4  * Copyright 2001 the LyX Team
5  * Read the file COPYING
6  *
7  * \author John Levon
8  * \author Kalle Dalheimer <kalle@klaralvdalens-datakonsult.se> 
9  */
10
11 #ifndef QTOC_H
12 #define QTOC_H
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "Qt2Base.h"
19
20 #include "ControlToc.h"
21  
22 class ControlToc;
23 class QTocDialog;
24
25 class QToc : 
26         public Qt2CB<ControlToc, Qt2DB<QTocDialog> > 
27 {
28 public:
29         QToc(ControlToc &);
30
31         friend class QTocDialog;
32  
33 private:
34         /// update the listview
35         void updateToc(int newdepth);
36
37         /// update the float types
38         void updateType();
39
40         /// select an entry
41         void select(string const & text);
42  
43         /// set the depth
44         void set_depth(int depth);
45  
46         virtual void apply() {};
47  
48         /// update dialog 
49         virtual void update_contents();
50
51         /// build dialog
52         virtual void build_dialog();
53
54         /// the toc list
55         Buffer::SingleList toclist;
56
57         /// depth of list shown
58         int depth_;
59 };
60
61 #endif // QTOC_H