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