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.
31 class TocWidget : public QWidget, public Ui::TocUi
36 TocWidget(GuiView & gui_view, QWidget * parent = 0);
39 void init(QString const & str);
41 void doDispatch(Cursor & cur, FuncRequest const & fr);
43 bool getStatus(Cursor & cur, FuncRequest const & fr, FuncStatus & status)
47 /// Schedule new update of the display unless already scheduled.
49 /// Update the display of the dialog whilst it is still visible.
50 void updateViewForce();
54 void select(QModelIndex const & index);
56 void goTo(QModelIndex const &);
58 void on_tocTV_activated(QModelIndex const &);
59 void on_tocTV_pressed(QModelIndex const &);
60 void on_updateTB_clicked();
61 void on_sortCB_stateChanged(int state);
62 void on_persistentCB_stateChanged(int state);
63 void on_depthSL_valueChanged(int depth);
64 void on_typeCO_currentIndexChanged(int value);
65 void on_moveUpTB_clicked();
66 void on_moveDownTB_clicked();
67 void on_moveInTB_clicked();
68 void on_moveOutTB_clicked();
69 void filterContents();
71 void showContextMenu(const QPoint & pos);
75 void enableControls(bool enable = true);
78 { return current_type_ == "tableofcontents"; }
79 /// It is not possible to have synchronous navigation in a correct
80 /// and efficient way with the label and change type because Toc::item()
81 /// does a linear search. Even when fixed, it might even not be desirable
82 /// to do so if we want to support drag&drop of labels and references.
84 { return current_type_ != "label" && current_type_ != "change"; }
87 { return current_type_ != "tableofcontents"; }
89 void setTreeDepth(int depth);
91 void outline(FuncCode func_code);
92 /// finds the inset that is connected to the current item,
93 /// if any, otherwise return null
94 Inset * itemInset() const;
96 QString current_type_;
98 /// depth of list shown
100 /// persistence of uncollapsed nodes in toc view
104 // next delay for outliner update in ms. -1 when already scheduled.
108 } // namespace frontend
111 #endif // TOC_WIDGET_H