]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QTocDialog.h
Log:
[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 protected slots:
43         ///
44         void on_tocTW_currentItemChanged(QTreeWidgetItem * current,
45                 QTreeWidgetItem * previous);
46
47         void on_closePB_clicked();
48         void on_updatePB_clicked();
49         void on_depthSL_valueChanged(int depth);
50         void on_typeCO_activated(int value);
51         void on_moveUpPB_clicked();
52         void on_moveDownPB_clicked();
53         void on_moveInPB_clicked();
54         void on_moveOutPB_clicked();
55
56 protected:
57         void enableButtons(bool enable = true);
58         void closeEvent(QCloseEvent * e);
59
60 private:
61         
62         void populateItem(QTreeWidgetItem * parentItem, toc::Toc::const_iterator& iter);
63
64         QToc * form_;
65
66         /// depth of list shown
67         int depth_;
68 };
69
70 } // namespace frontend
71 } // namespace lyx
72
73 #endif // QTOCDIALOG_H