]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/TocWidget.h
Compil fix.
[lyx.git] / src / frontends / qt4 / TocWidget.h
1 // -*- C++ -*-
2 /**
3  * \file TocWidget.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 TOC_WIDGET_H
14 #define TOC_WIDGET_H
15
16 #include "GuiDialog.h"
17 #include "GuiToc.h"
18 #include "ui_TocUi.h"
19
20 class QString;
21
22 namespace lyx {
23 namespace frontend {
24
25 class TocModels;
26
27 class TocWidget : public QWidget, public Ui::TocUi
28 {
29         Q_OBJECT
30 public:
31         TocWidget(TocModels & models, QWidget * parent = 0);
32
33         /// Initialise GUI.
34         void init(QString const & str);
35
36 public Q_SLOTS:
37         /// Update the display of the dialog whilst it is still visible.
38         void updateView();
39
40 protected Q_SLOTS:
41         ///
42         void setTocModel(size_t type);
43         ///
44         void select(QModelIndex const & index);
45         ///
46         void goTo(QModelIndex const &);
47
48         void on_tocTV_activated(QModelIndex const &);
49         void on_tocTV_clicked(QModelIndex const &);
50         void on_updateTB_clicked();
51         void on_depthSL_valueChanged(int depth);
52         void on_typeCO_currentIndexChanged(int value);
53         void on_moveUpTB_clicked();
54         void on_moveDownTB_clicked();
55         void on_moveInTB_clicked();
56         void on_moveOutTB_clicked();
57
58 private:
59         ///
60         void enableControls(bool enable = true);
61         ///
62         int getIndexDepth(QModelIndex const & index, int depth = -1);
63         ///
64         void setTreeDepth(int depth);
65
66         /// depth of list shown
67         int depth_;
68         ///
69         TocModels & models_;
70 };
71
72 } // namespace frontend
73 } // namespace lyx
74
75 #endif // TOC_WIDGET_H