]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QTocDialog.h
This new citation dialog follows a new design similar to lyx-1.3:
[lyx.git] / src / frontends / qt4 / QTocDialog.h
1 // -*- C++ -*-
2 /**
3  * \file QTocDialog.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 Abdelrazak Younes
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef QTOCDIALOG_H
14 #define QTOCDIALOG_H
15
16 #include "ui/QTocUi.h"
17 #include "controllers/ControlToc.h"
18
19 #include <QDialog>
20 #include <QCloseEvent>
21
22 class QTreeWidget;
23 class QTreeWidgetItem;
24
25 namespace lyx {
26 namespace frontend {
27
28 class QToc;
29
30 class QTocDialog : public QDialog, public Ui::QTocUi {
31         Q_OBJECT
32 public:
33         QTocDialog(QToc * form);
34         ~QTocDialog();
35
36         /// update the listview
37         void updateToc(bool newdepth=false);
38
39         /// update the float types
40         void updateType();
41
42 public slots:
43         void activate_adaptor(int);
44         void depth_adaptor(int);
45         void select_adaptor(QTreeWidgetItem *);
46         void update_adaptor();
47 protected:
48         void closeEvent(QCloseEvent * e);
49 private:
50         
51         void populateItem(QTreeWidgetItem * parentItem, toc::Toc::const_iterator& iter);
52
53         QToc * form_;
54
55         /// depth of list shown
56         int depth_;
57 };
58
59 } // namespace frontend
60 } // namespace lyx
61
62 #endif // QTOCDIALOG_H