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>
27 typedef TocBackend::Toc::const_iterator TocIterator;
29 class TocModel: public QStandardItemModel {
36 TocModel(TocBackend::Toc const & toc);
40 TocModel const & operator=(TocBackend::Toc const & toc);
44 void populate(TocBackend::Toc const & toc);
46 TocIterator const tocIterator(QModelIndex const & index) const;
48 QModelIndex const modelIndex(TocIterator const & it) const;
52 void populate(TocIterator & it,
53 TocIterator const & end,
54 QModelIndex const & parent);
56 typedef std::map<QModelIndex, TocIterator> TocMap;
58 typedef std::map<TocIterator, QModelIndex> ModelMap;
65 } // namespace frontend