/**
- * \file GuiTocDialog.C
+ * \file TocModel.cpp
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
#include "TocModel.h"
-#include "debug.h"
+#include "support/debug.h"
+#include <boost/assert.hpp>
#include <climits>
-#include <vector>
-#include <string>
-
-using std::endl;
-using std::pair;
-using std::map;
-using std::vector;
-using std::string;
-using std::make_pair;
-using std::max;
-using std::min;
+using namespace std;
namespace lyx {
namespace frontend {
toc_map_.insert( TocPair(top_level_item, iter) );
model_map_[iter] = top_level_item;
- LYXERR(Debug::GUI)
- << "Toc: at depth " << iter->depth()
- << ", added item " << to_utf8(iter->str())
- << endl;
+ LYXERR(Debug::GUI, "Toc: at depth " << iter->depth()
+ << ", added item " << to_utf8(iter->str()));
populate(iter, end, top_level_item);
}
-void TocModel::populate(TocIterator & iter,
- TocIterator const & end,
- QModelIndex const & parent)
+void TocModel::populate(TocIterator & iter, TocIterator const & end,
+ QModelIndex const & parent)
{
int curdepth = iter->depth() + 1;
}
-int TocModel::modelDepth()
+int TocModel::modelDepth() const
{
return maxdepth_ - mindepth_;
}