4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Abdelrazak Younes
9 * Full author contact details are available in file CREDITS.
15 #include "TocBackend.h"
17 #include "qt_helpers.h"
19 #include <QStandardItemModel>
26 class TocModel : public QStandardItemModel
34 TocModel(Toc const & toc) { populate(toc); }
38 void populate(Toc const & toc);
40 TocIterator tocIterator(QModelIndex const & index) const;
42 QModelIndex modelIndex(TocIterator const & it) const;
44 int modelDepth() const;
48 void populate(TocIterator & it, TocIterator const & end,
49 QModelIndex const & parent);
51 typedef std::map<QModelIndex, TocIterator> TocMap;
53 typedef std::map<TocIterator, QModelIndex> ModelMap;
63 } // namespace frontend