#include "FloatList.h"
#include "FuncRequest.h"
#include "gettext.h"
-
-#include "frontends/LyXView.h"
+#include "TextClass.h"
#include "support/convert.h"
namespace lyx {
namespace frontend {
-GuiToc::GuiToc(GuiViewBase & parent, Qt::DockWidgetArea area, Qt::WindowFlags flags)
+GuiToc::GuiToc(GuiView & parent, Qt::DockWidgetArea area, Qt::WindowFlags flags)
: DockView(parent, "toc", area, flags), params_(TOC_CODE)
{
widget_ = new TocWidget(*this);
return 0;
if (toc_models_.empty()) {
- LYXERR(Debug::GUI) << "GuiToc::tocModel(): no types available " << endl;
+ LYXERR(Debug::GUI, "GuiToc::tocModel(): no types available ");
return 0;
}
- LYXERR(Debug::GUI)
- << "GuiToc: type " << type
- << " toc_models_.size() " << toc_models_.size()
- << endl;
+ LYXERR(Debug::GUI, "GuiToc: type " << type
+ << " toc_models_.size() " << toc_models_.size());
BOOST_ASSERT(type >= 0 && type < int(toc_models_.size()));
return toc_models_[type];
{
if (type < 0 || !index.isValid()
|| index.model() != toc_models_[type]) {
- LYXERR(Debug::GUI)
- << "GuiToc::goTo(): QModelIndex is invalid!"
- << endl;
+ LYXERR(Debug::GUI, "GuiToc::goTo(): QModelIndex is invalid!");
return;
}
TocIterator const it = toc_models_[type]->tocIterator(index);
- LYXERR(Debug::GUI) << "GuiToc::goTo " << to_utf8(it->str()) << endl;
+ LYXERR(Debug::GUI, "GuiToc::goTo " << to_utf8(it->str()));
string const tmp = convert<string>(it->id());
lyxview().dispatch(FuncRequest(LFUN_PARAGRAPH_GOTO, tmp));
Dialog * createGuiToc(LyXView & lv)
{
- GuiViewBase & guiview = static_cast<GuiViewBase &>(lv);
+ GuiView & guiview = static_cast<GuiView &>(lv);
#ifdef Q_WS_MACX
// On Mac show as a drawer at the right
return new GuiToc(guiview, Qt::RightDockWidgetArea, Qt::Drawer);