]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/TocWidget.h
Typos.
[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 "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 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_sortCB_stateChanged(int state);
52         void on_persistentCB_stateChanged(int state);
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         QString current_type_;
69
70         /// depth of list shown
71         int depth_;
72         /// persistence of uncollapsed nodes in toc view
73         bool persistent_;
74         ///
75         GuiView & gui_view_;
76 };
77
78 } // namespace frontend
79 } // namespace lyx
80
81 #endif // TOC_WIDGET_H