4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Abdelrazak Younes
10 * Full author contact details are available in file CREDITS.
16 #include "GuiDialog.h"
26 class TocWidget : public QWidget, public Ui::TocUi
30 TocWidget(GuiToc & form, QWidget * parent = 0);
32 /// Update the display of the dialog whilst it is still visible.
35 /// Update Gui of the display.
36 void updateGui(int selected_type);
40 void setTocModel(size_t type);
42 void select(QModelIndex const & index);
44 void selectionChanged(const QModelIndex & current,
45 const QModelIndex & previous);
47 void on_updateTB_clicked();
48 void on_depthSL_valueChanged(int depth);
49 void on_typeCO_currentIndexChanged(int value);
50 void on_moveUpTB_clicked();
51 void on_moveDownTB_clicked();
52 void on_moveInTB_clicked();
53 void on_moveOutTB_clicked();
57 void enableControls(bool enable = true);
59 int getIndexDepth(QModelIndex const & index, int depth = -1);
61 void setTreeDepth(int depth);
64 /// Reconnects the selection model change signal when TOC changed.
65 void reconnectSelectionModel();
66 /// Disconnects the selection model.
67 //This is a workaround for a problem of signals blocking.
68 void disconnectSelectionModel();
70 /// depth of list shown
76 } // namespace frontend
79 #endif // TOC_WIDGET_H