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 "ui/QTocUi.h"
17 #include "controllers/ControlToc.h"
28 class QTocDialog : public QDialog, public Ui::QTocUi, public Dialog::View {
31 QTocDialog(Dialog &, QToc * form);
37 /// Hide the dialog from sight
40 /// Redraw the dialog (e.g. if the colors have been remapped).
43 /// Create the dialog if necessary, update it and display it.
46 /// Update the display of the dialog whilst it is still visible.
49 /// Update Gui of the display.
52 /// \return true if the dialog is visible.
53 bool isVisible() const;
57 void select(QModelIndex const & index);
59 void selectionChanged(const QModelIndex & current,
60 const QModelIndex & previous);
62 void on_closePB_clicked();
63 void on_updatePB_clicked();
64 void on_depthSL_valueChanged(int depth);
65 void on_typeCO_activated(int value);
66 void on_moveUpPB_clicked();
67 void on_moveDownPB_clicked();
68 void on_moveInPB_clicked();
69 void on_moveOutPB_clicked();
73 void enableButtons(bool enable = true);
74 /// Reconnects the selection model change signal when TOC changed.
75 void reconnectSelectionModel();
77 int getIndexDepth(QModelIndex const & index, int depth = -1);
83 /// depth of list shown
87 } // namespace frontend
90 #endif // QTOCDIALOG_H