]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QToc.h
The big renaming. Yowser.
[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 #include "DialogBase.h"
15 #include "LString.h"
16 #include "boost/utility.hpp"
17 #include "insets/insetcommand.h"
18 #include "buffer.h"
19
20 class Dialogs;
21 class QTocDialog;
22
23 class QToc : public DialogBase {
24 public:
25         QToc(LyXView *, Dialogs *);
26         ~QToc();
27
28         // Build the dialog
29         virtual void build();
30         /// Update the dialog before showing it.
31         virtual void update();
32         /// close the connections
33         virtual void close();
34
35 private:
36         /// Create the dialog if necessary, update it and display it.
37         void show();
38         /// Hide the dialog.
39         void hide();
40
41         /// create a Toc inset
42         void createTOC(string const &);
43         /// view a Toc inset
44         void showTOC(InsetCommand * const);
45         
46         /// update the Toc
47         void updateToc(int);
48
49         /// Real GUI implementation.
50         QTocDialog * dialog_;
51
52         /// the LyXView we belong to
53         LyXView * lv_;
54
55         /** Which Dialogs do we belong to?
56             Used so we can get at the signals we have to connect to.
57         */
58         Dialogs * d_;
59         /// pointer to the inset if any
60         InsetCommand * inset_;
61         /// insets params
62         InsetCommandParams params;
63         
64         /// Hide connection.
65         SigC::Connection h_;
66         /// Update connection.
67         SigC::Connection u_;
68         /// Inset hide connection.
69         SigC::Connection ih_;
70
71         /// the toc list
72         //std::vector <Buffer::TocItem> toclist;
73
74         /// depth of list shown
75         int depth;
76 };
77
78 #endif // QTOC_H