3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
7 * \author Abdelrazak Younes
8 * \author Angus Leeming
10 * Full author contact details are available in file CREDITS.
17 #include "TocWidget.h"
18 #include "qt_helpers.h"
21 #include "BufferView.h"
22 #include "BufferParams.h"
23 #include "FuncRequest.h"
25 #include "support/debug.h"
26 #include "support/gettext.h"
27 #include "support/lassert.h"
34 GuiToc::GuiToc(GuiView & parent, Qt::DockWidgetArea area, Qt::WindowFlags flags)
35 : DockView(parent, "toc", qt_("Outline"), area, flags),
36 widget_(new TocWidget(parent, this)),
40 setFocusProxy(widget_);
44 void GuiToc::updateView()
46 widget_->updateView();
50 bool GuiToc::initialiseParams(string const & sdata)
52 widget_->init(toqstr(sdata));
57 void GuiToc::dispatchParams()
62 void GuiToc::enableView(bool enable)
65 // In the opposite case, updateView() will be called anyway.
66 widget_->updateViewNow();
70 void GuiToc::closeEvent(QCloseEvent * /*event*/)
73 static_cast<GuiView *>(parent())->updateToolbars();
78 void GuiToc::doDispatch(Cursor & cur, FuncRequest const & cmd,
81 widget_->doDispatch(cur, cmd, dr);
85 bool GuiToc::getStatus(Cursor & cur, FuncRequest const & cmd,
86 FuncStatus & status) const
88 return widget_->getStatus(cur, cmd, status);
92 } // namespace frontend
95 #include "moc_GuiToc.cpp"