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"
27 class TocWidget : public QWidget, public Ui::TocUi
31 TocWidget(TocModels & models, QWidget * parent = 0);
34 void init(QString const & str);
37 /// Update the display of the dialog whilst it is still visible.
42 void setTocModel(size_t type);
44 void select(QModelIndex const & index);
46 void selectionChanged(const QModelIndex & current,
47 const QModelIndex & previous);
49 void on_updateTB_clicked();
50 void on_depthSL_valueChanged(int depth);
51 void on_typeCO_currentIndexChanged(int value);
52 void on_moveUpTB_clicked();
53 void on_moveDownTB_clicked();
54 void on_moveInTB_clicked();
55 void on_moveOutTB_clicked();
56 void setTreeDepth() { setTreeDepth(depth_); }
60 void enableControls(bool enable = true);
62 int getIndexDepth(QModelIndex const & index, int depth = -1);
64 void setTreeDepth(int depth);
65 /// Reconnects the selection model change signal when TOC changed.
66 void reconnectSelectionModel();
67 /// Disconnects the selection model.
68 //This is a workaround for a problem of signals blocking.
69 void disconnectSelectionModel();
71 /// depth of list shown
77 } // namespace frontend
80 #endif // TOC_WIDGET_H