4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Kalle Dalheimer
9 * \author Angus Leeming
10 * \author Abdelrazak Younes
12 * Full author contact details are available in file CREDITS.
18 #include "ControlCommand.h"
19 #include "TocBackend.h"
22 #include <QStandardItemModel>
23 #include <QStringListModel>
32 class GuiToc : public QObject, public ControlCommand
41 bool initialiseParams(std::string const & data);
44 /// Test if outlining operation is possible
45 bool canOutline(int type) const;
47 QStandardItemModel * tocModel(int type);
49 QModelIndex currentIndex(int type) const;
51 void goTo(int type, QModelIndex const & index);
55 int getTocDepth(int type);
58 /// Signal that the internal toc_models_ has been reset.
62 friend class TocWidget;
64 std::vector<TocModel *> toc_models_;
67 TocList const & tocs() const;
69 /// Return the list of types available
70 std::vector<docstring> const & typeNames() const
71 { return type_names_; }
74 int selectedType() { return selected_type_; }
76 /// Return the first TocItem before the cursor
77 TocIterator currentTocItem(int type) const;
79 /// Apply the selected outlining operation
91 std::vector<std::string> types_;
92 std::vector<docstring> type_names_;
95 /// Return the guiname from a given cmdName of the TOC param
96 docstring guiName(std::string const & type) const;
99 } // namespace frontend