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.
20 #include "insets/InsetCommandParams.h"
22 #include "TocBackend.h"
24 #include <QStandardItemModel>
34 class GuiToc : public DockView
41 GuiView & parent, ///< the main window where to dock.
42 Qt::DockWidgetArea area = Qt::LeftDockWidgetArea, ///< Position of the dock (and also drawer)
43 Qt::WindowFlags flags = 0);
48 bool initialiseParams(std::string const & data);
51 /// Test if outlining operation is possible
52 bool canOutline(int type) const;
54 QStandardItemModel * tocModel(int type);
56 QModelIndex currentIndex(int type) const;
58 void goTo(int type, QModelIndex const & index);
62 int getTocDepth(int type);
65 /// Signal that the internal toc_models_ has been reset.
72 std::vector<TocModel *> toc_models_;
74 void clearTocModels();
78 TocList const & tocs() const;
80 /// Return the list of types available
81 QStringList const & typeNames() const { return type_names_; }
83 /// Return the first TocItem before the cursor
84 TocIterator currentTocItem(int type) const;
86 /// Apply the selected outlining operation
97 /// Return the guiname from a given cmdName of the TOC param
98 docstring guiName(std::string const & type) const;
100 /// clean-up on hide.
101 void clearParams() {}
103 void dispatchParams();
105 bool isBufferDependent() const { return true; }
110 QStringList type_names_;
113 } // namespace frontend